[GRASS-user] Vector import

Hi –

I hate to complain because GRASS is such amazing value and I have counted on it for about 20years. However this puzzle seems to be something that just shouldn’t happen. Importing ASCII files has always (for me) been a challenge. Much as I might try, there always seems to be something wrong with my files. Here’s a case in point. Simple table with 6 columns and 66 rows - copy attached. This was output from R - which is usually very reliable.

v.in.ascii thinks otherwise… In the clip you can see that row 8 was broken and only 5 columns detected. Rows 1-7 with identical (to my eyes) formatting are not rejected. But perhaps it doesn’t like the space in the geology column string (even though 1-7 all include at least one space) . Replace the space with an _ and try again. No luck. Get rid of the space completely. No luck. Try reading the file back into R - no problem. Try reading the file into QGIS - no problem.

So that’s my puzzle for today. If anyone can see where the problem lies - that would be great.

I’m running GRASS 8.4 on a 2014 MacBook Pro with OSX 11.7.10.

Best regards
Stu

(attachments)

hardysprg_clean.csv (3.78 KB)
v.in.ascii.png
back2R.png

In my last post I was erroneously addressing row 7 instead of 8 …

After another shut down and restart, the problem has mysteriously solved itself and the file imports as expected - spaces and all.

Very strange.

Stu
On Jun 27 2024, at 10:19 am, Stuart Edwards via grass-user grass-user@lists.osgeo.org wrote:

Hi –

I hate to complain because GRASS is such amazing value and I have counted on it for about 20years. However this puzzle seems to be something that just shouldn’t happen. Importing ASCII files has always (for me) been a challenge. Much as I might try, there always seems to be something wrong with my files. Here’s a case in point. Simple table with 6 columns and 66 rows - copy attached. This was output from R - which is usually very reliable.

v.in.ascii thinks otherwise… In the clip you can see that row 8 was broken and only 5 columns detected. Rows 1-7 with identical (to my eyes) formatting are not rejected. But perhaps it doesn’t like the space in the geology column string (even though 1-7 all include at least one space) . Replace the space with an _ and try again. No luck. Get rid of the space completely. No luck. Try reading the file back into R - no problem. Try reading the file into QGIS - no problem.

So that’s my puzzle for today. If anyone can see where the problem lies - that would be great.

I’m running GRASS 8.4 on a 2014 MacBook Pro with OSX 11.7.10.

Best regards
Stu


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

···

On 27/06/2024 17:42, Stuart Edwards via grass-user wrote:

In my last post I was erroneously addressing row 7 instead of 8 …

After another shut down and restart, the problem has mysteriously solved itself and the file imports as expected - spaces and all.

Very strange.

I hate problems like that! Much prefer problems that are consistent. When a problem oddly “disappears”, you’re never sure it won’t pop up again.

Regards,

Micha

Stu
On Jun 27 2024, at 10:19 am, Stuart Edwards via grass-user grass-user@lists.osgeo.org wrote:

Hi –

I hate to complain because GRASS is such amazing value and I have counted on it for about 20years. However this puzzle seems to be something that just shouldn’t happen. Importing ASCII files has always (for me) been a challenge. Much as I might try, there always seems to be something wrong with my files. Here’s a case in point. Simple table with 6 columns and 66 rows - copy attached. This was output from R - which is usually very reliable.

v.in.ascii thinks otherwise… In the clip you can see that row 8 was broken and only 5 columns detected. Rows 1-7 with identical (to my eyes) formatting are not rejected. But perhaps it doesn’t like the space in the geology column string (even though 1-7 all include at least one space) . Replace the space with an _ and try again. No luck. Get rid of the space completely. No luck. Try reading the file back into R - no problem. Try reading the file into QGIS - no problem.

So that’s my puzzle for today. If anyone can see where the problem lies - that would be great.

I’m running GRASS 8.4 on a 2014 MacBook Pro with OSX 11.7.10.

Best regards
Stu


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

_______________________________________________
grass-user mailing list
[grass-user@lists.osgeo.org](mailto:grass-user@lists.osgeo.org)
[https://lists.osgeo.org/mailman/listinfo/grass-user](https://lists.osgeo.org/mailman/listinfo/grass-user)

-- 
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918