Question

Creating line geometry from XML

  • 7 December 2017
  • 1 reply
  • 12 views

Badge

I have an XML document that contains a string of coordinates that form a line. I want to create the line geometry from the list of coordinates. My first thought was to use an AttributeSplitter to separate out the coordinates then a VertexCreator and Line Builder and so on. However I'm sure there must be a less long-winded way. I've looked at using the GeometryReplacer, but haven't been able to get that working (I've tried it with various Geometry Encoding options). Any suggestions much appreciated as my knowledge with XML is very basic!

<LineString xmlns="http://www.opengis.net/gml" gid="102790531.1" srsName="osgb:BNG" srsDimension="46" axisLabels="x y">
<posList srsDimension="46">
468763 339612 468739 339598 468712 339581 468684 339568 468647 339556 468603 339546 468562 339542 468540 339541 468530 339536 468337 339604 468335 339610 468330 339617 468322 339625 468313 339635 468307 339642 468862 339504 468856 339510 468838 339528 468823 339548 468811 339570 468800 339592 468793 339600 468787 339605
</posList>
</LineString>


1 reply

Badge +22

That's gml, but with a funky srsDimension. If you change the postList srsDimension="46" to srsDimension="2", the GeometryReplacer (GML) should work.

Reply