Working with Spatial Data |
When SAS/GIS uses a coverage that is not universal--that is, one in which the value of the WHERE expression is not '1'--to subset a map, all of the layers in the map must also satisfy this WHERE expression. If any of the layers do not satisfy this WHERE expression, some features of the map might not be displayed, and the reason might not be apparent.
For example, if you have a map of the United States and you want to create a subset map containing just North Carolina and Virginia, you could use the following COVERAGE statement to create the subset map:
COVERAGE CREATE NCVA / where='STATEL IN(37 51) OR STATER IN(37 51)';Any points or lines that do not have 37 or 51 as the STATEL or STATER value will not display on the map.
Defining a layer with WHERE='1' displays all of the features in the underlying spatial data that have that type. For example, if you have a map with a point layer that contains capital cities, and you add a new point layer for grocery store locations by using WHERE='1' for the layer definition, the grocery store layer will display all of the point features in the spatial data. This layer includes capital cities, grocery stores, and all other point features in the spatial data. You might find this confusing if you are not aware that all point features are being displayed when you intend to display only one layer.
You might encounter this situation because the GENPOINT import, by default, defines all point layers with a WHERE='1' expression. You can click the Modify layers button on the GIS Spatial Data Importing window to redefine the layer definition to be a WHERE expression that uniquely identifies the set of points in the layer. If the layer already exists on the map, you can use the LAYER statement in the GIS procedure to redefine the layer with a WHERE expression that defines only those points in the layer.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.