# Adding attributes to line feature according to adjacent polygon

I'm trying to add attributes to a field in a polylines attribute table according to directly adjacent polygons…

In the pic, the purple line has an empty field labelled 'FG' and I'd like to fill it with whatever is in the 'FVG' field in the adjacent polygon that shares the boundary ie. 'Rf'… 'Mit'… 'Con'. The purple polyline is split into segments at each polygon boundary.

This should be quite simple but can't for the life of me figure it out. Is it spatial join I'm after? Haven't had much experience with that

Long, but robust:

- Add 2 fields to line table X, Y
- Calculate geometry midpoint X and Y
- Convert table to table and use it for Add XY data
- Convert XY to points
- Spatial join points and polygons

In points table populate FG by FGV values. Transfer results back to your lines. I assume you have UniqID field in their table

## Chapter 7 Geospatial Analysis I: Vector Operations

In Chapter 6 "Data Characteristics and Visualization", we discussed different ways to query, classify, and summarize information in attribute tables. These methods are indispensable for understanding the basic quantitative and qualitative trends of a dataset. However, they don’t take particular advantage of the greatest strength of a geographic information system (GIS), notably the explicit spatial relationships. Spatial analysis is a fundamental component of a GIS that allows for an in-depth study of the topological and geometric properties of a dataset or datasets. In this chapter, we discuss the basic spatial analysis techniques for vector datasets.

## Содержание

The definition of feature objects in GMS follows the paradigm used by typical GIS software that supports vector data. The basic object types are points, nodes, vertices, arcs, arc groups, and polygons. The relationship between these objects is illustrated in the following figure.

### Points

Points are XY locations that are not attached to an arc. Points have unique IDs and can be assigned attributes. Points are often used to represent wells. Points are also used when importing a set of XY locations for the purpose of creating arcs or polygons.

Arcs are sequences of line segments or edges which are grouped together as a single "polyline" entity. Arcs have unique IDs and can be assigned attributes. Arcs are grouped together to form polygons or are used independently to represent linear features such as rivers. The two end points of an arc are called "nodes" and the intermediate points are called "vertices".

**Create Arc Group** This command is used to create an arc group from a set of selected arcs. Once the arc group is created, it can be selected using the **Select Arc Group** tool. Properties can be assigned to the arc group as a whole, and the arc group can be selected to display the computed flow through the arc group. An arc group is deleted by selecting the arc group and selecting the *Delete* key. Deleting an arc group does not delete the underlying arcs. **Reverse Arc Direction** Each arc has a direction. One node is the "from" node, the other node is the "to" node. For most applications, the direction of the arc does not matter. However, when the arc is used to define a MODFLOW stream network, the direction of the arc becomes significant. The **Reverse Arc Direction** command can be used to change the direction (upstream to downstream) for a stream type arc.

### Nodes

Nodes define the beginning and ending XY locations of an arc. Nodes have unique IDs and can be assigned attributes.

### Vertices

Vertices are XY locations along arcs in between the beginning and ending nodes. They are used solely to define the geometry of the arcs. Vertices do not have IDs or attributes.

*Linear Interpolation*– If the Linear interpolation option is specified, then either a number of subdivisions or a target spacing can be given to determine how points are redistributed along the selected arcs. In either case, the new vertices are positioned along a linear interpolation of the original arc.

*Spline Interpolation*– If the Spline interpolation option is specified, vertices are redistributed along a series of cubic splines defined by the original vertices of the selected arcs. The difference between the linear and spline interpolation methods is illustrated below:

### Arc Groups

An arc group is a set of arcs that has been marked as a group by the user. As an arc group, attributes can be assigned to the entire group rather than to individual arcs. An arc group can also be selected as a single unit. Arc groups are primarily used for flow observations.

### Polygons

Polygons are a group of connected arcs that form a closed loop. A polygon can consist of a single arc or multiple arcs. If two polygons are adjacent, the arc(s) forming the boundary between the polygons is shared (not duplicated).

