systemapic / pile

PostGIS tile server
0 stars 2 forks source link

Sort out the difference between map and layer SRS in mapnik config #35

Closed strk closed 8 years ago

strk commented 8 years ago

I found that map and layer are using different SRS specification, for webmercator:

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"
srs="+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 +over"

The difference seems to be only formal (y_0 being 0 or 0.0) but it affects engaging or not in a reprojection, which in turn triggers the visible tile issue reported in #31

strk commented 8 years ago

mercator.proj4 evaluates to the +y_0=0 flavor, but then when the map object is rendered to XML the map srs element becomes +y_0=0.0 while the layer srs element remains +y_0=0

strk commented 8 years ago

As rendering a map js object to its XML is done by carto, I noticed pile uses two distinct versions:

├─┬ carto@0.14.1
│ ├─┬ carto@0.9.5-cdb2

The 0.14.1 is used directly while 0.9.5-cdb2 is used by grainstore (does pile really uses grainstore?)

strk commented 8 years ago

Found 0.0 hardcoded in src/pile.js line 1118, under options