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;


_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users

Reply via email to