Using Spatial Data with SAS/GIS Software 
SAS/GIS software
uses two basic types of data:

Spatial
Data
 Describe the location, shape, and interrelationships
of map features

Attribute
Data
 Provide information that relates to the
map features.
SAS/GIS software uses spatial data to represent the
following three types of map features:

Point
Features
 Consist of individual locations that are
shown as symbols, representing realworld locations of special points of
interest.

Line Features
 Consist of sequences of two or more coordinates
that form zerowidth shapes, either closed or unclosed. Line features represent
entities that either have no width, such as political boundaries, or those
that can be represented as having no width, such as streets or water
pipes.

Area
Features
 Consist of sequences of three or more coordinates
that form polygons (with single or multiple boundaries and with or without
holes.) Area features represent twodimensional entities such as geographic
areas (countries, states, and so forth) or floorplans for buildings.
To represent point, line, and area features in the map,
SAS/GIS software defines the following topological features in the spatial
data:

Chains
 Are sequences of two or more points in the
coordinate space. The end points (that is, the first and last points of the
chain) are nodes. Each chain has a direction, from the first point toward
the last point. The first point in the chain is the fromnode
and the last point is the tonode. Relative to its direction,
each chain has a left side and a right side.
Points between the fromnode and the tonode are detail points, which serve to trace the curvature of the feature
that
is represented by the chain. Detail points are not
nodes.

Nodes
 Are points in the spatial data coordinate
space that have connections to one or more chains.

Areas

Are twodimensional finite regions of the coordinate space. One or more chains,
called boundary chains, separate two different areas. Chains
that lie completely inside an area are called internal chains
and are bounded on the left and right sides by the same area.
The spatial data coordinate space can be represented
in any numeric units even those that include arbitrary values. Coordinates
that are stored as longitude and latitude values have a maximum usable precision
of about one centimeter.
Representations of map features are implemented with
one or more chains, as follows:

Point features
 Are implemented with one chain, one node
(that is, the fromnode and tonode for a point feature are the same node),
and no detail points.

Line and Area Features
 Are implemented with one or more chains
and one or more nodes.
Rules for Topological Correctness
SAS/GIS spatial data must obey the following rules in
order for the topology to be correct. These rules are similar to the rules
for TIGER/Line files from the U.S. Bureau of the Census. For more information
on these rules, see Gerard Boudriault's 1987 article, "Topology in the
TIGER File" in AUTOCARTA 8, Proceedings, pages 258263,
published by the American Society for Photogrammetry and Remote Sensing and
the American Congress on Surveying and Mapping.
Rule: Topological Completeness
All chains must
be
 Bounded by two nodes, the fromnode and the tonode
Note: In chains for point features and for singlechain closedloop
line features or area boundaries, the fromnode and the tonode are the same
node, but both are still included in the chain definition.
 Bounded by two areas, one on the left and one
on the right.
These relationships must be complete, so the following
two rules apply:
For each unique area ID or unique set of area IDs, all
the boundary chains that have the ID value (either on the right or left, but
not both) form one or more closed loops or cycles.
Rule: Topologicalgeometric Consistency
The collection of chains, nodes, and areas must have coordinates
that make the collection a disjoint partitioning of the coordinate space.
The following four conditions must be true to avoid problems with displaying
the spatial data:
Note: Edgematched data share coordinates along the
common boundaries, but each chain should have the proper polygonal ID values
on the side that represents the outside edge of their respective physical
coverages as well as the inside edges.
Problems Resulting from Topological Errors
Topological errors in the spatial
data cause the following types of problems:
 A polygonal index cannot be built for all the
polygons for a particular area set.
 A successfully indexed polygon does not close
because
 the chains for a node do not form a cycle, which
is sometimes the result of left and rightside values being swapped for one
or more of the connected chains
 a chain crosses another chain's interior coordinated
space.
 Multiple features are selected when only one selection
is desired because of overlapping features in a coordinate space.
 Select Like Connected processing fails to select
apparently connected chains.
Attribute data are all other data that are related to map features
in some way, including the data that you want to analyze in the context of
the map. Attribute data can be stored in the spatial database by the following
methods:
 Directly with the spatial data as variables in
the chains data set
 Indirectly in SAS data sets that are joined to
the chains data set by a link that is composed of one or more variables.
Attribute data can be used as
follows:
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.