Polygons may not overlap. However, a polygon can have a hole defined by having a set of closed arcs defining interior polygons. An example of such a case is shown in the figure below where three arcs are used to define two polygons. Polygon A is made up of arcs 1, 2, 3 and 4, whereas polygon B is defined by a single arc (arc 2). For polygon A arcs 1, 3, and 4 define the exterior boundary whereas arc 2 defines a hole.

Polygons have unique IDs and can be assigned attributes. Polygons are used to represent material zones, lakes, variable head zones, etc.

## Feature geometry and feature coordinates

Feature classes contain both the geometric shape of each feature as well as descriptive attributes. Each feature geometry is primarily defined by its feature type (point, line, or polygon). But additional geometric properties can also be defined. For example, features can be single part or multipart, have 3D vertices, have linear measures (called m-values), and contain parametrically defined curves. This section provides a short overview of these capabilities.

### Single-part and multipart lines and polygons

Line and polygon feature classes can be composed of single parts or multiple parts. For example, a state can contain multiple parts (Hawaii's islands) but is considered to be a single state feature.

### Vertices, segments, elevation, and measurements

Feature geometry is primarily composed of coordinate vertices. Segments in lines and polygon features span vertices. Segments can be straight edges or parametrically defined curves. Vertices in features can also include z-values to represent elevation measures and m-values to represent measurements along line features.

### Segment types in line and polygon features

Lines and polygons are defined by two key elements: an ordered list of vertices that define the shape of the line or polygon and the types of line segments used between each pair of vertices. Each line and polygon can be thought of as an ordered set of vertices that can be connected to form the geometric shape. Another way to express each line and polygon is as an ordered series of connected segments where each segment has a type: straight line, circular arc, elliptical arc, or Bézier curve.

The default segment type is a straight line between two vertices. However, when you need to define curves or parametric shapes, you have three additional segment types that can be defined: circular arcs, elliptical arcs, and Bézier curves. These shapes are often used for representing built environments such as parcel boundaries and roadways.

### Vertical measurements using z-values

Feature coordinates can include x,y and x,y,z vertices. Z-values are most commonly used to represent elevations, but they can represent other measurements such as annual rainfall or air quality.

Features can have x,y coordinates and, optionally, added z-elevation values.

### Linear measurements using m-values

Linear feature vertices can also include m-values. Some GIS applications employ a linear measurement system used to interpolate distances along linear features, such as roads, streams, and pipelines. You can assign an m-value to each vertex in a feature. A commonly used example is a highway milepost measurement system used by departments of transportation for recording pavement conditions, speed limits, accident locations, and other incidents along highways. Two commonly used units of measure are milepost distance from a set location, such as a county line, and distance from a reference marker.

Vertices for measurements can be either x,y,m or x,y,z,m.

Support for these data types is often referred to as *linear referencing* . The process of geolocating events that occur along these measurement systems is referred to as *dynamic segmentation* .

Measured coordinates form the building blocks for these systems. In the linear referencing implementation in ArcGIS, the term **route** refers to any linear feature, such as a city street, highway, river, or pipe, that has a unique identifier and a common measurement system along each linear feature. A collection of routes with a common measurement system can be built on a line feature class as follows:

## Best Practices for Editing

### Be Mindful of the Coordinate Reference System

When working with the Event Geodatabase in ArcGIS Pro it is recommended to leave the Event Features in the WGS 1984 Geographic Coordinate System in which they are distributed. It is simpler and more effective to only change the map data frame to the local projected coordinate system.

Working with the NIFS, this means setting the data frame coordinate reference system (CRS) after creating the Offline Copy. Unlike ArcMap, the Pro Offline Copy CRS is determined by the data frame in which it is downloaded, not the CRS of the service.

### Save Often!

Unlike in ArcMap, there are no edit sessions in ArcGIS Pro.

However, all edits must still be saved. Once edits are made in a map, the Save and Discard buttons will become available on the Edit ribbon tab.

Because editing is enabled on all available workspaces, when creating features it is vitally important to pay close attention to the Feature Template being used.

Renaming layers in the Table of Contents can help avoid confusion without affecting the underlying data.

### Use the Attributes Window

The Attributes window is the preferred method for both single and bulk attribute updates because domains are set for many of the fields. Field Calculate, custom tools, and scripts will overwrite a domain, introducing typos and breaking queries. To bulk update with the Attributes window, click the layer heading in the top section after selecting the desired features and edit the table below as normal.

When all features are properly attributed, it is easy to change the Display Field setting under layer properties to leverage the Attributes window for efficient features updates.

Setting it to a field that best differentiates data for the task at hand (for example Feature Category or Label) allows features to be quickly selected and updated.

### Highlights

- Leave the Event Features in WGS84.
- Save Often! Both the Project and Edits.
- Editing is enabled on all workspaces available. Pay close attention to what layer is being edited. Edits must be saved.
- Utilize the Attributes window for single and bulk updates.

## Coordinate system

When you create a feature class, you have to choose, or possibly create, a coordinate system. The coordinate system, along with tolerance and resolution values, makes up a spatial reference of a feature class. A spatial reference describes where features are located in the real world.

You can define a coordinate system for your new feature class in several ways:

- Select one of the predefined coordinate systems provided with ArcGIS. Navigate to a geographic or projected coordinate system that appropriately represents the area in your data model.
- Import the coordinate system parameters used by another feature class. If you want to use the coordinate system of another feature class as a template, you have the option to browse to it and import it.
- Define a new custom coordinate system. You can input values to create a coordinate system tailored to your needs.

If you choose to include z-values with your coordinates, you must also specify a vertical coordinate system. A vertical coordinate system georeferences z-values, most commonly used to denote elevation. A vertical coordinate system includes a geodetic or vertical datum, a linear unit of measure, an axis direction, and a vertical shift.

Measure values do not have a coordinate system.

If you don't have the coordinate system information for your data or you don't know which coordinate system to use, you may choose an unknown coordinate system.

The Modify option allows you to review or edit the properties of a coordinate system.

First, you'll navigate to an area of interest and digitize an enumeration area based on standard criteria.

- If necessary, open your Southern Lusaka Enumeration Areas project in ArcGIS Pro .
- On the ribbon, click the Map tab. In the Navigate group, click Bookmarks and choose the Gabon bookmark.

The map navigates to Gabon township in Lusaka, the capital of Zambia.

Like the other areas you've navigated to in this lesson, this area already has some enumeration areas. Enumeration areas are typically drawn around point locations. Previously, you created geolocation points for each enumeration area, but you can also base the enumeration areas around the household cluster points that appear on the map. (The location of each point is typically determined using a statistical sampling process to ensure the locations are representative of the wider region.)

Enumeration areas adhere to the following criteria:

- The area must be between 3 and 5 hectares (to ensure it is walkable by a survey team).
- The area's boundaries should not cross rivers.
- The area's boundaries should be contiguous with roads, when possible.

You'll create an enumeration area for one of the points on the map. First, you'll measure an area between 3 and 5 hectares around the point to help plan the dimensions of the enumeration area.

The roads around this area may provide a boundary for the enumeration area. You'll perform your measurement here.

The Measure Area window appears and the pointer changes. You can draw a polygon by clicking locations on the map and the tool will calculate the polygon's area.

You'll measure the tall, somewhat rectangular area enclosed by roads around the household cluster point.

Now, when you move the pointer, a line connects your pointer to the point you clicked. By clicking subsequent points, you'll draw a polygon. (Your drawing does not have to be perfect you're only estimating the area.)

