![]() Introduction to Geographic Information Systems in Forest Resources |
|
|||||||||||||||||
|
|||||||||||||||||
Discussion
Most of the projects you will encounter will include data that have already been developed. However, sometimes you may need to create new data sets or alter existing data sets. This section covers making edits to features in the coordinate databases used within ArcView.
When you create or alter vector data sets in ArcView, you will be using shapefiles. Shapefiles are the preferred native data set for ArcView. Shapefiles are fully editable within ArcView, which means that they can be altered in both their spatial and attribute features. In addition, any other valid vector data sources in ArcView projects can be easily converted to shapefiles, at which time their features can be edited.
The most common method of getting data into a GIS has been through the use of digitizing tablets.
Digitizing tablets have been used since the early days of GIS, in order to capture coordinate map data. A digitizer is a special table embedded below the surface with a series wires. The wires are arranged in tightly spaced horizontal rows and vertical columns. These wires receive signals from the digitizer cursor (which behaves like a mouse), and allow map features to be traced and saved as coordinate data. GIS software is used to transform the table coordinate values to real-world coordinate values.
Typically, a map is taped to the tablet and registered with points of known location ("tics"). Then features on the map are traced as the software "listens" to the communications port to which the digitizer is connected. Special keys on the cursor are used to control the functionality of the digitizer.
Most software applications that have been developed as complete GIS solutions have included support for both tablet and on-screen ("heads-up") digitizing.
ArcView supports digitizing in both modes, with a few exceptions. Shapefiles are the only type of spatial data source files that can be modified by digitizing. Heads-up digitizing of shape files is fully supported. Tablet digitizing is only supported on MS-Windows systems, and is only supported if the Windows drivers are installed for the brand of digitizing tablet which is connected to the machine. Due to time constraints and the lack of enough digitizing tablets, we will not cover tablet digitizing in this course. However, the help files for tablet digitizing in ArcView are clear and extensive.
Working with shapefiles Creating a new shape theme Adding shape theme features Adding attributes Editing shapefiles Selecting Features Reshaping features Setting snapping tolerances Splitting lines and polygons Updating attributes with Split Merging features with Union Updating attributes with Union More editing operations Undoing edits Saving edits
Shapefiles are the native ArcView GIS vector data format. A single shapefile represents a group of points, lines, or polygons. Whereas other data sources (e.g., ArcInfo coverages, CAD drawings) may be composed of multiple feature types, shapefiles are composed of only points, lines, or polygons.
The shapefile is actually a collection of files, rather than a single file. A single shapefile is composed of at least 3 files (where in this example, the name of the shapefile is roads).
In addition to the 3 basic files, there may also be other files:
Index files are used to cross-reference spatial features or attributes, and speed up query, processing, and display.
Shapefiles are useful in ArcView because they
In addition to converting shape files from other feature data sources, it is also possible to create shapefiles from scratch, using other shapefiles or images only as a visual guide for positional reference.
When a new shape file is created, the user must decide whether the shapefile will represent point, line, or polygon features. You need to determine in advance what the feature type will be for your data set. The shapefile must also be given a name and a place in the file system.
The shapefile is then added to the current view, and is open for editing.
The coordinates of the new features are determined by the extent of the view to which the features are added. If you are using a new view without other themes, the features you add will be placed near the view's origin (by default, a new view's extent is roughly [(0,0), (1,1)]).
Here, a new point shapefile is created:
The new theme is open for editing, but contains no features. This is similar to creating a new spreadsheet or word processed document; when it has just been created, it is empty.
Once the new theme is added to the view and open for editing, you can add features. Use the Draw tool to add and alter features.
The Draw tool is a dropdown list of icons, each of which performs a different function. Depending on the application's state, one or more of the tools may be unavailable (grayed-out). Some of the Draw tools are used to add graphical primitives to a view, while others are specifically for heads-up digitizing of theme features. The list of tools and their functions is listed here:
| Point | draws a point |
| Line | draws a line |
| Multiline | draws a line with 2 or more vertices |
| Rectangle | draws a rectangle |
| Circle | draws a circle |
| Polygon | draws a polygon |
| Line Split | splits an existing line at the intersection with the new line |
| Polygon Split | splits a polygon by adding a multiline |
| AutoComplete | appends a polygon to the edge of existing polygons |
When a new shapefile is created, a "bare bones" attribute table is also created. This table will initially contain only a single record for each feature, and two fields, Shape and ID. In the following table, 3 points have been created, and the theme table is displayed
The user can add fields to the attribute table (or to any table in the project, for that matter). Fields are added to represent properties of the spatial features. When fields are added, the field name, width (number of character or integer columns), data type (numeric, free text , boolean, date), and decimal places must be specified. The new field is appended after the last existing field in the table.
Once the fields are added to the table, values can be populated.
Shapefiles that have been created from scratch, or from other sources, can be edited. When a new shapefile has been created, it will automatically be placed in edit mode. However, any shapefile can be edited, assuming the user has write permission to the files and directories on the disk that store the shapefile. The following topics describe specific edits that can be made to the spatial features of themes.
Before any edits can be made, the shape file must be placed in edit mode. Make the theme active and select Theme > Start Editing from the menu. When a theme is open for editing, its check box in the Table of Contents will be outlined with a dashed symbol.
Once a theme is in edit mode, use the Select Features tool
to select individual features.
Keep the <SHIFT> key pressed to select more than one
feature. When features are selected, they will appear with selection handles
around them. Here you can see two selected polygons.
Use the Vertex Edit tool
to reshape
polygonal or linear features.
To change the location of vertices of a line, click on the line. All vertices in the line will be marked with a small square.
Click and drag a vertex to a new position.
Note that when a line is shared by two adjacent, contiguous polygons, the common boundary will be moved if and only if only the boundary line is selected.
If an entire polygon is selected, all of its vertices will be highlighted. Moving one of these vertices will not affect the vertices of the adjacent polygon. This is because each polygon shape is defined as its own "ring" feature.
Vertices can be deleted by placing the cursor over a vertex (the cursor will change to a small cross-hair), and pressing the DEL key.
Snapping is used to assure the intersection of linear features. Snapping will make the end of a new line join an existing line, either end-to-end, or end-to-side. Snapping is set, either interactively, or in the theme properties, to a certain tolerance. If a new line's endpoint is within the tolerance distance of an existing line, the new line will snap and join the existing line. Snapping only allows features of a theme to be snapped to existing features of the same theme. Features from one theme cannot be snapped to features of another theme.
General snapping is used to assure that every new line uses the same snap tolerance value. Once set, this value stays in place until changed.
Interactive snapping allows the user to use different snapping properties on a vertex-by-vertex basis as a new feature is being added. If interactive snapping is enabled, right-clicking the mouse during a feature addition invokes a menu in which there are choices for:
Both types of snapping are controlled by their own snap tolerance.
Snap tolerance is set in one of two ways:

