[wfs-dev] RE: Axis Ordering in GML
Simon Cox
Simon.Cox at csiro.au
Fri May 20 07:29:03 EST 2005
The spec always allowed srsName attribute on either the Geometry (Point) or
position value (coordinates, pos).
It may not show in all the examples - sorry.
In GML 3 we were more careful to specify that the CRS of the boundedBy
element on the parent feature is inherited by all geometries inside (unless
locally overridden).
However, this is strictly *not* a GML issue. All GML essentially says is
"the coordinates are structured acording to the definition of the coordinate
reference system indicated" then it sup to the users to do what they say.
This may seem a rather stubborn and unhelpful stance, but in the course of
the debate it has been illustrated many times that the CRS conventions are
real and should be respected.
Furthermore, in differnent jurisdictions and applications, all kinds of
permutations do occur in practice - lat-lon, easting-northing,
southing-westing, localNorth-localEast, parallel-perpendicular (to some
reference curve), row-column, etc, etc etc, to the extent that it is
genuinely impossible to simply pick one convention and expect it to apply
everywhere.
(not withstanding all those "light" geolocation apps that are rattling
around on the web where they just say "lat-lon" - in Australia the
jurisdictions were legally required to change datum from WGS84 to GDA94 by
2000. this has a huge practical impact - most locations shiftedaround 200m
across australia, which would be a problem if you were trying to make a
couple of tunnels join, or even try to find a Pizza shop.)
Going into 3-D it gets still worse - which direction is positive? up or
down? Often it depends on if you are a miner or a pilot!!
The only safe thing to do is say "this is the coordinate systems used" and
then be careful about using it according to the definition provided,
including the order of axes.
Ideally the reference to a CRS is supported by a machine-readable
description, so that the consuming software really can make sense of it.
That is the motivation for a CRS schema actually being bundled in GML - it
really is critical to the coherence of the whole thing.
Now Martin is right - there is widespread disrespect and error in
deployments.
And this discussion is something of a permathread, though it has been more
than a year now since it last flared I think.
The misuse and abuse should be countered by polite but firm education.
Two Eisntein quotes -
"For every complex problem there is a simple solution, which is wrong".
"Make everything as simple as possible, but no simpler"
Simon
----- Original Message -----
From: "Jeff Fitzgerald" <jeff.fitzgerald at caris.com>
To: <wfs-dev at opengeospatial.org>
Sent: Friday, May 20, 2005 7:56 PM
Subject: Re: [wfs-dev] RE: Axis Ordering in GML
> Going back to the spec (2.1.x anyway), the gml:coord and gml:coordinates
> elements don't have any knowledge of a coordinate system, since they don't
> have an srsName attribute. In the spec, they show an example of a
> gml:coord
> element and its equivalent gml:coordinates element. The example implies
> the
> order should be (x,y) or in the case of EPSG:4326 (lon, lat).
>
> <Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
> <coord><X>5.0</X><Y>40.0</Y></coord>
> </Point>
>
> This would allow the Point example provided above to be encoded as:
>
> <Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
> <coordinates>5.0,40.0</coordinates>
> </Point>
>
>
>
> ----- Original Message -----
> From: "Martin Daly" <Martin.Daly at cadcorp.com>
> To: <wfs-dev at opengeospatial.org>
> Cc: "PostGIS Development Discussion"
> <postgis-devel at postgis.refractions.net>; <sfsql.rwg at opengeospatial.org>
> Sent: Friday, May 20, 2005 4:18 AM
> Subject: [wfs-dev] RE: Axis Ordering in GML
>
>
>> > Question for the group. Is the GML below legal?
>> >
>> > <gml:Point
>> > srsName="EPSG:4326"><gml:coordinates>-172.335,18.53916667</gml
>> > :coordinates></gml:Point>
>> >
>> > I have built a GML point that references EPSG:4326 but has
>> > the easting
>> > before the northing.
>>
>> Oh no, not again. Do you *any* idea what you have just started?
>>
>> > If I check your WFS 1.0 servers, will I find them returning GML in
>> > easting/northing order or northing/easting order for
>> > EPSG:4326? This is
>> > both a theory and practice problem. In theory, what should
>> > happen, and
>> > in practice, what are people doing?
>>
>> Cadcorp's experience is that the theory is lat/lon, but the practice is
>> lon/lat. Another worm squirming out of the can is that the
>> representation of ordinates in EPSG 4326 is not supposed to be in
>> decimal degrees. There are differences of opinion (!) as to whether or
>> not this applies to data transfer mediums, or just to user-facing
>> representation.
>>
>> Let battle commence,
>> Martin
>>
>> _______________________________________________
>> wfs-dev mailing list
>> wfs-dev at opengeospatial.org
>> https://mail.opengeospatial.org/mailman/listinfo/wfs-dev
>>
>
> _______________________________________________
> wfs-dev mailing list
> wfs-dev at opengeospatial.org
> https://mail.opengeospatial.org/mailman/listinfo/wfs-dev
>
More information about the wfs-dev
mailing list