QGis: How to import svg or raster images into Quantum GIS?
Asked Answered
G

2

11

these vector or raster files being classic files without geocoordinates. They are lat/long projection, I want to import them into QGIS, scale them up/down, place them to their right place, and they become reusable shp or raster geocoordinated layers.

Edit: I'am from the wikipedia Graphic Lab>Map workshop, we want to work more using GIS. We litteraly have hundreds maps to migrate to GIS technologies....

enter image description here enter image description here

Godsend answered 28/3, 2013 at 20:28 Comment(1)
This is not going to get answered unless we see examples. You can extract coordinates from SVG files, but they are way too potentially complex for a one-size-fits-all-and-fits-in-a-SO-answer solution.Gaffrigged
G
9

Partial Solution: load SVG into Inkscape, Save as DXF file, then you can load this into QGIS. This should at least get you most of the linework into QGIS.

However, it won't yet be properly georeferenced or styled, and different layers may be in different places because the SVG has some scaling and translating operators on parts of the map data that QGIS or Inkscape is ignoring. You'll probably need to work with a layer at a time. This probably isn't a problem since maybe you are only interested in the added data on the map, and not the base map (country outlines etc) since you will probably want to overlay your data onto standard map base layer (natural earth, OpenStreetMap tiles).

The only way I see to do the transformation at present is to work out the affine transformation parameters and use the QgsAffine plugin, but that does require you to work out the parameters beforehand by fitting known source coordinates to known target coordinates.

But to do hundreds? You might be better off writing some custom SVG parsing code for each one...

Gaffrigged answered 1/4, 2013 at 15:15 Comment(1)
Indeed, I'am interested to get back the thematic layers (here: ancient China's districts & wine area shapes). For the base map, we can go back to the former GIS data we used to create the SVG's land outline. For legends, we can externalized. Thanks for this direction.Godsend
C
5

If you only want to display it in the correct place, scale and rotation treat it as an SVG icon.
1. create a point layer and put a single point at the georeferenced centre of the SVG you will load.
2. edit the symbology and load the SVG as an icon
3. set the size units to map units
4. supply the appropriate dimensions
5. rotate as necessary

The redraw is very slow and painful, but if you use Project>import/Export>Export map as image you can make a georeferenced raster.

Coldiron answered 11/4, 2019 at 0:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.