Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easier way to check units, useful for threshold in watershed #14

Open
bw4sz opened this issue Jun 15, 2018 · 4 comments
Open

Easier way to check units, useful for threshold in watershed #14

bw4sz opened this issue Jun 15, 2018 · 4 comments

Comments

@bw4sz
Copy link
Collaborator

bw4sz commented Jun 15, 2018

Hey bryce - this is looking really great! Amazing job. I just came back to it for a way to pass watershed clusters to my deep learning tree classifier (still in progress). One thing i noticed is that its not immediately easy to know the map units of the vertical dimension. It might be useful to have a summary method for the cloud object that prints some essentials.

Similar to

https://rdrr.io/cran/lidR/man/summary.LAS.html

That way I know what units to input to the threshold tolerance for watershed.

@brycefrank
Copy link
Owner

This should be straightforward, I will implement in 0.2.2 when I get the chance.

Thanks for the suggestion, Ben.

@bw4sz
Copy link
Collaborator Author

bw4sz commented Jun 15, 2018

yup. Just letting you know, rasterio's planned update is going to break your code. I found it in pre release.

pip install --pre rasterio --upgrade

Has some kind of problem way deep in the code, looks like something with gdal_version variable. I can't paste it, i've already downgraded. I had grabbed it because i was looking for a way to crop the CHM by the shapely geometry from your geopandas frame. I'm trying to avoid writing the chm to file (big arrays), which fits better with rasterio's current functionality. Soon you will be able to push numpy arrays directly to their file type.

https://rasterio.readthedocs.io/en/latest/topics/memory-files.html

@bw4sz bw4sz closed this as completed Jun 15, 2018
@bw4sz bw4sz reopened this Jun 15, 2018
@brycefrank
Copy link
Owner

brycefrank commented Jun 16, 2018

Thanks for the tip, I will adjust the yaml file to maintain the old version once Travis CI fails.

I've been awaiting the memory files capability to show up. A good portion of pyfor can be reworked to use these if they are as performant as just using numpy arrays, and other portions can just be converted straight over. I may just be able to re-work the Raster class using memory-files, since most of that class is dedicated to danncing around rasterios past framework of "input raster / output raster" that made "internal" arrays like mine hard to handle.

I should have some time in the coming months to dedicate more toward this. Because it is more of a "side-grade" than a new feature (the rasterio stuff, I mean), I will likely implement in 0.3.0 so I have adequate time to test and develop before merging to master.

-Bryce

@brycefrank
Copy link
Owner

Ben,

Just an update - I am working on this (summary function) for 0.3.0. It is proving a bit tricky with different LAS specifications, but I think I can come up with something reasonable that attempts to parse CRS information from older acquisitions. The new version should be out sometime in the next month or two.

-Bryce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants