Skip to main content
Question

How to create wkt column from coordinates of LineString ? (generic solution for shape type)

  • December 22, 2021
  • 4 replies
  • 90 views

Forum|alt.badge.img

coordinates of given type

lineeextract coordinates and type

resim_2021-12-22_153824

4 replies

danilo_fme
Evangelist
Forum|alt.badge.img+41
  • Evangelist
  • December 22, 2021

Hi @ikubra800

 

Did you try to use the stringsearch?

 

Do you want to separate lat and long, correct?

 

Thanks in Advance,

Danilo

 

 

 

 

 


geomancer
Evangelist
Forum|alt.badge.img+46
  • Evangelist
  • December 22, 2021

Your attribute coordinates reads like:

[x1,y1][x2,y2][x3,y3][x4,y4]

WKT for a linestring has the following format:

LINESTRING (x1 y1, x2 y2, x3 y3, x4 y4)

So perform a bit of consecutive search-and-replace:

  1. Replace ',' (comma) with ' ' (space)
  2. Replace '][' with ', ' (comma space)
  3. Replace '[' with 'LINESTRING ('
  4. Replace ']' with ')'

Search_Replace_to_WKT


Forum|alt.badge.img
  • Author
  • December 23, 2021

Thanks for response @danilo_fme​  and @geomancer​ ,

 

I solved that GeoJSON (Geographic JavaScript Object Notation) reader directly.


danilo_fme
Evangelist
Forum|alt.badge.img+41
  • Evangelist
  • December 25, 2021
ikubra800 wrote:

Thanks for response @danilo_fme​  and @geomancer​ ,

 

I solved that GeoJSON (Geographic JavaScript Object Notation) reader directly.

Hi @ikubra800​ 

 

Thanks your feedback. It is a very good that you solved the problem with the GeoJSON Reader.


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