* Fixed `render_list` build needs `libm`
* Added tests
* Updated man page
* Created function to set double
* Cleaned up / optimized a bit
* Removed `--dont-render` option
_Also_:
* Use `mapnik::freetype_engine::register_fonts` in `gen_tile.cpp` rather than recursing manually
* Available since `Mapnik` v2 which is no longer supported
* Add tests for `ModTileCacheExtendedHostName` and expired tileOld/TileVeryOld
* Add tests for `ModTileEnableTileThrottling`/`ModTileEnableTileThrottlingXForward`
And setting it to `0`, no longer requiring defining it everywhere except in foreground executables as needed.
_Also_:
* Require `GLib` >= `v2.50`
* Needed for [g_log_writer_standard_streams](https://docs.gtk.org/glib/func.log_writer_standard_streams.html)
* Set FreeBSD job `BUILD_PARALLEL_LEVEL` & `TEST_PARALLEL_LEVEL` environment variables via `run`
* Rather than hard-coding them
* `includes/config.h.in`
* Wrap contents in `#ifndef CONFIG_H`
* `includes/mod_tile.h`
* Include `protocol.h`
* For `XMLCONFIG_MAX`
* Include `apr_tables.h`
* For `apr_array_header_t`/`apr_time_t`/`apr_uint64_t`
* Include `netinet/in.h`
* For `in6_addr`/`in_addr_t`
* `src/cache_expire.c`
* Include `netinet/in.h`
* For `htonl`/`htons`
* `src/gen_tile.cpp`
* Use `snprintf` instead of `sprintf`
* To resolve `warning: 'sprintf' is deprecated` in [`macOS` builds](https://github.com/openstreetmap/mod_tile/actions/runs/7590268635/job/20677236621#step:5:579)
* `src/gen_tile_test.cpp`
* Use `snprintf` instead of `sprintf`
* To resolve `warning: 'sprintf' is deprecated` in [`macOS` builds](https://github.com/openstreetmap/mod_tile/actions/runs/7590268635/job/20677236621#step:5:579)
* `src/mod_tile.c`
* Use `snprintf` instead of `sprintf`
* To resolve `warning: 'sprintf' is deprecated` in [`macOS` builds](https://github.com/openstreetmap/mod_tile/actions/runs/7590268635/job/20677236621#step:5:579)
* Cast `os_thread` to `(unsigned long)` in `ap_log_rerror` calls format
* To resolve `warning: format specifies type 'long' but the argument has type 'apr_os_thread_t'`
* `os_thread` is an alias of `unsigned long`
* Use `"%" APR_OFF_T_FMT`/`APR_UINT64_T_FMT "..."` to resolve warnings under `macOS`
* To resolve `warning: format specifies type 'long' but the argument has type 'off_t'`
* The format/type for `apr_off_t` varies under `macOS`
* See [here](8e68a77f61/include/apr.h.in (L610-L645))
* And resolve `warning: format specifies type 'long' but the argument has type 'apr_uint64_t'`
* The format/type for `apr_uint64_t` varies under `macOS`
* See [here](8e68a77f61/include/apr.h.in (L610-L645))
* Divide by `2.0` rather than `2`
* To resolve `possible loss of precision` warning
* Use `%li` rather than `"%" APR_TIME_T_FMT` as format for `maxAge`
* It is defined as a `long int`
* `src/render_submit_queue.c`
* Include `string.h`/`strings.h`
* To resolve `warning: call to undeclared library function 'bzero'`
* To resolve `warning: call to undeclared library function 'strncpy'`
* To resolve `warning: call to undeclared library function 'strdup'`
* To resolve `warning: call to undeclared library function 'strerror'`
* To resolve `warning: call to undeclared library function 'strchr'`
* To resolve `warning: call to undeclared library function 'strlen'`
* To resolve `warning: call to undeclared library function 'memset'`
* Cast `performance_stats.stat[i].noRendered` to `(float)`
* To resolve `possible loss of precision` warning
* `src/renderd.c`
* Use `snprintf` instead of `sprintf`
* To resolve `warning: 'sprintf' is deprecated` in [`macOS` builds](https://github.com/openstreetmap/mod_tile/actions/runs/7590268635/job/20677236621#step:5:579)
* Change `const char` to `char` for `ini_fileExtension`, `ini_mimeType`, `ini_outputFormat`
* To resolve `warning: format specifies type 'char *' but the argument has type 'const char *'`
* `src/request_queue.c`
* Add `default case` to `switch` statements
* To resolve:
* `warning: enumeration values 'queueRender' and 'queueDuplicate' not handled in switch`
* `warning: enumeration values 'cmdIgnore', 'cmdDone', and 'cmdNotDone' not handled in switch`
* `src/store_file.c`
* Cast `pthread_self()` to `(unsigned long)`
* To resolve `warning: format specifies type 'unsigned long' but the argument has type 'pthread_t'`
* No longer need `CFLAGS=-Wno-implicit-function-declaration`
`renderd` coverage is otherwise not properly reported
_Also:_
- Removed `freebsd12` from CI
- Packages are no longer provided (http://pkg.freebsd.org/)
- Added test for `HTCP host name` specification
- Renamed files in `src`/`includes` to match target names
- `src/daemon.c` → `src/renderd.c`
- `src/speedtest.cpp` →`src/render_speedtest.cpp`
- `includes/daemon.h` → `includes/renderd.h`
The value for `DEFAULT_ATTRIBUTION` in `includes/mod_tile.h` needed to be escaped, it was causing a JSON parsing failure.
* Added basic test for `/.../.../tile-layer.json` to ensure parsing is successful
* Added basic tests for `/metrics` & `/mod_tile` URLs
* Allow the …/status URL to be turned on or off (default of on remains)
Add ModTileEnableStatusURL On/Off to allow the …/status to be turned on
(default) or off. Previous behaviour has …/status on, which is not
changed in this patch.
* Allow the …/dirty URL to be turned on or off (default of on remains)
Add ModTileEnableDirtyURL On/Off to allow the …/dirty to be turned on
(default) or off. Previous behaviour has …/dirty on, which is not
changed in this patch.
* Make …/dirty & …/status disabled by default.
This is a breaking change. To get the old default behaviour back, you
must now manually add `ModTileEnableStatusURL On` &
`ModTileEnableDirtyURL On` to your apache configuration.
* Change default for ModTileEnable Dirty/Status URL to On
* Add log output for when `/dirty`/`/status` is Off
* Add tests for "ModTileEnable{Dirty|Status}URL Off"
---------
Co-authored-by: Amanda McCann <amanda@technomancy.org>
* Added the possibility to provide ImageIO's output format in the TYPE string.
For instance:
TYPE=png image/png
TYPE=png image/png png256
TYPE=png image/png png24
TYPE=png image/png png
* Removed useless comments.
Added documentation for output format.
* Added tests for 'webp' output format
* Also added tests for 'png32' output format
* Fix 'webp' sums vary based on version
* Add JPG & use multiple layers on example-map
---------
Co-authored-by: Tim <autintim@gmail.com>
* Using [`GLib Logging Framework`](https://developer.gnome.org/programming-guidelines/stable/logging.html.en) for logging
* Created new `g_logger` function for logging
* Outputs to `stdout`/`stderr` only when running in `foreground`
* `stderr` for `message`, `warning`, `critical` & `error` levels
* `stdout` for `debug` & `info` levels
* Use `G_MESSAGES_DEBUG=all` environment to enable `debug` to print
* Otherwise, output will be to `syslog` or `systemd journal` (when appropriate)
* Standardized usage of `{LOG_PRIORITY}: ` prefix in log messages
* Only when using `syslog`, otherwise `GLib Logging` will take care of it
* Changed `fprintf(stderr`, `printf` & `perror` calls to `g_logger` calls
* You might want to check them out closely to make sure I chose the right levels
* No changes to `logging/output` were made to "`foreground`" programs (I.E. `render_*`)
* Changed `0`,`1` to `no_argument`,`required_argument` in `getopt_long`'s `long_options`
* Fixed `renderd`'s `foreground` opt (should be `no_argument` [0] rather than `reguired_argument` [1])
* Basic test for `mod_tile` module
* ~~Extended `renderd` log priority onto Mapnik's logger~~
sets the new MaxLoadMissing to 50 and MaxLoadOld to 16.
With the prevalence of multi core servers today, the previous
default thresholds of 10 and 5 were becoming to lower than the average
CPU count. Furthermore, load is not an ideal measure, as it includes I/O
load and much of the I/O load might well come from serving rather than
rendering. Especially if the database is on a separate SSD. Lastly, using
the thresholds in mod_tile isn't super helpful, as due to hysteresis of
rendering queues stop submitting tiles at a time of high load is not
particularly helpful without stopping rendering from the queue.
In addition to Render and RenderPrio, add another priority level of RenderLow.
The idea is that if you rerender all tiles by touching planet-import-complete and
thereby likely overloading the server's rendering capacity you want to prioritize rerendering
of tiles that were explicitly marked dirty due to data changes over rerendering
due to planet-import-complete updates.
This is achieved by splitting rendering requests by if they are "old", or "very old".
As the tile expiry sets back the modification date many years, mod_tile splits
rendering requests based on how old the tiles are. If they are no more than a
certain threshold (currently set to one year) old, they are rendered with lower priority.