Lesson 5 | Edit the data |
DATA INTEGRITY IS CRUCIAL IN GIS and ArcGIS Pro has some built-in safeguards to make sure you really mean to be doing what you’re doing. When editing, if you make a mistake, you can recover with the Undo button, which lets you undo edits one by one in reverse order. If the mistakes are too complicated to resolve, you can discard your edits without saving them.
Ideally, data would come to us free of errors or inconsistencies, but that seldom happens. Careful exploration of data usually reveals imperfections, which can arise for all kinds of reasons. Sometimes data is captured or created incorrectly to begin with. Sometimes errors creep in with subsequent data processing. Sometimes the data is perfectly good until the world changes. And sometimes the data isn’t wrong at all—it’s just generalized for use at a certain scale and inappropriate for use at another scale. For example, the park data you’re using was really designed for medium-scale maps, more or less in the range of 1:100,000 to 1:250,000. When the features are examined at much larger scales, it’s not surprising that they don’t conform to high-resolution imagery.
ArcGIS Pro has many tools for editing features in specialized ways, as well as methods for evaluating and maintaining data integrity. Data editing, however, isn’t the focus of your project. You’re correcting one park feature and creating another, because during your data exploration, you saw a need to do so. Then you’ll move ahead with the analysis.
Exercise 5a: Edit a feature
In lesson 3, you saw that Pecan Playground, a park near Dodger Stadium, didn’t match up well against the imagery. In this exercise, you’ll edit the park boundary and update its acreage attribute.
Add data to ArcGIS Pro
You need the park data and a basemap of imagery.
1)Start ArcGIS Pro, and open your LARiverParkSite project.
2)Insert a new map, and name it Lesson5.
3)Change the basemap to Imagery.
4)In the Catalog Pane, navigate to the LA River project geodatabase in the Databases folder.
5)From the LARiverParkSite geodatabase, drag Parks to the map. If necessary, right-click the Parks layer, and click Zoom To Layer.
Zoom to Pecan Playground and edit
1)Zoom to the Pecan Playground bookmark.
You should change the park symbol so that you can see what you’re doing as you’re editing.
2)Open the Symbology pane for the Parks layer, and change the fill color to No color.
3)Change the outline color to Quetzel Green and the outline width to 2 pt. Click Apply.
4)Zoom and pan as needed so that you see the whole block, as in the initial figure.
The feature as drawn doesn’t include the swimming pool or the play area at the north end of the block. Also, its boundaries extend into the street. (The southwest corner of the block is correctly excluded as this is a school.) After editing, Pecan Playground should look more like the modified version.
Don’t worry too much about your results—it should be fairly easy to make the polygon more accurate, but a rough approximation will suffice for this exercise.
5)On the Edit tab, click the Select button. Click anywhere inside the Pecan Playground feature to select it. The feature outline turns to cyan.
6)Confirm that snapping is turned on. The Snapping tool on the Edit tab should be blue. If not, just select it to turn it on.
7)Click the Modify button in the Features group. The Modify Features pane opens.
8)Under Reshape, click the Vertices tool .
Two things happen. One is that a new toolbar, the Edit Vertices toolbar, is added.
The other is that the feature is now marked with a number of small green squares (and one red one). The squares, or vertices, are coordinate pairs that define the feature’s shape and position. The red vertex is the last one added when the feature was created or edited. In the figure, though not on your screen, the vertices are numbered for reference. Note that the red circles with numbers will not appear on your map. They are for visual instructions only.
As you edit the feature, you may find it useful to zoom and pan using shortcut keys.
Shortcut keys for navigating while editing
To navigate while editing vertices, use these shortcut keys: Z to zoom in, X to zoom out, C to pan, B for zoom/pan (drag to zoom, right-click and drag to pan). Clicking tools such as Explore interrupts vertex editing. If you accidentally interrupt vertex editing, click the Vertices button on the Modify Features pane to resume editing.
9)On the Edit Vertices toolbar, make sure the Normal tool is selected.
10)Place your pointer over vertex 2, which is in a street intersection.
When the pointer is directly over the vertex, it changes to a four-headed arrow.
11)Drag the vertex to where it should go—the southeastern corner of the soccer field—and then release the mouse button.
If you make a mistake, you can recover with the Undo button
on the Quick Access toolbar.
The cyan highlighting continues to show the original shape of the feature.
12)Place your pointer over vertex 0, and move the vertex to the northeastern corner of the park.
The eastern boundary now has a kink because of vertex 1. This vertex is superfluous.
13)On the Edit Vertices toolbar, click the Delete tool .
14)Click on vertex 1 to delete the vertex.
The eastern side of the park should now be straight, as in the figure.
15)On the Edit Vertices toolbar, click the Normal tool, and move vertex 7 (the red vertex) to the northwest corner of the park.
16)Move vertex 5 to where the baseball diamond meets the schoolyard.
17)Click the Delete tool, and delete vertex 6 to straighten the western side of the park.
18)Click the Normal tool, and move vertex 3 to the southwest corner of the soccer field.
Explore snapping
When you move a vertex near another feature, the vertex connects to it automatically. This behavior, called snapping, helps prevent errors such as small gaps and overshoots. A vertex will snap to features in its own layer, as well as to features in other layers. You may have seen this behavior already with one or two of the vertices you’ve moved.
1)Hover over vertex 4 at the northeast corner of the school.
This vertex is already at a good location. You’re just going to explore snapping behavior a little bit.
2)Without releasing the mouse button, drag the vertex a small distance in various directions.
As you move south or west along the edges of the feature, you’ll see the SnapTip “Parks: Edge” appear next to the pointer. The SnapTip tells you that you’re within the range, or snapping tolerance, of an edge in the Parks layer. As you move back toward your original position, you’ll see the SnapTip “Parks: Vertex.” Moving in any direction away from the feature, you won’t see a SnapTip.
3)Drag the vertex back toward its original position. When you see the “Parks: Vertex” SnapTip, release the mouse button.
4)Use your scroll wheel to zoom in on vertex 4.
If you don’t have a scroll wheel, press and hold the Z key, and then drag the mouse to zoom in and out. If you zoom in too far and the imagery disappears, press and hold the X key and zoom out a bit.
5)Place your pointer over vertex 4 again. Without releasing the mouse button, drag the vertex a small distance in different directions.
The snapping behavior is the same as before, but the snapping tolerance—which is 10 screen pixels by default—now corresponds to a much smaller ground distance. That gives you more control over the exact placement of the vertex.
6)Again, drag the vertex back toward its original position.
When you see the “Parks: Vertex” SnapTip, release the mouse button.
7)Zoom out to see the entire edit sketch.
Save your edits
You’ll finish the sketch and save your edits.
1)On the Edit Vertices toolbar, click the Finish button .
The edited park is now a selected feature. You could still undo these edits, or stop the edit session without saving them, but you should be satisfied with the new park boundary.
2)On the Edit tab, in the Manage Edits group, click Save.
Saving your project does not save your data edits. You must click the Save button on the Edit tab to save the changes to the database.
Update attribute values
Changing the park’s shape has changed its area. That means the ACRES attribute value is no longer correct.
1)Open the Parks attribute table.
2)At the bottom of the table, click the Show Selected Records button . Confirm that only Pecan Playground is selected. If necessary, scroll across to see the geometry attributes.
ArcGIS Pro has automatically updated the Shape_Length and Shape_Area fields in the linear unit of the data’s projection, but it’s your job to maintain the ACRES attribute. The value stored now is just over four acres (4.1). This is the acreage of the old, pre-edited feature.
3)Right-click the ACRES field heading, and click Calculate Field.
4)Enter the following text in the text box under ACRES =: !shape.area@acres!
5)Compare your tool to the figure, and click Run.
The new value is written to the table. It shouldn’t be much different from the old value. Although the park was enlarged along its northern boundary, it was narrowed along three sides.
6)At the bottom of the table, click the Show all records button .
7)On the Edit tab, click the Clear button .
8)Close the Parks attribute table.
9)Close the Modify Features pane.
Your edits have been saved to the Parks feature class and are preserved whether you save your project or not. You’ll save your project, because you’ll keep using it in exercise 5b, and you may not be continuing immediately.
If you are continuing to the next exercise, leave ArcGIS Pro open; otherwise, close ArcGIS Pro.
Exercise 5b: Create a new park feature
Another local park, Vista Hermosa Park, was not represented by a feature in any of the parks feature classes. In this exercise, you’ll create it by tracing its outline against the basemap image. The process is similar to the editing you did in exercise 5a.
After creating the feature, you’ll add attribute values for it. You’ll also edit the attribute values of the two park features you loaded in lesson 4.
Start editing
You’ll zoom to the location of the missing park and start editing.
1)If necessary, start ArcGIS Pro, and open the Lesson5 map.
2)Use your bookmarks to zoom to Vista Hermosa Park.
The park alone doesn’t take up the entire L-shaped lot, just the portion shown by the dotted outline in the figure.
You won’t see the dotted line on your map—it was added here for reference.
3)Zoom in to an area more or less matching the area around the park.
4)On the Edit tab, in the Features group, click Create.
5)In the Create Features pane, click the Parks symbol.
By clicking the symbol, you’ve chosen a template. A template determines the properties that new features you create will have. Because your map has only one editable layer, Parks is the only template available. And because all your parks are symbolized the same way, the template has just one symbol.
6)Right-click the Parks layer in the Create Features pane, and click Properties.
The Template Properties dialog box lets you view and change the properties of the template. You can switch between General, Tools, and Attributes.
You don’t need to change any of these settings.
7)Close the Template Properties dialog box.
Feature templates are especially useful when you’re creating many new features in a layer with varied symbology. For example, a Points of Interest layer might have different symbols and descriptive attributes for restaurants, museums, parks, and so on. A template allows you to choose the right symbol and description for each new point as you add it.
Create the park feature
You’re ready to draw the boundary of Vista Hermosa Park. Again, your purposes don’t require extremely high accuracy. You just want a boundary that approximately conforms to the yellow dotted outline in the figure at the beginning of this exercise. If you decide to zoom in and work at large scale, you may be able to see and follow the fence line that encloses the park. (Remember to use the editing shortcut keys.)
1)Move your pointer over the map. The pointer becomes a crosshair.
2)Choose a starting point.
Your starting point can be anywhere, although corners are usually good—for example, you might use the southeast corner of the soccer field.
3)Click once to start drawing the feature. A red vertex is added at the location where you clicked.
4)Move the mouse in the direction you want to go. (Don’t drag, just move.)
As you move, the pointer remains connected to the vertex by a dashed line.
As long as you’re moving in a straight line, you don’t need to add a vertex.
5)When you come to a spot where you must change direction, click to add a second vertex.
The new vertex is red (it’s the last one added), and the first vertex turns green.
6)Trace the boundary of the park as good as you can, following fence lines, property lines, and sidewalks.
If you add a bad vertex, click the Undo button on the Quick Access toolbar.
7)When the polygon is complete, click the Finish button on the Drawing toolbar (or simply double-click).
Your new feature, still selected, should resemble the figure.
Again, the result doesn’t have to be perfect. However, if you want to make changes, click the Vertices button in the Tools gallery. If you’re really dissatisfied with your feature, press the Delete key on the keyboard to get rid of it, and then start over.
8)On the Edit tab, click Save to save your edits.
9)Close the Create Features pane.
Edit attribute values
You’ve created the Vista Hermosa Park feature, but you haven’t given it attribute values.
1)On the Edit tab, in the Selection group, click the Attributes button . Confirm that the Vista Hermosa Park feature is still selected.
The Attributes pane opens, showing the attributes and values for this feature.
Values in software-managed fields (OBJECTID, Shape_Length, and Shape_Area) can’t be edited. (Your length and area values won’t match those in the figure. Your OBJECTID value may be different, too.)
2)In the Attributes pane, click the null value next to NAME, and enter Vista Hermosa.
3)Click the null value next to TYPE, and enter Local park or recreation area.
4)Close the Attributes pane.
5)On the Edit tab, click Save to save your edits.
You must still calculate the acreage for Vista Hermosa Park and for the two park features you loaded in lesson 4 (which didn’t have an acreage attribute). You could find these records by scrolling to the bottom of the Parks attribute table, but a more systematic way is to query for null values in the ACRES field.
6)Open the Parks attribute table.
7)On the Map tab, in the Selection group, click Select By Attributes.
In the Select Layer By Attribute dialog box, you’ll build a query expression to find parks for which the acreage is not given.
8)Make sure Selection type is set to create a new selection.
9)Under Expression, click Add Clause.
10)In the Field drop-down menu, click ACRES.
11)In the operator drop-down menu, click Null.
12)Click Add.
13)Confirm that Invert Where Clause is unchecked.
14)Confirm that your expression matches the figure, and click Run.
15)Close the Select Layer By Attribute pane.
16)In the table, click the Show selected records button. Three records should be selected.
17)In the table, calculate the values for the ACRES field.
How? Right-click the ACRES field heading, and click the Calculate Field. Enter the following text in the text box under ACRES =:
!shape.area@acres!
Then click Run.
The results should be about 32 acres for Los Angeles State Historic Park, 36 acres for Rio de Los Angeles State Recreation Area, and 9 to 10 acres for Vista Hermosa Park.
The TYPE values for Los Angeles and Rio de Los Angeles (the two parks you loaded) are nonstandard in your table because they came from another data source. All other state parks have the value “State or local park or forest.”
18)In the table, right-click on the gray square next to the Vista Hermosa record, and click Unselect.
Two records remain selected.
19)Right-click the Type field heading, and click Calculate Field.
20)In the expression box under TYPE =, type “State or local park or forest”.
The quotation marks are required for a string value.
21)Compare your dialog box to the figure, and click Run.
The values for the two selected records are updated.
22)Confirm in the attribute table that the values for the two selected records are updated.
23)In the table, clear the selection, and show all records.
24)Close the attribute table and the Calculate Field pane.
Zoom to Parks and save the map
You’ll take a quick look at your work, and save your project.
1)Resymbolize the Parks layer to give it a solid green fill color and a 1-pt outline width. Change the outline color, too, if you want.
2)Use bookmarks to zoom to Pecan Playground. Your updated boundary should be displayed.
3)Zoom to the Vista Hermosa Park bookmark. Your park should be displayed.
As mentioned earlier, edits are written to the source data at the time you save them. Although you’re making a practice of saving maps, your park edits have already been saved to the feature class.
4)Close the Lesson5 tab and any open tables.
5)Save your project.
6)Continue to the next lesson, or close ArcGIS Pro. Save your changes if prompted.
All your data preparations are complete. In lesson 6, you’ll look for suitable park sites.