Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a raster in correct projection. I used shapefiles, and marked objects (manually), but I found out that my vector layers have different projection, so they have different size and position. Is there a way to correct it using QGIS functional?

That is what I see:

enter image description here

Then, I tried to convert vector projection to raster projection and got that:

enter image description here

share|improve this question

2 Answers 2

Have you tried an affine transformation? Yours is a typical case for such kind of transformation for cartesian coordinates (i.e., not for lat-lon coordinates).

Basically, you would need to pick at least 3 well spread common points on both your vector and raster layers (for example, a street intersection) and arrange their coordinates in a matrix like this:

¦ Xs1 Ys1 1 0 0 0 ¦ | a ¦   ¦ Xt1 ¦
¦ Xs2 Ys2 1 0 0 0 ¦ ¦ b ¦   ¦ Xt2 ¦ 
¦ Xs3 Ys3 1 0 0 0 ¦ ¦ c ¦ = ¦ Xt3 ¦ 
¦ 0 0 0 Xs1 Ys1 1 ¦ ¦ d ¦   ¦ Yt1 ¦ 
¦ 0 0 0 Xs2 Ys2 1 ¦ ¦ e ¦   ¦ Yt2 ¦ 
¦ 0 0 0 Xs3 Ys3 1 ¦ ¦ f ¦   ¦ Yt3 ¦

Where Xs and Ys are coordinates on the source (your vector data) and Xt and Yt are coordinates on the target (your raster data).

Once you solve that system of equations, you obtain the transformation parameters, which are:

a: Scale X 
e: Scale Y
d: Rotation X
b: Rotation Y
c: Translation X
f: Translation Y

Then you can use the QGIS plugin 'Affine transformation' placing the calculated parameters in the plugin interface, this way:

Affine transformation parameters

That's it!

share|improve this answer

If you digitized the vector layer based on the raster but had a wrong CRS specified for the vector layer, the easiest option should be to simply overwrite the Shapefile's .prj file with the correct CRS information.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.