[GRASS-user] ascii to dem

antonio rodriguez antonio.raju at gmail.com
Fri Mar 16 06:53:08 EDT 2007


>> r.in.xyz z=3 fs='space' input=baty2.xyz out=baty
>>
>> Scanning data ...
>> ERROR:Not enough data columns. Incorrect delimiter or column number?
>> Found
>>       the following character(s) in row 1:
>>       [-9 38 -137]
>>
>> Don't know what I'm doing wrong since the 1st column holds the x's 
>> (longitude) values, the 2nd column, lat values, and 3rd column the z 
>> values (elevation +/-) The column delimiter is 'space'
>>     
>
>
> try fs=tab, or fs=space without the 'quotes' (if done from the GUI
> window, from the command line 'quotes' shouldn't matter).
> AndI think it is hoping for just one space,
>
> this might help:
>
> cat bathy2.xyz | awk '{print $1 $2 $3}' > bathy3.txt
>
> ?
>
> Hamish
>   

Thanks Hamish, it helps a lot. What a powerful tool is awk (if one knows 
how to use it :-[ )

The raster data is imported fine, but when trying to convert it to a 
vector file:

r.to.vect in=bati3 out=bati3 

Extracting lines ...
update_list: crowded cell 8H (1,2)
ERROR:Raster map is not thinned properly.
      Please run r.thin.

I do that, but:

r.thin in=bati3 out=bati3_thin

File bati3 -- 241 rows X 421 columns
Bounding box: l = 2, r = 422, t = 2, b = 242
Pass number 1
Deleted 1320 pixels
Pass number 2
Deleted 1312 pixels
Pass number 3
Deleted 1304 pixels
Pass number 4
Deleted 1296 pixels

At the end of the process almost all the data were erased. What is 
r.thin finding so wrong in my data that it deletes almost everything?

Cheers,

Antonio





More information about the grass-user mailing list