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

Raster Zonal Stats computation error #217

Open
tm-dafrose-bajaro opened this issue Sep 14, 2023 · 1 comment
Open

Raster Zonal Stats computation error #217

tm-dafrose-bajaro opened this issue Sep 14, 2023 · 1 comment

Comments

@tm-dafrose-bajaro
Copy link
Contributor

tm-dafrose-bajaro commented Sep 14, 2023

rasterstats puts extracted values in rows without relevant attributes. Implemented a fix - but might be relevant to geowrangler as well. Attaching some photos for reference.
image_720
image_720
image_720

@joshuacortez
Copy link
Member

Hi @tm-dafrose-bajaro ! I think it may be an issue with the all_touched parameter in the raster_zonal_stats function that's set to False by default. Is the tile quadkey smaller than the resolution of the population data?

If yes then the NaNs are appearing because all_touched being False means that the AOIs have to touch the centroid of the raster cells to be counted. If it's set to True, then all AOIs are counted even if they didn't touch the centroid

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

2 participants