[postgis-devel] AsGML output not valid?

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Wed Aug 29 00:57:09 PDT 2007


On Tue, 2007-08-28 at 14:03 -0400, Christopher Schmidt wrote:
> foss=> select AsGML('POLYGON((1 2, 4 5, 3 6, 1 2))'::geometry);
>                     asgml
> -----------------------------------------------------------------------------
>  <gml:Polygon>
>    <gml:OuterBoundaryIs>1,2 4,5 3,6 1,2</gml:OuterBoundaryIs>
>  </gml:Polygon>
> 
> It appears that this behavior is old:
> 
> http://postgis.refractions.net/pipermail/postgis-devel/2004-September/000491.html
> 
> And that there was a patch sent to the devel list 5 months ago:
> 
> http://postgis.refractions.net/pipermail/postgis-devel/2007-March/002507.html
> 
> But I can't tell if anything ever happened after that.
> 
> I can't find a bug tracker for PostGIS (the only URL I found is
> http://postgis.refractions.net/bugs/ , which I can't login to),  so I
> don't know if there is a status on this that I should be aware of.
> 
> Is this planned to be fixed, or do I need to start thinking about
> supporting 'PostGIS GML' in OpenLayers to account for this incorrect
> behavior?
> 
> Note that without the patch mentioned above, GML is different from all
> the other sources I can find.  
> 
> MsSqlSpatial: http://openlayers.org/pipermail/dev/2007-August/001281.html
> 
> OGR:
> <gml:Polygon>
>   <gml:outerBoundaryIs>
>     <gml:LinearRing>
>       <gml:coordinates>0,0,0 1,1,0 2,2,0 0,0,0</gml:coordinates>
>     </gml:LinearRing>
>   </gml:outerBoundaryIs>
> </gml:Polygon>
> 
> 
> OpenLayers:
> <gml:Polygon> 
>   <gml:outerBoundaryIs> 
>     <gml:LinearRing> 
> <gml:coordinates decimal="." cs=", " ts=" "> -34.453125, -17.9296875 -2.109375,
> 27.0703125 20.390625, -17.2265625 -34.453125, -17.9296875</gml:coordinates> 
> </gml:LinearRing> 
> </gml:outerBoundaryIs>
> </gml:Polygon>
> 
> 
> FeatureServer:
>   <gml:Polygon>
>     <gml:outerBoundaryIs><gml:LinearRing>
>     <gml:coordinates>-131.484375,-5.9765625 -112.5,-58.0078125
> -32.34375,-50.2734375 -114.609375,52.3828125 -167.34375,-35.5078125
> -146.953125,-57.3046875 -139.921875,-34.1015625
> -131.484375,-5.9765625</gml:coordinates>
>     </gml:LinearRing></gml:outerBoundaryIs>
>   </gml:Polygon>


Hi Christopher,

We currently have a GML patch posted for review - I personally haven't
had time to look at it in greater detail yet, plus it is likely to
require a few more eyes since I don't tend to use GML everyday.

http://postgis.refractions.net/pipermail/postgis-devel/2007-July/002690.html
http://postgis.refractions.net/pipermail/postgis-devel/2007-July/002715.html
http://postgis.refractions.net/pipermail/postgis-devel/2007-August/002744.html

Would this solve the problems you are experiencing? I'm intending to
look at this when I get a free moment, and if you are able to test, it
would be a great help.


ATB,

Mark.

-- 
ILande - Open Source Consultancy
http://www.ilande.co.uk





More information about the postgis-devel mailing list