Changes between Version 27 and Version 28 of Help/LeicaLidarDems
- Timestamp:
- Feb 28, 2012, 11:03:14 AM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Help/LeicaLidarDems
v27 v28 8 8 ---------- 9 9 == Using GRASS == 10 The first step is to create a location of the required area. See the GRASS reference manual for help with this. Alternatively you can download a template grass database from here: [raw-attachment:wiki:Help/DEM_scripts:grass_db_template.zip GRASS template database] 10 The first step is to create a location of the required area. See the GRASS reference manual for help with this. Alternatively you can download a template grass database from here: [raw-attachment:wiki:Help/DEM_scripts:grass_db_template.zip GRASS template database]. The template database contains both a UK National Grid and WGS84 Latitude/Longitude region. Start GRASS using a region suitable for the LiDAR data (creating one if it doesn't exist). 11 11 12 When this is done the ASCII point data can be loaded in. To import the ASCII data it must be within the GRASS region limits, any data outside the current region will not be imported. If you know the extent of your data you can set the region limits and skip the next step.12 When this is done the ASCII point data can be loaded in. To import the ASCII data it must be within the GRASS region limits, any data outside the current region will not be imported. 13 13 14 Scan through the point cloud and find the min/max Eastings and Northings:14 '''Scan through the point cloud and find the min/max Eastings and Northings''': 15 15 16 1. '''`r.in.xyz -s input=<LDRfilename> output=<outputmapname> x=2 y=3 z=4 fs=' '`''' 16 {{{ 17 r.in.xyz -s input=<LDRfilename> output=<outputmapname> x=2 y=3 z=4 fs=' ' 18 }}} 17 19 18 where <LDRfilename> is the filename you want to read in, <outputmapname> is the name you wish to call this within GRASS, x, y, and z are equal to the column numbers which contain the Easting, Northing and elevation values, fs is the field separator. 20 where <LDRfilename> is the filename you want to read in, <outputmapname> is the name you wish to call this within GRASS, x, y, and z are equal to the column numbers which contain the Easting, Northing and elevation values, fs is the field separator. For more info on this command see the GRASS manual [http://grass.fbk.eu/gdp/html_grass63/r.in.xyz.html] 19 21 20 Set the region such that it contains all the point cloud data, and the resolution you wish to use– in this case 2.0m:22 '''Set the region such that it contains all the point cloud data, and the resolution you wish to use''' – in this case 2.0m: 21 23 22 2. '''`g.region n=max_northing s=min_northing w=min_easting e=max_easting res=2.0`''' 24 {{{ 25 g.region n=max_northing s=min_northing w=min_easting e=max_easting res=2.0 26 }}} 23 27 24 replacing the keywords max_northing, min_northing, min_easting, max_easting with the values from the `r.in.xyz` command above. 28 replacing the keywords max_northing, min_northing, min_easting, max_easting with the values from the `r.in.xyz` command above. You may wish to add a small buffer on to ensure points on the boundary are imported. 25 29 26 Now we can import the laser point cloud data into grass. This uses the same `r.in.xyz` command as above but without the -s flag:30 Now we can '''import the laser point cloud data into GRASS'''. This uses the same `r.in.xyz` command as above but without the -s flag: 27 31 28 3. '''`r.in.xyz input=<LDRfilename> output=<outputmapname> x=2 y=3 z=4 fs=' '`''' 32 {{{ 33 r.in.xyz input=<LDRfilename> output=<outputmapname> x=2 y=3 z=4 fs=' ' 34 }}} 29 35 30 36 The above 3 steps need to be repeated for each of the point cloud files you wish to use to make the DEM with. 31 37 32 When all point cloud files are loaded into GRASS, the region needs to be changed such that it covers the area of all the point clouds:38 When all point cloud files are loaded into GRASS, the '''region needs to be changed such that it covers the area of all the point clouds''': 33 39 34 4. '''`g.region rast=mapname1,mapname2,....`''' 40 {{{ 41 g.region rast=mapname1,mapname2,....,mapnameN 42 }}} 35 43 36 where mapname1, mapname2, etc are the map names of the imported point cloud data from the above step .44 where mapname1, mapname2, etc are the map names of the imported point cloud data from the above steps. 37 45 38 All the separate LIDAR maps can now be patched together to make a single large rasterdata set. To do this, use the following command:46 All the separate '''LIDAR maps can now be patched together to make a single large raster''' data set. To do this, use the following command: 39 47 40 5. '''`r.patch in=mapname1,mapname2,... out=lidar_mosaic`''' 48 {{{ 49 r.patch in=mapname1,mapname2,... out=lidar_mosaic 50 }}} 41 51 42 where the map names are as before, the imported point cloud rasters, and lidar_mosaic is the output name for the single concatenated raster set. 52 where the map names are as before, the imported point cloud rasters, and lidar_mosaic is the output name for the single concatenated raster set. For more details on this command see [http://grass.fbk.eu/gdp/html_grass63/r.patch.html]. 43 53 44 54 … … 50 60 51 61 52 Assuming that there are only small holes in the data set and the DEM is required only within the lidar swath coverage, we can use the `r.surf.idw` command to interpolate over the lidar. But because this command only gives integer results, we multiply by 100 first and then divide by 100 afterwards, to try and maintain some precision. This command will also interpolate into the GRASS region where the LIDAR is undefined. 62 If '''small''' holes are present in your data, say due to small lakes or removed noise, the easiest way to fill these in is to patch the data with a lower resolution version of the LiDAR. This can be done by changing the region to a lower resolution and resampling: 63 64 {{{ 65 g.region res=5 66 g.resamp.stats input=lidar_mosaic output=lowres_mosaic 67 }}} 68 69 which in this example will create a new raster called lowres_mosaic at 5m resolution. Note that this is not suitable for larger holes in the data and other methods should be used in this case such as patching external data or interpolating. 70 53 71 54 72 6.