Skip to main content

I have XML file that contains GEOMETRYCOLLECTION for each object and it might contain lines, points, areas.

I have this GEOMETRYCOLLECTION already in attribute but how to create multiple features out of those text geometries?

Have you tried the GeometryReplacer? It can take an attribute that contains an encoded geometry (in a variety of different formats) and build the geometry out of it. My guess is that you can try it with the GML setting.


Tried now but didn't work.

Example string here: GEOMETRYCOLLECTION(LINESTRING(23.812724831546493 62.24215058504461,23.811914804438306 62.241978194865645,23.810879471775582 62.24199068694086))


Tried now but didn't work.

Example string here: GEOMETRYCOLLECTION(LINESTRING(23.812724831546493 62.24215058504461,23.811914804438306 62.241978194865645,23.810879471775582 62.24199068694086))

Ah, that's a WKT (OGC Well Known Text) string.

 

This means that whoever designed that XML structure decided to not use the GML geometry model, but the OGC WKT instead (at least they didn't hack their own geometry representation).

 

No worries, set the GeometryReplacer to OGC Well Known Text and it'll work.


Wow, thanks! :)


Reply