LIDAR: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
(→‎Examples: clean DEM)
(→‎Examples: use variable for map name)
Line 49: Line 49:
* [http://www.liblas.org libLAS] ASPRS LiDAR data translation tools
* [http://www.liblas.org libLAS] ASPRS LiDAR data translation tools


== Examples ==
== Example ==
 
=== Import ===


* Using [http://www.liblas.org libLAS] to import LAS data into GRASS. (data used in this example can be found at [http://www.appliedimagery.com/Serpent%20Mound%20Model%20LAS%20Data.las appliedimagery.com])
* Using [http://www.liblas.org libLAS] to import LAS data into GRASS. (data used in this example can be found at [http://www.appliedimagery.com/Serpent%20Mound%20Model%20LAS%20Data.las appliedimagery.com])


Check bounds and SRS:
Check bounds and SRS:
Line 59: Line 62:
   Max X Y Z                  290106.020000 4323641.570000 215.480000
   Max X Y Z                  290106.020000 4323641.570000 215.480000
  Spatial Reference          +proj=utm +zone=17 +ellps=WGS84 +units=m  
  Spatial Reference          +proj=utm +zone=17 +ellps=WGS84 +units=m  


After creating a suitable UTM zone 17 location (EPSG:32617)  
After creating a suitable UTM zone 17 location (EPSG:32617)  
set the region according to the information from lasinfo at 1m resolution, rounding grid outwards to align to whole meters:
set the region according to the information from lasinfo at 1m resolution, rounding grid outwards to align to whole meters:
  g.region n=4323641.57 s=4320942.61 w=289020.90 e=290106.02 res=1 -ap
  g.region n=4323641.57 s=4320942.61 w=289020.90 e=290106.02 res=1 -ap


Finally, import with {{cmd|r.in.xyz}} with data piped directly from the <tt>las2txt</tt> program and set a nice equalized color table:
Finally, import with {{cmd|r.in.xyz}} with data piped directly from the <tt>las2txt</tt> program and set a nice equalized color table:
  las2txt --stdout "Serpent_Mound_Model_LAS_Data.las" | \
BASEMAP="Serpent_Mound_Model_LAS"
     r.in.xyz in=- out=Serpent_Mound_Model_LAS_Data fs=space
  las2txt --stdout "${BASEMAP}_Data.las" | \
  r.colors Serpent_Mound_Model_LAS_Data color=bcyr -e
     r.in.xyz in=- out=${BASEMAP}_Data fs=space
  r.colors ${BASEMAP}_Data color=bcyr -e


Clean DEM:
=== Clean DEM ===
  # convert to vector points
  # convert to vector points
  r.to.vect -z feature=point in=Serpent_Mound_Model_LAS_Data out=Serpent_Mound_Model_LAS_pt
  r.to.vect -z feature=point in=${BASEMAP}_Data out=${BASEMAP}_pt
   
   
  # interpolate using a regularized spline fit
  # interpolate using a regularized spline fit
  v.surf.rst layer=0 in=Serpent_Mound_Model_LAS_pt elev=Serpent_Mound_Model_LAS.rst
  v.surf.rst layer=0 in=${BASEMAP}_pt elev=${BASEMAP}.rst
   
   
  # create buffer area around origial data points
  # create buffer area around origial data points
  r.buffer in=Serpent_Mound_Model_LAS_Data out=Serpent_Mound_Model_LAS.5m_buff dist=5
  r.buffer in=${BASEMAP}_Data out=${BASEMAP}.5m_buff dist=5
   
   
  # crop interpolated DEM to only include areas nearby actual data
  # crop interpolated DEM to only include areas nearby actual data
  r.mapcalc 'Serpent_Mound_Model_LAS.smooth = \
  r.mapcalc "${BASEMAP}.smooth = \
   if(isnull(Serpent_Mound_Model_LAS.5m_buff), \
   if( isnull(${BASEMAP}_buff), null(), ${BASEMAP}.rst"
      null(), Serpent_Mound_Model_LAS.rst'
   
   
  # set colors to something nice
  # set colors to something nice
  r.colors Serpent_Mound_Model_LAS.smooth color=bcyr -e
  r.colors ${BASEMAP}.smooth color=bcyr -e


== Sample data ==
== Sample data ==

Revision as of 08:46, 4 February 2009

LIDAR and Multi-beam Swath bathymetry data

Modules

Import

  • r.in.xyz - Create a raster map from an assemblage of many coordinates using univariate statistics.
    (example)
  • v.in.ascii - Import data from an ASCII file to GRASS vector format.
    Limited to a few million data points unless topology and database creation is skipped with the -bt flags

Analysis

  • v.outlier - Removes outliers from vector point data.
  • v.lidar.growing - Building contour determination and Region Growing algorithm for determining the building inside.
  • v.lidar.correction - Correction of the v.lidar.growing output. It is the last of the three algorithms for LIDAR filtering.

Surface generation

  • v.surf.rst - Spatial approximation and topographic analysis using regularized spline with tension.
  • v.surf.idw - Surface interpolation from vector point data by Inverse Distance Squared Weighting.
  • v.surf.bspline - Surface interpolation from vector point data by bicubic or bilineal interpolation with Tykhonov regularization.
  • r.fillnulls - Fills no-data areas in raster maps using v.surf.rst splines interpolation.

Swath Bathymetry Tools

see also the Marine_Science#Multibeam_sonar_processing wiki page

  • The v.swathwidith module by David Finlayson for planning surveys. (development page)
  • GRASS integration with MB-System (GPL) software for processing Multibeam and Sidescan Sonar data. GRASS + MBsys + GMT make a nice scriptable trio.

LIDAR Tools

  • r.terraflow - computation of flow direction, flow accumulation and other basic topographic terrain indices from massive raster digital elevation models (DEM). From the Duke University STREAM project.
  • LAStools are a set of simple command line tools (including source code) for converting to/from ASCII, viewing, comparing, and compressing LIDAR data.
  • libLAS ASPRS LiDAR data translation tools

Example

Import


Check bounds and SRS:

lasinfo "Serpent_Mound_Model_LAS_Data.las"
[...]
 Min X Y Z                  289020.900000 4320942.610000 166.780000
 Max X Y Z                  290106.020000 4323641.570000 215.480000
Spatial Reference           +proj=utm +zone=17 +ellps=WGS84 +units=m 

After creating a suitable UTM zone 17 location (EPSG:32617) set the region according to the information from lasinfo at 1m resolution, rounding grid outwards to align to whole meters:

g.region n=4323641.57 s=4320942.61 w=289020.90 e=290106.02 res=1 -ap

Finally, import with r.in.xyz with data piped directly from the las2txt program and set a nice equalized color table:

BASEMAP="Serpent_Mound_Model_LAS"
las2txt --stdout "${BASEMAP}_Data.las" | \
   r.in.xyz in=- out=${BASEMAP}_Data fs=space
r.colors ${BASEMAP}_Data color=bcyr -e

Clean DEM

# convert to vector points
r.to.vect -z feature=point in=${BASEMAP}_Data out=${BASEMAP}_pt

# interpolate using a regularized spline fit
v.surf.rst layer=0 in=${BASEMAP}_pt elev=${BASEMAP}.rst

# create buffer area around origial data points
r.buffer in=${BASEMAP}_Data out=${BASEMAP}.5m_buff dist=5

# crop interpolated DEM to only include areas nearby actual data
r.mapcalc "${BASEMAP}.smooth = \
  if( isnull(${BASEMAP}_buff), null(), ${BASEMAP}.rst"

# set colors to something nice
r.colors ${BASEMAP}.smooth color=bcyr -e

Sample data

Widely used in GRASS tutorials

Other

  • USGS Center for LIDAR Information Coordination and Knowledge (aka CLICK) - USGS LiDAR point cloud distribution site
    http://lidar.cr.usgs.gov
  • EarthScope Spatial Data Explorer - A java application for querying, browsing, and acquiring data from the EarthScope Spatial Data Repository. Currently includes a number of LiDAR datasets.
    http://www.earthscope.org/data/lidar.php

Links

  • libLAS - LAS 1.0/1.1 ASPRS LiDAR data translation toolset