Opened 16 years ago

Closed 16 years ago

#161 closed defect (fixed)

GML 3 lat lon problem

Reported by: colivier Owned by: colivier
Priority: high Milestone: PostGIS 1.4.0
Component: postgis Version: 1.4
Keywords: GML 3 lat/lon Cc:

Description

In GML 3, for decimal deegree data (e.g EPSG:4326), lat/lon order data must be reverse.

Right output should be:

SELECT st_asgml(3, geomfromtext('POINT(33 66)', 4326));
<gml:Point srsName="EPSG:4326"><gml:pos>66 33</gml:pos></gml:Point>

instead of current:

<gml:Point srsName="EPSG:4326"><gml:pos>33 66</gml:pos></gml:Point>

For planar one on the other hand, it's OK:

SELECT st_asgml(3, geomfromtext('POINT(33 66)', 27582));
<gml:Point srsName="EPSG:27582"><gml:pos>33 66</gml:pos></gml:Point>

(GML 2 is also already OK)

As we don't (yet) have a flag into geometry to know if it's a planar one or a geocentric one, i propose this solution:

  • Add an option bit to in St_AsGML function
  • This new bit indicate that geometry is geocentric one
  • And so will be able to shift lat/lon for them

Cons:

  • Oblige to manually said that to export function in SQL
  • won't be able to deal with collection of mixed data (geocentric and planar one) at the same time

Any reactions, thoughts ?

Olivier

Change History (1)

Note: See TracTickets for help on using tickets.