问题
I have .las (lidar data) file, now I wanted to know the size of it, for example how long it's width and height in kilometers.
How is it possible to retrieve these kind of info?
回答1:
tl;dr: install libLAS and run lasinfo myfile.las
.
Lasfile headers, in general, shouldn't be trusted since they may not agree with the true data bounds. A more robust approach is to calculate the spatial extents of the data by reading the points themselves. Here's a few free and open-source ways to calculate the true bounds of a lasfile:
- libLAS, via
lasinfo mylasfile.las
- libLAS can also be compiled with LASzip support to read
.laz
files
- libLAS can also be compiled with LASzip support to read
- PDAL, via
pdal info myfile.las
- PDAL can also be configured to read other types of pointcloud files, including compressed
.laz
and more
- PDAL can also be configured to read other types of pointcloud files, including compressed
- If you want to inspect the lasfile's extents (and other properties) programically with Python, you can use laspy
Many of these software projects are available via package managers for your system:
- Windows: OSGeo4W includes libLAS, LASzip, and PDAL
- Ubuntu:
sudo apt-get install liblas-bin
will installlasinfo
on Ubuntu 14.04, 12.04, and others - OSX:
brew install pdal liblas
using Homebrew - laspy can be installed via
pip install laspy
回答2:
You best bet is to use a specific software to find out the extent of this lidar file.
Another way you can probably do it is to look at the header section of the file (if you have the raw file), which must state the extent as well.
Otherwise, talk to the data provider (if you can´t find out the extent any other way). He probably has the software and knows the extension of your dataset.
George
回答3:
You can use the lasinfo
utility from lastools
which will return the .las header information (including the extent):
http://www.cs.unc.edu/~isenburg/lastools/
The lasinfo
module in SAGA GIS
will provide the same information:
http://www.saga-gis.org/
回答4:
With Fusion, an option is the command line Catalog
to retrieve descriptive statistics.
Suppose Fusion is installed under the directory c:\fusion
and the las file is stored in c:\lidar\point_cloud.las
. Write and run:
c:\fusion\catalog c:\lidar\point_cloud.las c:\lidar\point_cloud
An output example is:
Add switches to obtain more information or to adapt the command to specific needs (e.g.; switch 'coverage' will show nominal coverage area of the entire lidar cloud).
来源:https://stackoverflow.com/questions/1342900/extracting-descriptive-information-from-a-lidar-cloud-las-files