Re: [GRASS-user] dems from coordinate lists
On Thu, May 13, 2010 at 4:26 PM, Hanlie Pretorius hanlie.pretor...@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 - ... Can someone perhaps help me to fix this? Please take a look at http://grass.osgeo.org/wiki/Import_XYZ Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] dems from coordinate lists
Hanlie Pretorius wrote: Hi Micha, I tried your suggestion after setting the region to 20m instead of the raster DEM's 25m.: v.surf.rst input=dem_2628cc_...@c83 layer=0 elev=dem_2628cc_rst_elev tension=40. segmax=40 npmin=120 dmin=9.998022 dmax=49.990111 zm ult=1.0 This worked, but the differences between the raster DEM that I created with r.in.xyz and the rst interpolated results are quite big - ranging from -6.882202m to +7.864258m. From my understanding, r.in.xyz is best suited for cases where you have a very high density of x-y values (i.e. lidar data) and you want to create a raster where each cell will contain several of the original points. You can then choose to average all point values (or max, min, etc) to create the final cell value. On the other hand, v.surf.rst gives the best results when you have a density of points that is lower than the final raster resolution, and you want to interpolate between the original point values to create a higher resolution raster. It also ran fairly slowly. Without adjusting the npmin paramter from the default (300) to 120 it literally ran for hours (Win XP, 3GHz CPU, 1GB RAM). Adjusting npmin to 120 didn't seem to affect the error range of the outcome much. Yes, it's slow. How large a region? how many cells in the final raster? Is there a reason why I should use r.surf.rst instead of v.surf.rst? Or perhaps I should just import the points with r.in.xyz and leave the DEM in this format for further applications (hydrological modelling)? That should be fine providing: 1- You want the final raster at the same or larger resolution as the original points, and 2- You have at least one point value for *every* target raster cell. (Other wise you'll end up with cells with value '0') Regards Hanlie 2010/5/13, Micha Silver mi...@arava.co.il: MS wrote: If I follow correctly, instead of v.to.rast, you need to interpolate a raster DEM from the points. v.surf.rst produces nice results, but there are other interpolation modules as well in the raster category. That's the method I use also. I start with: v.in.ascii -z in=ascii_file z=3 out=vect_pts This creates a 3D vector using the z column as the height values. Now set the desired region: g.region vect=vect_pts res=xxx Choose the raster resolution that suits your needs. If the points in the ascii file are at 25 m spacing, then you probably could interpolate at 10m-20m resolution (or better) with no problems. Then: v.surf.rst in=vect_pts layer=0 elev=dem ... The layer=0 parameter indicates that you're using the 3D vector's z value for elevation. -- Micha This mail was received via Mail-SeCure System. -- Micha Silver Arava Development Co. +972-52-3665918 http://surfaces.co.il ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] dems from coordinate lists
Micha wrote: From my understanding, r.in.xyz is best suited for cases where you have a very high density of x-y values (i.e. lidar data) and you want to create a raster where each cell will contain severalĀ of the original points. You can then choose to average all point values (or max, min, etc) to create the final cell value. r.in.xyz is also good if your input data coords are already in a grid, as if you set the region bounds correctly it can replicate that grid and therefore the input data *exactly*. 1- You want the final raster at the same or larger resolution as the original points, and ie r.in.xyz and r.resamp.stats are good at aggregating data, v.surf.rst and r.resamp.interp are good at interpolating data. 2- You have at least one point value for *every* target raster cell. (Other wise you'll end up with cells with value '0') only for the n count map (which is great for checking that r.in.xyz is doing what you meant). for other methods cells with no-data are filled with NULL, not 0. (as you might hope for something like minimum!) regards, Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] dems from coordinate lists
Hi Micha, I tried your suggestion after setting the region to 20m instead of the raster DEM's 25m.: v.surf.rst input=dem_2628cc_...@c83 layer=0 elev=dem_2628cc_rst_elev tension=40. segmax=40 npmin=120 dmin=9.998022 dmax=49.990111 zm ult=1.0 This worked, but the differences between the raster DEM that I created with r.in.xyz and the rst interpolated results are quite big - ranging from -6.882202m to +7.864258m. It also ran fairly slowly. Without adjusting the npmin paramter from the default (300) to 120 it literally ran for hours (Win XP, 3GHz CPU, 1GB RAM). Adjusting npmin to 120 didn't seem to affect the error range of the outcome much. Is there a reason why I should use r.surf.rst instead of v.surf.rst? Or perhaps I should just import the points with r.in.xyz and leave the DEM in this format for further applications (hydrological modelling)? Regards Hanlie 2010/5/13, Micha Silver mi...@arava.co.il: MS wrote: If I follow correctly, instead of v.to.rast, you need to interpolate a raster DEM from the points. v.surf.rst produces nice results, but there are other interpolation modules as well in the raster category. That's the method I use also. I start with: v.in.ascii -z in=ascii_file z=3 out=vect_pts This creates a 3D vector using the z column as the height values. Now set the desired region: g.region vect=vect_pts res=xxx Choose the raster resolution that suits your needs. If the points in the ascii file are at 25 m spacing, then you probably could interpolate at 10m-20m resolution (or better) with no problems. Then: v.surf.rst in=vect_pts layer=0 elev=dem ... The layer=0 parameter indicates that you're using the 3D vector's z value for elevation. -- Micha ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] dems from coordinate lists
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: 2988300S: 2959850 | E: 99550W: 74300 | B: 1429.79T:1740.2 | | Digitization threshold: 0 | Comments: | ++ r.info: ++ | Layer:dem_2628cc_...@c83 Date: Thu May 13 16:15:50 2010 | Mapset: C83Login 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:2988300S:2959850 Res:25 |E: 99550W: 74300 Res:25 | Range of data:min = 1429.85 max = 1739.41 | | 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 grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] dems from coordinate lists
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.pretor...@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_...@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: 2988300S: 2959850 | E: 99550W: 74300 | B: 1429.79T:1740.2 | | Digitization threshold: 0 | Comments: | ++ r.info: ++ | Layer:dem_2628cc_...@c83 Date: Thu May 13 16:15:50 2010 | Mapset: C83Login 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:2988300S:2959850 Res:25 |E: 99550W: 74300 Res:25 | Range of data:min = 1429.85 max = 1739.41 | | 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 grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] dems from coordinate lists
If I follow correctly, instead of v.to.rast, you need to interpolate a raster DEM from the points. v.surf.rst produces nice results, but there are other interpolation modules as well in the raster category. Best regards, Mark On May 13, 2010, at 10:26 AM, Hanlie Pretorius hanlie.pretor...@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_...@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: 2988300S: 2959850 | E: 99550W: 74300 | B: 1429.79T:1740.2 | | Digitization threshold: 0 | Comments: | +-- --- --- + r.info: +-- --- --- + | Layer:dem_2628cc_...@c83 Date: Thu May 13 16:15:50 2010 | Mapset: C83Login 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:2988300S:2959850 Res:25 |E: 99550W: 74300 Res:25 | Range of data:min = 1429.85 max = 1739.41 | | 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 grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] dems from coordinate lists
MS wrote: If I follow correctly, instead of v.to.rast, you need to interpolate a raster DEM from the points. v.surf.rst produces nice results, but there are other interpolation modules as well in the raster category. That's the method I use also. I start with: v.in.ascii -z in=ascii_file z=3 out=vect_pts This creates a 3D vector using the z column as the height values. Now set the desired region: g.region vect=vect_pts res=xxx Choose the raster resolution that suits your needs. If the points in the ascii file are at 25 m spacing, then you probably could interpolate at 10m-20m resolution (or better) with no problems. Then: v.surf.rst in=vect_pts layer=0 elev=dem ... The layer=0 parameter indicates that you're using the 3D vector's z value for elevation. -- Micha Best regards, Mark On May 13, 2010, at 10:26 AM, Hanlie Pretorius hanlie.pretor...@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_...@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: 2988300S: 2959850 | E: 99550W: 74300 | B: 1429.79T:1740.2 | | Digitization threshold: 0 | Comments: | ++ r.info: ++ | Layer:dem_2628cc_...@c83 Date: Thu May 13 16:15:50 2010 | Mapset: C83Login 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:2988300S:2959850 Res:25 |E: 99550W: 74300 Res:25 | Range of data:min = 1429.85 max = 1739.41 | | 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 grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@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 ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user