Thursday 21 March 2019

Copying features from one layer into different layer using ArcGIS for Desktop?


I would like to have two different kinds of feature (lets say coniferous and deciduous woodland).


To represent this I have two different layers that are different colours.


In an edit session when I copy features from one layer using the standard toolbar, I have a choice of pasting the features into either layer. The problem is that the feature always pastes into the same layer, no matter which one I choose. I can only seem to create features in one layer as well, even though there are two different templates available in 'create features'.


Can someone explain what I am doing wrong? I was managing to produce features with different appearance ok two days ago, I can't work out what I am doing differently now.



Answer




Again, as explained in your earlier question (Creating Layer for Selected Features, then Moving it using ArcGIS for Desktop?), layers are views, not data. You need to manipulate the underlying data to achieve your desired result, and there are two approaches you can take. Neither is 'right' - they both have valid reasons to use.


First, you can have one shapefile or feature class (in overly simple terms a feature class is just a shapefile inside a geodatabase) which contains both kinds of features. This is typically for types of the same feature as you describe - coniferous vs deciduous woodland. As long as the features are related in some way (they're all ground cover, or types of trees, or land uses) it can make sense to keep them in a single feature class. What distinguishes the two (or more) types of features is an attribute. Some shapes have an attribute (type) with a value of deciduous, some have that same type attribute with a value of coniferous. Right-click the layer and choose Open Attribute Table to see the attributes of each shape. From that window you can add fields/attributes (but not while in an edit session). When you've added what you want, you can change the values for each shape in that field while in an edit session. Be sure to save your EDITS which is different than saving your MAP. This method requires only one layer in the map to work with the data. You can set up the symbology of the layer (right-click layer, properties, go to symbology tab) to display features with different attributes differently - say dark green fill for coniferous and light green for deciduous.


The second method is to keep all shapes of a given type in their own feature class. With this method you do not need to worry about the attribute because all shapes in that feature class are the same type. You have to maintain two different feature classes or shapefiles. To work with all the data you need at least two layers in your map - one for each feature class. Again, they can be symbolized differently.


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...