mod_tile icon indicating copy to clipboard operation
mod_tile copied to clipboard

Map parameterization should be reverted

Open springmeyer opened this issue 10 years ago • 2 comments
trafficstars

/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.Map is made every time a tile is rendered even if no parameterize_function is 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

springmeyer avatar Jul 15 '15 17:07 springmeyer

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?

pnorman avatar Jul 15 '15 19:07 pnorman

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.

springmeyer avatar Aug 14 '15 18:08 springmeyer