|Using Spatial Data with SAS/GIS Software|
SAS/GIS software uses SAS catalog entries to store metadata for the spatial database-that is, information about the spatial data values in the spatial data sets. SAS/GIS spatial databases use the following entry types.
A spatial entry is a SAS catalog entry of type GISSPA that identifies the spatial data sets for a given spatial database and defines relationships between the variables in those data sets.
SAS/GIS software supports simple spatial entries and merged spatial entries as follows:
For example, you may have two spatial databases that contain the county boundaries of adjoining states. You can build a merged spatial entry that references both states and view a single map that contains both states' counties. Otherwise, you would have to import a new map containing the two states' counties. This new map would double your spatial data storage requirements.
Spatial entries are created and modified using the SPATIAL statement in the GIS procedure.
Note: You can also create a new spatial entry by selecting the following from the GIS Map window's menu bar:
The following additional statements in the GIS procedure also update the information in the spatial entry:
You can view a formatted report of the contents of a spatial entry by submitting a SPATIAL CONTENTS statement in the GIS procedure.
See SPATIAL Statement for details about using the GIS procedure to create, modify, or view the contents of spatial entries.
A coverage entry is a SAS catalog entry of type GISCOVER that defines the subset, or coverage, of the spatial data that are available to a map. SAS/GIS maps refer to coverages rather than directly to the spatial data.
A coverage entry contains the following elements:
Note: The clause WHERE='1' can be used to define a coverage that includes all the
data that are in the spatial database. WHERE='1' is called a universal
The WHERE clause binds the coverage entry to the spatial data sets that it subsets. The WHERE clause is checked for compatibility with the spatial data when the coverage entry is created and also whenever a map that uses the coverage entry is opened.
These maximum and minimum coordinates are evaluated when the coverage is created. The GIS procedure's COVERAGE CREATE statement reads the matching chains and determines the extents from the chains, the XMIN, YMIN, XMAX, and YMAX variables. If you make changes to the chains, nodes, and details data sets that affect the coverage extents, use the COVERAGE UPDATE statement to update the bounding extent values.
Multiple coverage entries can refer to the same spatial entry to create different subsets of the spatial data for different maps. For example, you could define a series of coverages to subset a county into multiple sales regions according to the block groups that are contained in each of the regions. The spatial data for the entire county would still be in a single spatial database that is represented by the chains, nodes, and details data sets and by the controlling spatial entry.
Coverage entries are created and modified by using the COVERAGE statement in the GIS procedure. You can view a formatted report of the contents of a coverage entry by submitting a COVERAGE CONTENTS statement in the GIS procedure. (The contents report for a coverage entry also includes all the contents information for the root spatial entry as well.)
See COVERAGE Statement for more information about creating, modifying, or viewing the contents of coverage entries.
A layer entry is a SAS catalog entry of type GISLAYER that defines the set of features that compose a layer in the map. A layer entry contains the following elements:
The WHERE clause binds the layer entry to the spatial data even though the WHERE clause is stored in the layer entry. The layer is not bound to a specific spatial entry, just to those entries that represent the same type of data. Therefore, a layer that is created for use with data that are imported from a TIGER file can be used with data that are imported from any TIGER file; however, not all filetypes can take advantage of this behavior. The WHERE clause is checked for compatibility with spatial data when the layer entry is created and also whenever a map that uses the layer entry is opened.
Note: When you define area layers, you
can specify a composite as an alternative to specifying an explicit WHERE
clause. However, the layer entry stores the WHERE clause that is implied by
the composite. For example, if you specify STATE as the defining composite
for a layer, and the STATE composite specifies the following variables: VAR=(LEFT=STATEL,RIGHT=STATER),
then the implied WHERE clause that is stored in the layer entry is 'STATEL
A map entry is a SAS catalog entry of type GISMAP. Map entries are the controlling entries for SAS/GIS maps because they tie together all the information that is needed to display a map. A map entry contains the following elements:
Map entries are created by using the MAP CREATE statement in the GIS procedure. However, much of the information that is stored in the map entry is specified interactively in the GIS Map window.
You can view a formatted report of the contents of a map entry by submitting a MAP CONTENTS statement in the GIS procedure. (The contents report for a map entry includes all the contents information for the spatial, coverage, and layer entries as well.)
See MAP Statement for details on using the MAP statement.
For most operations that involve the spatial database, you refer to composites of the spatial data variables rather than directly to the variables in the spatial data sets. A composite consists of the following elements:
For example, if the chains data set has a variable named FEANAME that contains feature names, you can create a composite for the FEANAME variable that assigns the class attribute NAME to indicate that the association represents feature names. Or, if the chains data set has COUNTYL and COUNTYR variables that contain the codes for the counties on the left and right sides of the chains, you can create a composite named COUNTY. The composite identifies the bilateral relationship between these two variables and assigns the class attribute AREA to indicate that the association defines county areas in the spatial data.
Composites are created and modified using the COMPOSITE statement in the GIS procedure. Composite definitions are stored in the spatial entry.
See COMPOSITE Statement for more information about creating or modifying composites.
Top of Page
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.