1

I'm building my first map, so please forgive me beginners mistakes.
I've downloaded QGIS 2.0.1 and following tutorial I was able to download data from http://sdi.geoportal.gov.pl/wfs_prg/wfservice.aspx?request=getfeature&version=1.1.0&service=wfs&typename=WOJEWODZTWA and present is as one layer in application. My SHP file has 16 objects (Polish provinces).

enter image description here My problem is that right now I have one layer (with one layer style) and I can show/hide all provinces at once, what I want to do is to have all provinces as layers (or groups) so I could show only some provinces and change their color.

I know that I can select shape using select tool, then export selection into SHP file and import 16 layers into project.
This is fine when layer has 16 objects, but my second map has over 3000 districts and I must be able to hide/show/change color of them individually. Can this be done better/faster?

EDIT
I managed to split my SHP into layers, this way I have 16 layers and I can add style to every layer individually. I can also hide layers using layers panel. enter image description here Can I add similar select to layer? So I can choose which object to show/hide?

3
  • You can style them different colour if they are in the same layer. Do you also need to turn different ones off? Having 3000 layers isn't going to scale well? What is your final goal?
    – Nathan W
    Jan 2 '14 at 12:27
  • Goal is to have main map with provinces (16) so user will be able to hide unwanted and change color of individual province. I would like to do same with districts, but whey will be shown based on query or manually.
    – Misiu
    Jan 2 '14 at 12:37
  • @NathanW how can I style different objects in same layer?
    – Misiu
    Jan 2 '14 at 12:43
4

For distinct coloring, Rightclick on the layer -> Properties, Style tab

Change single symbol to categorized, select the name field (or ID if you want), then click on Classify and OK.

2

If you want to split up your vector then try:

Vector -> Data Management Tools -> Split Vector Layer

For the Unique ID field choose your province.

4
  • I did that, but this way I must add 16 layers to my project one by one. Can this be done automatically? I don't want to think how long will it take to add 3000 layers
    – Misiu
    Jan 2 '14 at 12:47
  • Sure, just use ctrl + a or shift + click when you are adding your layers. This will select multiple files and add them all at the same time.
    – Rob Lodge
    Jan 2 '14 at 12:53
  • I've manage to do that with plugin called "Synchronize QGIS with a directory". Works fine. But can I have one layer and hide objects on it? I'll update my question in a second
    – Misiu
    Jan 2 '14 at 13:00
  • 4
    I think you're rather looking for quering your layer. Right click on your layer, go to properties -> general and look at the feature subset section of the window. This way you can build a query that satisfies your demand. For example Name IN ('wielkopolskie', 'lubuskie').
    – jareks
    Jan 2 '14 at 13:11

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.