Ticket #156 (closed defect: fixed)
Reprojection forced where not needed
| Reported by: | damiano | Owned by: | artem |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.6.0 |
| Component: | Core Library | Version: | 0.5.1 |
| Severity: | Normal | Keywords: | projection, renderer |
| Cc: | rcoup | Patch Needs Improvement: | no |
| Needs Docmentation: | no | Has Patch?: | no |
| Design Decision Needed: | yes |
Description
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.
