Did you adjust the region also? To do this properly, you need to first scan the file using r.in.xyz to get the extents. I'd also use the shell style output.
r.in.xyz -sg input="2628cc.ORT.xyz" output="dem_2628cc_25m_xyz Should return something like: n=1000 s=500 w=500 e=1000 t=### b=### (you can ignore the t & b output) This is the extent of the points, which are going to be the center of the output pixels. Since the region is defined as pixel edge, you need to expand the region 1/2 a pixel in each direction to ensure the points are in the center of the pixel. At 25m spacing, your region should be set as: g.region n=1012.5 s=487.5 w=487.5 e=1012.5 res=25 - Jamie On Thu, May 13, 2010 at 9:02 AM, Hanlie Pretorius < [email protected]> wrote: > 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 < > > [email protected]> 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_...@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_...@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_...@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_...@c83" output="dem_2628cc_25m" > >> use="z"\ > >> | type="point,line,area" layer=1 value=1 rows=4096 > >> | > >> > >> > >> > +----------------------------------------------------------------------------+ > >> > >> Thanks > >> Hanlie > >> _______________________________________________ > >> grass-user mailing list > >> [email protected] > >> 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 > > [email protected] > > http://lists.osgeo.org/mailman/listinfo/grass-user > > > > > > End of grass-user Digest, Vol 49, Issue 24 > > ****************************************** > > >
_______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