Existing lines and polygons can be split using the Line Split
and Polygon Split
tools. When these tools
are enabled, the cursor will act as a line drawing tool, but features will be
split by the added line. As with the Line Draw tool, a double-click terminates
the line.
When splitting lines, new lines split existing lines at the points where the new line intersects the existing line.
Polygon splitting is similar to line splitting, except that existing polygons are split by the added line. To split polygons, it is necessary for the splitting line to start and end outside of the polygon that is to be split.
A single splitting line may split more than one existing line or polygon at a time.
When an existing line or polygon is split, the original feature's attribute record is deleted, and new attribute records are added for each new feature.
Here, the Washington State shapefile is split into two separate polygons.

A generic line is split into two lines:
|
|
|
|
|
|
|
|
Updating attributes with Split
When features are split, you can specify how the attributes of the new features are derived from the original features. Each field in the attribute table can be assigned rules of behavior for splitting. Should numeric fields be copied, or given their proportion of the original value? Should string (character) fields be copied, or should the fields be blank for the the new features?
ArcView provides rules for updating attribute values for features that have been split:
|
|
|
| Blank | values in new records are left blank |
| Copy | values in new records are copied from the parent record |
| Proportion | numeric values are proportional to the original area or length of the feature |
| Shape Area | values are the areas of the new polygons |
| Shape Perimeter | values are the perimeters of the new polygons |
| Shape Length | values are the lengths of the new lines |
The rules for handling attributes during splitting are set in the Attribute Updating part of the Editing section of the Theme Properties dialog.

Each field in the theme attribute table can have split rules applied.
In addition to splitting features, ArcView allows more than one feature to be merged. Features to be merged must be part of a selected set.
Lines that meet at the same point are joined into a single line with a single attribute record.
Polygons that overlap or share a common boundary are joined into a single polygon with a single attribute record. Polygons that do not overlap and are not contiguous may also be merged into a single polygon with a single record. In this way also, the shapefile differs from other vector data sets; shapefiles support single polygons consisting of more than one spatial object.
Here, a shapefile of the 50 United States is merged into a single polygon with a single attribute record. Even though the theme appears to have several different polygons, there is really only 1 polygon composed of multiple "rings."

Updating attributes with Union
When features are unioned, the original attribute records are deleted and a new attribute record is created. As with split, rules can be used for setting values for the new record's attributes.
|
|
|
| Blank: | value in the new record is left blank |
| Copy: | value in the new record is copied from the first value in the attribute table |
| Proportion: | value is proportional to the area or length of merged features |
| Add: | value is the sum of the area or length of merged features |
| Average: | value is the mean of the values of merged features |
| Proportion: | numeric value is proportional to the original area or length |
| Shape Area: | value is the area of the new polygon |
| Shape Perimeter: | value is the perimeter of the new polygon |
| Shape Length: | value is the length of the new line |
The rules for handling attributes during unions are also set in the Theme Properties dialog.

A few more editing operations are available for polygon features. Here are some generalized data sets to illustrate the operations:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Any edits made to shapefiles can be reverted by selecting Edit > Undo Feature Edit from the menu or using the keystroke combination <CTRL-Z>. All edits are able to be undone, up until the last save was performed, or up to the creation of the shapefile if the shapefile is new and has never been saved.
If you have finished editing a shapefile, you can choose to save edits. It is also a good idea to save edits on a frequent basis in case of system problems. Any edits that are saved are written to the disk as part of the shapefile's structure.
You will be prompted to save edits if you attempt to stop editing a theme, or start editing another theme, since only a single theme may be edited at a time.
You will also be prompted to save changes if you attempt to close the project, open another project, or close ArcView.
|
|||||||||||||||||
|
The University of Washington Spatial Technology, GIS, and Remote Sensing Page is provided by the College of Forest Resources and the College of Ocean and Fisheries Sciences through Unit-Specific UIF. Site administrator: Phil Hurvitz. |
Copyright © Phil Hurvitz, 1998-2003 |