12 | | The ST_AsGML call is rounding off the coordinates and creating an invalid collapsed polygon. The problem can be averted by not rounding coordinates. |
| 12 | The ST_AsGML call is rounding off the coordinates and creating an invalid collapsed polygon. The problem can be averted by not rounding coordinates so hard, for example: |
| 13 | {{{ |
| 14 | |
| 15 | WITH g(geom) AS ( |
| 16 | SELECT 'POLYGON((0 0, 10 0, 10 0.000001, 0 0.000001, 0 0))'::geometry |
| 17 | ) |
| 18 | SELECT |
| 19 | ST_GeomFromGML( |
| 20 | ST_AsGML(3, geom, 14, 0, 'gml', NULL) |
| 21 | ,5514) |
| 22 | FROM g; |
| 23 | }}} |