|Using Spatial Data with SAS/GIS Software|
|COMPOSITE operation composite-name </ options>;|
The COMPOSITE statement defines, modifies, or deletes associations between variables in the chains and nodes data sets. Once defined, composites can be referenced by other GIS procedure statements.
For example, if a spatial database contains the variables COUNTYL and COUNTYR that identify the chains' left and right values for a county ID variable, you could use the COMPOSITE statement to create a composite called COUNTY by associating the two spatial database variables. The COUNTY composite could then be used to define the county boundaries for the map.
Composites are stored in the currently specified spatial (GISSPA) entry. An error occurs if you submit a COMPOSITE statement when no spatial entry is currently selected.
Note: Use the SPATIAL
CONTENTS statement to view the composites for a spatial entry.
|COMPOSITE Statement Operations|
In a COMPOSITE statement, the operation can be one of the following:
The following list contains descriptions of the COMPOSITE statement operations:
A warning is issued and processing of the current RUN group is halted if a composite with the specified name already exists. The COMPOSITE CREATE statement does not overwrite existing composites. Use COMPOSITE REPLACE to overwrite an existing composite.
Note: Not all spatial database
variables are composites of multiple SAS data set variables. Some composites
represent a single SAS data set variable.
No additional arguments (other than the composite name) are used with this operation. A warning is issued and processing of the current RUN group is halted if the specified composite does not exist.
Note: The DELETE operation of the COMPOSITE statement removes a
composite from the spatial entry but does not delete the SAS variables from
their respective SAS data sets.
For the DELETE operation, you can also specify the following alternative forms for the composite-name argument:
_ALL_to delete all the composites in the current spatial entry.
A warning is issued and processing of the current RUN group is halted if there is no existing composite with the specified name.
The composite-name value must conform to the rules for SAS names:
|COMPOSITE Statement Optional Arguments|
When you specify CREATE, REPLACE, or UPDATE for operation in a COMPOSITE statement, you can specify one or more of these options to follow the composite-name.
the list of options
from the composite-name with a slash (/).
The following list contains descriptions of the additional COMPOSITE statement options:
Rto the specified composite name. For example, the following two statements are equivalent:
composite create state / class=area bilateral; composite create state / class=area var=(left=statel,right=stater);
The VAR= argument is required when you use the CREATE or REPLACE operations, except in the following circumstances:
composite create cfcc; composite create cfcc / var=cfcc class=classification;
Rare added to the composite-name to form the variable name pair for the association. For example, the following statements are equivalent:
composite create state / class=state; composite create state / class=state var=(statel stater);
For other class-type values, the VAR= argument is required when you use the CREATE or REPLACE keywords. See VAR=association-declaration for more information on the VAR= values.
The class-type for the CLASS= option can be one of the following:
The following list contains descriptions of the CLASS=Class-type arguments:
Data set address values are the numeric portion of a
street address, for example, the
100 in the
100 North Main Street. A chain
has four values to define the address range for each side:
|FROMLEFT||Beginning address on the left side|
|TOLEFT||Ending address on the left side|
|FROMRIGHT||Beginning address on the right side|
|TORIGHT||Ending address on the right side.|
When you use specify ADDRESS for the class-type value, you must use the following form of the VAR= argument:
For polygonal areas that represent political subdivisions, you can specify the following alternative class-type values to indicate which features the areas represent:
When you use AREA (or COUNTRY, STATE, or COUNTY) for the class-type value, you must specify the bilateral form of the VAR= argument to specify the variables that identify the features on the left and right sides of each chain in the area:
By default, CITY is not considered an AREA-type composite. If your spatial data contain closed city boundaries, you must explicitly define the composite as an AREA class as well:
composite create towns / var=(cityl cityr) class=(city area);
Note: In order to create new point layers when you add points
to the map interactively in the GIS Map window, you must define at least one
CLASSIFICATION-type composite in the spatial entry.
North Main Ave. Composites of this class are used in geocoding.
2nd St South. Composites of this class are used in geocoding.
Central Park, or the name component of an aggregate feature name, such as the
E Main St. Composites of this class are used in geocoding.
By default, PLUS4 is not considered an AREA-type composite. If your chains data contain closed ZIP+4 boundaries, you must explicitly define the composite as an AREA class as well:
composite create zip4 / var=(zip4l zip4r) class=(area plus4);
N Harrison Ave. Composites of this class are used in geocoding.
By default, ZIPCODE is not considered an AREA-type composite. If your chains data set contains closed ZIP code area boundaries, you must explicitly define the composite as an AREA class as well:
composite create zip / var=(zipl zipr) class=(zipcode area);
The association-declaration argument for the VAR= option can be one of the following, depending on the class-type values that are specified in the CLASS= option:
|COMPOSITE Statement Examples|
The following code fragment associates the class Y with the variable named LAT in the nodes data set to indicate that the variable contains north-south coordinate information:
composite create latitude / var=LAT class=y; run;
Either of the following code fragments associates a pair of variables in the chains data set that contain values for the left and right sides of area boundaries:
composite create state / var=(left=statel,right=stater) class=area; run;
composite create state/ bilateral class=area; run;
The following code fragment associates two pairs of variables in the chains data set that contain values for the corners of address boundaries:
composite create custadd / var=(fromleft=FRADDL,fromright=FRADDR, toleft=TOADDL,toright=TOADDR) class=address; run;
Top of Page
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.