las2dem - rasterizing LAS files into DEMs

2,402 views
Skip to first unread message

Martin Isenburg

unread,
Apr 8, 2011, 12:05:19 PM4/8/11
to LAStools - efficient command line tools for LIDAR processing
hello,

las2dem.exe takes a LAS/LAZ file as input and creates a DEM in BIL,
TIF, PNG, or JPG format as output. If the LAS/LAZ file contains
projection information, las2dem.exe will also create a KML file that
geo-references the DEM for display withing Google Earth. If the LAS/
LAZ file does not contain projection information, you can provide the
projection information in the command line. as an example, i was
running las2dem.exe on the 'SerpentMound.laz' data

las2dem.exe -i SerpentMound.laz -o SerpentMound.png

because the 'SerpentMound.laz' contains projection information, the
las2dem.exe tool automatically creates a KML file called
SerpentMound.kml. If you ever wondered why this data set is called
"Serpent Mound", then check out the resulting hillside-shaded DEM in
Google Earth. you will notice that the "serpent" - while barely
visible in the Google Earth imagery - is beautifully prominent in the
hillside-shaded bare earth DEM (you'll have to zoom in a little).

cheers,

martin

Martin Isenburg

unread,
Apr 8, 2011, 12:07:23 PM4/8/11
to LAStools - efficient command line tools for LIDAR processing
las2dem went through a major redesign and has new features:

* it supports ESRI ASC grids
* it supports floating-point for BIL & TIF output
* you can create elevation OR intensity raster
* it can read from multiple LAS files and merge them
* lots of new filter options
* improved false coloring ramp
* ...

http://www.cs.unc.edu/~isenburg/lastools/download/las2dem.exe
http://www.cs.unc.edu/~isenburg/lastools/download/las2dem_README.txt
http://www.cs.unc.edu/~isenburg/lastools/download/lastools.zip

here some example command lines for the data that comes with LAStools.
the README contains more example command lines and a detailed
description of other options.

las2dem -i TO_core_last_zoom.laz -o dem.png -utm 17T -v -elevation -
gray
las2dem -i TO_core_last_zoom.laz -o dem.png -utm 17T -v -elevation -
gray -min_max 46.83 90
las2dem -i TO_core_last_zoom.laz -o dem.png -utm 17T -v -elevation -
false
las2dem -i TO_core_last_zoom.laz -o dem.png -utm 17T -v -elevation -
false -min_max 46.83 90

las2dem -i TO_core_last_zoom.laz -o dem.png -utm 17T -v -hillshade
las2dem -i TO_core_last_zoom.laz -o dem.png -utm 17T -v -hillshade -
light 0 0 1
las2dem -i TO_core_last_zoom.laz -o dem.png -utm 17T -v -intensity -
min_max 0 1000 -gray
las2dem -i TO_core_last_zoom.laz -o dem.png -utm 17T -v -intensity -
min_max 0 1000 -false

Martin Isenburg

unread,
Apr 8, 2011, 12:09:21 PM4/8/11
to LAStools - efficient command line tools for LIDAR processing
more info here and a picture of the results are here:

https://lidarbb.cr.usgs.gov/index.php?showtopic=6448
Message has been deleted

RLW

unread,
Apr 12, 2011, 12:43:37 AM4/12/11
to LAStools - efficient command line tools for LIDAR processing
Martin,

I found your las2dem.exe utility with a Google search. First of all,
thanks for a tool that (almost) does what I need: convert .LAS files
into KML files. I'm a relative newbie at LIDAR, but have some amateur/
hobbyist experience with GIS in general.

I'm wrestling with a couple of things:

1. I get my LIDAR files from the Ohio GIS OSIP site - these are .ZIP
files containing a .LAS file and an XML file with metadata. Your
README.txt file refers to a .LAZ file. What are the contents of
the .LAZ file? I tried renaming the .ZIP file to .LAZ, but that
failed with an error message. I made the assumption that las2dem.exe
would interpret the XML file and extract the coordinate base (State
Plane - Ohio South - NAD83) from the XML metafile, but it didn't. I
ended up using command line args to get the .LAS file converted to a
PNG and a KML file. Is, perhaps, a .LAZ file a gzipped tar file
containing a LAS file and some kind of well-defined metadata file (not
an arbitrary XML file)?

2. I played around with the file, and it georeferenced it correctly on
Google Earth, but I was unable to see enough details in the ground
return. Is there a way to bias or exaggerate elevations? All I could
do was get a grayscale shading. Evidently, it was not enough to bring
out the detail I was looking for (it could be that the detail isn't in
the file - it's a Hopewell or Fort Ancient mound pretty much obscured
by a tree canopy). Theoretically, the Ohio LIDAR data Z axis is in 1
foot increments - the mound I'm trying to detect is about 3 feet above
the surrounding ground level. If I could apply a color range for
elevations, I could possibly detect it. Is there a way to map a range
of colors to a range of Z values (elevations)? Can it be scaled to
the scope of the range of elevations in a clipped portion of the LAS
file?

3. Here is the URL for the zipfile I mentioned:
http://gis3.oit.ohio.gov/ZIPARCHIVES/ELEVATION/LIDAR/Pickaway/S1885565_LAS.zip.

4. Here's the command line I was using to turn it into a set of KML/
PNG files: las2dem -i S1885565.las -o Crossmound-LIDAR.png -sp83 OH_S
-feet -keep_class 2 -drop_class 3 -drop_class 4 -drop_class 5 -
keep_class 6 -elevation_feet

Class 2 is ground, classes 3-5 are vegetation (low, medium, high) and
class 6 is buildings. I got that from looking at the classification
settings with the file open in PointVue LE. I'm pretty sure (but not
positive) that all of the Ohio LIDAR data uses the same settings.

