Chapter Contents

Previous

Next
Using Spatial Data with SAS/GIS Software

Importing Generic Spatial Data

SAS/GIS software provides facilities for creating spatial databases from SAS data sets that contains the following types of generic spatial data:
point - GENPOINT - consists of discrete points
line - GENLINE - consists of discrete line segments
polygon - GENPOLY - consists of areas that are enclosed by polylines.

You can use the following import methods if your data are in a format other than the specific import types that were discussed earlier.


Importing Generic Point (GENPOINT) Data

To import a SAS data set that contains point data by using the GIS Spatial Data Importing window:

  1. Select Genpoint by using the Import Type pull-down control.

    The title of the filename field in the Input area changes to SAS/GIS Generic Point data set.

  2. Specify the desired SAS data set, either by typing the location in the data set field or by using the pull-out control to display the Select a Member window, and then by selecting the data set from that window.

    The point data set must contain at least the following variables:
    X east-west coordinate of the point
    Y north-south coordinate of the point
    ID identifier value for the point.

    Note:   Each observation in the data set must have a unique value for the ID variable.  [cautionend]

    The data set can also contain other variables, for example, variable to define characteristics of the points.

  3. Select the variable in the input data set that you want to use as an ID variable by selecting it in the ID Vars field. SAS/GIS software performs a frequency analysis on the values of the specified variable in the point data set and creates a point layer for each unique value of the specified variable. If you specify more than 16 layers, only the first 16 are added to the map. If you do not specify a layer variable, the resulting map will have a single point layer with the same name as the original point data set.

  4. Modify the destination information for the catalog and the spatial data sets, if needed.

  5. Modify the default layers and composites, if needed. See Common Importing Procedures for more information.

  6. Select Import to import the data. When the import process is complete, a message is displayed in the window message bar to indicate whether the import was successful. You can proceed with another import or close the window to display the newly imported map.


Importing Generic Line (GENLINE) Data

To import a SAS data set that contains line data by using the GIS Spatial Data Importing window:

  1. Select Genline using the Import Type pull-down control.

    The title of the filename field in the Input area changes to SAS/GIS Generic Line data set.

  2. Specify the desired SAS data set, either by typing the location in the data set field or by using the pull-out control to display the Select a Member window, and then by selecting the data set from that window.

    The line data set must contain at least the following variables:
    X east-west coordinate of a point on the line
    Y north-south coordinate of a point on the line
    ID identifier value for the line

    Note:   Each line in the data set must have a unique ID value, and all observations for the points on each line must have the same value for the ID variable.  [cautionend]

    The data set can also contain other variables, for example, variables to define characteristics of the lines.

  3. Select the variable in the input data set that you want to use as an ID variable by selecting it in the ID Vars field. SAS/GIS software performs a frequency analysis on the values of the specified variable and creates a line layer for each unique value of the specified variable. If more than 16 layers are created, only the first 16 are added to the map by default. If you do not specify a layer variable, the resulting map will have a single line layer with the same name as the original line data set.

  4. Modify the destination information for the catalog and the spatial data sets, if needed.

  5. Modify the default layers and composites, if needed. See Common Importing Procedures for more information.

  6. Select [Import] to import the data. When the import process is complete, a message is displayed in the window message bar to indicate whether the import was successful. You can proceed with another import or close the window to display the newly imported map.


Importing Generic Polygon (GENPOLY) Data

To import a SAS data set that contains polygon data by using the GIS Spatial Data Importing window:

  1. Select Genpoly using the Import Type pull-down control.

    The title of the filename field in the Input area changes to SAS/GIS Generic Polygon data set.

  2. Specify the desired SAS data set, either by typing the location in the data set field or by using the pull-out control to display the Select a Member window, and then by selecting the data set from that window.

    The polygon data set must contain at least the following variables:
    X east-west coordinate of a point on the polygon boundary
    Y north-south coordinate of a point on the polygon boundary
    ID-name(s) identifier value(s) for the polygonal area.

    Note:   Each polygonal area in the data set should have unique identifier values, and all observations for the points in each area should have the same identifier value. A polygonal area can consist of more than one polygon, in which case the data set should also contain a SEGMENT variable to distinguish the individual polygons.  [cautionend]

    Any other variables in the data set will not be included in the spatial database.

  3. Select the variables in the input data set that you want to use as ID variables by selecting them in the ID Vars field. ID variables are variables whose values uniquely identify unit areas in the map. A separate layer is created for each ID variable. The ID variables must be selected in hierarchical order. For example, if the data set contains both STATE and COUNTY variables, then STATE must be selected before COUNTY.

  4. Modify the destination information for the catalog and the spatial data sets, if needed.

  5. Modify the default layers and composites, if needed. See Common Importing Procedures for more information.

  6. Select [Import] to import the data. When the import process is complete, a message is displayed in the window message bar to indicate whether the import was successful. You can proceed with another import or close the window to display the newly imported map.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.