Friday 25 September 2015

arcgis desktop - How to add item to an existing selection layer


I have a selection layer of about 150 properties in ArcGIS ArcMap, and I want to add one more building to it (see image, area outlined in red circle). The problem is that I missed this building in particular when I clicked to add all the buildings one-by-one originally.


When I click on it using the Selection Interactive tool to add it to the selection, I can't seem to make it a part of the existing selection layer called "LargeBuilding selection" (nor can I change its color to green).


I am relatively new to ArcGIS.


in red circle is what I want to add to an existing layer



Answer



As far as I know, there's no way to add features to a layer created by selection. The easiest thing to do is select all the features that went into that layer, add the ones you want by manual selection or using Select by Attributes/Location with a 'add to current' method (see my answer at this question for working with active selections), and then create a new layer based on the updated selection to replace the incorrect one.




  1. On the top menu bar, choose Selection > Select by Location.

  2. In the Select by Location dialog, set the following: selection method - select features from, Target - LargeBuilding, Source - LargeBuilding Selection, spatial selection method... - are identical to. Click Ok.

  3. That should select all 150 buildings in the original layer that you saved to the selection layer. Using the interactive selection (Select Features button on the Tools toolbar) and holding shift, click the building you want to add in the LargeBuilding layer. This should add it to the selection. Make sure you don't click anywhere else or clear the current selection (of the other buildings) when you do this or you have to repeat those steps.

  4. Right-click the LargeBuilding layer and choose Selections > Create Layer from Selection as you did the first time to create a new layer based on the updated selection.




The alternative to this method is to add your own field to the LargeBuildings layer. You can then use that field to signify however many groups or whatever you want (in or out, set1 or set2 or set3). You can add multiple copies of the same layer and put definition queries on each so that it only shows features with a particular value in that field. With this method, whenever you edit that attribute it will automatically appear/disappear from the definition queried layer when you save the edits and you don't have to worry about selections at all. This could also be done on an existing attribute field if there's one in particular that identifies the ones you're manually selecting. By doing it with an attribute, you don't have to worry about recreating a selection to subset or modify a subset - it's stored as an attribute.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...