Working with Spatial Data |
Overview |
MERGE= is an argument of the GIS procedure's SPATIAL statement that enables you to 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 |
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.
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 before specifying the names of the entries you want to merge.
Types of Merge Operations |
The MERGE= argument accepts the following arguments:
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= argument.
EDGEMATCH rewrites the specified chains data sets. You cannot reverse this operation.
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 spatial entries (either merged or simple).
For more information, see SPATIAL Statement.
Benefits of Merging Data |
Merging data enables you to construct maps that show larger geographic areas without the overhead of storing duplicate spatial data sets. For example, you might have chains, nodes, and details data sets 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.
Edge matching 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 edge match 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.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.