The Google Earth coordinates of the area I'm investigating are
39.562395, -82.785149. That's the center of the mound. The mound
(known as Cross Mound) is in the shape of a cross, about 90'x90'. The
arms are approximately 15' wide, and the north/south arm of the cross
is about 11 degrees west of true north. It's an effigy mound,
probably of Fort Ancient culture origin (around 1000 BPE).

Any suggestions you can give me that will help detect the mound by
it's 3' elevation would be greatly appreciated.

Again, thanks for a tantalizingly good utility (at least, it maps a
LIDAR file to a GE KML file - best I've found so far!)

RLW

Finnegan, David ERDC-CRREL-NH

unread,
Apr 12, 2011, 8:55:48 AM4/12/11
to last...@googlegroups.com
Rlw,
The xml with the file is not a standard part of a las file. It's a product
generated by the acquisition software to document metadata.
David C Finnegan
Research Physical Scientist
CRREL
---------
Message sent via my BlackBerry Wireless Device

Martin,

RLW

--
You are subscribed to the group
"LAStools - efficient command line tools for LIDAR processing"
You can download LAStools at
http://www.cs.unc.edu/~isenburg/lastools/
You can visit the LAStools group at
http://groups.google.com/group/lastools/

Stuart Edwards

unread,
Apr 12, 2011, 9:28:12 AM4/12/11
to last...@googlegroups.com

> --
> You are subscribed to the group
> "LAStools - efficient command line tools for LIDAR processing"
> You can download LAStools at
> http://www.cs.unc.edu/~isenburg/lastools/
> You can visit the LAStools group at
> http://groups.google.com/group/lastools/

Not sure if this is exactly what you are looking for, but this link:

http://grass.osgeo.org/wiki/LIDAR

provides a description of the process for examining the Serpent Mound - in color - (also in Ohio) based on the Ohio LIDAR data, but using GRASS (open source GIS). You'll need to use las2txt to convert the las file to text for import into GRASS.

Stu

Martin Isenburg

unread,
Apr 12, 2011, 10:10:41 AM4/12/11
to LAStools - efficient command line tools for LIDAR processing
Hello,

> Your README.txt file refers to a .LAZ file.  What are the contents of
> the .LAZ file?  I tried renaming the .ZIP file to .LAZ, but that
> failed with an error message.  I made the assumption that las2dem.exe
> would interpret the XML file and extract the coordinate base (State
> Plane - Ohio South - NAD83) from the XML metafile, but it didn't.  I
> ended up using command line args to get the .LAS file converted to a
> PNG and a KML file.

A LAZ file is a lossless compressed LAS file. No more. No less. See
http://laszip.org

> 2. I played around with the file, and it georeferenced it correctly on
> Google Earth, but I was unable to see enough details in the ground
> return.  Is there a way to bias or exaggerate elevations?  All I could
> do was get a grayscale shading.

I looked at the file. It covers an area of 5000 * 5000 = 25 000 000
sqft and contains 347267 ground points. So that gives you on average
one elevation sample per 72 square foot. Not sure that gives you
enough details for your purposes.

> the mound I'm trying to detect is about 3 feet above
> the surrounding ground level. If I could apply a color range for
> elevations, I could possibly detect it. Is there a way to map a range
> of colors to a range of Z values (elevations)? Can it be scaled to
> the scope of the range of elevations in a clipped portion of the LAS
> file?

Yes. The default setting on las2dem gets you a hillside-shading. The
switches '-gray' or '-false' give you an elevation coloring. By
default the elevation range of the LAS header is used. You can narrow
this range around the filtered points with '-compute_min_max' or
specify an even narrower range with '-min_max 875 1000'.

> 4. Here's the command line I was using to turn it into a set of KML/
> PNG files:  las2dem -i S1885565.las -o Crossmound-LIDAR.png -sp83 OH_S
> -feet -keep_class 2 -drop_class 3 -drop_class 4 -drop_class 5 -
> keep_class 6  -elevation_feet

I have simplified your command line a little bit and changed it to
false colors:

* use either '-keep_class' or '-drop_class' filters, not both
* run "lasinfo -i S1885565.las" on the file and you will see that
there are no point classifications of type 6
* no need to specify that the elevations are in feet as we do not
produce elevation output
* increased spacing to 100 square/feet per pixel

The command line and result are here:

las2dem -v -i S1885565.las -o Crossmound-LIDAR.png -sp83 OH_S -feet -
keep_class 2 -false -step 10 -compute_min_max
http://www.cs.unc.edu/~isenburg/lastools/download/test/Crossmound-LIDAR-FALSE.kmz

> The Google Earth coordinates of the area I'm investigating are
> 39.562395, -82.785149.  That's the center of the mound.  The mound
> (known as Cross Mound) is in the shape of a cross, about 90'x90'.  The
> arms are approximately 15' wide, and the north/south arm of the cross
> is about 11 degrees west of true north.  It's an effigy mound,
> probably of Fort Ancient culture origin (around 1000 BPE).
>
> Any suggestions you can give me that will help detect the mound by
> it's 3' elevation would be greatly appreciated.

Usually the hillside shading seems an efficient way for the human
perception system to detect "bumps" in a landscape. you can exaggerate
the "bumpiness" by scaling the elevations with '-scale 10' for example
or by changing the light direction with '-light 0 0 1' for example.
the command line and result are here:

las2dem -v -i S1885565.las -o Crossmound-LIDAR.png -sp83 OH_S -feet -
keep_class 2 -step 10 -scale 10
http://www.cs.unc.edu/~isenburg/lastools/download/test/Crossmound-LIDAR.kmz

I detected some sort of cross and marked it with a circle. But I doubt
it is the right one. Seems too big ...

Cheers,

Martin @lastools

Martin Isenburg

unread,
Apr 12, 2011, 10:39:31 AM4/12/11
to LAStools - efficient command line tools for LIDAR processing
Stuart,

nice link. seems the Serpent Mound is everybody's favorite. I believe
this particular data set is from Applied Imagery [1] and not from the
Ohio GIS OSIP site. I had used it to introduce las2dem in USGS forum
as an example of hillside shading exactly for the reasons you point
out: one gets to "see" the serpent through the canopy in Google Earth:

http://www.cs.unc.edu/~isenburg/lastools/download/SerpentMound.kmz
https://lidarbb.cr.usgs.gov/index.php?showtopic=6448

Cheers,

Martin @lastools

[1] http://www.appliedimagery.com/Serpent%20Mound%20Model%20LAS%20Data.las

RLW

unread,
Apr 12, 2011, 10:52:43 AM4/12/11
to LAStools - efficient command line tools for LIDAR processing
Martin, et.al.,

Thanks for all the replies and help. When I downloaded las2dem.exe, I
didn't realize that there was a whole set of tools that go along with
it. I was just pretty excited to be able to find something that would
generate an image and a KMZ file from LIDAR data. I haven't had a
chance this morning to download the other utilities, but will at some
point today.

I picked up the class 6 from looking at the class list on that LAS
file in PointVueLE. I said I was a newbie!

Your second KMZ file (with the circle) did show up the cross, but your
circle was 2084 feet to the south. The heading and distance from the
center of your circle is 353.92 degrees and 2084 feet north. The
cross is barely visible in that image, but I know where it is and what
it looks like - there's a depression in the center. The center of the
cross is at 39.562395, -82.785149.

Thanks for the tips on shading. I played around with it after I
posted last night and found the -scale and -step args.

Is there some description of the values that can be plugged into the -
light argument? I'm thinking I can change the shading a bit to
display a bit more relief by changing the sun angle and azimuth.

Thanks again for the help,

RLW

Stuart Edwards

unread,
Apr 12, 2011, 12:27:51 PM4/12/11
to last...@googlegroups.com
Very impressive ! ..... the cross shows up quite nicely at the location indicated by RLW - about 75 ft across?.

You're right about the source of the LIDAR for Serpent of course -- and the increased resolution makes a huge difference.

I must dig into your tool-box a little deeper - obviously a lot of good stuff in there.

thanks!

Stu

RLW

unread,
Apr 12, 2011, 1:58:13 PM4/12/11
to LAStools - efficient command line tools for LIDAR processing
On Apr 12, 12:27 pm, Stuart Edwards <sedwar...@cinci.rr.com> wrote:
> Very impressive ! ..... the cross shows up quite nicely at the location indicated by RLW - about 75 ft across?.

Stuart,

The east-west arms are about 90 feet long. The south-north arm is
about 75-80', as there's been erosion at the edge of the spur of land
on the north side, over the past one or two thousand years. If you
know where to look for it, it's visible on Google Earth. There are
also 4 other conical mounds to the west, but only one shows up in the
LIDAR data.

The way I found Martin's tools was from a Google search on LIDAR and
Serpent Mound. I'd love to see a scan of Cross Mound at the same
resolution as the Serpent Mound data.

I've been playing around with the clipping function and managed to
clip the z axis quite a bit, next is to figure out -light and what the
3 numbers mean in regards to sun-angle and azimuth.

A couple of archaeologists here in Ohio have discovered "lost"
Hopewell culture structures in a woodlot using LIDAR data.

I'm a volunteer for the local park system that owns/manages Cross
Mound. We're looking for other structures that may be in the area,
hence the interest in Martin's tools. Since I know Cross Mound's
shape and location, I'm using it to "ground-truth" the LIDAR data so I
can check another couple of tantalizing locations. Dr. Brad Lepper
has a theory that the Hopewell Culture folks built a perfectly
straight road (the Great Hopewell Road, or GHR), about 60 miles long,
from their earthworks in Newark, OH to Chillicothe, OH. If it
existed, it passed about 1.75 miles west of Cross Mound. The "lost"
Hopewell structures were part of the GHR, right where they should be,
a few miles south of the Newark end. I have a friend who owns a
century farm (been in the family more than 100 years) on the line of
the GHR. Her parents and a farm hand who was old when she was a kid
spoke of an "Indian racetrack" in one of their fields. The shape he
described is similar to other structures seen in aerial photos from
the 1930s. I hope to use the LIDAR data to identify the area in their
field as one.

Since our park system is practically broke, I think I qualify for use
of the software in "free" mode.

RLW

Jason Oldham

unread,
Apr 16, 2011, 1:58:21 PM4/16/11
to last...@googlegroups.com
Martin,

I have 3 LiDAR datasets from different years collected over the same area.
The extents on all of the datasets are slightly different but I need all
three datasets to be converted to DEMs and still be aligned. In completing
this task I have run into an issue. When I use the LAS2DEM tool the
resulting DEM always ends up being in a different location than the original
data. The commands I have used are as follows:

1) las2dem -i temp\in.las -o DEM\dem.asc -kill 5 -elevation -meter
-elevation_meter
2) las2dem -i temp\in.las -o DEM\dem.asc -kill 5 -elevation -meter
-elevation_meter -utm 17T

