[OpenLayers-Users] Coordinates Reversed

Tom Kunicki tkunicki at usgs.gov
Tue Mar 12 02:04:10 PDT 2013


Jerome,

Here are the details you're concerned with using GeoServer 2.2.x, WFS and GML:  

http://docs.geoserver.org/stable/en/user/services/wfs/basics.html

As I mentioned earlier, it's going to be very hard to give absolute guidelines on how to handle this across all use cases other than "be aware and prepare to adjust".  This is really a problem for interoperability w/o need for human checks and intervention.

I am thankful that I work with geospatial data (US) where it's very obvious when coordinate order is incorrect...

Tom


On Mar 11, 2013, at 7:52 PM, Jerome A. Wendell <jawendell at digitalmapping.com> wrote:

> Tom,
> 
> Thanks for your reply.  I am using WFS 1.1.0 and and GML 2.  I am using
> OpenLayers 2.12, and on the server I am using GeoServer 2.2.4.  The WMS
> layer that I am accessing is in shapefile format, and is in EPSG:4326.  The
> data, server, etc. are all ours.  The original question that I had was when
> the WMS layer is accessed using a select control, the features are returned
> in GML format with the longitude first, and then the latitude.  When the
> same layer is accessed using a filter to select only features with a
> specific attribute value, the features are returned in GML format with the
> latitude first, and then the longitude.  I am fairly new to OpenLayers and
> GeoServer, so I presumed that I must be doing something wrong for the
> coordinates of the same feature to be returned in reverse order.  I will try
> using WFS 1.0 and see what happens.
> 
> I appreciate the information.
> 
> Thanks.
> 
> -----Original Message-----
> From: openlayers-users-bounces at lists.osgeo.org
> [mailto:openlayers-users-bounces at lists.osgeo.org] On Behalf Of Tom Kunicki
> Sent: Monday, March 11, 2013 5:14 PM
> To: undisclosed-recipients:
> Cc: OpenLayers User List
> Subject: Re: [OpenLayers-Users] Coordinates Reversed
> 
> 
> To help it would be useful to know the WFS version and server-side vendor
> and implementation you are attempting to utilize.
> 
> The easiest thing would be to use WFS 1.0 with GML2.  You'll (usually) get
> back geographic coordinates in [lon, lat] 
> 
> The longer gist-of-it-but-skipping-details explanation:
> 
> There's some ambiguity as to what the axis ordering should be.
> Computer-folk tend to prefer [x, y] or [lon, lat] and this was how the
> computer-folk implemented these services for a long time.  The reality is
> that the authorities that define the coordinate systems (i.e. the "EPSG" in
> "EPSG:4326")  define the proper axis order for coordinates.  As an example
> for EPSG:4326 the authority defined axis order is [lat, lon] == [y, x] ==
> [north, east].  The purists brought up this discrepancy and in 2009 the OGC
> put forth this guidance note:  http://www.ogcnetwork.net/node/491.  What
> this says that any specification generated after 2009 (and implementations
> of those specifications) must respect the authority defined axis order (i.e.
> [lat, long] not [lon, lat]).  Now this is all muddled because vendors have
> put forth varying degrees of compliance in the implementations of these
> newer services.  There a number of nuances to all of this and it's usually
> easier (if possible) to use servi  ces that pre-date the 2009 upheaval
> (where everything was in the incorrect, but consistent axis order).
> 
> Tom
> 
> 
> 



More information about the Users mailing list