[postgis-users] Has anyone tried GML to table?

Simon G Greener simon at spatialdbadvisor.com
Wed Sep 30 20:20:55 PDT 2020


There is a small mistake in the SQL I supplied.

The SQL is more easily accessible on my website at:

https://www.spdba.com.au/processing-gml-data-using-postgresqls-xmltable/

This is corrected section:

SELECT decoded.room_id,
        decoded.capacity,
        decoded.comment,
*       ST_AsEWKT(**
**          ST_GeomFromGML(decoded.location::text,4326)**
**       ) as geom*
FROM
     hoteldata
     cross join
     xmltable(
         '//hotels/hotel/rooms/room'
         passing hotels
         COLUMNS
             room_id  varchar(3) path '@id',
*            location xml        path 'location/Point',*
             capacity integer,
             comment  text
     ) AS decoded;


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20201001/c75ddc13/attachment.html>


More information about the postgis-users mailing list