mod_tile
mod_tile copied to clipboard
Map parameterization should be reverted
/cc @jburgess777
Looking into ttps://github.com/mapnik/mapnik/issues/2965, I wondered if renderd was doing anything unsafe.
I noticed that https://github.com/openstreetmap/mod_tile/commit/c4aabc570103e72876e9889a20396e719f52bca4 added mutation of map objects per render. While this might work I think it should be reverted for at least these reasons:
- A copy of the
mapnik.Mapis made every time a tile is rendered even if noparameterize_functionis set. This is potentially very expensive. - I think parameterization would be much better done in XML before loading the map. Ideally maps should not be modified after being loaded.
- If per render changes to styling truly need to be made, then a much better design would be to leverage Mapnik 3.x variables: https://github.com/mapnik/mapnik/issues/2553
If per render changes to styling truly need to be made
For multi-lingual maps, I think they're needed
then a much better design would be to leverage Mapnik 3.x variables: mapnik/mapnik#2553
The ticket is still open - has all the code landed in Mapnik 3.0.0, or is it planned for 3.1?
The ticket is still open - has all the code landed in Mapnik 3.0.0, or is it planned for 3.1?
@pnorman Yes the code has landed. The ticket is open still as a reminder to write more visual and unit tests for it to root out any bugs. But its ready to use for those interested.