I have a raster file with 68M pixels and a shapefile with 83 polygons covering the same area.
I would like to find, for each pixel, which polygon it is located. If there is more than one polygon per pixel, I would like to choose one based on the predominant area, but if it is very "machine expensive", it could be a random choice as well.
I have both layers in a PostGIS DB, and I tried to do it using PostGIS ST_Intersects but it will take ages to do that, even in my very fast workstation and using geo-indexes (I tested with a small part of the raster data).
How can I do this using ArcGIS Desktop or python?