| Working with Spatial Data Using SAS/GIS Software |
|
MAP operation
<libref.catalog.>map-entry </ options>;
|
The MAP statement
A map entry is a SAS catalog
entry of type GISMAP that defines
the displayed features of a map. The definition specifies which layers the
map contains and which coverage of the spatial database is used. The map entry
also stores legend definitions and operation definitions for the map, information
about the projection system used to display the map, and the names of any
associated SAS data sets and of the data set that contains labels for map
features.
In the MAP statement, operation
can be one of the
following:
The
following list contains descriptions of the MAP
statement operations:
-
CONTENTS
- CONTENTS prints information about the contents
of the specified GISMAP entry to the OUTPUT window, including
No additional arguments (other than the map-entry name) are
used with this operation. An error occurs if the specified
map entry does not exist.
-
CREATE
- CREATE creates a new GISMAP entry defining
a map that can be displayed in the GIS Map window.
An error occurs if a map entry with the specified name
already exists. The MAP CREATE statement does not overwrite existing map entries.
Use MAP REPLACE to overwrite an existing entry.
For a MAP CREATE statement, you must also specify the
COVERAGE= and LAYERS= arguments.
-
DELETE
- DELETE removes the specified GISMAP entry.
No additional arguments (other than the map entry name)
are used with this operation. An error occurs if the specified map entry does
not exist.
For the DELETE operation, you can also specify the special
value _ALL_ for the map entry name argument
to delete all GISMAP entries in the current catalog.
- CAUTION:
- Use DELETE with care.
The GIS procedure
does not prompt you to verify the request before deleting the map entry. Be
especially careful when using the
_ALL_ keyword.
![[cautend]](../common/images/cautend.gif)
-
REPLACE
- REPLACE overwrites the specified GISMAP
entry. The MAP REPLACE statement has the effect of canceling the previously
issued MAP CREATE statement for the specified map entry.
For a MAP REPLACE statement, you must also specify the
COVERAGE= and LAYERS= options.
-
UPDATE
- UPDATE modifies the specified GISMAP entry
by applying new values for specified arguments.
An error occurs if there is no existing map entry with
the specified name.
- Entry Name
- In the MAP statement, the map entry-name identifies the GISMAP entry you want to create, delete, replace, or
update. The general form of the argument
is
|
<libref.catalog.>map-entry
|
If you
specify a one-level name, the map entry is assumed
to be in the catalog specified in the PROC GIS statement or in the most recently
issued CATALOG statement. An error occurs if no catalog has previously been
specified.
The map-entry name must conform to the
rules for SAS names:
When you specify CREATE, REPLACE, or UPDATE for the
MAP operation, you can specify one or more of the following options following
the map entry name.
Note: Separate the list of options
from the map entry-name with a slash (/).
The following list contains descriptions of additional
MAP statement options:
- CARTESIAN | LATLON
- CARTESIAN | LATLON specifies the coordinate
system used for the displayed spatial data. The default is LATLON.
- CARTESIAN
- data are in an arbitrary rectangular coordinate
system
- LATLON
- data are in a geographic (spherical) coordinate
system.
Note: The map entry must use the same
coordinate system as the spatial entry from which the map is derived. If the
spatial entry specifies the CARTESIAN coordinate system, then you must also
specify the CARTESIAN argument for the MAP statement. If the spatial entry
specifies the LATLON coordinate system, then you must also specify the LATLON
argument for the MAP statement.
![[cautend]](../common/images/cautend.gif)
-
COVERAGE
- COVERAGE=<libref.catalog.>coverage-entry (or
COVER=<libref.catalog.>coverage-entry) specifies the GISCOVER entry to which the map
refers. The coverage determines the geographic extent of the map.
If you specify a one-level name, the coverage entry
is assumed to be in the catalog specified in the PROC GIS statement or in
the most recently issued CATALOG statement. An error occurs if no catalog
has previously been specified.
Note: The COVERAGE= argument
is required when you use the CREATE or REPLACE keyword.
![[cautend]](../common/images/cautend.gif)
-
DEGREES | RADIANS | SECONDS
- DEGREES | RADIANS | SECONDS specifies the
coordinate units for the displayed spatial data when the coordinate system
is geographic (LATLON). The default is RADIANS.
The unit system you select defines the allowable range
for coordinate values. For example, if you specify DEGREES, then all X coordinate
values must be in the range -180 to 180, and all Y coordinate values must
be in the range -90 to 90.
-
DESCRIPTION
- DESCRIPTION='string'
or DES='string' specifies a descriptive string,
up to 256 characters long, that is stored in the description field of the
GISMAP entry. The default description is blank.
-
DETAILS | NODETAILS
- DETAILS | NODETAILS specifies whether detail
coordinates are read for the entire map. The default is NODETAILS.
Note: You can use the LAYER statement's DETAILS and DETAILON=
options to control the display of detail coordinates for a particular layer.
The MAP statement's DETAILS option overrides the LAYER statement's DETAILS
option.
![[cautend]](../common/images/cautend.gif)
-
LAYERS
- LAYERS=(<libref.catalog.>layer-entry-1 <, ...,
<libref.catalog.>layer-entry-n>) specifies a list of GISLAYER entry names. The
layer list determines which components of the spatial data within the specified
coverage are available in the map and how they are displayed.
If you specify one-level names for any of the layer
entries, the entries are assumed to be in the catalog specified in the PROC
GIS statement or in the most recently issued CATALOG statement. An error occurs
if no catalog has previously been specified.
Note: The LAYERS= argument is required when you use the CREATE or REPLACE
keyword.
![[cautend]](../common/images/cautend.gif)
-
MULT
- MULT=multiplier-value
specifies a constant value by which spatial data coordinates are multiplied
when the data is displayed. The default is MULT=1E7. If the unit multiplier
is too large, it will be recomputed when the map is opened, and a note is
printed to the SAS log showing the new value. If you map opens and appears
to be empty, your MULT value may be too small.
-
LABEL
- LABEL= libref.dsname
| NONE assigns or removes a label data set reference. Specifying libref.dsname assigns the data set and removes any existing
data set reference. LABEL=NONE removes any existing data set reference. This
does not delete the label data set itself.
-
ACTION
- ACTION lets you copy, delete, or update
GIS actions associated with a map entry. The arguments used with ACTION
are
The
following list contains descriptions of the ACTION
arguments:
- ACTION COPY
- ACTION COPY copies existing operations from
one map entry to another. Specify the map entry containing the operations
to be copied with the FROM=map-entry argument.
The operations are copied to the map specified in the MAP statement.
Specify the operations to be copied with the NAME=link-name argument.
Specifying NAME=_ALL_ copies all operations
in the specified map. Existing operations in the map to be updated are not
overwritten unless you specify the FORCE argument.
- ACTION DELETE
- ACTION DELETE removes an existing operation
from the map entry. Specify the operation to be deleted with the NAME=operation-name argument. Specifying NAME=_ALL_ deletes all
operations. Use the NOWARN argument to suppress messages when an operation
is not found.
- ACTION UPDATE
- ACTION UPDATE modifies existing operations
in the map being updated. Specify the operation to be updated with the NAME=operation-name argument. Specifying NAME=_ALL_ updates all
operations. NAME= is required for UPDATE.
If you specify a single operation, you can use the RENAME=new-operation-name argument to change the
link name. You cannot
use RENAME if you specify NAME=_ALL_.
You can also change the operation's execution settings
with the WHEN argument.
- ACTION NAME
- NAME=operation-name
| _ALL_ specifies the operation to be copied, deleted, or updated. operation-name identifies a single operation, while _ALL_ specifies
all operations.
Note: You cannot specify NAME=_ALL_
if you are using ACTION UPDATE with the RENAME argument.
![[cautend]](../common/images/cautend.gif)
- ACTION WHEN
- WHEN = OFF | IMMEDIATE | DEFERRED is used
with ACTION UPDATE to change the execution setting of the specified operation.
- OFF
- the operation will not be executed when
a layer element is selected.
- IMMEDIATE
- the operation will be executed as soon as
a layer element is selected.
- DEFERRED
- the operation's execution will be deferred
when a layer element is selected.
- ACTION FROM
- FROM=map-entry
is used with ACTION COPY and specifies the source map entry containing operations
to be copied. Specify the operations to be copied from the map with the NAME=operation-name argument.
- ACTION
RENAME
- RENAME=new-operation-name renames the link specified in the NAME=operation-name for ACTION UPDATE.
Note: You cannot
specify RENAME if you have also specified NAME=_ALL_.
![[cautend]](../common/images/cautend.gif)
-
ATTRIBUTE
- ATTRIBUTE lets you copy, delete, or update
data links. The arguments used with ATTRIBUTE
are
The
following list contains descriptions of the ATTRIBUTE
arguments:
- ATTRIBUTE COPY
- ATTRIBUTE COPY copies existing attribute
data links from one map entry to another. Specify the map entry containing
the links to be copied with the FROM=map-entry
argument. The links are copied to the map specified in the MAP statement.
Specify the link to be copied with the NAME=link-name argument.
Specifying NAME=_ALL_ copies all links
in the specified map. Existing links in the map to be updated are not overwritten
unless you specify the FORCE argument.
- ATTRIBUTE DELETE
- ATTRIBUTE DELETE removes an existing attribute
data link from the map entry. Specify the link to be deleted with the NAME=link-name argument. Specifying NAME=_ALL_ deletes all data
links. Use the NOWARN argument to suppress messages when a link is not found.
This does not delete the attribute data set, only the link.
- ATTRIBUTE UPDATE
- ATTRIBUTE UPDATE modifies existing data
links in the map being updated. Specify the link to be updated with the NAME=link-name argument. Specifying NAME=_ALL_ updates all data
links. NAME= is required for the UPDATE operation.
If you specify a single link, you can use the RENAME=new-link-name argument to change the
link name. You cannot
use RENAME if you specify NAME=_ALL_.
- ATTRIBUTE NAME
- NAME=link-name
| _ALL_ specifies the attribute data link to be copied, deleted, or updated. link-name identifies a single data link, while _ALL_ specifies
all data links.
Note: You cannot specify NAME=_ALL_ if
you are using ATTRIBUTE UPDATE with the RENAME argument.
![[cautend]](../common/images/cautend.gif)
- ATTRIBUTE FROM
- FROM=map-entry
is used with ATTRIBUTE COPY and specifies the map entry containing data links
to be copied. Specify the links to be copied from the map with the NAME=link-name
argument.
-
RENAME
- RENAME=new-link-name
renames the link specified in the NAME=link-name
for the ATTRIBUTE UPDATE operation.
Note: You cannot
specify RENAME if you have also specified NAME=_ALL_.
![[cautend]](../common/images/cautend.gif)
- RENAME_LAYER
- RENAME_LAYER old-name=new-name changes the name of an existing layer in the map being
updated. This argument also changes the name of the layer entry in the catalog.
If other maps use the renamed layer, you must issue
a MAP UPDATE statement for those maps as well.
- FORCE
- FORCE specifies that existing operations
or attribute links may be overwritten during copy operations. Use this argument
with ACTION COPY or ATTRIBUTE COPY.
- NOWARN
- NOWARN specifies that messages are not to
be issued about operations or attribute links not being found during deletion.
Use this argument when specifying ACTION DELETE or ATTRIBUTE DELETE.
The following code fragment creates an entry named STORES
of type GISMAP in the current catalog. The map is based on the coverage defined
in the GISCOVER entry named MALL in the current catalog and uses the GISLAYER
entries STORE, FIRE, INFO, PHONE, and RESTROOM in the current catalog.
map create stores /
coverage=mall
layers=(store, fire, info, phone, restroom);
run;
The following code fragment updates the MAPS.USA.USA.GISMAP
entry to use detail data when the map is displayed:
map update maps.usa.usa / details;
run;
The following code fragment copies the SIMPLUSR attribute
link from GISSIO.SIMPLUS.SIMPLE to WORK.SIMPLE.SIMPLE:
proc gis;
map update work.simple.simple /
attribute = (name=simplusr
copy FROM=gissio.simplus.simple);
run;
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.