[GIS] Generate tiles with EPSG:4326 projection using Mapnik

mapnikopenlayers-2postgis

I'm trying to generate tiles from a PostgreSQL database that contain OpenStreetMap (OSM) data in EPSG 4326. I used the scripts generate_xml.py and generate_tyles.py provided by mapnik-stylesheets.

The final result is not correct, the overlapping of the layers is wrong.
The client code is JavaScript and uses the OpenLayers library.

var danube = new OpenLayers.Layer.XYZ(
 "OSM",
 "http://localhost/osm/${z}/${x}/${y}.png",
 {sphericalMercator: false,
   numZoomLevels:11,
   buffer: 0,
   isBaseLayer: true,
   projection:"EPSG:4326"
);

I think that the client code is correct but the generation tiles with Mapnik is not correct. Indeed, the tiles generated have an overlaps and are not shown correctly.

Best Answer

The generate_tiles.py script only works for mercator. For a more flexible tiling system that supports Mapnik and any projection see MapProxy and for extra details see the mapnik-users thread on this type of setup: https://groups.google.com/forum/#!msg/mapnik/YBqjwv4YU0w/TVD0KqYxeG4J

Related Question