hydro-flattening DEM

194 views
Skip to first unread message

Shaun Blackmore

unread,
Sep 20, 2023, 2:13:22 AM9/20/23
to LAStools - efficient tools for LiDAR processing
Hi all,

I'm currently in the process of generating a 1-meter DEM from LAS files, with a focus on class 2 and 64 data points. Additionally, I'm aiming to apply hydro-flattening techniques to specific water areas within the DEM.

To try and achieve this, I have been using the following las2dem script:

las2dem -i input.las -elevation -keep_extended_class 2 64 -lakes hydroflatten.shp -step 1 -odir output_DEM.tif -cores 20

However, I've encountered an issue with this approach as it surpasses the maximum point limit of approximately 20 million points that las2dem can handle. I did attempt to utilize blast2dem as an alternative, but unfortunately, it does not support the '-lakes' argument.

I'm seeking guidance on whether there is a method within the lastools suite that allows for the creation of a DEM with hydro-flattened water areas, especially when dealing with large quantities of LAS file points. Your insights and suggestions would be greatly appreciated.



Jochen Rapidlasso

unread,
Sep 20, 2023, 4:12:23 AM9/20/23
to LAStools - efficient tools for LiDAR processing
Hi Shaun,
you can solve this problem by creating tiles first.
Then for every tile you do the DEM creation, using the whole hydroflatten.shp to crop the water areas. Using tiles you will also increase speed significant because of the multi core option. With the script/line you presented the -cores option will be ignored because you have just one input file.
So your script could look something like this:

lastile64 -i input.las -odir tiles -olaz
las2dem64 -i tiles\*.laz -elevation -keep_extended_class 2 64 -lakes hydroflatten.shp -step 1 -o output_DEM.tif -cores 20

Best regards,

Jochen @rapidlasso

Shaun Blackmore

unread,
Sep 21, 2023, 4:55:03 AM9/21/23
to LAStools - efficient tools for LiDAR processing
Hi Jochen,

The current script works, but I'm encountering a couple of issues when running it.

Firstly, the "cores" function doesn't work for lasboundary. I’m running this script through multiple files, 50 to 1000’s of files.

Secondly, I'd like to incorporate the GDA 2020 datum into the script.

Could you please assist me in addressing these concerns?

Jochen Rapidlasso

unread,
Sep 21, 2023, 5:52:19 AM9/21/23
to LAStools - efficient tools for LiDAR processing
Hi Shaun,
lasboundary support multi core. Please tell exactly what you did and why you believe it does not work as you expect.
About GDA 2020: Most LAStools support the argument "-gda2020". Please tell whats unclear about this.
Consider to read the readme las2las themes about georeferencing and datum conversion.

Best regards,

Jochen @rapidlasso

Alejandro Hinojosa

unread,
Sep 21, 2023, 3:28:40 PM9/21/23
to last...@googlegroups.com
Hello,

Can you set the value of the cells that will be covered by the shape? or what value is it assigned to the cells inside the polygon, one of attributes of the shape?

Thanks

Alejandro Hinojosa

On Wed, Sep 20, 2023 at 1:12 AM Jochen Rapidlasso <rapid...@gmail.com> wrote:
****************************************************************
** ADVERTENCIA: Mensaje recibido desde una dirección EXTERNA al CICESE **
****************************************************************
--
Download LAStools at
https://rapidlasso.de
Manage your settings at
https://groups.google.com/g/lastools/membership
---
You received this message because you are subscribed to the Google Groups "LAStools - efficient tools for LiDAR processing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lastools+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lastools/43e846cc-78c7-4ede-94eb-0b571c274e7an%40googlegroups.com.

Shaun Blackmore

unread,
Sep 22, 2023, 2:06:43 AM9/22/23
to LAStools - efficient tools for LiDAR processing
Hi,

I have added my script below to select multiple files within a folder.

Right now, I'm working with 18 las files as an input.

lastile64 -i %LIDAR% -odir %TEMPDIR% -olaz -cores 5
las2dem64 -i %TEMPDIR%\*.laz -elevation -keep_extended_class 2 64 -lakes %Hydro% -step %STEP% -gda2020 -odir %DTM% -otif -cores 5

Neither the lastiles nor lasboundary are using core's function. I'm getting the following error: Warning: not complied with multi-core batching. ignoring '-cores- ..

The computer I'm working on has more than enough cores for this task.

Thank you for your help, as I'm still new to lastools and learning.

Regards,

Shaun Blackmore

Jochen Rapidlasso

unread,
Sep 22, 2023, 2:13:25 AM9/22/23
to LAStools - efficient tools for LiDAR processing
Hi Shaun,
thanks for sharing your command line.
Please change this to
lastile -i %LIDAR% -odir %TEMPDIR% -olaz -cores 5 -cpu64
las2dem -i %TEMPDIR%\*.laz -elevation -keep_extended_class 2 64 -lakes %Hydro% -step %STEP% -gda2020 -odir %DTM% -otif -cores 5 -cpu64
Control multicore ist just implemented for the 32bit version right now. But using the -cup64 argument will cause to call the 64bit version for all sub-processes. Right now we complete the full port to 64 bit: Quite soon we will support this also on 64bit directly.

Best regards,

Jochen @rapidlasso
Reply all
Reply to author
Forward
0 new messages