|Using Spatial Data with SAS/GIS Software|
|POLYGONAL INDEX operation polygonal-index </ options>;|
The POLYGONAL INDEX statement creates, replaces, modifies, or deletes polygonal index data sets by using a libref and polygonal index references from a spatial entry. Polygonal indexes delineate enclosed areas in the spatial data by noting the chains that form polygons. This statement is also used to compute the enclosed areas, the centroid coordinates, and the perimeter lengths of the individual polygons.
The spatial database must include a polygonal index data set for each feature type that you intend to represent as an area layer in the map. For example, to represent states and counties as enclosed areas, you must have separate polygonal indexes for each.
The POLYGONAL INDEX statement uses composite values from the current spatial entry to determine area boundaries. The composites that are used for polygonal indexes must have the CLASS attribute AREA (or one of the political subdivision area classes such as COUNTRY, STATE, or COUNTY that imply AREA by default).
Polygonal index definitions are stored in the currently specified spatial entry. An error occurs if you submit a POLYGONAL INDEX statement when no spatial entry is currently selected.
Note: You can use the SPATIAL CONTENTS statement to view the polygonal index definitions
for a spatial entry.
|POLYGONAL INDEX Statement Operations|
In a POLYGONAL INDEX statement, the operation is one of the following:
The following list contains descriptions of the POLYGONAL INDEX statement operations:
A warning is issued and processing of the current RUN group is halted if either a polygonal index definition or a SAS data set with the specified names already exist. The POLYGONAL INDEX CREATE statement does not overwrite existing index definitions or data sets. Use POLYGONAL INDEX REPLACE to replace an existing index definition or data set.
For a POLYGONAL INDEX CREATE statement, you must specify both the COMPOSITE= and OUT= arguments.
KEEP is the only additional argument (other than the polygonal index name) that can be used with this operation. A warning is issued and processing of the current RUN group is halted if the specified polygonal index does not exist.
For DELETE, you can also specify the special value
_ALL_ for the polygonal-index
argument to delete all the polygonal index definitions in the current spatial
For a POLYGONAL INDEX REPLACE statement, you must specify both the COMPOSITE= and OUT= arguments.
Note: If the
data set that is specified in the OUT= argument already exists and belongs
to a different spatial entry, you must specify the FORCE argument to cause
it to be overwritten.
A warning is issued and processing of the current RUN group is halted if there is no existing polygonal index with the specified name. If data set that is owned by a different spatial entry that is specified in the OUT= argument already exists, you must use the FORCE argument to cause it to be overwritten.
In a POLYGONAL INDEX statement, the polygonal-index argument names the polygonal index you want to create, delete, replace, or update.
The polygonal-index value must conform to the rules for SAS names:
|POLYGONAL Index Statement Optional Arguments|
When you specify CREATE, REPLACE, or UPDATE for the operation in a POLYGONAL INDEX statement, you can specify the following additional arguments following the polygonal index name.
When you specify DELETE for the operation keyword, only the following option is allowed:
Note: Separate the list of arguments
from the polygonal index name with a slash (/).
The following list contains descriptions of optional POLYGONAL INDEX statement arguments:
Note: The COMPOSITE= argument is required when you use the CREATE or REPLACE
Note: The OUT= argument
is required when you use the CREATE or REPLACE operation.
|POLYGONAL INDEX Statement Example|
The following code fragment builds a polygonal index data set that is named GMAPS.STATEX. The data set identifies the boundaries of the polygons for the area feature that is identified by the STATE composite in the current spatial entry:
polygonal index create state / composite=state out=gmaps.statex; run;
Top of Page
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.