[GRASS-user] Importing Dems with r.in.xyz

Micha Silver micha at arava.co.il
Fri Jun 4 11:33:17 EDT 2010


On 06/04/2010 04:20 PM, Hanlie Pretorius wrote:
> Hi,
>
> I've been following the procedure at
> http://grass.osgeo.org/wiki/Import_XYZ to import DEMs into GRASS.
>
> It has worked for two DEMS, but I have a problem with the third one at
> the step where one "verifies that the number of rows in the ASCII file
> corresponds to the number of cells in the enlarged region".
>
> At this point, g.region reports 1146474 cells in the region, while I
> have 1146370 lines of coordinates in my file.
>
>    
Assuming you already did the "r.in.xyz -s ..." step to get and set your 
region to match the input data.
So it looks like there are about 100 coordinates missing from the ASCII 
file. Maybe "holes" in the data?
One way to work around this might be to import the point data as a 3D 
vector, then run the usual v.surf.rst interpolation.
v.in.xyz -z in=ascii.txt out=elev_pts z=3 fs=,
then
g.region vect=elev_pts res=<choose appropriate resolution>
v.surf.rst elev_pts elev=dem layer=0

> The output of g.region is:
> -----
> projection: 99 (Transverse Mercator)
> zone:       0
> datum:      ** unknown (default: WGS84) **
> ellipsoid:  wgs84
> north:      -49312.49
> south:      -74587.5
> west:       -3015862.5
> east:       -2987512.5
> nsres:      25.00000989
> ewres:      25
> rows:       1011
> cols:       1134
> cells:      1146474
> -----
>
> The first three and last three coordinates in my text file are:
> -----
> -74575.000000,-3015850.000000,1548.830000
> -74575.000000,-3015825.000000,1548.330000
> -74575.000000,-3015800.000000,1547.500000
> .
> .
> .
> -49324.990000,-2987575.010000,1510.980000
> -49324.990000,-2987550.010000,1511.240000
> -49324.990000,-2987525.010000,1511.470000
> -----
>
> Can someone help me to figure out what's going on?
>
> Thanks
> Hanlie
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
> This mail was received via Mail-SeCure System.
>
>
>    


-- 
Micha Silver
Arava Development Co. +972-52-3665918
http://www.surfaces.co.il




More information about the grass-user mailing list