mapnik-org/mapnik — Issue #154: Reprojection forced where not needed
Author: artemp
Created: 2011-10-11 07:38:51+00:00
State: open
Labels: Core_Library

In a mapfile having a non standard projection, even if the map element and all the layer elements have the same srs, Mapnik reproject the map, increasing the rendering time.

HOW TO REPEAT:

Take a shapefile (a not so small one, about 200 MB would be good) with the default srs '+proj=latlong +datum=WGS84'. Run nik2img producing an image and check the total time needed to render.

Now project the same shapefile (for example, using ogr2ogr) and change the srs in the map and layers accordingly. Repeat the nik2img processing and you'll notice that the time is noticeably increased.

PROPOSED SOLUTIONS:

- Bypass the projection when the map and layer srs elements are the same (skipping it totally)

or

- Let mapnik know about the unit of the map and query the map accordingly.