Skip to main content
Question

Read a Point Cloud with double separator characters

  • November 3, 2020
  • 1 reply
  • 7 views

pschout
Participant
Forum|alt.badge.img+2

I have a problem with a Pointcloud source file. It is a CSV file without headers and separator character is |, but there are also double quotes present (see yellow marked in the attached picture). When I use a pointcloud xyz reader it generate only 4 columns but I need 6 columns (with | as separator character), it seems that the quotes cause the problem to split the string between the quotes. It will work when I replace the double quotes for noting. That’s usable in a small file but most of the CSV’s contains more than 20 million records (up to 100 million records) so replacing double quotes is not so easy! Has anyone an idea to handle these csv pointcloud files? Is there a way to negate these double quotes, maybe a rewrite action will solve this problem? A subset of the point cloud is attached.

1 reply

geomancer
Evangelist
Forum|alt.badge.img+46
  • Evangelist
  • November 3, 2020

Read the CSV file as a text file.

Next replace the quotes with nothing (StringReplacer).

Now you can split each line, this gives you a list (AttributeSplitter).

Finally rename the list items to useful field names (AttributeRenamer).

 

ContributorYou can also do this when you read the CSV file with the CSV Reader. Then you perform the steps on the third field (the one with the quotes).


Reply


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