4

I'm trying to use the flag of each region in Italy to fill each region's polygon. I have downloaded the shapefile of Administrative areas for Italy from diva-gis and am now attempting to fill each of the 20 polygons with the corresponding flag image taken from Wikipedia at http://en.wikipedia.org/wiki/Regions_of_Italy

When you click on the flag image on the wikipedia page, and try to download a single flag, such as Sardinia:

http://en.wikipedia.org/wiki/Regions_of_Italy#mediaviewer/File:Flag_of_the_Italian_region_Sardinia.svg

you see that the images are already in svg format. However, when I attempt to use them in QGIS, all I see is blank space.

I downloaded Inkscape as I read somewhere this would be the appropriate tool for dealing with SVG, however opening the file in Inkscape and saving as SVG does not result in anything different.

There are 20 regions in Italy and therefore 20 flags, can someone lead me in the right direction?

My plan of attack so far is to change the Style to Categorized and classify the regions of Italy by the NAME_1 Column (which is the region name) and then change each symbol layer type to SVG fill. After that I was thinking I would download each SVG flag individually from wiki and chose it for the SVG fill by clicking on the ellipses (...) button and navigating to the appropriate file.

5

You have to create a folder called "svg" in your ".qgis2" directory. You should be able to find this in:

C:\Users\(your user name)\.qgis2

Then create the new svg folder, insert your flags in there and you should be able to see them in your Style > Symbol interface:

Symbol selector

For me, QGIS did tend to run a bit slow so it may be a good idea to first follow the answer provided by @hexamon.

  • 2
    In the QGIS settings, you will find a configuration which allows you to specify where QGIS should search for SVGs. You can configure multiple paths there. – underdark Sep 25 '14 at 13:33
  • I ended up just creating a folder called Italy_SVG and pointing QGIS to it through the settings as suggested from underdark. Works so well! BTW is plain SVG smaller or easier to handle? – user30757 Sep 26 '14 at 0:48
5

In InkScape, try saving the image as "Plain SVG" if you're not already doing so. Also try positioning the center of the flag in the upper left corner of the canvas (this is origo of an SVG.)

4

I made a tutorial to show how I did it.

map showing each region in Italy painted with their flag

  • FYI, link to tutorial is no longer available. – whyzar Jan 24 at 20:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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