Changes between Version 27 and Version 28 of Help/LeicaLidarDems


Ignore:
Timestamp:
Feb 28, 2012 11:03:14 AM (8 years ago)
Author:
mark1
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Help/LeicaLidarDems

    v27 v28  
    88----------
    99== 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]
     10The 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).
    1111
    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.
     12When 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.
    1313
    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''':
    1515
    16 1. '''`r.in.xyz -s input=<LDRfilename> output=<outputmapname> x=2 y=3 z=4 fs=' '`'''
     16{{{
     17r.in.xyz -s input=<LDRfilename> output=<outputmapname> x=2 y=3 z=4 fs=' '
     18}}}
    1719
    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.
     20where <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]
    1921
    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:
    2123
    22 2. '''`g.region  n=max_northing s=min_northing w=min_easting e=max_easting res=2.0`'''
     24{{{
     25g.region  n=max_northing s=min_northing w=min_easting e=max_easting res=2.0
     26}}}
    2327
    24 replacing the keywords  max_northing,  min_northing,  min_easting,  max_easting with the values from the `r.in.xyz` command above.
     28replacing 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.
    2529
    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:
     30Now 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:
    2731
    28 3. '''`r.in.xyz input=<LDRfilename> output=<outputmapname> x=2 y=3 z=4 fs=' '`'''
     32{{{
     33r.in.xyz input=<LDRfilename> output=<outputmapname> x=2 y=3 z=4 fs=' '
     34}}}
    2935
    3036The above 3 steps need to be repeated for each of the point cloud files you wish to use to make the DEM with.
    3137
    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:
     38When 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''':
    3339
    34 4. '''`g.region rast=mapname1,mapname2,....`'''
     40{{{
     41g.region rast=mapname1,mapname2,....,mapnameN
     42}}}
    3543
    36 where mapname1, mapname2, etc are the map names of the imported point cloud data from the above step.
     44where mapname1, mapname2, etc are the map names of the imported point cloud data from the above steps.
    3745
    38 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:
     46All the separate '''LIDAR maps can now be patched together to make a single large raster''' data set. To do this, use the following command:
    3947
    40 5. '''`r.patch in=mapname1,mapname2,... out=lidar_mosaic`'''
     48{{{
     49r.patch in=mapname1,mapname2,... out=lidar_mosaic
     50}}}
    4151
    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.
     52where 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].
    4353
    4454
     
    5060
    5161
    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.
     62If '''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{{{
     65g.region res=5
     66g.resamp.stats input=lidar_mosaic output=lowres_mosaic
     67}}}
     68
     69which 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
    5371
    54726.