[TinyOWS-dev] GeoJSON output should include srs at FeatureCollection level

Even Rouault even.rouault at mines-paris.org
Sat May 14 10:33:06 EST 2011


Le samedi 14 mai 2011 16:55:03, Olivier Courtin a écrit :
> On May 14, 2011, at 4:11 PM, Even Rouault wrote:
> 
> Hi Even,
> 
> > Yes the OGR GeoJSON driver is now happy. Thanks Olivier for the
> > prompt action.
> 
> Great !
> 
> > But now I have a more open observation. When trying with the 'world'
> > layer of
> > the demo data, so in geographic WGS84 SRS, I notice that the
> > coordinate order
> > is lon,lat in WFS 1.1.0, and the SRS advertized is however
> > urn:ogc:def:crs:EPSG::4326.
> > 
> > 
> > In my understanding, the json output should follow
> > EPSG axis order...
> 
> Not that clear for me.
> 
> I just read back this thread, but did'nt find any clue that they
> choose axis order
> at the end of the flame:
> <http://lists.geojson.org/htdig.cgi/geojson-geojson.org/2008-March/000358.h
> tml

Yes that discussion is confusing and its conclusion unclear...

My understanding of the whole axis order stuff (independantly from the 
discussion on the geojson list) was that :

* EPSG:xxxx is ambiguous. The implied axis order might be dependant on 
context, applications, etc etc... This is recognized by the following sentence 
in the geojson spec : "OGC CRS URNs such as "urn:ogc:def:crs:OGC:1.3:CRS84" 
shall be preferred over legacy identifiers such as "EPSG:4326"
* but urn:ogc:def:crs:EPSG::xxxx should follow the order as advertized by EPSG

So :
* urn:ogc:def:crs:OGC:1.3:CRS84 --> long,lat order
* urn:ogc:def:crs:EPSG::4326 --> lat,long order

But the sentence in the geojson spec "CRS shall not change coordinate 
ordering" linking to "A position is represented by an array of numbers. There 
must be at least two elements, and may be more. The order of elements must 
follow x, y, z order (easting, northing, altitude for coordinates in a 
projected coordinate reference system, or longitude, latitude, altitude for 
coordinates in a geographic coordinate reference system)" seem to indeed go 
against my above reasoning...

Well, in doubt, I guess it is better to leave the code as it is.

> 
> 
> Any other sources ?
> 
> --
> Olivier
> _______________________________________________
> TinyOWS-dev mailing list
> TinyOWS-dev at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/tinyows-dev


More information about the TinyOWS-dev mailing list