Skip to main content
Question

Help in creating a function to create points from a messy csv file

  • April 13, 2021
  • 1 reply
  • 5 views

I received some data where x and y coordinates are concatenated in a single cell. Extracting and connecting these together will give me either a line or a polygon.

I have provided a sample csv file below

The issue with the data I have been provided is that it has displaced field 10 onwards - but I can't tell that field 10 has been displaced unless I remove the all the concatenated geometry fields

There are 2 things that I need help with

1) extracting the x & y's so I can create geometry

2) understanding where Field 10 may have been displaced to so I can create a table that makes sense!

Any help appreciated!

 

 

1 reply

DanAtSafe
Safer
Forum|alt.badge.img+18
  • Safer
  • April 13, 2021

Hi @abbas_lokat​ My general method would be to translate the XLSX to CSV, then read it back as a text file to get the entity_id and concatenate the remaining values to Well Known Text and finally create lines with a GeometryReplacer. Please try the attached workspace. (I don't know if this method helps with Field 10 or not.)


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