[josm-dev] WMTS scales - proper definition of 1m along meridian

Wiktor Niesiobedzki osm at vink.pl
Mon Jul 6 19:15:46 UTC 2015


2015-07-06 10:54 GMT+02:00 Paul Hartmann <phaaurlt at gmail.com>:
> This is the same for WMS version 1.3 and later.
>
> As JOSM supports both WMS 1.1 and WMS 1.3, this means our implementation of
> WMS 1.3 is as incomplete / broken as WMTS in this regard.
>
> I just assumed that EPSG:4326 is the only relevant case where the axes are
> switched. (You can use the code "CRS:84" to get the same "projection", but
> with longitude first and latitude second.)
>
> Apparently I was wrong and EPSG:2180 is at least one more exception.
>

Indeed, WMS 1.3 will also need this information. I'll implement fix
for this together with WMTS.

>
>
> Strange... It would be interesting to see how other projects are handling
> this, e.g. QGIS and GDAL.

This is good hint. I've checked QGIS, but it actually uses GDAL
definitions. And GDAL has following information:

""""
AXIS
The name of the axis is for human consumption. The enumerated value
that follows is to allow software to correctly overlay different
coordinate systems. If the optional AXIS terms are not present, then
the default values are assumed. They are:
Geographic Coordinate System(GEOGCS) - AXIS["Lon",EAST],AXIS["Lat",NORTH]
Projected Coordinate System(PROJCS) - AXIS["X",EAST],AXIS["Y",NORTH]
""""
(http://www.geoapi.org/3.0/javadoc/org/opengis/referencing/doc-files/WKT.html)


So all GCS-es are North, East and need switch. When I check WKT for
4326 and 2180 I see:
PROJCS["ETRS89 / Poland
CS92",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS
1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",19],PARAMETER["scale_factor",0.9993],PARAMETER["false_easting",500000],PARAMETER["false_northing",-5300000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","2180"]]

GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS
84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]

So it looks like, for EPGS:4326 this default works, but not for 2180.
Strange. I didn't have had occasion to test, if it works properly in
QGIS in WMTS or WMS 1.3.0.

So I guess I'll have to go trough epsg registry for all our
projections and add +axis= parameter. I do not see any way, to induce,
whether we are working with PROJCS or GEOGCS.

Cheers,

Wiktor



More information about the josm-dev mailing list