geowrangler icon indicating copy to clipboard operation
geowrangler copied to clipboard

Raster Zonal Stats computation error

Open tm-dafrose-bajaro opened this issue 1 year ago • 1 comments

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

tm-dafrose-bajaro avatar Sep 14 '23 05:09 tm-dafrose-bajaro

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

joshuacortez avatar Feb 14 '24 02:02 joshuacortez