[postgis-tickets] [PostGIS] #4910: Conversion from Postgis geometry to GML 3.1.1 and back fails

PostGIS trac at osgeo.org
Fri May 7 06:04:23 PDT 2021


#4910: Conversion from Postgis geometry to GML 3.1.1 and back fails
--------------------------+---------------------------
 Reporter:  tomassejkora  |      Owner:  pramsey
     Type:  defect        |     Status:  new
 Priority:  high          |  Milestone:  PostGIS 3.1.2
Component:  postgis       |    Version:  3.1.x
 Keywords:  GML 3.1.1     |
--------------------------+---------------------------
 Conversion of Postgis geometry to GML 3.1.1 is failing with error message
 "invalid GML representation" in some cases. I have a lot of tiny
 geometries which I'm trying to convert to GML 3.1.1 and later back to
 Postgis and only for some of them it's failing.

 I tried to isolate the problem into a simple SQL command which fails with
 the latest Postgis 3.1.x and Postgres 12

 SELECT
   ST_GeomFromGML(ST_AsGML(3, ST_GeomFromText('MULTIPOLYGON(((-804030.88
 -988533.6,-804027.84 -988531.12,-804026.14
 -988528.6900000001,-804020.6013588897
 -988532.5649898029,-804012.6923943197 -988538.1028127444,-804014.75
 -988540.52,-804026.29 -988539.96,-804030.88 -988533.6)),((-804030.52
 -988525.62,-804026.137267668 -988528.6887703099,-804026.14
 -988528.6900000001,-804030.52 -988525.62)))', 5514), 2, 0, 'gml', null),
 5514);

 If the GML version in fuction ST_AsGML is changed from version 3 to 2 then
 the SQL statemnt runs successfuly. I tried to play with ST_AsGML options
 but without any success.

 Could you please help us with conversion?

 Thank you very much!
 Tomas

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4910>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list