Page 1 of 1

Finding the minheight, maxheight, and height range per cell

Posted: Wed Mar 08, 2017 8:23 am
by pwan
Hello,

I want to get the height range per cell of a selected point cloud in my plugin. I know the "Tools->Projection->Rasterize" can be used do that, but I don't know how to use the inner function in "ccRasterGrid.h", or "ccRasterizeTool.h". What should I after I get a ccPointCloud *pc ?

Thanks!

pwan

Re: Finding the minheight, maxheight, and height range per cell

Posted: Wed Mar 08, 2017 8:17 pm
by daniel
Well, the ccRasterizeTool class has not been meant to be used this way, however you can use the 'ccRasterGrid' class:
- init the grid with the right dimensions (ccRasterGrid::init)
- and then project the cloud in the grid (ccRasterGrid::fillWith)

Once done, you can access to the cells of the grid (row by row with the 'rows' member). A cell is valid if its height (h) is not NaN. In this case the other statistics are valid (see the ccRasterCell structure).