I have a shapefile which contains 10.000 polygons and I want to know how many of them falls on a specific land use. Unfortunately, the land use map that I have to use is a raster map and not a vector map.
I created a mask from the raster map with 0-1 values for the land use I'm interested in, and I thought to convert the mask to a vector file: this way I can obtain the information that I want with simple vector processing tools.
However, I'm struggling to convert the raster to a polygon (maybe it's because it is a large raster, 10940 rows x 11404 columns with 20m pixel size). I've tried several methods, namely:
- Raster to Vector tool in QGIS;
- rasterToPolygons function in R;
- gdal_polygonize using the OSGeo4W shell);
This far, 1 and 2 literally crashed my computer after a while; 3 is running since 20 hours and it's around 70% complete, but after all this time I don't even know what to expect and I certainly do not have the time to re-run the script.
Is there a faster way to convert this raster?