Name

ST_GeomFromGML — Construct a geometric object given its GML Representation

Synopsis

geometry ST_GeomFromGML(varchar GML);

Alias

GeomFromGML, ST_GMLToSQL, GMLToSQL

Description

Construct a geometric object given its GML Representation. It supports OGC GML standard 2.1.2

[Note]

ST_AsGML is the reverse of ST_GeomFromGML

Coordinate Dimensions
2D3DM

-

Spatial Standards Support
OGC SFS for SQL. 1.1 (1999)OGC SFS for SQL. 1.1.0 (2005)OGC SFS for SQL. 1.2.0 (2006)SQL-MM Part 3
---

5.1.42 ST_GeomFromGML

5.1.38 ST_GMLToSQL

Examples

SELECT ST_GeomFromGML (
'<gml:Point srsName="EPSG:25830">
  <gml:coordinates>
    1.0,1.0,1.0
  </gml:coordinates>
</gml:Point>'
);
--Result PostgreSQL
\011 \001\001\000\000\000\000\000\000\360?\000\000\000\000\000\000\360?\000\000\000\000\000\000\360?
--Result H2
09200101000000000000f03f000000000000f03f000000000000f03f

SELECT ST_GeomFromGML (
'<gml:Polygon>
  <gml:outerBoundaryIs>
    <gml:LinearRing>
      <gml:coordinates>
        1.0,1.0 1.0,3.0 2.0,4.0 3.0,3.0 1.0,1.0
      </gml:coordinates>
    </gml:LinearRing>
  </gml:outerBoundaryIs>
</gml:Polygon>'
);

Related functions

ST_AsGML