The Measure Area window displays the area of the polygon, although in your organization's default unit of measurement, which is probably either imperial or metric. You'll change it to hectares.

The unit of measurement changes. While the exact number you receive may vary slightly, the area of the polygon you drew is about 3.25 hectares. This area is within the recommended range of 3 to 5 hectares. This area also crosses no rivers and uses roads for all of its boundaries, meaning it's an acceptable enumeration area.

Closing the window also removes your drawing from the map. You'll draw the area again, this time while digitizing a new enumeration area feature.

The process for digitizing a polygon is similar to the process for digitizing a point. Instead of clicking a single point on the map, however, you'll draw the polygon similar to how you drew the measurement area, by clicking multiple points that serve as the vertices of the polygon.

The default editing tool for this template is Polygon . Other templates provide the option to draw specific geometric shapes or draw freehand. The Polygon tool functions the same way as the Measure tool.

You've digitized the enumeration area.

## Vector Data Models Structures

Vector data models can be structured many different ways. We will examine two of the more common data structures here. The simplest vector data structure is called the spaghetti data model A data model in which each point, line, and/or polygon feature is represented as a string of X, Y coordinate pairs with no inherent structure. (Dangermond 1982). Dangermond, J. 1982. “A Classification of Software Components Commonly Used in Geographic Information Systems.” In *Proceedings of the U.S.-Australia Workshop on the Design and Implementation of Computer-Based Geographic Information Systems*, 70–91. Honolulu, HI. In the spaghetti model, each point, line, and/or polygon feature is represented as a string of X, Y coordinate pairs (or as a single X, Y coordinate pair in the case of a vector image with a single point) with no inherent structure (Figure 4.9 "Spaghetti Data Model"). One could envision each line in this model to be a single strand of spaghetti that is formed into complex shapes by the addition of more and more strands of spaghetti. It is notable that in this model, any polygons that lie adjacent to each other must be made up of their own lines, or stands of spaghetti. In other words, each polygon must be uniquely defined by its own set of X, Y coordinate pairs, even if the adjacent polygons share the exact same boundary information. This creates some redundancies within the data model and therefore reduces efficiency.

