Chapter Contents

Previous

Next
Using Spatial Data with SAS/GIS Software

Merging Spatial Data


Overview

MERGE is an option of the GIS procedure's SPATIAL statement that lets you build a new spatial entry by referencing two or more existing spatial entries. The dependent data sets for the spatial entries are not actually combined when you use the MERGE argument; the new spatial entry includes them by reference.


Syntax

The MERGE option syntax follows.

MERGE=(<libref.catalog.>spatial-entry-1 <, ..., <libref.catalog.>spatial-entry-n>)
<EDGEMATCH | OVERLAP>

Note:   Keep in mind that MERGE is specified as an option on a SPATIAL statement.  [cautionend]

If you specify a one-level name for any of the entries to be merged, the spatial entry is assumed to be in the catalog that is specified in the CATALOG= argument with the PROC GIS statement or in the most recently issued CATALOG statement. An error occurs if you have not specified a catalog prior to specifying the names of the entries you want to merge.


Types of Merge Operations

The MERGE option accepts the following arguments:

EDGEMATCH
Locates common boundaries between the merged spatial entries and updates missing left- or right-side composite variable values in the chains data that lie on the boundaries.

In other words, the EDGEMATCH operation compares the chains in the different data sets and finds those chains that map the same feature. When it finds the same chain in both data sets, it replaces any missing left- or right-side composite values in either chain with the valid values from the other data set. EDGEMATCH also creates a merged spatial entry that references other spatial entries (either merged or simple) that you specified with the MERGE option.

EDGEMATCH rewrites the specified chains data sets. You cannot reverse this operation.

OVERLAP
Merges spatial entries without attempting to match boundaries. OVERLAP is the default behavior of the MERGE argument. The OVERLAP argument creates a merged spatial entry that references the specified spatials entries (either merged or simple) .

OVERLAP does not rewrite the specified chains data sets.

For more information, see SPATIAL Statement.


Benefits of Merging Data

Merging data allows you to construct maps that show larger geographic areas without the overhead of storing duplicate spatial data sets. For example, you may have a chains, nodes, and details data set for each U. S. state. If you want to create a map of New England, you do not have to physically combine and duplicate the individual data sets for the six states composing the region. Instead, you can create a merged spatial entry named New_England that references the individual states' simple spatial entries.

Edgematching provides a mechanism to update adjoining spatial data sets to replace missing left or right values in the chains data sets. Using the New England example, the chains in the chains data set for New Hampshire that lie along the Vermont border contain the FIPS code of 33 on one side of each chain. The other side of each chain has a missing value. The corresponding chains in the Vermont chains data set contain the Vermont FIPS code of 50 on one side and a missing value on the other side. An edgematch merge of the two data sets locates these common boundary chains in each data set and replaces the missing values with the correct FIPS code for the adjoining state. It will also create a merged spatial entry that references the New Hampshire and Vermont simple spatial entries.

The EDGEMATCH operation creates a single-merged spatial entry by which you can create a map of the two states. It also adds the Vermont FIPS code to the appropriate chains in the New Hampshire data set, and adds the New Hampshire FIPS code to the corresponding chains in the Vermont data set.


Chapter Contents

Previous

Next

Top of Page

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