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

area #230

Open
DanielJDufour opened this issue May 11, 2024 · 0 comments
Open

area #230

DanielJDufour opened this issue May 11, 2024 · 0 comments

Comments

@DanielJDufour
Copy link
Member

DanielJDufour commented May 11, 2024

Is your feature request related to a problem? Please describe.
Really should support area results better, being the reality that a lot of people multiply the count of pixels in a specific class with pixel size to get the area of X. For example, something like area of flooding in an area, by number of pixels.

Describe the solution you'd like
I'm not sure yet, but maybe options like

geoblaze.validArea(url, geom) // area of valid pixels

geoblaze.invalidArea(url, geom) // area of no data and invalid pixels

// like histogram, but instead of key => count, it's key => area (i.e. count * pixelarea)
geoblaze.histogramArea(url, geom)

Describe alternatives you've considered
People could handwrite these calculations. We could also return metadata to the user to calculate the area themselves. Part of my concern is that if people use virtual resampling, that'll shrink the pixels sizes, so they'd have to use the dynamic pixel size of the virtual resampling calculation and not a fixed size.

I wonder if we could add frequency and area as params to the pre-existing histogram function

histogram(georaster, geometry, { value_type: "area" })

histogram(georaster, geometry, { value_type: "frequency" })

Additional context
N/A

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

No branches or pull requests

1 participant