I am working in python and have polygon shapefile created from polygonized binary raster. I populate the attribute fields for each polygon in a loop. I need to calculate the invariant moments fr each polygon and also write them into the attribute table. I was hoping to use the OpenCV library however it requires an array as input. Would anybody have an idea how to calculate this for the polygons or how to convert each polygon to a binary array (not and image file)?
أكثر...
أكثر...