Let us say I have 2 vector layer, a country map, and then a floor plan (autocad DXF file, i just imported it to QGIS as vector layer) consisting of line string

Country Map

enter image description here

How do we put the floor plan on top of the country map (essentially, i want to put the floor plan on top of actual land in the map)?

Right now, when I zoomed out, the 2 layers are separated by one another.

My idea is to bring the coordinates of the floor plan down to the coordinates inside the country map so that they sit overlap, but don't know where to start. I also observed that the coordinates of the floor plan are way out of range in the earth coordinates.

How do we scale or bring it back to earth?


Just select the 'floor' layer from the bottom left list and drag it at the top of the list. Layers appearance order start from the bottom.


Firstly, chose a projected coordinate system that uses feet or metres rather than lat lon - whatever matches your CAD drawing. This will help you greatly later on. Right click your layers, Save as... and choose a suitable national projection or your appropriate UTM zone.

Locate some data that will help you locate your building. An aerial photo or building footprint data (OpenStreetMap or governmental data etc.) would help. Otherwise, some survey points captured with a GPS/GNSS receiver will narrow things down.

To line up the CAD file, use the excellent Vector Bender plugin. It will require you to draw pairs of lines between corresponding points on both of your layers, and will greatly simplify what would be referred to as an 'affine transformation'. Be aware, as I assume that you have a scale drawing, that both the Vector Bender plugin and other methods of affine transformation can optionally distort a vector layer to fit. You probably don't want to do this. There are several video tutorials available for the plugin. I highly recommend watching them first.

I would also recommend saving the layer with the corresponding line pairs, should you need to repeat the process with subsequent CAD imports.

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