For some reason output from this is showing up directly north of the LAS
file that was used for input. As a second test I downloaded the serpent
mound sample dataset and tried using it with same command line as 1) above
with the same results. It seems that if I change the spatial extent of the
dataset the DEM is always shifted directly north of the original LAS data
and the southern edge of the DEM always seems to line up with the northern
edge of the LAS file. Is it possible that the lower left corner of the ASC
dem is being set as the upper left corner causing this to happen or am I
doing something wrong in the command line?

Thanks for your time

-Jason Oldham
-Candidate for MSc - Geography
-University of Waterloo, Waterloo ON, Canada

Martin Isenburg

unread,
Apr 17, 2011, 8:49:51 AM4/17/11
to LAStools - efficient command line tools for LIDAR processing
Hello Jason,

thank you for the bug report. There was a copy & paste error for the
lower left y corner in (yllcorner) in my ESRI ASC ASCII GRID writer. I
just fixed it for both, las2dem and lasgrid.

http://www.cs.unc.edu/~isenburg/lastools/download/las2dem.exe
http://www.cs.unc.edu/~isenburg/lastools/download/las2dem_README.txt
http://www.cs.unc.edu/~isenburg/lastools/download/lasgrid.exe
http://www.cs.unc.edu/~isenburg/lastools/download/lasgrid_README.txt

Cheers,

Martin @lastools
Reply all
Reply to author
Forward
Message has been deleted
0 new messages