Previous Page | Next Page

The GIS Procedure

LATTICE Statement


Defines the relationships between areas in a spatial database.
LATTICE operation outer-composite-name-1 ENCLOSES inner-composite-name-1
<...outer-composite-name-n ENCLOSES inner-composite-name-n>
<_UNIVERSE_ ENCLOSES inner-composite-name>;

Operations

CONTENTS

prints information about the lattice hierarchy in the current spatial entry to the Output window. No additional arguments are used with this operation.

CREATE

creates a new lattice hierarchy in the current spatial entry. An error occurs if the spatial entry already contains a lattice. Use the REPLACE operation to replace an existing lattice.

DELETE

removes the lattice from the current spatial entry. No additional arguments are used with this operation. An error occurs if the specified coverage entry does not exist.

REPLACE

overwrites the lattice in the current spatial entry or creates a new entry if one does not exist.


Arguments

The following arguments are used with the LATTICE statement:

outer-composite-name ENCLOSES inner-composite-name

_UNIVERSE_ ENCLOSES inner-composite-name

outer-composite-name

is an area composite that geographically contains other enclosed AREA-type composites. Outer-composite-name 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 inner-composite-name is a single area composite that is not contained within other enclosed areas and that does not itself enclose any other areas.

ENCLOSES

is the separator between LATTICE composites. The characters -> can be used in place of ENCLOSES.

inner-composite-name

is an area composite that is geographically within the outer-composite-name polygonal areas. It can also be a single area that is not contained by another when preceded by _UNIVERSE_. Inner-composite-name must have the CLASS attribute AREA (or one of the political subdivision area classes such as COUNTRY, STATE, or COUNTY).

_UNIVERSE_

indicates that the composite is a single area that is not part of a hierarchy.


Details

The LATTICE statement 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 reevaluated 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 cannot be 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 entry. 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.  [cautionend]

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;


Examples


Single Hierarchy

For a lattice hierarchy that comprises several composites, the general form of the LATTICE statement is

LATTICE CREATE A ENCLOSES B
B ENCLOSES C
C ENCLOSES D;

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 create state  encloses county
        county encloses tract
        tract  encloses block;


Multiple Hierarchies

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 create state  encloses county /* first lattice */
        county encloses tract  /* first lattice */
        tract  encloses block  /* first lattice */
        mall   encloses store; /* second unrelated lattice */


Single-Element Lattice

If the map has only one AREA-type composite, it is called a universe-enclosed association. Use the _UNIVERSE_ keyword to define a lattice for a universe-enclosed association, as follows:

lattice create _universe_ encloses tract;

It is possible to have more than one set of unrelated AREA composites, for example, a spatial entry containing counties and telephone area codes. The lattice hierarchy would then be defined as:

lattice create _universe_ encloses AreaCode
               _universe_ encloses County;

Previous Page | Next Page | Top of Page