Chapter Contents |
Previous |
Next |
Using Spatial Data with SAS/GIS Software |
COMPOSITE operation composite-name </ options>; |
Description |
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.
_ALL_
. 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.
Note: Separate
the list of options
from the composite-name with a slash (/).
The following list contains descriptions of the additional COMPOSITE statement options:
L
and R
to 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;
L
and R
are 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
street address, 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:
VAR=(<FROMLEFT=>variable,
<FROMRIGHT=>variable,
|
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:
VAR=(<LEFT=>variable, <RIGHT=>variable) |
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
in North Main Ave
. Composites
of this class are used in geocoding.South
in 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 Main
in 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);
Ave
in 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 |
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;
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.