spatial relationships

SPATIAL RELATIONSHIPS



A major objective of a GIS is to develop spatial relationships between mapped geographic features. With vector based GIS's these relationships must be developed by constructing complex objects from simple graphic primitives (i.e. vectors and points).

EXAMPLES:

The relationship between a line and the ordered set of points which define it

The relationship between an area (polygon) and the set of lines which define it


In order to establish spatial relationships between objects a GIS must maintain the unique identity of all graphic primitives. Consider the following graphic:



There are a number of relationships present in this graphic. There are polygon adjacencies, polygon overlap, and points (labels) within each polygon. To develop the relationship between all features of this graphic, each crossing arc has to form an intersection. At that intersection, a node separates the crossing arc. As simple circles, each circle is made up of one closing arc. When the circles overlap, additional polygons are generated and arcs are segmented to account for this new relationship.

Each Primitive in this graphic is labeled with an unique identifyer. Each arc is numbered (there are 16 arcs), each node formed by intersecting arcs are numbered (there are 8 nodes), and each polygon is labeled with a point and numbered (there are 9 polygons).

With all objects identified as unique entities, relationships can be formed between all objects. Since arcs share nodes, we can determine flow between arcs by identifying the linkage. Since polygons share arcs, we can determine adjacency of polygons (i.e. polygon 4 is adjacent to polygons 5, 6, and 1). Notice that polygon 4 is not adjacent to polygons 7 or 9 since they do not share an arc, only a node.



The examples above are simple relationships within a GIS. The following examples are more complex and are logically separated into various types of relationships.

RELATIONSHIPS WHICH CAN BE COMPUTED FROM THE COORDINATES OF THE OBJECTS

Two lines can be examined to see if they cross by identifying the shared node

Areas can be examined to see which one encloses a given point

Areas can be examined to see if they overlap

RELATIONSHIPS WHICH CANNOT BE COMPUTED FROM COORDINATES - THESE MUST BE CODED IN THE DATABASE DURING INPUT

E.G. We can compute if two lines cross, but not if the highways they represent intersect (may be an overpass)

POINT-POINT
"IS WITHIN", e.g. Find all of the customer points within 1 km of this retail store point

"IS NEAREST TO", e.g. Find the hazardous waste site which is nearest to this ground water well

POINT-LINE
"ENDS AT", e.g. Find the intersection at the end of this street

"IS NEAREST TO", e.g. Find the road nearest to this aircraft crash site

POINT-AREA
"IS CONTAINED IN", e.g. Find all of the customers located in this zip code boundary

"CAN BE SEEN FROM", e.g. Determine if any of this lake can be seen from this viewpoint

LINE-LINE
"CROSSES", e.g. Determine if this road crosses this river

"COMES WITHIN", e.g. Find all of the roads which come within 1 km of this railroad

"FLOWS INTO", e.g. Find out if this stream flows into this river

LINE-AREA
"CROSSES", e.g. Find all of the soil types crossed by this railroad

"BORDERS", e.g. Find out if this road forms part of the boundary of this airfield

AREA-AREA

"OVERLAPS", e.g. Identify all overlaps between types of soil on this map and types of land use on this other map

"IS NEAREST TO", e.g. Find the nearest lake to this forest fire

"IS ADJACENT TO", e.g. Find out if these two areas share a common boundary




CODING SPATIAL RELATIONSHIPS AS ATTRIBUTES

In a database we can visualize relationships between features as additional attributes


OPTION A:

Each link in a stream network could be given the id of the downstream link which it flows into

OPTION B:

Alternatively the network could be coded as two sets of entities - links and nodes ("FROM" AND "TO" NODES). tThis is the common method used in an ARC/NODE oriented GIS.



OBJECT PAIRS

Distance is an attribute of a pair of objects

There are other types of information which are attributes of pairs of objects

Flow of commuters between a suburb and downtown
Trade between two countries
Flow of groundwater between a sink and a spring

In some cases these attributes can be attached to an object linking the origin and destination objects


In general, it is necessary to allow for information which is not an attribute of any one object but of a pair of objects, including:

Distance
Connectedness - yes or no
Flow of goods, trade
Number of trips

Such attributes cannot necessarily be ascribed to any real object

Commuting flows between a suburb and downtown are not necessarily attributes of any set of links in the transport network

Flow of groundwater between a sink and a spring does not necessarily follow any aquifer or conduit



CARTOGRAPHIC AND TOPOLOGICAL DATABASES

STRICT DEFINITION OF "TOPOLOGICAL"

If a map is stretched and distorted, some of its properties change, including:

Distances

Angles

Relative proximities

Other properties remain constant, including:

Adjacencies

Most other relationships, such as "is contained in", "crosses" (intersecting arcs)

Types of spatial objects - areas remain areas, lines remain lines, points remain points

Strictly, topological properties are those which remain UNCHANGED after distortion

USAGE OF "TOPOLOGICAL" IN GIS

A spatial database is often called "topological" if one or more of the following relationships have been computed and stored

Connectedness of arcs at intersections

Ordered set of arcs forming each polygon boundary

Adjacency relationships between areas


In general, "topological" implies that certain relationships are stored, making the data more useful for various kinds of spatial analysis



PLANAR ENFORCEMENT

Objects and their attributes are capable of describing the conditions existing on a map or in reality

Variation of a single property like soil type or elevation over a mapped area is achieved by partitioning the area into two or more areas

In cases like soil type, the polygons used to describe spatial variation must obey certain rules

Two areas cannot overlap

Every place must be within exactly one area, or on a boundary

These rules are collectively referred to as planar enforcement

Planar enforcement is used to build objects out of digitized lines (hence the phrase "building topology")

It is a consistent and precise approach to the problem of making meaningful objects out of groups of lines.

RELATIONSHIPS IN RASTER SYSTEMS

In general, it is easier to work with relationships in vector systems

The concept of object is not as natural for raster systems, which model the world as composed of pixels

However, relationships can be handled in raster systems with simple techniques:

A map of county boundaries

In one layer each pixel has a county code attribute which is an id pointing to an entry in a county attribute table

In a second layer each well location is coded by giving the appropriate pixel an id pointing to a well attribute table

The "is contained in" relationship can be computed by an overlay operation and stored as an additional column in the well attribute table

Only a few raster systems contain this type of capability to extract relationships into attribute tables

Most do not handle relationships between spatial objects

Go back to previous page

Go back to GER home page

Author: R. Douglas Ramsey Doug@nr.usu.edu