1

In MapProxy Demo TMS page, EPSG:4326 looks fine, except the map is tilted and I don't want that. Tried to make EPSG:900913 work, However, no matter what I try. the map is too small, at zoom level 18 I can not see street, the whole city remains a little dot on screen for all zoom levels. Or sometime I got nothing.

Background:

  • Street data stored in Spatialite in Lat Lng format, and all geometry has srid 4269
  • Uses MapProxy 1.5 and Mapnik 2.2.0
  • tried to append 900913 to mapnik\share\proj\epsg file (seems mapnik don't support 900913 natively). randomly give value such as
    • <900913> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs <>
    • <900913> +proj=longlat +datum=WGS84 +no_defs <>
  • randomly change all srs string in mapnik xml config to srs strings above
  • Map looks fine in TileMap with SRS "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs", map looks small and tilted with SRS "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over"
  • I thought Lat Lng data is absolute format, any projection should works fine with my data.
  • Clear Cache and restart server every time.

1 Answer 1

2

Ok, I figured it out myself.

The XML mapnik config file has at least two SRS, one on Map element, one on Layer element. It is normal that hey are DIFFERENT! I thought the layer one is redundant and delete it at first place, turns out it is required. Any addition answer for explaining why there are two different SRS could be helpful.

1
  • 2
    You need the latlong SRS for bounding boxes of rendering requests, while the 900913 SRS is used for output in pixel coordinates.
    – AndreJ
    Commented Aug 2, 2013 at 14:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.