DEM

Feel free to ask any question here
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: DEM

Post by daniel »

Ah, ah, I know perfectly what a DEM is ;) Or to be more precise I know it's a very misleading term as there's no clear convention (see https://en.wikipedia.org/wiki/Digital_elevation_model).

At least I did understand from the first post that you were not referring to a "DTM" (contrarily to what the 'gisresources.com' page states ;) ) as you wanted to make the ground points 'flat'. What was a bit unclear in your message was what you wanted to do with the vegetation (points).

If I understand well now, you actually want to 'subtract' the DTM from the DSM?

If yes then you have two options:
1) use the Rasterize tool: if there's enough ground points below your vegetation (i.e. a good lidar cloud with enough penetration) then you can simply rasterize the cloud and export the resulting grid as a cloud exporting the 'height range' scalar field:
cc_rasterize_height_range.JPG
cc_rasterize_height_range.JPG (15.53 KiB) Viewed 9956 times
If you have both ground points and vegetation points in your cloud, then you'll get in this scalar field the difference between the two. You can then export scalar field as the Z coordinate:
cc_dsm_dtm_diff.JPG
cc_dsm_dtm_diff.JPG (98.44 KiB) Viewed 9956 times
2) if there's not enough ground points (i.e. there are holes in your ground cloud), then you'll have to fill them by triangulating the ground points first (e.g. with the Delaunay triangulation tool, or with the Rasterize tool once again, by using the 'Interpolate' mode for the 'fill empty celles' option). In the first case, you'll have a mesh that you'll need to convert to a dense cloud (Edit > Mesh > Sample points). You can then either merge the two clouds (filled DTM + vegetation) and use the method described above (1). Or alternatively use the 'Compute 2.5D Volume' tool that does the same but between two separate clouds (you can export the 'difference' raster directly)
Daniel, CloudCompare admin
Sile
Posts: 21
Joined: Tue Oct 10, 2017 3:40 pm

Re: DEM

Post by Sile »

Daniel,

Sorry, I did not see that you responded to my last post. Yes you are right, I want to 'subtract' the DTM from the DSM, so that only the vegetation is left. I am following your steps but am not getting the results I need.

1) I am using LiDAR data from terrestrial scanning, so I am not sure if everything works the same.
capture_2.jpg
capture_2.jpg (23.57 KiB) Viewed 9929 times
2) The image that you posted where it shows the raw data being turned into a DSM, I cannot figure out how how to do that.
cc_dsm_dtm_diff.JPG
cc_dsm_dtm_diff.JPG (98.44 KiB) Viewed 9929 times

3) Are these steps correct? rasterize the data: Tools>Projection>Rasterize(and contour plot)

step: 2
Active Layer: height grid values
Direction: Z
Cell height: Minimum height
interpolate SF(s): average value
re sample input cloud: checked
Fill With: leave empty

Update grid
Export tab>height range checked>Raster>Export heights>OK

This is the results I get:
Capture_1.png
Capture_1.png (219.97 KiB) Viewed 9929 times
Thank you so much for your time. I am very new to this kind of work and have little to no guidance. So this is a huge learning experience.
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: DEM

Post by daniel »

Hum, it can work with a TLS scan if you have a good coverage and not too many 'shadows' (however it's a bit hard to do that with so many trees ;).

Then in the Rasterize tool, I think most of your parameters are good, but:
  • you should use a much smaller grid step to increase the resolution. Of course it depends on the density of your cloud, but it should be very dense if it's TLS, isn't it?
  • I don't think the 'resample input cloud' option is helping here, but it may work nevertheless (you can try without first, and then test it if it worked).
Last but not least, you have to check the 'height range' option. Then export the cloud. On the exported cloud, make the 'height range' scalar field active, and the convert this scalar field to the 'Z' coordinate (with 'Edit > Scalar fields > Export SF to coordinate(s)'). This will replace the Z coordinate of every points by the difference between the min and max altitudes at their (average) position. This is exactly what you are looking for.

Don't hesitate to send me a (sample) cloud if you want me to test it on my side and give you better directions.
Daniel, CloudCompare admin
Sile
Posts: 21
Joined: Tue Oct 10, 2017 3:40 pm

Re: DEM

Post by Sile »

Daniel,

Unfortunately I cannot send you my data because I do not have that authority. I believe that we are not understanding each other still. I will be working with another team of engineers shortly who have work with your software. Hopefully we will be able to communicate a little better. None the less, thank you for your time. I think I need to start over and understand what the program is doing when I give it a command. Are there any resources that you have to help me better understand the processes the program is taking?
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: DEM

Post by daniel »

I think the most helpful would be the wiki? http://www.cloudcompare.org/doc/wiki/in ... =Rasterize
Daniel, CloudCompare admin
Sile
Posts: 21
Joined: Tue Oct 10, 2017 3:40 pm

Re: DEM

Post by Sile »

Thank you. I'll take a look at this and if I have any more questions, I'll let you know. Thanks again for your help.
Sile
Posts: 21
Joined: Tue Oct 10, 2017 3:40 pm

Re: DEM

Post by Sile »

Hello Daniel,

I figured out what was going wrong. I wasn't activating the "Scalar Field" in the properties Scalar Fields section. I have made the dsm. The problem I am having now is that all my trees are being stretched in the Z dimension. Have you seen this problem before?
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: DEM

Post by daniel »

Can you show me what it looks like?
Daniel, CloudCompare admin
Sile
Posts: 21
Joined: Tue Oct 10, 2017 3:40 pm

Re: DEM

Post by Sile »

Here is what I have.
Attachments
Capture_1.PNG
Capture_1.PNG (105.87 KiB) Viewed 9880 times
daniel
Site Admin
Posts: 7707
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: DEM

Post by daniel »

What am I looking at?!

Are you sure you are projecting along the right dimension? Or using the right scalar field?
Daniel, CloudCompare admin
Post Reply