brycefrank / pyfor

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

missing else branch for tolerance parameter in KrausPfeifer1998 #77

Closed Crghilardi closed 4 years ago

Crghilardi commented 4 years ago

If a tolerance other than 0 is used in the KrausPfeifer1998, it doesn't get passed through to any of the functions and returns the same as leaving it as the default. I found this after reading through this article where they use a tolerance of 1 in their groundfilter.exe call.

ex = pyfor.ground_filter.KrausPfeifer1998(1).ground_points(cloud)
ex2 = pyfor.ground_filter.KrausPfeifer1998(1,tolerance=100).ground_points(cloud)

#returns same # of points regardless, would expect to be different
ex.data.points.shape #(2285739, 13)
ex2.data.points.shape #(2285739, 13)
brycefrank commented 4 years ago

Hey Casey,

Good catch. I should have time today for a quick patch.

-B

brycefrank commented 4 years ago

Casey,

I have pushed this fix to the develop branch:

3d402a1

Also, I added some instructions for installing directly from develop instead of via conda-forge (the develop branch is not supported in conda yet, so you will need to install directly from GitHub).