Applies, modifies, or deletes labels associated with a specific layer.
applies the current operation to all labels.
specifies a variable in an attribute data set that supplies label text for the layer.
specifies the text color.
specifies a GIS composite that references a variable in a GIS spatial data set.
specifies the label data set to which new labels are appended.
specifies the font used in label text.
replaces the existing label data set reference in a map.
specifies the location of an image to use as an image label on the map.
specifies the name of the layer with which to associate the label.
indicates the map entry to display the labels on.
controls whether a label is turned off when the map view is zoomed.
specifies the distance to shift the entire label from its default location.
controls whether a label is turned on when the map view is zoomed.
specifies how labels are treated when they overlap.
controls whether a leader line from a label to its associated map feature.
controls where the labels are placed relative to map features.
specifies a particular label in the data set to update, replace, delete, or print.
specifies a variable in the map's chains data set that is used to create labels on features in a specific map layer.
specifies the text for a literal label, that is, one not associated with a specific map layer.
controls whether map features show through the label's bounding box.
You must specify one of the following values for the operation keyword:
prints label information. prints label information to the Output window. The behavior of a LAYERLABEL CONTENTS statement depends on which options are specified.
creates a new label or labels. Unlike CREATE operations for other PROC GIS statements, duplicate labels are allowed.
The behavior of a LAYERLABEL DELETE statement depends on which options are specified.
A note is printed in the log upon completion of a successful deletion.
Restriction | The only valid options for the DELETE operation are DATASET=, IMAGE=, LAYER=, MAP=, ROW=, TEXT=, and _ALL_. Any others will be ignored. |
Requirement | Either the DATASET= or MAP= option is required or no deletions can occur. |
Note | Any DELETE operation that completely empties the label data set also causes the data set to be deleted. If a data set is deleted, a NOTE is printed to the log. If the label data set is deleted, the reference to the data set within the map entry is removed. |
replaces the labels for the specified layer or the specified label. The behavior of a LAYERLABEL REPLACE statement depends on which options are specified.
updates the labels for the specified layer or the specified label. The behavior of a LAYERLABEL UPDATE statement depends on which options are specified.
Restriction | _ALL_ cannot be used in the same statement with ROW= or TEXT= options. |
specifies a variable in an attribute data set that supplies label text for the layer. The link portion of the argument is an attribute data set that is read to get the text string for each map feature to be labeled.
For each chain in the specified layer, the row number of its attribute data in the link data set is determined. The value on that row for the specified variable is used for the label text. The following restrictions apply to the ATTRIBUTE_VARIABLE argument:
is a SAS color-name (for example, GREEN or RED).
is an RGB color (for
example, CX23A76B
).
Default | BLACK |
See | For more information about color-naming schemes, see “Specifying Colors in SAS/GRAPH Programs” in SAS/GRAPH: Reference. |
specifies a GIS composite that references a variable in a GIS spatial data set. This option is used to create labels on features in a specific map layer.
The label for each feature in the specified layer is created by first determining the row number of each map feature to be labeled. The value of the composite's associated variable for that row is then used as the label for that feature. For example, the chain whose row number in the chains data set is 35 would be labeled with the composite variable's value from row 35. The following restrictions apply to the COMPOSITE argument:
specifies the label data set to which new labels are appended. If the data set does not exist, it is created.
If you specify a one-level data set name, the WORK library is assumed. If you specify both DATASET= and MAP=, and the map already references a label data set, the data set names are compared. If they are not the same and FORCE was not specified, a warning is printed, and the run group is terminated.
assigns the default font to the label. If FONT= is omitted entirely, this is assumed. If the font name specified for the label is not found when the map is opened, the default system font is substituted and a note is printed to the log.
causes an image label to be drawn over the map features.
causes an image label to be drawn beneath the map features.
Default | FRONT |
Note | These options do not apply to text labels. |
enables you to enter a host directory path to an image file, as in the following example:
image='C:\My SAS Files\photo.gif'
uses an IMAGE catalog entry for the image label. If you omit the library name from the statement, the WORK library is the default.
specifies the name of the layer with which to associate the label. The label is displayed when this layer is turned on. The labels are also placed adjacent to the features in this layer as indicated by the POSITION= option.
LAYER= is a required argument for the CREATE, REPLACE, and UPDATE operations.
The layer entry name is determined by the following rules:
indicates the map entry to display the labels on. If you specify a one-level name, the map entry is assumed to be in one of two catalogs. It will be the catalog that is specified either in the PROC GIS statement or in the most recently issued CATALOG statement.
If the specified map entry already references a label data set, new labels are appended to that data set.
If the map entry does not reference a label data set, you must provide a label data set name with the DATASET= option. The labels are written to that data set, and the data set is then assigned to the specified map.
specifies a map scale where the label is turned on or off when the map view is zoomed.
specifies the units for OFFSCALE.
enables you to specify various combinations of units. Valid values are KM, M, CM, MI, FT, and IN. Real-units is typically KM, M, MI, or FT, and map-units is usually either CM or IN. Long forms of the unit names (for example, KILOMETERS or INCH (singular or plural), are also acceptable).
sets the scale units to KM/CM (kilometers per centimeter).
sets the scale units to MI/IN (miles per inch).
Default | METRIC |
specifies the distance to shift the entire label from its default location. The x value is the number of pixels to move the label right (positive numbers) or left (negative numbers), and the y value is the number of pixels to shift the label up (positive numbers) or down (negative numbers). For example,
To set only the X offset, specify one value, with or without a following comma:
offset = ( 10 pixels, )
To set only the Y offset, specify one value preceded by a comma:
offset = ( ,-30 pixels, )
To set both the X and Y offsets, specify two values, with or without a comma separating them:
offset = ( 20 pixels, 40 pixels )
specifies a map scale where the label is turned on or off when the map view is zoomed.
specifies the units for ONSCALE.
enables you to specify various combinations of units. Valid values are KM, M, CM, MI, FT, and IN. Real-units is typically KM, M, MI, or FT, and map-units is usually either CM or IN. Long forms of the unit names (for example, KILOMETERS or INCH (singular or plural), are also acceptable).
sets the scale units to KM/CM (kilometers per centimeter).
sets the scale units to MI/IN (miles per inch).
Default | METRIC |
All labels that you create with the option will be displayed even if they conflict with other labels.
some of the conflicting labels will be suppressed until you zoom in more closely.
Default | NOOVERLAP |
draws a leader line from the label to its associated map feature.
places the label on the map with no leader line.
Default | NOPOINTER |
The new labels are associated with the map features displayed in that layer. The labels are positioned around those features to minimize conflicts and collisions. The POSITION option enables you to specify the order in which the label positions are tried. The following illustrates the syntax of POSITION=:
The following diagram shows all of the positions around a point (X) where a label can be placed:
The default position values for these locations are shown in the following diagram:
For example, the first attempt to place the label is made in the number 1 position, and then in the number 2 position, with the number 8 position last. It might be that the label cannot be placed in any of these positions without a collision. In this case, if OVERLAP is not specified, the label will not be displayed when the map is opened. A warning will be printed to the log at that time.
The following example assigns the position values as indicated:
position=(3 1 4 7 8 5 2 6)
The following restrictions apply to the POSITION argument:
Restriction | The ROW= option is not valid for the CREATE operation. |
specifies a variable in the map's chains data set that is used to create labels on features in a specific map layer. The label for each feature in the specified layer is created by first determining the row number of each map feature to be labeled. The value of the variable for that row is then used as the label for that feature. For example, the chain whose row number in the chains data set is 35 would be labeled with the variable's value from row 35. The following restrictions apply to the SAS_VARIABLE argument:
specifies the text for a literal label, that is, one not associated with a specific map layer. For REPLACE, UPDATE, DELETE or CONTENTS operations, string specifies a search string used to locate a specific target label if ROW= is not present. When TEXT='string' is used to search for a label, string is case sensitive, and an exact match to the value of the search string must be found. For example, TEXT='Paris' will ignore a label having PARIS as its text. It will also ignore a label having 'Paris Metro' as its text.
If ROW= and TEXT= are both used in a REPLACE or UPDATE statement, the 'string' entered with TEXT is not a search string. It becomes a replacement string for the label at the specified ROW number.
enables the map features to show through the label's bounding box.
Default | TRANSPARENT |