Question

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

  • 22 December 2021
  • 4 replies
  • 12 views

Badge

coordinates of given type

lineeextract coordinates and type

resim_2021-12-22_153824


4 replies

Userlevel 4
Badge +30

Hi @ikubra800

 

Did you try to use the stringsearch?

 

Do you want to separate lat and long, correct?

 

Thanks in Advance,

Danilo

 

 

 

 

 

Userlevel 4
Badge +36

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

Badge

Thanks for response @danilo_fme​  and @geomancer​ ,

 

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

Userlevel 4
Badge +30

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.

Reply