You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am wondering if there is a way to extract the exact area of each pixel (of a GeoTIFF file loaded as a Jim object) being overlapped by a JimVec object (i.e., a polygon ESRI shapefile).
The text was updated successfully, but these errors were encountered:
I don't think it can easily be done with a Jim raster object directly. Perhaps there is a different end-goal behind your question that can be handled differently. But then I would have to understand the context better. The problem is that the vector is first rasterized with the extract functions in pyjeo. One way might be to up-sample the raster, but this is not very efficient and still an approximation.
Perhaps a better way might be to vectorize the pixels and calculate the intersection with the vector. This can be done as suggested here
Thanks for your input. The idea is accurate zonal statistics for the purpose of hydrological modelling on a large scale if you are interested in the end goal. In this case, the number of pixels can grow exponentially with an increase in scale, so I was looking for an efficient solution to do so.
I know exactextract is offering a similar, efficient solution, but the jeolib is accessible from Python and would've been a much flexible tool if it offers such a feature.
I am wondering if there is a way to extract the exact area of each pixel (of a GeoTIFF file loaded as a Jim object) being overlapped by a JimVec object (i.e., a polygon ESRI shapefile).
The text was updated successfully, but these errors were encountered: