Skip to main content
Solved

GEOMETRYCOLLECTION text to separate geometry features

  • August 16, 2022
  • 4 replies
  • 48 views

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?

Best answer by redgeographics

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

redgeographics
Celebrity
Forum|alt.badge.img+62

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.


  • Author
  • August 17, 2022

Tried now but didn't work.

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


redgeographics
Celebrity
Forum|alt.badge.img+62
  • Celebrity
  • Best Answer
  • August 17, 2022

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.


  • Author
  • August 17, 2022

Wow, thanks! :)