I have this image loaded in QGIS, with two possible values for the pixels: 1 = orange, 2 = blue
For simplification, assume it represents a province of a country.
I want to extract just the part of the image included inside the limits of the province. Regardless the value of the pixels. I guess I should use a mask for that, but I don't want to mask pixels based on their values. I want to mask the pixels based on their location (inside or outside the limits of the province).
The image is not from a real province. So, I don't know the limits (in that case, I could spatially intersect the raster with the known limits).
One approach would be vectorize this image to get the limits of the fake province as a geometry. That would make things easy. But I'm not sure about how to face that task.
So, suggestions are welcome. Many thanks in advance.