Reclassify raster pixels underlying certain polygons using Python

المشرف العام

Administrator
طاقم الإدارة
I've got a shapefile with many polygons, each of which exactly overlays a contiguous region of raster cells; an example in yellow:



For some of these, I want to use the polygon as a sort of analysis mask, so that I can reclassify only those cells that are overlaid by the polygon according to one of the polygon's attributes. I have to do this thousands of times to the same raster, so I'm looking for a Python-automated way to do it, using (hopefully) any of GDAL/OGR, SAGA, QGIS, or numpy arrays. Thanks!



أكثر...
 
أعلى