brycefrank / pyfor

Tools for analyzing aerial point clouds of forest data.
MIT License
93 stars 19 forks source link

Point gridding can be simplified #67

Closed brycefrank closed 4 years ago

brycefrank commented 4 years ago

The following gridding operation is too complex:

https://github.com/brycefrank/pyfor/blob/091a66614b57271187be61f9e858640114d2f640/pyfor/rasterizer.py#L35-L39

The above can be generalized to any arbitrary bin edges (irregular distances, etc), but is too complex for the case of regular bin edges. This can be replaced with a simple division by resolution and floor operation. The y axis needs to be flipped in some way first such that the bin indices are matrix style.