control how many maps are created in the mapnik pool.
I've carried over Math.ceil(require('os').cpus().length * 16) from some tilelive module, but I think somewhere else it gets limited to 16 anyway (don't remember where I saw that).
Caution(!): This adds a little raster at null-island so be sure to always include --bounds when using that otherwise the map extent will be pretty big and slow down things considerably.
2.
The mapnik.xml has to have style in its name to set the file extension of the resulting tiles correctly:
@mapsam (/cc @springmeyer ) you might want to look at (and maybe carry over) same additions I did in https://github.com/BergWerkGIS/investigate-gpx
---concurrency
control how many maps are created in the mapnik pool. I've carried over
Math.ceil(require('os').cpus().length * 16)
from sometilelive
module, but I think somewhere else it gets limited to16
anyway (don't remember where I saw that).https://github.com/BergWerkGIS/investigate-gpx/blob/9e86ced0559e88195857417a66609552837d1125/bench.js#L23
https://github.com/BergWerkGIS/investigate-gpx/blob/9e86ced0559e88195857417a66609552837d1125/bench.js#L150
--show-progress
more verbose output than
--verbose
. e.g. shows tiles/sec not only at the end, but also in betweenhttps://github.com/BergWerkGIS/investigate-gpx/blob/9e86ced0559e88195857417a66609552837d1125/bench.js#L24
https://github.com/BergWerkGIS/investigate-gpx/blob/9e86ced0559e88195857417a66609552837d1125/bench.js#L35
https://github.com/BergWerkGIS/investigate-gpx/blob/9e86ced0559e88195857417a66609552837d1125/bench.js#L130-L137
https://github.com/BergWerkGIS/investigate-gpx/blob/9e86ced0559e88195857417a66609552837d1125/bench.js#L153-L161
workarounds to generate
webp
tiles1.
If your are working with vector sources the trick is to include a raster into the
mapnik.xml
: https://github.com/BergWerkGIS/investigate-gpx/blob/9e86ced0559e88195857417a66609552837d1125/style.xml.template#L28-L39Caution(!): This adds a little raster at
null-island
so be sure to always include--bounds
when using that otherwise the map extent will be pretty big and slow down things considerably.2.
The
mapnik.xml
has to havestyle
in its name to set the file extension of the resulting tiles correctly:https://github.com/BergWerkGIS/investigate-gpx/blob/9e86ced0559e88195857417a66609552837d1125/bench.js#L88
This is just for getting the correct file extension. No matter what extension you pass here
the output format of the tiles is always determined by tilelive-brigde automatically depending what types of layers are found in the map. Hence (workaround
#1
).slippy map for viewing generated tiles
run the bench, then
node show-tiles-server.js
, then http://localhost:666https://github.com/BergWerkGIS/investigate-gpx/blob/9e86ced0559e88195857417a66609552837d1125/show-tiles-server.js
https://github.com/BergWerkGIS/investigate-gpx/blob/9e86ced0559e88195857417a66609552837d1125/show-tiles.html
https://github.com/BergWerkGIS/investigate-gpx/tree/9e86ced0559e88195857417a66609552837d1125/leaflet
It's working for
webp
tiles. Not so much forpbf
files. I somehow have troubles extracting them. Maybe that's an exercise left to the reader :smirk: https://github.com/BergWerkGIS/investigate-gpx/blob/9e86ced0559e88195857417a66609552837d1125/show-tiles-server.js#L59-L95