[GRASS-user] Re: dems from coordinate lists

Hanlie Pretorius hanlie.pretorius at gmail.com
Thu May 13 12:02:03 EDT 2010


Hi Jamie,

I tried r.in.xyz:
(r.in.xyz input="2628cc.ORT.xyz" output="dem_2628cc_25m_xyz"
method="mean" type="FCELL" x=1 y=2 z=3 zscale=1.0 percent=100)

but I still get the rows of no data in the result.

Hanlie


>
> You want the points to represent cell centers so you need to expand your
> region 1/2 pixel in all four directions.  Also look at using r.in.xyz, it
> works directly on this type of data.
>
> Jamie
>
> On Thu, May 13, 2010 at 7:26 AM, Hanlie Pretorius <
> hanlie.pretorius at gmail.com> wrote:
>
>> Hi,
>>
>> I've obtained DEMs in text files with columns X, Y and Z at 25m
>> spacing. The first three entries in the text file are:
>>
>> -----
>> X,Y,Z
>> 99550,2.9883e+06,1473.47
>> 99550,2.98828e+06,1473.57
>> 99550,2.98825e+06,1473.63
>> -----
>>
>> To me it seems the easiest way to import these is the following:
>>
>> 1. v.in.ascii
>>
>> 2. Set the region to the extents of new vector file and the resolution to
>> 25m.
>>
>> 3. v.to.rast.
>>
>>
>> This 'works' but I get horizontal strips of no data in my raster DEM
>> at 25m spacings.
>>
>> Also, when I look at the raster and the vector layer together, the
>> vector points are not always on the edges of the raster cells.
>>
>> Can someone perhaps help me to fix this?
>>
>> g.region:
>>
>> projection: 99 (Transverse Mercator)
>> zone:       0
>> datum:      ** unknown (default: WGS84) **
>> ellipsoid:  wgs84
>> north:      2988300
>> south:      2959850
>> west:       74300
>> east:       99550
>> nsres:      25
>> ewres:      25
>> rows:       1138
>> cols:       1010
>> cells:      1149380
>>
>> v.info:
>>
>>
>> +----------------------------------------------------------------------------+
>>  | Layer:           dem_2628cc_25m at C83
>>  | Mapset:          C83
>>  | Location:        sa_tm_19deg_E
>>  | Database:        C:\Hanlie\grassdata
>>  | Title:
>>  | Map scale:       1:1
>>  | Map format:      native
>>  | Name of creator: Administrator
>>  | Organization:
>>  | Source date:     Thu May 13 16:06:07 2010
>>
>>
>> |----------------------------------------------------------------------------|
>>  |   Type of Map:  vector (level: 2)
>>  |
>>  |   Number of points:       1151529         Number of areas:      0
>>  |   Number of lines:        0               Number of islands:    0
>>  |   Number of boundaries:   0               Number of faces:      0
>>  |   Number of centroids:    0               Number of kernels:    0
>>  |
>>  |   Map is 3D:              Yes
>>  |   Number of dblinks:      0
>>  |
>>  |         Projection: Transverse Mercator
>>  |               N:           2988300    S:           2959850
>>  |               E:             99550    W:             74300
>>  |               B:           1429.79    T:            1740.2
>>  |
>>  |   Digitization threshold: 0
>>  |   Comments:
>>  |
>>
>>
>> +----------------------------------------------------------------------------+
>>
>> r.info:
>>
>>
>> +----------------------------------------------------------------------------+
>>  | Layer:    dem_2628cc_25m at C83             Date: Thu May 13 16:15:50 2010
>>  | Mapset:   C83                            Login of Creator:
>> Administrator
>>  | Location: sa_tm_19deg_E
>>  | DataBase: C:\Hanlie\grassdata
>>  | Title:    Categories ( dem_2628cc_25m )
>>  | Timestamp: none
>>
>>
>> |----------------------------------------------------------------------------|
>>  |
>>    |
>>  |   Type of Map:  raster               Number of Categories: 0
>>  |   Data Type:    DCELL
>>  |   Rows:         1138
>>  |   Columns:      1010
>>  |   Total Cells:  1149380
>>  |        Projection: Transverse Mercator
>>  |            N:    2988300    S:    2959850   Res:    25
>>  |            E:      99550    W:      74300   Res:    25
>>  |   Range of data:    min = 1429.850000  max = 1739.410000
>>  |
>>  |   Data Source:
>>  |    Vector Map: dem_2628cc_25m at C83 in mapset C83
>>  |    Original scale from vector map: 1:1
>>  |
>>  |   Data Description:
>>  |    generated by v.to.rast
>>  |
>>  |   Comments:
>>  |    v.to.rast input="dem_2628cc_25m at C83" output="dem_2628cc_25m"
>> use="z"\
>>  |     type="point,line,area" layer=1 value=1 rows=4096
>>  |
>>
>>
>> +----------------------------------------------------------------------------+
>>
>> Thanks
>> Hanlie
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://lists.osgeo.org/pipermail/grass-user/attachments/20100513/dd33d293/attachment.html
>
> ------------------------------
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
>
> End of grass-user Digest, Vol 49, Issue 24
> ******************************************
>


More information about the grass-user mailing list