| Working with Spatial Data Using SAS/GIS Software |
The LATTICE statement defines the relationships between
areas in a spatial database, that is, it defines which areas enclose other
smaller areas (such as states enclose counties).
When a lattice hierarchy is defined, the area composite
values for new points are assigned automatically as the points are added to
the map. The composite values are also re-evaluated automatically when an
existing point is moved to a new location. A lattice definition also makes
it possible to simultaneously assign attribute values to all points in a point
layer by setting area attributes in the GIS Layer window. Area attributes
are not automatically assigned to new points, moved points, geocoded points,
or imported points unless a lattice has been defined.
The lattice definition is written to the current spatial
(GISSPA) entry. If the current spatial entry already has a lattice definition,
it is replaced. An error occurs if you submit a LATTICE statement when no
spatial entry is currently selected.
Note: Because the
LATTICE statement uses composites, you must include a RUN statement following
a COMPOSITE statement. This ensures that the composite is created before the
LATTICE statement executes and attempts to use the composite.
The following arguments can be used with the LATTICE
statement:
An error occurs if there is no current spatial entry
for the GIS procedure. Use the SPATIAL statement to specify the current spatial
entry.
The LATTICE statement checks lattice definitions for
circular references. For example, a lattice definition of the following form
would cause an error:
LATTICE A ENCLOSES B
B ENCLOSES C
C ENCLOSES B;
The following list contains descriptions of the LATTICE
statement arguments:
- Composite-1
- Composite-1
is an area composite that geographically contains other enclosed AREA type
composites. Composite-1 must have the CLASS attribute AREA
(or one of the political subdivision area classes such as COUNTRY, STATE,
or COUNTY).
You can also use the special value _UNIVERSE_ to signify that composite-2
is a single area composite which is not contained within other enclosed areas
and which does not itself enclose any other areas.
-
ENCLOSES
- ENCLOSES | -> is the separator between LATTICE
composites.
- Composite-2
- Ccomposite-2
is an area composite that is geographically within composite-1s
polygonal areas, or a single area not contained by another when
_UNIVERSE_ is composite-1. Composite-2 must have the CLASS
attribute AREA (or one of the political subdivision
area classes such as COUNTRY, STATE, or COUNTY).
For a lattice hierarchy that comprises several associations,
the general form of the LATTICE statement is
Assume that the spatial database contains states that
are subdivided into counties, that the counties are further subdivided into
tracts, that the tracts are further subdivided into blocks, and that corresponding
composites are defined for each. The following code fragment defines the lattice
for the spatial database:
lattice state -> county
county -> tract
tract -> block;
You can define more than one lattice hierarchy for a
spatial database, for example, when the map has overlapping AREA-type composites
that are not related. A single LATTICE statement is used, but the GIS procedure
recognizes the break between the two hierarchies, as follows:
lattice state encloses county /* first lattice */
county encloses tract /* first lattice */
tract encloses block /* first lattice */
mall encloses store; /* second unrelated lattice */
If the map has only one AREA-type composite, it is called
a universe-enclosed association. You use the _UNIVERSE_
keyword to define a lattice for a universe-enclosed association, as follows:
lattice _universe_ encloses tract;
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.