Figure 4.9 Spaghetti Data Model

Despite the location designations associated with each line, or strand of spaghetti, spatial relationships are not explicitly encoded within the spaghetti model rather, they are implied by their location. This results in a lack of topological information, which is problematic if the user attempts to make measurements or analysis. The computational requirements, therefore, are very steep if any advanced analytical techniques are employed on vector files structured thusly. Nevertheless, the simple structure of the spaghetti data model allows for efficient reproduction of maps and graphics as this topological information is unnecessary for plotting and printing.

In contrast to the spaghetti data model, the topological data model A data model characterized by the inclusion of topology. is characterized by the inclusion of topological information within the dataset, as the name implies. Topology A set of rules that models the relationship between neighboring points, lines, and polygons and determines how they share geometry. Topology is also concerned with preserving spatial properties when the forms are bent, stretched, or placed under similar geometric transformation. is a set of rules that model the relationships between neighboring points, lines, and polygons and determines how they share geometry. For example, consider two adjacent polygons. In the spaghetti model, the shared boundary of two neighboring polygons is defined as two separate, identical lines. The inclusion of topology into the data model allows for a single line to represent this shared boundary with an explicit reference to denote which side of the line belongs with which polygon. Topology is also concerned with preserving spatial properties when the forms are bent, stretched, or placed under similar geometric transformations, which allows for more efficient projection and reprojection of map files.

Three basic topological precepts that are necessary to understand the topological data model are outlined here. First, connectivity The topological property of lines sharing a common node. describes the arc-node topology for the feature dataset. As discussed previously, nodes are more than simple points. In the topological data model, nodes are the intersection points where two or more arcs meet. In the case of arc-node topology, arcs have both a from-node (i.e., starting node) indicating where the arc begins and a to-node (i.e., ending node) indicating where the arc ends (Figure 4.10 "Arc-Node Topology"). In addition, between each node pair is a line segment, sometimes called a link, which has its own identification number and references both its from-node and to-node. In Figure 4.10 "Arc-Node Topology", arcs 1, 2, and 3 all intersect because they share node 11. Therefore, the computer can determine that it is possible to move along arc 1 and turn onto arc 3, while it is not possible to move from arc 1 to arc 5, as they do not share a common node.

