Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

This question already has an answer here:

I have imported data from an excel spreadsheet containing lat,long coordinates associated with other attributes such as current operator of each point (well). I imported as a tab delimited file, then saved this as a shapefile.

I want to be able to organize the files by operator so that they can be toggled on and off (by operator). I have been doing this by opening the attribute table, making a selection and then saving the selection as a new shapefile for each operator, which works, but I have reached the limit of shapefiles for a single project, and am wondering if there is another way to accomplish this.

share|improve this question

marked as duplicate by underdark Feb 19 '13 at 7:02

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

I can think of two straight-forward, non-programming options. Both use only one shapefile/featureclass rather than creating many many files.

One is to create a layer from the selection rather than a shapefile (Make your selection from the attribute table, right click the layer in the table of contents and go to Selection --> Create Layer from Selected Features)

Alternatively you can add the same shapefile multiple times to the map and apply a differrent definition query to each layer. You do this by opening the properties dialog for that layer and writing an SQL expression (the same as you do in the select by attributes dialog) in the Definition Query Tab

Definition Query Tab

In either scenario you can then toggle the layers on and off as required. Personally I prefer definition queries because; when using selection sets, if you edit the data the selection can get confused and either add incorrect records to the layer or the records in the layer can disappear entirely.

share|improve this answer
    
Thank You! That's exactly what I've been trying to figure out. –  David Feb 18 '13 at 22:40
    
I am working with the Mac OSX version of QGIS, and can't find the "Selection -> Create Layer From Selected Features" Command. Is there a special plugin I should install for this feature? –  David Feb 18 '13 at 22:52
1  
That's because this answer is for ArcGIS not QGIS. @Loz please look at the tags to find the software the person is using. –  Nathan W Feb 18 '13 at 23:00
    
Is there a way to create a layer from a selection in QGIS? –  David Feb 18 '13 at 23:13
1  
No worries, I found the answer here: gis.stackexchange.com/questions/48799/… –  David Feb 18 '13 at 23:39

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