Assessing Your Spatial Data Needs

Determining Prerequisites

You use a geographic information system to explore data in the context of a map, so you must have a map in order to use SAS/GIS software. In addition, the map must be in the form of spatial data that SAS/GIS software can use.

Assessing Your Attribute Data

The first step in deciding what spatial data you need is to assess the attribute data that you want to analyze. The attribute data must have a spatial component. That is, the data must contain at least one variable with values that relate to location. Examples include city, state, or country names or codes; street names; addresses; and so on. Because SAS/GIS software is part of SAS, the attribute data must also be in the form of a SAS data set or a SAS view. If needed, you can use any method that is available for transforming your attribute data into a SAS data set or a SAS view. These methods include, but are not limited to the following:
  • using SAS programming statements or the SAS Import Wizard to read external files into SAS data sets
  • using SAS/ACCESS software or the SQL procedure to create views to database files
  • using SAS programming statements or the SQL procedure to create dynamic views to SAS data sets.
First ensure that your attribute data has a spatial component and is in a format that SAS/GIS can read. Then proceed to identify and locate your spatial data.

Determining Your Spatial Data Requirements

SAS/GIS software can analyze attribute data under certain conditions. You need spatial data that contains representations of features to at least the same level of detail as the location information in your attribute data. For example, if your attribute data consists of demographic data for states, then your spatial data must provide at least state boundaries. Your attribute data can consist of demographic data for smaller census tracts. You will then need spatial data that contains the corresponding census tract boundaries. Only then can SAS/GIS software explore the demographic data.

Locating a Source of Spatial Data

To acquire spatial data for use with SAS/GIS software, you import the data from other formats. One readily accessible source of maps for importing is the map data sets that are provided with SAS/GRAPH software. However, these maps provide only political boundaries and not other physical features such as rivers and major highways. Other sources for spatial data that you can import include the following:
  • Governmental agencies. For example, SAS/GIS software can import spatial data from TIGER/Line shapefiles produced by the U.S. Census Bureau and from DLG files produced by the U.S. Geological Survey.
  • Drawing and computer-aided design (CAD) packages. SAS/GIS software can import the DXF interchange format that is supported by products from various vendors.
  • Tele Atlas N.V. SAS/GIS can import the Dynamap files.
  • MapInfo Corporation. SAS/GIS can import MapInfo MIF and MID files.
  • ArcInfo software by Esri. SAS/GIS can import uncompressed ArcInfo interchange (E00) files.
  • User-created files. If no other source is available, you can use SAS programming statements to convert your spatial data into the required generic format, which SAS/GIS software can then import.
    The MAPIMPORT procedure can import polygonal areas from Esri shapefiles into SAS/GRAPH map data sets. Those map data sets can then be imported into SAS/GIS. For more information about the procedure, see MAPIMPORT Procedure in SAS/GRAPH: Reference.
Whatever the source, the spatial data must have at least one variable with values that match values in the attribute data that you want to analyze. If necessary, you can use SAS to process either the attribute data or the spatial data. For example, if your attribute data contains state names and your spatial data contains state codes, you can use SAS programming statements to generate corresponding codes for the names. A similar circumstance exists if your attribute data and spatial data both have codes to identify areas in the map. However, the two sets of data use different codes for the same areas. In this case you can use SAS programming statements to translate the coding schemes.