[GRASS-user] Using v.in.ascii to create elevation vector

Hamish hamish_b at yahoo.com
Mon Nov 17 00:55:31 EST 2008


Kurt Springs wrote:
> I am trying to convert ascii files that I bought from the
> Irish Ordinance Survey in to GRASS vector format.  These are
> digital terrain models.  I want to eventually make a raster
> surface map and a 3d raster map out demonstrating where
> various archaeological sites are.
> 
> The files the OSI has sent me have a heading set off with
> "#" on each line, then the data.  There are three
> columns, eventually x, y, z.  These are separated by a
> space.
> 
> Using v.in.ascii, I checked Create 3D file
> selected the input file, in this case 0834_10.DTM and typed
> the out put file osi0834.  The field separator was set to |.
>  I erased this, and left it blank.

if they are separated by spaces, you'll want to put a space there,
or the word "space".

> Input file format was set to point.
> 
> I clicked on the Columns tab.  I left the SQL blank.  Left
> x=1 y=2  and set Z=3.
> 
> When I hit run I got:
> 
> Scanning input for column types...
> Maximum input row length: 33
> Maximum number of columns: 1
> Minimum number of columns: 1
> y column number > minimum last column number
> 
> (incorrect field separator?)
> 
> I put the | back and got the same error.

(should be space)

> I then set the input file format to standard and got:
> 
> Unexpected data in vector head:
> [#]

if should be in points mode.

lines starting with # are treaded as comments, and automatically skipped.
header lines not starting with # should be skipped with the skip= param.

 
> I have a lot of these to convert.  Can anyone give me any
> advice?

hopefully the above gets you there.

Are the DEMs gridded or sparse? if gridded you might be able to load them
directly with r.in.xyz after sorting out the bounds and resolution.
(verify that "n" map is all 1s with r.univar)


Hamish



      



More information about the grass-user mailing list