geotrellis / geotrellis-pointcloud

GeoTrellis PointCloud library to work with any pointcloud data on Spark
Apache License 2.0
26 stars 10 forks source link

Approximate EPT tree depth #76

Closed jpolchlo closed 4 years ago

jpolchlo commented 4 years ago

For very large EPT catalogs, the hierarchy description can be split over many files (one example from 3DEP had over 30k files). We were reading the complete hierarchy to determine the tree depth for resolution calculations, but this was utterly impractical for these large catalogs. This resulted in punting and assigning a GridExtent to the layer at the coarsest possible resolution. This caused problems with the interaction of the DEM raster sources and WCS, preventing appropriate resolution selection, and leading to coarse results: coarse

This PR addresses this problem by estimating the number of tree levels. In many cases, the method used here will be an overestimate, and in other cases it will underestimate, depending on the shape of the EPT tree.

With this fix, we can see a more favorable result in WCS visualization: full-res

This uncovered problems with IDW rendering of higher zoom levels: zoomed

The problem was related to using the cellwidth/cellheight as the extent of a point's influence on the rendering. This excluded point centers in the 8-connected neighborhood. I've increased the radius of influence to that of the diagonal length of the cell and added a bit of fudge. This should balance the number of missing cells with the blurring and dilation of the final result: zoom-fixed

This PR is built on top of #67, so that PR should be merged first.

Closes #69