Figure 4.10 Arc-Node Topology

The second basic topological precept is area definition The topological property stating that line segments connect to surround an area and define a polygon. . Area definition states that an arc that connects to surround an area defines a polygon, also called polygon-arc topology. In the case of polygon-arc topology, arcs are used to construct polygons, and each arc is stored only once (Figure 4.11 "Polygon-Arc Topology"). This results in a reduction in the amount of data stored and ensures that adjacent polygon boundaries do not overlap. In the Figure 4.11 "Polygon-Arc Topology", the polygon-arc topology makes it clear that polygon F is made up of arcs 8, 9, and 10.

Figure 4.11 Polygon-Arc Topology

Contiguity The topological property of identifying adjacent polygons by recording the left and right side of each line segment. , the third topological precept, is based on the concept that polygons that share a boundary are deemed adjacent. Specifically, polygon topology requires that all arcs in a polygon have a direction (a from-node and a to-node), which allows adjacency information to be determined (Figure 4.12 "Polygon Topology"). Polygons that share an arc are deemed adjacent, or contiguous, and therefore the “left” and “right” side of each arc can be defined. This left and right polygon information is stored explicitly within the attribute information of the topological data model. The “universe polygon” is an essential component of polygon topology that represents the external area located outside of the study area. Figure 4.12 "Polygon Topology" shows that arc 6 is bound on the left by polygon B and to the right by polygon C. Polygon A, the universe polygon, is to the left of arcs 1, 2, and 3.

Figure 4.12 Polygon Topology

Topology allows the computer to rapidly determine and analyze the spatial relationships of all its included features. In addition, topological information is important because it allows for efficient error detection within a vector dataset. In the case of polygon features, open or unclosed polygons, which occur when an arc does not completely loop back upon itself, and unlabeled polygons, which occur when an area does not contain any attribute information, violate polygon-arc topology rules. Another topological error found with polygon features is the sliver A narrow gap formed when the shared boundary of two polygons do not meet exactly. . Slivers occur when the shared boundary of two polygons do not meet exactly (Figure 4.13 "Common Topological Errors").

In the case of line features, topological errors occur when two lines do not meet perfectly at a node. This error is called an “undershoot” when the lines do not extend far enough to meet each other and an “overshoot” when the line extends beyond the feature it should connect to (Figure 4.13 "Common Topological Errors"). The result of overshoots and undershoots is a “dangling node” at the end of the line. Dangling nodes aren’t always an error, however, as they occur in the case of dead-end streets on a road map.

Figure 4.13 Common Topological Errors

Many types of spatial analysis require the degree of organization offered by topologically explicit data models. In particular, network analysis (e.g., finding the best route from one location to another) and measurement (e.g., finding the length of a river segment) relies heavily on the concept of to- and from-nodes and uses this information, along with attribute information, to calculate distances, shortest routes, quickest routes, and so forth. Topology also allows for sophisticated neighborhood analysis such as determining adjacency, clustering, nearest neighbors, and so forth.

Now that the basics of the concepts of topology have been outlined, we can begin to better understand the topological data model. In this model, the node acts as more than just a simple point along a line or polygon. The node represents the point of intersection for two or more arcs. Arcs may or may not be looped into polygons. Regardless, all nodes, arcs, and polygons are individually numbered. This numbering allows for quick and easy reference within the data model.

### Affiliations

Geography, College of Life and Environmental Sciences, University of Exeter, Amory Building, Rennes Drive, Exeter, EX4 4RJ, UK

Barry Evans & Clive E Sabel

