I'm trying to follow the this GRASS tutorial and I'm already stuck at the first step. I have acii points in an .xyz and supposed to import them with v.in.ascii. However, I get the following error message

WARNING: Expected 5 columns, found 4 columns ERROR: Broken row 384: '32346000.00 5630383.00 100.01' (Sun Feb 2 16:02:14 2020) Befehl ausgeführt (0 Sek)
(Sun Feb 2 16:05:43 2020)
v.in.ascii -n input=C:\Users\denni\Desktop\xyz_daten\dgm1.xyz output=dgm1 separator=space text=space z=4

I don't find the setting to tell the algorithm to expect only 4 columns.

That's the content of the ascii file:

enter image description here

And that's the settings under the "point" field:

enter image description here

how can I solve the error?


It is failing when your 4th column has a 3-digit number (100.01) rather than the 2-digit numbers you show in your screenshot (98.xx).

Your data file is poorly formatted and uses whitespace as a delimiter rather than a , or | or other character. Because of this, when your number grows to 100.01 it eats up one of the spaces that makes the invisible 3rd column. I have no idea where the 5th column is. Perhaps to the right of your 98.xx numbers?

I suggest reformatting your data file. Replace spaces with a comma, and collapse to only 3 columns.

If you try to do this with only 4 columns, that won't work either - when the digit grows to >= 100, you'll probably read in NaNs rather than the data, because it has shifted columns at that point.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.