You are here:
About converting between graphics and features
Mapping and visualization
Adding graphics and text to maps
Working with graphics
Although graphics and features may appear similar onscreen, they are actually different entities in terms of behavior and storage methods. Generally, graphics are points, lines, polygons, and text that are created with the Draw toolbar and stored in the map document. Features are usually stored in geodatabase feature classes or shapefiles, have attributes, and are created and edited using the Editor toolbar. However, you can convert graphics into features and vice versa using ArcMap.
Converting graphics into features
You can convert graphics you draw on your map into shapefiles or geodatabase feature classes. The Convert Graphics To Features command, which is available from the Drawing menu on the Draw toolbar or by right-clicking a data frame in the table of contents, supports all the graphic types you can draw with the tools in the graphics palette on the Draw toolbar including circles, curved lines, and freehand lines. You can also convert graphic text into annotation feature classes.
This functionality allows you to create simple features, like study areas used for clipping, immediately in ArcMap without the need to go to ArcCatalog or start an edit session to create data. For example, you can add specific x,y point or address locations to a map with the Go To XY command or through the Find dialog box, then use Convert Graphics To Features to create a feature class containing these points.
Convert Graphics To Features also supports 3D graphics such as contour lines drawn on the map using the Contour tool on the 3D Analyst toolbar. In these cases, the output shapefile or feature class will automatically have z-values.
Attributing the graphics before converting to features
When you generate a shapefile or feature class from line, point, or polygon graphics, the Element Name found on the graphic's Properties > Size and Position tab is automatically added to the Name field in the output shapefile or feature class. This ensures that the name given to a graphic is preserved and carried over to the converted feature. For example, if you add a polygon graphic to your map and call it Study Area 1, then use the Convert Graphics To Features command to create a feature class containing this polygon, the value of the Name field for this polygon will be Study Area 1. The Convert Graphics To Features command will accept element names that are up to 60 characters long. Element names that are longer than that will be truncated to 60 characters—the length of the Name field in the output feature class. (If you are using Convert Graphics To Features to convert text graphics to annotation feature classes, the Element Name of the text graphic is not included in the output as an attribute).
Besides being an easy way to create and attribute features, entering information into the element name before converting graphics to features may be useful in these workflows:
- Drawing polygon graphics representing study areas. For example, draw three polygon graphics, type the name of the study area in the Element Name text box, and convert to features. The output feature class contains three polygons, with the name of each study area in a Name field ready for you to use. You can immediately label, identify, query, or symbolize your new layer.
- Finding places of interest. For example, you can use the Places tab on the Find dialog box to find these six places near Yellowstone National Park, add them as points to your map, and convert to features. The output feature class contains six point features, with the name of each place in the Name field.
- Creating 3D graphics in ArcMap with the 3D Analyst toolbar. For example, the Line Of Sight tool automatically populates each line graphic with an element name saying whether the line represents locations that are visible from the observer point. Also, when you use the Contour tool and click the map to create a contour graphic, the Element Name text box is populated with the height of the contour line. When you convert these graphics to features, the element name information is carried over to the Name field in the new feature class attribute table.
- Converting to KML features. You can draw features using the graphics tools, fill in the element names, convert to a feature class, then convert to KML—without requiring an edit session to specify the attributes of the features.
Converting graphic text into features
When you convert graphic text (map document annotation
) into a geodatabase annotation feature class
, only one annotation subclass will be created. If there are multiple annotation groups in your map, they will all be converted into the same default subclass. The converted annotation features will store their symbology properties inline (in other words, the SymbolID value is -1, and the feature does not reference a text symbol in the symbol collection).
When converting graphic text into an annotation feature class, you can also convert the point, line, and polygon graphics into the output annotation feature class at the same time. If you convert them into an annotation feature class, the element name attribute will not be brought across.
You can also set the reference scale for the created annotation feature class. With a data frame reference scale, you define the scale at which text and symbols will appear at their true size. If you zoom in or out, the text and symbols will change scale along with the display. Symbols and text will appear larger as you zoom in on your data frame and smaller as you zoom out. Unless you explicitly set a reference scale, the current scale is your reference scale.
Converting features into graphics
You can convert a layer's features to graphics so they can be moved around or resized on the map. This is particularly useful if you want to change the location of features relative to each other for cartographic purposes, such as generalization, but you don't want to edit the source data that your layer represents.
How to convert between graphics and features
Converting graphics into features
When you convert features into graphics, you can choose to draw only the converted graphics or to draw both the converted graphics and the features. If you choose the option to draw only the graphics after converting but later want the features to draw again, open the Layer Properties dialog box, click the Display tab, then look under Feature Exclusion. The excluded features are shown in the list.
- Make sure you are in data view.
- In the table of contents, right-click the data frame containing the graphics you want to convert to features and click Convert Graphics To Features. You can also click the Drawing menu on the Draw toolbar and click Convert Graphics To Features.
- Click the Convert drop-down arrow and click the type of graphic to convert.
- By default, only the selected graphics will be converted. Uncheck Selected graphics only if you want to convert all graphics.
- If you are converting text to annotation, specify a reference scale and choose whether to include any point, line, or polygon graphics in the output annotation feature class.
- Click the option for the output coordinate system you want to use.
- Click the browse button and navigate to a location to save the exported data.
- Type the name for the output data source.
- Click the Save as type drop-down arrow and choose the output type. The output can be either a shapefile or a geodatabase feature class (annotation can only be stored in a geodatabase).
- Click Save.
- If you want the graphics to be deleted once you've converted them to features, check Automatically delete graphics after conversion.
- Click OK.
Converting features into graphics
- The coordinate system for the data frame's annotation groups is specified on the Annotation Groups tab of the Data Frame Properties dialog box. It defaults to the coordinate system being used for the data frame, but changing the coordinate system for the annotation groups can be useful if you want to project the graphics differently from the feature layers—for example, to draw a line that adheres to the direction characteristic of a particular projection.
- Right-click the layer in the table of contents that you want to convert to graphics and click Convert Features To Graphics.
- Click All to convert all features or click Selected to convert the selected features.
- Choose whether you want to draw only the graphics or both the features and the graphics after the conversion.
- Set the target where you want to store the graphics. The default target saves the graphics to your map document.
- Click OK.
- Use this option to convert the features in a layer to graphics that can be moved, resized, and edited on the map. This is useful if you want to change the location of features relative to each other for cartographic purposes, such as generalization, but you don't want to edit the source data that your layer represents.
- The features remain selected after you convert them to graphics. For example, if you select a set of features in a layer and convert these features to graphics, the features will remain selected after the graphics have been created. This makes it easier to complete workflows where you want to retain the selected set of features, such as switching the selected and unselected features and converting those features to graphics. You can click the Clear Selected Features button on the Tools toolbar to deselect them.
- If you choose the option to draw only the graphics after converting but later want to draw the features again, open the Layer Properties dialog box, click the Display tab, then look under Feature Exclusion. The excluded features are shown in the list. Click a feature or features and click Restore Drawing to display them, or click Restore All to display all features.