QGIS Raster Vector Snapping – How to Snap a Vector Layer to a Raster Layer in QGIS

qgisrastersnappingvector

I am working with both vector and raster data. I have several vector layers with land use data, e.g. including urban, (types of) forest and agriculture. I am also using Sentinel-2 raster data. My goal is to perform a supervised land use classification on the raster data. I am using the vector data to choose my training ROIs.

The problem is that the geography of the vector layers do not correspond with the raster layer. As you can see in the image I have attached, the polygons seem to be shifted slightly to the upper-left. Is there a tool to correct this by snapping the vector layer to the raster data in QGIS? For example, through selecting geographically matching points in both the raster and vector layers.

                Unmatching geographies of vector-raster data

Best Answer

If the offset is the same for all polygon geometries you can use Affine transform.

  1. Measure how much you want to move the polygons using "Measure Line", both X and Y axis
  2. Affine transform by the distance:

enter image description here

Related Question