Skip to main content
Solved

Swapping values around in WKT to geometry

  • June 6, 2019
  • 2 replies
  • 17 views

thomastupuivao
Contributor
Forum|alt.badge.img+7

I have a list of multilinestring values (WKT) that I want to convert to geometry and I am able to convert successfully using the "GeometryReplacer" transformer. But the issue is, the output is rotated incorrectly, I'm assuming because the latitude value precedes the longitude;

 

MULTILINESTRING ((-44.7015317625899 169.11857955951024, -44.7016055333 169.11847676667, -44.701775304303375 169.1184517619954))

MULTILINESTRING ((-44.701775304303375 169.1184517619954, -44.7021002667 169.1184039, -44.7024581167 169.11867501667))

MULTILINESTRING ((-44.9492277 168.83416295, -44.9493422667 168.8342806, -44.95023849319257 168.8351577308208))

MULTILINESTRING ((-44.95023849319257 168.8351577308208, -44.9508926333 168.83579793333, -44.9527597167 168.83769603333))

MULTILINESTRING ((-44.95023849319257 168.8351577308208, -44.94992568966844 168.83576309491352, -44.94992568966844 168.8358054239898))

 

Does the longitude value need to precede the latitude value? and if so, is there anything I can do to swap the values within the mutli string bracket around?

 

Thanks

Thomas

Best answer by takashi

How about applying the CoordinateSwapper (Swap Type: X <-> Y) after the GeometryReplacer?

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.

2 replies

takashi
Celebrity
  • 7843 replies
  • Best Answer
  • June 6, 2019

How about applying the CoordinateSwapper (Swap Type: X <-> Y) after the GeometryReplacer?


thomastupuivao
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • 15 replies
  • June 7, 2019

How about applying the CoordinateSwapper (Swap Type: X <-> Y) after the GeometryReplacer?

Thats fantastic!!...did the trick. Thanks for that!