Using Spatial Data with SAS/GIS Software |
The
%GCBATCH macro accepts the following information:
- The name of the address data set to geocode
- The variable names in
the address data set
- The name of the map entry
- The libref in which to store geocoding data sets,
and whether they should be recreated
- The name of the ZIP code centroids data set
- The names of any additional polygonal
composites
to add to the address data set.
Note: The CH, NODE, DETNODE, FNAME, FTYPE, PRE, SUF,
FX, FY, TX, TY, COUNTY, BLOCK, PLACE, STATE, TRACT, ZIP, PLUS4, FRADD, and
TOADD arguments are not used in SAS/GIS software beginning with Version 8.
These arguments are ignored if you specify them.
The %GCBATCH macro has the following general form:
%GCBATCH(
|
<GLIB=geocoding-library>,
|
|
<ZIPD=ZIP-centroids-data-set>,
|
|
<PV=area-composite-list>,
|
|
<NEWDATA=new-data-value>
);
|
|
where
-
AV=address-var
- Specifies the name of the variable that
stores the street address in the address data set that you want to geocode.
This parameter is required.
-
CV=city-var
- Specifies the name of the variable that
stores the city name portion of the address in the address data set that you
want to geocode. This parameter is required.
-
GEOD=address-data-set
- Specifies the address data set that you
want to geocode. The address-data-set argument
should use the form libref.data-set-name. This
parameter is required.
-
GLIB=geocoding-library
- Specifies the libref for the SAS data library
where all of the sorted and summarized chains, nodes, and details data sets
that are created for the geocoding process are stored.
Note: The SAS data library that you specify for the geocoding-library argument should be
on a volume that has a
large amount of free space because the geocoding data sets can be quite large.
Also, to take full advantage of the geocoding facility, you should specify
a permanent SAS data library. The default for this variable is WORK, but data
sets in the WORK library are deleted when the SAS session is terminated, so
the geocoding data sets will be lost. If geocoding data sets already exist
in the specified library at the start of the geocoding process, the geocoding
facility checks their creation dates against the creation date of the chains
data set. The geocoding data sets will be recreated only if the chains data
set has a more recent creation date. The first time that you geocode with
a particular chains data set the process will take considerably longer because
these geocoding data sets are being created, sorted, and indexed. Subsequent
geocoding times, however, will be much faster as long as the chains data set
has not been modified. This parameter is optional.
- MNAME=map-entry
- Specifies the name of the GISMAP entry for
the SAS/GIS spatial database that you
are using for geocoding. The geocoding process uses the projection information
in the map entry to ensure that the X and Y coordinates that are returned
for the address will be in the same coordinate system as the spatial data
for the map. The map-entry argument should use
the form libref.catalog-name.entry-name. This
parameter is required.
-
NEWDATA=YES|NO
- Specifies whether the geocoding data sets
are recreated. The default is NEWDATA=NO. If you set NEWDATA=NO, the geocoding
facility searches the SAS data library that you specified with the GLIB macro
variable for geocode data sets that were created for the spatial entry. The
geocoding facility checks the creation date of existing geocode data sets
against the creation date of the spatial entry. If the creation date of the
geocode data sets is more recent than the creation dates of the spatial entry,
the geocoding facility uses the geocode data sets. Otherwise it creates new
geocode data sets.
Use NEWDATA=YES to force the geocoding facility to build
new versions of the geocoding data sets. You need to specify NEWDATA=YES if
the existing geocoding data sets were created with an earlier version of SAS/GIS
software. This parameter is optional.
-
NV=name-var
- Specifies the name of the variable that
stores the name portion of the address in the address data set that you want
to geocode.
This parameter is optional.
-
PV=area-composite-list
- Specifies the list of polygonal (area) composite
values that you want added as variables to the address data set along with
the X and Y coordinates of the address. By default, no other variables are
added. Use spaces to separate composite names in the list. For example, the
following specification adds the county and census tract and block values
along with the address coordinates:
pv=county tract block,
This parameter is optional.
-
P4V=ZIP+4-var
- Specifies the name of the variable that
stores ZIP+4 postal codes in the address data set that you want to geocode.
This parameter is not required, but the accuracy of
the geocoding process may be reduced if you omit it.
-
SV=state-var
- Specifies the name of the variable that
stores the state name portion of the address in the address data set you want
to geocode.
This parameter is not required, but the accuracy of
the geocoding process may be reduced if you omit it.
-
ZIPD=ZIP-centroids-data-set
- Specifies a data set that contains the coordinates
of the centers of ZIP code zones. (If an address includes a ZIP code and
the street address cannot be matched, the geocoding facility supplies the
ZIP code centroid coordinate instead of the address coordinate.) The default
is ZIPD=SASHELP.ZIPCODE, which specifies the SASHELP.ZIPCODE data set that
is supplied with SAS/GIS software. This parameter is optional.
-
ZV=ZIP-var
- Specifies the name of the variable that
stores the ZIP code portion of the address in the address data set that you
want to geocode.
This parameter is not required, but the accuracy of
the geocoding process may be reduced if you omit it.
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.