maptiler/tileserver-php

WMTS topLeftCorner axis orientation

daliborjanak opened this issue · 2 comments

TopLeftCorner in tileMatrixSet defines two coordinates (x, y). In some coordinate systems like 4326 which has different axe orientation are the coordinates switched (y, x).
See:
http://gis.stackexchange.com/questions/120325/what-is-proper-succession-of-coordinates-while-specifying-topleftcorner-in-tilem

OL3 implementation:
https://github.com/openlayers/ol3/blob/master/src/ol/tilegrid/wmtstilegrid.js#L101

Proj4 4.8+ implementation:
https://trac.osgeo.org/proj/wiki/GenParms#Axisorientation

(updated) Implementation details discussed in MapTiler repo.

MapTiler will add into metadata the flag: axis:'xy' or axis:'yx' and WMTS implementation inside of TileServer-PHP will respect it directly when constructing TopLeftCorner in GetCapabilities.

Finally we have removed axies parameter. The order of coords is based on type of system (geographic or projected). Tileserver is parsing it now from proj4 string if is provided. Implemented. Tested