Working with Spatial Data |
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:
spatial entries
coverage entries
layer entries
map entries
composites
Spatial Entries |
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.
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:
SAS/GIS software supports simple spatial entries and merged spatial entries.
Simple spatial entries contain the following elements:
references to the chains, nodes, and details data sets that contain spatial information.
references to any polygonal index data sets that define the boundaries of area features in the spatial data.
definitions for composites that specify how the variables in the spatial data sets are used. See Composites for more information about composites.
the definition for a lattice hierarchy that specifies which area features in the spatial data enclose or are enclosed by other features.
parameters for the projection system that is used to interpret the spatial information that is stored in the spatial data sets.
the accumulated bounding extents of the spatial data coordinates of its underlying child spatial data sets, consisting of the minimum and maximum X and Y coordinate values and the ranges of X and Y values.
Merged spatial entries have the following attributes:
consist of multiple SAS/GIS spatial databases that are linked together hierarchically in a tree structure.
contain logical references to two or more child spatial entries. A child spatial entry is a dependent spatial entry beneath the merged spatial entry in the hierarchy.
contain specifications of how the entries were merged (by overlapping or edge matching).
reference the spatial data sets that belong to the child spatial entries beneath them on the hierarchy.
do not have references to any polygonal index data sets that define the boundaries of area features in the spatial data.
do not have definitions for composites that specify how the variables in the spatial data sets are used. See Composites for more information about composites.
do not have the definition for a lattice hierarchy that specifies which area features in the spatial data enclose or are enclosed by other features.
do not have parameters for the projection system that is used to interpret the spatial information stored in the spatial data sets.
contain the accumulated bounding extents of the spatial data coordinates of their underlying child spatial entries, consisting of the minimum and maximum X and Y coordinate values and the ranges of X and Y values.
The following additional statements in the GIS procedure update the information in the spatial entry:
creates or modifies composites that define the relation and function of variables in the spatial data sets. The composite definition is stored in the spatial entry. See COMPOSITE Statement for details about creating or modifying composites.
updates the list of available index names stored in the spatial entry. See POLYGONAL INDEX Statement for details about creating or modifying polygonal indexes.
updates the lattice hierarchy stored in the spatial entry. See LATTICE Statement for details about defining lattice hierarchies.
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.
Coverage Entries |
A coverage entry is a SAS catalog entry of type GISCOVER that defines the subset, or coverage, of the spatial data that is available to a map. SAS/GIS maps refer to coverages rather than directly to the spatial data.
A coverage entry contains the following elements:
a WHERE expression that describes the logical subset of the spatial data that is available for display in a map.
Note: The expression WHERE='1' can be used to define a coverage that includes all the data that is in the spatial database. WHERE='1' is called a universal coverage.
The WHERE expression binds the coverage entry to the spatial data sets that it subsets. The WHERE expression 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.
the maximum and minimum X and Y coordinates in the portion of the spatial data that meets the WHERE expression criteria for the coverage.
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' 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.
Layer 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:
a WHERE expression that describes the common characteristic of features in the layer.
The WHERE expression binds the layer entry to the spatial data even though the WHERE expression 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 is imported from a TIGER file can be used with data that is imported from any TIGER file; however, not all file types can take advantage of this behavior. The WHERE expression 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 expression. However, the layer entry stores the WHERE expression 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 expression that is stored in the layer entry is 'STATEL NE STATER'.
option settings for the layer such as the layer type (point, line, or area), whether the layer is static or thematic, whether it is initially displayed or hidden, whether detail points are drawn for the layer, and the scales at which the layer is automatically turned on or off.
the graphical attributes that are necessary to draw the layer when it is displayed as a static layer.
the attribute links, theme range breaks, and graphical attributes if the layer contains themes.
Map Entries |
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:
a reference to the coverage entry that defines the subset of the spatial data that is available to the map. Note that the map entry refers to a particular coverage of the spatial data rather than directly to the spatial entry.
references to the layer entries for all layers that are included in the map.
references to any attribute data sets that are associated with the map, for example, the data sets that are used for the map actions, along with definitions of how the attribute data sets are linked to the spatial data.
a reference to the SAS data set that contains labels for map features.
parameters for the projection system that is used to project the spatial data coordinates for display.
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 about using the MAP statement. See Chapter 10, "SAS/GIS Windows" in the SAS/GIS Software: Usage and Reference, Version 6, for details about the items that can be specified interactively in the GIS Map window.
Composites |
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:
a variable association that identifies which variable or variables in the spatial database comprise the association. The variable association can specify a single variable, a pair of variables that define a bilateral (left-right) association, or two pairs of variables that define the start and end of a directional (from-to) bilateral association.
a class attribute that identifies the role of the composite in the spatial database.
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. When a spatial action is performed in a map, the variables referenced by composites for the selected map features are displayed in the Spatial Information window.
See COMPOSITE Statement for more information about creating or modifying composites.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.