On 06.07.2015 21:15, Wiktor Niesiobedzki wrote:
2015-07-06 10:54 GMT+02:00 Paul Hartmann <[email protected]>:
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.
I don't get this from the above quote, but it may well be true.
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"]]
No axes info in these WKT strings, so basically the same as in the epsg
file...
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.
You can download the EPSG file and sort of automate this:
$ echo 'select COORD_SYS_CODE from "Coordinate Reference System" where
COORD_REF_SYS_CODE=2180' | mdb-sql -pHF EPSG_v8_7.mdb
> 4531
$ echo 'select COORD_SYS_TYPE,COORD_SYS_NAME from "Coordinate System"
where COORD_SYS_CODE=4531' | mdb-sql -pHF EPSG_v8_7.mdb
> Cartesian Cartesian 2D CS. Axes: northing, easting (x,y).
Orientations: north, east. UoM: m.
Best, Paul
_______________________________________________
josm-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/josm-dev