Skip to main content
Solved

GEOMETRYCOLLECTION text to separate geometry features


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

_jami_ wrote:

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.

View original
Did this help you find an answer to your question?

4 replies

redgeographics
Celebrity
Forum|alt.badge.img+49

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+49
  • Celebrity
  • Best Answer
  • August 17, 2022
_jami_ wrote:

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! :)


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings