Thanks very much for that. I am quite happy with a fixed axis order in returns 
but my problem was trying to find out what axis order to use when assembling a 
polygon cql filter in the client where the client cannot control what EPSG are 
in use. I didn't realize the axis order could be part of the definition. I see 
from that registry that one of the other EPSG code that tend to use is also 
east, north. I see that I am going to have to write code to query and assemble 
based on whatever the native projection is in Geoserver. Very good to know!

From: Rahkonen Jukka (MML) [mailto:jukka.rahko...@maanmittauslaitos.fi]
Sent: Thursday, 28 June 2018 18:29
To: Phil Scadden <p.scad...@gns.cri.nz>; GeoServer Mailing List List 
<geoserver-users@lists.sourceforge.net>
Subject: Re: Baffling different behaviour with respect to axis-order between 
EPSG:3031 and EPSG:2193 (and geometry in CQL Filter)

Hi,

The axis order of EPSG:3031 seems to be officially easting-northing
http://epsg-registry.org/export.htm?wkt=urn:ogc:def:crs:EPSG::3031
while EPSG:2193 is using northing-easting order
http://epsg-registry.org/export.htm?wkt=urn:ogc:def:crs:EPSG::2193

In valid GeoJSON the coordinates are always in easting-northing or 
longitude-latitude order. Use GML3 if you want to study the axis order in the 
response. And WFS 1.0.0 is not axis-aware but it behaves like GeoJSON.

-Jukka Rahkonen-


Lähettäjä: Phil Scadden [mailto:p.scad...@gns.cri.nz]
Lähetetty: 28. kesäkuuta 2018 7:53
Vastaanottaja: GeoServer Mailing List List 
<geoserver-users@lists.sourceforge.net<mailto:geoserver-users@lists.sourceforge.net>>
Aihe: [Geoserver-users] Baffling different behaviour with respect to axis-order 
between EPSG:3031 and EPSG:2193 (and geometry in CQL Filter)

Short statement. 1.1.0 queries against 3031 need long/lat. Same kind against 
2193 need lat/long (as per documentation).

Anything special about polar projections?

Long statement:
This is a working query against an EPSG:2193 layer:
url: http://maps.gns.cri.nz/geoserverlatest/gns/wfs
cql_filter: INTERSECTS(the_geom, POLYGON((5746568.950286176 1694143.7308257942, 
5750237.927643864 1694143.730825794, 5750237.927643863 1690474.7534681011, 
5746568.950286174 1690474.7534681007, 5746568.950286176 1694143.7308257942)))
maxFeatures: 1000
outputFormat: application/json
propertyName: 
facies,lithology_,lithology1,Comments,Primary_so,Secondary_,Source_qua,the_geom
request: GetFeature
service: wfs
srsName: EPSG:2193
typeNames: NWP_Lithofacies_4_Ma__lWo_
version: 1.1.0

Not obvious unless you know the coordinate system, but the axis order for the 
polygon is lat/long which seems correct for WFS version of 1.1.0.
Geometries returned are in long/lat order.

However, this is a working query against ESPG:3031
url: http://maps.gns.cri.nz/geoserverlatest/wfs
cql_filter: INTERSECTS(the_geom, POLYGON((438268.2059849124 
-1301158.8151743845, 438268.2059849127 -1298360.2509553954, 435469.6417659225 
-1298360.2509553959, 435469.6417659226 -1301158.8151743864, 438268.2059849124 
-1301158.8151743845)))
maxFeatures: 1000
outputFormat: application/json
propertyName: 
ABSMAX_MA,MAPSYMBOL,PLOTSYMBOL,NAME,DESCR,SIMPLENAME,MBREQUIV,FMNEQUIV,SBGRPEQUIV,GRPEQUIV,SPGRPEQUIV,TERREQUIV,STRATRANK,TYPENAME,TYPE_URI,GEOLHIST,REPAGE_URI,YNGAGE_URI,OLDAGE_URI,STRATAGE,ABSMIN_MA,LITHOLOGY,REPLITH_UR,REGLITH,REGLITH_UR,ROCKGROUP,ROCKCLASS,OBSMETHOD,CONFIDENCE,POSACC_M,SOURCE,SOURCECODE,METADATA,RESSCALE,CAPTSCALE,CAPTDATE,MODDATE,PLOTRANK,FEATUREID,SPEC_URI,SYMBOL,the_geom
request: GetFeature
service: wfs
srsName: EPSG:3031
typeNames: gns:ATA_geological00_units_West
version: 1.1.0

The polygon coordinates are in long/lat , not lat/long! Furthermore, if you 
change version 1.0.0 it still works whereas the 2193 query above does not.
Returned geometries are in long/lat as above.

Both layers are on the same 2.11.0 geoserver.

Can anyone shed any light on what is going on? It certainly make client-side 
code challenging.
Notice: This email and any attachments are confidential and may not be used, 
published or redistributed without the prior written consent of the Institute 
of Geological and Nuclear Sciences Limited (GNS Science). If received in error 
please destroy and immediately notify GNS Science. Do not copy or disclose the 
contents.
Notice: This email and any attachments are confidential and may not be used, 
published or redistributed without the prior written consent of the Institute 
of Geological and Nuclear Sciences Limited (GNS Science). If received in error 
please destroy and immediately notify GNS Science. Do not copy or disclose the 
contents.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to