1

I am pretty lost with the attribute table, so I couldn’t figure out the already existing answers about it (using QGIS 2.12.3.). I have a shapefile with all the protected areas in one region. Since I don’t need all of those protected areas, I would like to know how I can hide all the other objects? I have to search for the objects through their name and really don’t know how to use the dialog with all its functions.

ArMoraer
  • 5,649
  • 2
  • 26
  • 48
Freya
  • 73
  • 6
  • By "hide", do you mean delete? Or do you just want to filter the results inside the attribute table (which won't hide anything)? You can't really hide objects in the attribute table, but you may be able to hide them in the style panel. – ArMoraer Feb 17 '16 at 14:55
  • 1
    You may want to add a tag for QGIS as well. – recurvata Feb 17 '16 at 14:56
  • Actually it doesn’t really matter if I hide them or delete them, so I would be fine with deleting them too.

    I just don’t know how to filter them the way I need (by name) or better: a filter which shows me everything but the objects I need, so that I can delete them right away.

    – Freya Feb 17 '16 at 15:05
  • I saw that post, it’s just that I can’t find the query builder (since I use it in German, it may has another name?). Where can I find it? – Freya Feb 17 '16 at 15:11
  • 1
    Quick answer in german: in der Attributtabelle unten links ist ein Button mit dem du die Tabelle filtern kannst: Spaltenfilter geben Dir die Möglichkeit eine kategorie nach bestimmten inhalten zu durchsuchen. Denk daran, dass leerzeichen mitgesucht werden (also keine am ende des Begriffs/Wertes stehen lassen). Statt enter zu drücken musst du den von dir gebauten Filter mit "Anwenden" bestätigen. Unter fortgeschrittene Filter kannst Du auch einen eigenen Ausdruck zum Filtern bauen – Papierwolf Feb 17 '16 at 15:19
  • But I don’t know the formula to get every object, but those I need, so that I can delete them right away? Is it possible to say that I want to see every object but for example “Ortenberg” and “Plettenberg”? Because those two I don’t want to delete.

    I thought it’s something like that, but it doesn’t work: "OBJEKT" NOT ILIKE '%Tiefer Weg%' AND ILIKE '%Ortenberg'% AND ILIKE '%Plettenkeller'%

    – Freya Feb 18 '16 at 07:13
  • do you know what I mean? otherwise i would have to delete one by one anyway, if I can't filter it the way I wan't to... – Freya Feb 18 '16 at 10:10

1 Answers1

1

What you're looking for is called a definition query. There is a tool for it in qgis called query builder. Select the field your names are stored in and type the name of the protected area to display, i.e: "NAME" = 'Example Area'.

You may want to look at this post, it explaines the use of the query builder in further details: Displaying only selected features on map in QGIS? or also: http://docs.qgis.org/2.0/en/docs/user_manual/working_with_vector/query_builder.html

I hope this explains what you want to achieve.

dru87
  • 1,477
  • 9
  • 23
  • @Freya: The German name for the query builder is Abfrageeditor. You can switch the qgis.org page (second link in my answer) to German if you want. – dru87 Feb 17 '16 at 15:29
  • Thanks dru87! do you know a formula with which I can select all the shapefiles in my data of the protected areas, but those with the name, for example "Ortenberg" and "Plettenberg"? This way it would be very easy to delet the rest. – Freya Feb 18 '16 at 10:13
  • Try: "ProtectedAreas" <> 'Ortenberg' AND "ProtectedAreas" <> 'Plettenberg'. This should select all the other areas, besides those mentioned. If you want to select the area mentioned, use = instead of <>. If you decide to use = then you have to switch to the logical operator OR instead of AND, because your areas don't contain both names at once. Hope this helps. – dru87 Feb 18 '16 at 10:45
  • yeahii perfect! it worked! thank you so much! I would have been never able to get that formula by myself! thanks!! – Freya Feb 18 '16 at 11:53
  • @Freya Glad it did! you're welcome. – dru87 Feb 18 '16 at 12:13