European Centre for Environment and Human Health, Peninsula College of Medicine and Dentistry, Knowledge Spa, Royal Cornwall Hospital, Truro, TR1 3HD, UK

Barry Evans & Clive E Sabel

You can also search for this author in PubMed Google Scholar

You can also search for this author in PubMed Google Scholar

### Corresponding author

## Split model

When a line or polygon feature class is created, by default, a split model is automatically defined on the feature class. The split model is used to determine how the feature's geometry and its attributes within the table will be divided when a feature is split during the editing process.

The forward slashes in the split model name represent an ordered list of operations that occur on the feature within the feature class that is being split. Update/Insert is the default split model behavior and most users will never need to change it. The Delete/Insert/Insert split model is appropriate when you have specific modeling requirements, such as matching a particular format for interoperability and data conversion, that need to identify a split as a deletion of the original feature.

In addition to defining the split model on a feature class, you can also define the split policy on a relationship class. The relationship class split policy is used to determine how related records within the destination table are treated when a feature in the origin feature class is split during the editing process. Depending on the relationship class type, simple or composite, there are different split policy behaviors that can be defined, including Default (simple) , Default (composite) and Duplicate related objects .

See Relationship class split policy for more details on how to set and use this relationship class property.

- Feature Class Properties—From the Source tab on the Feature Class Properties dialog box, scroll down to Split Model . Clicking in the cell beside Split Model enables a drop down. Choosing a split model from the list populates the Set Feature Class Split Model geoprocessing tool and runs it in the background.

If the input feature class is from an enterprise geodatabase, you must be the data owner to execute this tool.

### Update/Insert

By default, an Update/Insert split model is set on feature classes when they are created. Therefore, when a feature within this feature class is split during editing, the original feature is updated, becoming the largest feature, and the smaller feature is inserted as a new row in the table.

The image below illustrates the before and after when a single cable, OBJECTID 2 is split within the cable feature class and where the split model is set to the default value, Update/Insert . Before the split, the first row is selected, OBJECTID 2, and the split editing tool is used to split this selected feature. After the split, notice the first row, OBJECTID 2, remains and its geometry and OBJECTID attribute value have been updated. This shows that OBJECTID 2 contains the largest feature after the split, and the smaller feature has been inserted as a new row in the table with an OBJECTID of 5. After the split, OBJECTID 2 and OBJECTID 5 have the same total length as the original length of OBJECTID 2 before it was split.

### Delete/Insert/Insert

Once the split model is set as Delete/Insert/Insert for a feature class, when a feature within this feature class is split during editing, the split operation results in a deletion of the original feature that was split, followed by both parts of the split feature being inserted as new features with two new rows in the table.

Any feature class with a split model set to Delete/Insert/Insert will not open in versions earlier than ArcGIS Pro 2.6 or ArcGIS Enterprise 10.8.1.

The image below illustrates the before and after when a single cable, OBJECTID 2 is split within the cable feature class and where the split model was set to Update/Insert . Before the split, the Set Feature Class Split Model geoprocessing tool was executed to change the split model to Delete/Insert/Insert . The first row is selected, OBJECTID 2, and the split editing tool is used to split this selected feature. After the split, notice the first row, OBJECTID 2, has been deleted and two new rows, OBJECTID 6 and OBJECTID 7, were inserted. After the split, the two new features that were inserted have the same total length as the length of the original feature before the split.

##### Caution:

If the split model is set to Delete/Insert/Insert on a feature class that has been registered as versioned and the same feature is split in two ways within two versions, for example, the Default and child version, no conflict will be displayed since the original feature was deleted and two new features are inserted. Therefore, the child version will end up containing all variations of the split feature on reconcile. If the Update/Insert default split model is used, the same feature is split in two ways within two versions, an update/update conflict would be generated, alerting the user that something is wrong with the edits made.

### Feature class properties

The split model for the feature class can be viewed from the Source tab on the Feature Class Properties dialog box, then scroll down to Split Model .