4

I have to create a map with the corridor information in it (in German: Flurstücke). For that, I have one shapefile with the lines and another shapefile (points) with the information about the corridor numbers (and a lot more information). Now I would like to filter the the point-shapefile and delete all the points that don't have the corridor number or land use. Is it possible to filter the attribute table within an attribute name (for example within the attribute name Layer)? To be clear, I want to delete everything that doesn’t have information about the corridor number or the land use. How would be the formula for that?

enter image description here

  • Are you using ArcGIS for Desktop, or something else? As per the Tour there should be only one question asked per question. – PolyGeo Apr 12 '16 at 9:15
  • Ah sorry I forgot.. I am using QGIS 2.12.3-lyon. And I know that there should be just one question.. but since they are somehow conected I thought I will leave it like that. – user69896 Apr 12 '16 at 9:17
  • wow thanks a lot! that was easy! Now its just saving forever, is this normal? – user69896 Apr 12 '16 at 9:38
  • 1
    That can depend on a number of factors such as how large your attribute table or shapefile is, hardware specs of your computer etc... =). QGIS is very stable so try to give it time to process (even though it looks like it might have crashed, chances are it's still processing the data). – Joseph Apr 12 '16 at 9:40
  • 1
    ok, than I have just to be patient! Thanks again for your help – user69896 Apr 12 '16 at 9:46
4

Open the Attribute Table, at the bottom there is a button that says "Show All Features". Click this and select "Advanced Filter (Expression)" and use an expression like "Layer" IS NULL OR "Layer" = 0. This should now only show features with doesn't have a value for the "Layer" field.

Now you can edit and delete features by selecting the relevant buttons in the Attribute Table (clicking the area in the red circle selects all features; click the icon in the blue circle to delete):

Attribute table

  • I just have one more question: It worked very easy while there was the 0 in the Layer. I tried the same with K-TOP-PKT and nothing got filtered. ("Layer" IS K-TOP-PKT) Do you know why? – user69896 Apr 12 '16 at 10:00
  • When it comes to strings (i.e. using letters and symbols), you need to use single quotes around it. Double-quotes for column names (not required but I would recomment using it); single quotes for values such as strings (not required for numbers). So you can use an expression like: "Layer" = 'K-TOP-PKT' – Joseph Apr 12 '16 at 10:04
  • @user69896 - Most welcome ;) – Joseph Apr 12 '16 at 10:18

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.