The GIS Procedure

LAYER Statement

Displays information about the contents of a layer entry, creates a new layer entry, replaces an existing layer entry, modifies the characteristics of an existing layer entry, or deletes a layer entry.

Syntax

LAYER operation <libref.catalog.>layer-entry </ options<theme-options>>;

Summary of Optional Arguments

specifies a composite that defines the common characteristic of the features in the layer.
defines the static appearance of a layer.
specifies a descriptive phrase that is stored in the description field of the layer entry
specifies the scale at or below which detail coordinates are displayed, provided that detail points are available.
specifies whether the detail coordinates are read for this layer.
enables you to create more than one theme by using the same variable from the same attribute data set.
specifies the numeric scale at or below which map labels are displayed.
identifies a GISMAP-type entry that provides theme information for layers that are created in SAS/GIS in Release 6.11 of SAS.
specifies the scale at or below which the layer is hidden.
specifies the scale at or below which the layer is displayed.
specifies whether the current theme in the layer is turned on when the map is opened.
enables you to modify or delete existing themes or to create new themes.
specifies the type of layer.
specifies the scale units for subsequent ONSCALE=, OFFSCALE=, and DETAILON= argument values.
specifies a WHERE expression that subsets the chains data set to define a geographic layer of a spatial database.

Required Argument

<libref.catalog.>layer-entry
specifies the layer entry that you want to create, delete, replace, or update. The layer-name value must conform to the following rules for SAS names:
  • The name can be no more than 32 characters long.
  • The first character must be a letter or underscore (_). Subsequent characters can be letters, numeric digits, or underscores. Blanks are not permitted.
  • Mixed-case names are honored for presentation purposes. However, because any comparison of names is not case-sensitive, you cannot have two names that differ only in case (for example, State and STATE are read as the same name).

Operations

You must specify one of the following values for the operation keyword:

CONTENTS
displays the characteristics of the specified layer entry in the Output window, including the WHERE expression that defines the layer and lists of the layer's parameters and graphical attributes.
An error occurs if the specified layer entry does not exist.
Restriction:No additional arguments (other than the layer entry name) are used with the CONTENTS operation.
CREATE
creates a new layer entry to define a particular set of features in the spatial database. The LAYER CREATE statement does not overwrite existing layer entries. An error occurs if a layer entry with the specified name already exists. Use LAYER REPLACE to replace an existing entry.
Requirement:For the CREATE operation, you must also specify either the COMPOSITE= argument or the WHERE= argument. For area layers, you must use the COMPOSITE= argument.
DELETE
removes the specified layer entry. For the DELETE operation, you can also specify the special value _ALL_ for the layer-entry name to delete all layer entries in the current catalog.
An error occurs if the specified layer entry does not exist.
Restriction:No additional arguments (other than the layer entry name) are used with the DELETE operation.
Note:You must specify a new layer list for any map entries that refer to the deleted layer entry.
CAUTION:
Use DELETE with care.
The GIS procedure does not prompt you to verify the request before deleting the layer entry. Be especially careful when you use _ALL_.
REPLACE
overwrites the specified layer entry or creates a new layer entry if an entry with the specified name does not exist. The LAYER REPLACE statement has the effect of canceling the previously issued LAYER CREATE statement for the specified layer entry.
Requirement:For the REPLACE operation, you must also specify either the COMPOSITE= argument or the WHERE= argument. For area layers, you must use the COMPOSITE= argument.
UPDATE
modifies the specified layer entry by applying new values for specified arguments. An error occurs if there is no existing layer entry with the specified name.

Options

When you specify CONTENTS, CREATE, REPLACE, or UPDATE for the operation argument in a LAYER statement, you can specify one or more of the following additional optional arguments. Separate the list of options from the layer-entry argument with a slash (/).

COMPOSITE=composite-name
specifies a composite that defines the common characteristic of the features in the layer. The COMPOSITE= argument is an alternative to specifying a WHERE expression by using the WHERE= argument. For example, if you specify COMPOSITE=STATE in the LAYER statement and the composite named STATE was created with the variable association VAR=(LEFT=STATEL,RIGHT=STATER), then the implied WHERE expression for the layer is WHERE STATEL NE STATER.
Note:Either the COMPOSITE= argument or the WHERE= argument is required when you use the CREATE or REPLACE operation. For area layers, you must use the COMPOSITE= argument.
DEFAULT=(static-arguments)
defines the static appearance of a layer. The following are the options:
AREA=(area-arguments)
defines the static appearance of the area fills in an area layer. You can specify the following arguments:
ANGLE=angle-value
specifies an angle for hatched and crosshatched lines. The ANGLE= value must be greater than or equal to zero and less than 90 (for crosshatch), or greater than or equal to zero and less than 180 (for hatch).
Default:0 (for HATCH and CROSSHATCH)
Ranges:0 – 90 (HATCH), 0 – 180 (CROSSHATCH)
COLOR=color
specifies the fill color of the area. The color value must be one of the following:
  • a SAS color name
  • an RGB color code in the form CXrrggbb
  • an HLS color code in the form Hhhhllss
  • a gray-scale color code in the form GRAYnn
Default:GRAY
See:For more information about color-naming schemes, see “Specifying Colors in SAS/GRAPH Programs” in SAS/GRAPH: Reference.
SPACING=line-spacing
specifies the spacing between hatched lines or crosshatched lines. The lower the number, the less space between lines.
Default:7
Range:2 – 10
STYLE=EMPTY | FILLED | HATCH | CROSSHATCH.
specifies the fill style of the area.
Default:FILLED (area contains a solid color)
Restriction: The AREA= option is valid only when TYPE=AREA is specified in the layer definition.
CENTERLINE=(centerline-arguments)
defines the static appearance of the optional centerline in a line layer. You can specify the following arguments:
COLOR=color
specifies the color of the centerline. The color value must be one of the following:
  • a SAS color name
  • an RGB color code in the form CXrrggbb
  • an HLS color code in the form Hhhhllss
  • a gray-scale color code in the form GRAYnn
Default:BLACK
See:For more information about color naming schemes, see “Specifying Colors in SAS/GRAPH Programs” in SAS/GRAPH: Reference.
ON | OFF
specifies whether the optional centerline is displayed.
Default:OFF
STYLE=SOLID | DASHED | DOTTED
specifies the style of the centerline.
Default:SOLID
WIDTH=line-width
specifies the width of the centerline.
Default:1
Range:1 – 20
Restriction:The CENTERLINE= option is valid only when TYPE=LINE is specified in the layer definition.
LINE=(line-arguments)
defines the static appearance of the lines in a line layer. You can specify the following arguments:
COLOR=color
specifies the color of the line. The color value must be one of the following:
  • a SAS color name
  • an RGB color code in the form CXrrggbb
  • an HLS color code in the form Hhhhllss
  • a gray-scale color code in the form GRAYnn
Default:BLACK
See:For more information about color-naming schemes, see “Specifying Colors in SAS/GRAPH Programs” in SAS/GRAPH: Reference.
STYLE=SOLID | DASHED | DOTTED
specifies the style of the line.
Default:SOLID
WIDTH=line-width
specifies the width of the line.
Default:1
Range:1 – 20
Restriction:The LINE= option is valid only when TYPE=LINE is specified in the layer definition.
OUTLINE=(outline-arguments)
defines the appearance of the area outlines in an area layer. You can specify the following arguments:
COLOR=color
specifies the color of the outline. The color value must be one of the following:
  • a SAS color name
  • an RGB color code in the form CXrrggbb
  • an HLS color code in the form Hhhhllss
  • a gray-scale color code in the form GRAYnn
Default:BLACK
See:For more information about color-naming schemes, see “Specifying Colors in SAS/GRAPH Programs” in SAS/GRAPH: Reference.
ON | OFF
specifies whether the area outline is displayed.
Default:ON
STYLE=SOLID | DASHED | DOTTED
specifies the style of the area outline.
Default:SOLID
WIDTH=line-width
specifies the width of the area outline.
Default:1
Range:1 – 20
Restriction:The OUTLINE= option is valid only when TYPE=AREA is specified in the layer definition.
POINT=(point-arguments)
defines the static appearance of the symbols in a point layer. You can specify the following arguments:
CHARACTER="char"
specifies the character to use for the point symbol. CHARACTER= must specify a single character in quotes.
Default:'W' (a dot in the MARKER font)
COLOR=color
specifies the color of the point symbol. The color value must be one of the following:
  • a SAS color name
  • an RGB color code in the form CXrrggbb
  • an HLS color code in the form Hhhhllss
  • a gray-scale color code in the form GRAYnn
Default:BLACK
See:For more information about color-naming schemes, see “Specifying Colors in SAS/GRAPH Programs” in SAS/GRAPH: Reference.
FONT=font-name
specifies the name of the font to use for the point symbol. Font verification can be overridden by using the FORCE option in the LAYER statement.
Default:MARKER
SIZE=symbol-size
specifies the size of the point symbol.
Default:8
Range:1 – 21
Restriction:The POINT= option is valid only when TYPE=POINT is specified in the layer definition.
DESCRIPTION='string'
specifies a descriptive phrase, up to 256 characters long, that is stored in the description field of the layer entry.
Default:Blank
DETAILON=scale-value
specifies the scale at or below which detail coordinates are displayed, provided that detail points are available. This argument helps keep the detail level of a layer to a minimum when the map is zoomed to a large scale. By default, detail is displayed at all scales when detail is turned on.
Interaction:The DETAILON= argument is effective only when detail coordinates are read for the layer. The DETAILS argument controls whether detail coordinates are read.
DETAILS | NODETAILS
specifies whether the detail coordinates are read for this layer. If you specify DETAILS to read the detail coordinates from the database, you can use the DETAILON= argument to control the scale at which the detail coordinates are actually displayed.
Default:NODETAILS
FORCE
enables you to create more than one theme by using the same variable from the same attribute data set.
MAP=<libref.catalog.>map-entry
identifies a GISMAP-type entry that provides theme information for layers that are created in SAS/GIS in Release 6.11 of SAS. This option is ignored for layers that are generated by later releases of SAS/GIS. For thematic layers, the link to the associated data set and the name of the response variable for the theme are stored in the map entry rather than in the layer entry. If you omit this argument, the LAYER CONTENTS statement is unable to provide thematic display information for layers that were created in SAS/GIS in Release 6.11 of SAS.
Restriction:The MAP= argument is valid only in conjunction with the CONTENTS and UPDATE operations and is the only option that is permitted with the CONTENTS operation.
LABELON=scale-value
specifies the numeric scale at or below which map labels are displayed. This argument helps keep the number of items in the map window to a minimum when the map is zoomed to a large scale. By default, labels are displayed at all scales.
OFFSCALE=scale-value
specifies the scale at or below which the layer is hidden. By default, the layer is displayed at all zoom scales. The value specified for OFFSCALE= must be less than the value specified for ONSCALE=. The following illustrates the syntax of OFFSCALE=:
OFFSCALE=(<layer-off-scale>
<ON | OFF>
<real-units/map-units>
<METRIC | ENGLISH>
<NONE>)
layer-off-scale
sets a map scale where the layer is turned off when zoomed. The value is a real number.
ON | OFF
enables or disables the layer off-scale. If disabled, current scale settings remain intact.
METRIC
specifies KM/CM (kilometers per centimeter) as the units.
ENGLISH
specifies MI/IN (miles per inch) as the units.
real-units/map-units
are other arbitrary 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.
NONE
disables the layer off-scale and removes all parameters.
Default:METRIC
ONSCALE=scale-value
specifies the scale at or below which the layer is displayed. When the map is zoomed to a larger scale, the layer is hidden. By default, the layers are displayed at all zoom scales. The following illustrates the syntax of ONSCALE=:
ONSCALE=(<layer-on-scale>
<ON | OFF>
<real-units/map-units>
<METRIC | ENGLISH>
<NONE>)
layer-on-scale
sets a map scale where the layer is turned on when zoomed. The value is a real number.
ON | OFF
enables or disables the layer on-scale. If disabled, current scale settings remain intact.
METRIC
specifies KM/CM (kilometers per centimeter) as the units.
ENGLISH
specifies MI/IN (miles per inch) as the units.
real-units/map-units
are other arbitrary 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.
NONE
disables the layer on-scale and removes all parameters.
Default:METRIC
STATIC | THEMATIC
specifies whether the current theme in the layer is turned on when the map is opened.
STATIC
turns the current theme off so that it is not displayed when the map is opened. It does not remove the theme from the layer entry. If the layer has no theme, STATIC is ignored. The default appearance of a newly created layer is STATIC. Use the LAYER statement's DEFAULT= option to modify static graphical attributes. See DEFAULT=(static-arguments) for more information.
THEMATIC
turns the current theme in the layer on so that it is displayed when the map is opened. If the layer has no theme, this option has no effect. Use the LAYER statement's THEME= option to create a theme in a layer. See THEME=(operation theme-arguments) for more information.
THEME=(operation theme-arguments)
enables you to modify or delete existing themes or to create new themes. The THEME= option has the following arguments:
operation
specifies one of the following actions for the theme:
CREATE
creates a new theme for the specified layer entry.
An error occurs if a theme already exists for the layer that uses the same variable in the same attribute data set, unless you also specify the FORCE option in the LAYER statement. The CREATE operation does not overwrite existing themes. Use REPLACE to replace an existing theme.
For a CREATE operation, you must also specify the LINK= and VAR= arguments for the THEME= option.
REPLACE
overwrites the specified theme for the layer entry. The REPLACE operation has the effect of canceling the previously issued CREATE operation for the specified layer entry.
For a REPLACE operation, you must also specify both the LINK= argument and the VAR= arguments for the THEME= option.
UPDATE
modifies the specified theme for the layer entry by applying new values for specified arguments.
An error occurs if the specified layer does not have at least one existing theme. For an UPDATE operation, you must specify a value for at least one of the LINK=, VAR=, RANGE=, NLEVELS=, MAKE_CURRENT, or NOT_CURRENT arguments for the THEME= option.
If you do not specify LINK=, the current data set link is used. If you do not specify THEMEVAR=, the current thematic variable is used.
DELETE
removes the specified theme from the specified layer entry.
For a DELETE operation, you must specify a value for the THEMEVAR= or POSITION= arguments for the THEME= option. An error occurs if you specify THEMEVAR=variable-name when a theme based on variable-name does not exist.
CAUTION:
Use DELETE with care.
The GIS procedure does not prompt you to verify the request before it deletes the layer theme.
theme-arguments
TYPE=POINT | LINE | AREA
specifies the type of layer. The TYPE argument affects how the layer is displayed in a map.
POINT
The layer's features are discrete points and have no length or area associated with them. If a POINT feature has left and right attributes, the values of the attributes must be identical.
LINE
The layer's features have length, and they can have different values for their left and right attributes. However, a LINE feature can enclose an area, even though it is displayed as a line.
AREA
The layer's features have length and area associations and the layer is displayed as enclosed polygons.
Requirement:Each area layer must have a polygonal index for the composite that defines the area boundaries.
Default:LINE
UNITS=unit-specification
specifies the scale units for subsequent ONSCALE=, OFFSCALE=, and DETAILON= argument values. The unit-specification value can be one of the following:
ENGLISH
selects nonmetric as the scale units, for example, miles per inch or feet per inch.
METRIC
selects metric as the scale units, for example, kilometers per centimeter or meters per centimeter.
real-units/map-units
selects a user-defined combination of units. Valid values for real-units and map-units are as follows:
  • KM | KILOMETER | KILOMETERS
  • M | METER | METERS
  • CM | CENTIMETER | CENTIMETERS
  • MI | MILE | MILES
  • FT | FOOT | FEET
  • IN | INCH | INCHES
The value of real-units is typically KM, M, MI, or FT, and the value of map-units is usually either CM or IN.
Default:METRIC
WHERE=('where-string-1' <... 'where-string-n'>)
specifies a WHERE expression that subsets the chains data set to define a geographic layer of a spatial database. The where-string value can contain a complete valid WHERE expression of 200 characters or fewer.
To specify a WHERE expression greater than 200 characters, you must break the expression into separate quoted strings. When WHERE= is processed, the strings are concatenated, with a space between each string, and the entire expression is evaluated.
If you are using multiple strings, each string does not have to contain a complete WHERE expression, but the concatenated expression must be valid.
You can use any of the variables in the chains data set in the WHERE expressions, not just the coordinate variables. However, the layer definition must not delineate a bounded geographic region, but rather a particular subset of the spatial data that is independent of the coverage. For example, a STREETS layer might apply to all the spatial data, even if streets do not exist in many areas. You can use only variables in the WHERE expression, not composites. Specify WHERE='1' to define a layer that contains all the features in the map.
Note:Either the WHERE= argument or the COMPOSITE= argument is required when you use the CREATE or REPLACE operation. For area layers, you must use the COMPOSITE= argument. If you use the WHERE= argument, the default layer type is LINE.

Additional Optional Arguments for Themes

The THEME= option has the following optional arguments for defining and modifying layer themes:
AREA=( (level-definition 1) <... (level-definition-n)> <BLENDCOLOR> <BLENDSPACING>)
defines the appearance of the area fill for each level of a theme for an area layer. You can specify the following arguments:
level-definition
defines the appearance of a theme level for an area layer. Enclose each level definition in parentheses. The definition contains the following arguments:
ANGLE=angle-value
specifies an angle for hatched and crosshatched lines. The ANGLE= value must be greater than or equal to zero and less than 90 (for crosshatch), or greater than or equal to 0 and less than 180 (for hatch). The default is the angle of the static area for this layer.
Ranges:0 – 90 (CROSSHATCH), 0 – 180 (HATCH)
COLOR=color-name | color-code | CURRENT
specifies the fill color of the area. The value must be one of the following:
  • a SAS color name
  • an RGB color code of the form CXrrggbb
  • an HLS color code of the form Hhhhllss
  • a gray-scale color code of the form GRAYnn
  • CURRENT when you use the BLENDCOLORS option and want to use this range level color as one of the colors between which to interpolate
Default:GRAY
See:For more information about color-naming schemes, see “Specifying Colors in SAS/GRAPH Programs” in SAS/GRAPH: Reference.
LEVEL=level-number | FIRST | LAST
specifies which level of the theme is being modified. For example, LEVEL=1 refers to the first range level in this theme. LEVEL=FIRST and LEVEL=LAST can also be used to denote the initial and final range levels. If the LEVEL= arguments are omitted, the entered theme parameters are assigned to the range levels in sequence.
SPACING=line-spacing | CURRENT
specifies the spacing between hatched lines or crosshatched lines. The lower the number, the less space between lines. The default is the spacing of the static area for this layer. Specify CURRENT when you want to specify BLENDSPACING and use this range as one of the spacing values between which to interpolate.
Range:2 – 10
STYLE=EMPTY | FILLED | HATCH | CROSSHATCH
specifies the fill style of the area. The default is the style of the static area for this layer.
BLENDCOLOR
interpolates the color values for any theme range levels between those specified with LEVEL=. If you want to blend between existing colors, indicate the colors with COLOR=CURRENT.
BLENDSPACING
interpolates the hatched or crosshatched style for any theme range levels between those specified with LEVEL=. To blend between existing spacing values, indicate them as SPACING=CURRENT. If any intermediate range levels are not hatched or crosshatched, BLENDSPACING ignores them.
Restriction: The AREA= option is valid only when TYPE=AREA is specified in the layer definition.
CENTERLINE=(centerline-arguments)
defines the appearance of the optional centerline for a theme in a line layer. You can specify the following arguments.
Note: A centerline does not vary in a single theme. Its appearance is the same for all range levels.
COLOR=color-name | color-code
specifies the color of the centerline. The color value must be one of the following:
  • a SAS color name
  • an RGB color code in the form CXrrggbb
  • an HLS color code in the form Hhhhllss
  • a gray-scale color code in the form GRAYnn
For more information about color-naming schemes, see “Specifying Colors in SAS/GRAPH Programs” in SAS/GRAPH: Reference. The default is the color of the static centerline for this layer.
STYLE=SOLID | DASHED | DOTTED
specifies the style of the centerline. The default is the style of the static centerline for this layer.
ON | OFF
specifies whether the optional centerline is displayed. The default is the display status of the static centerline for this layer.
WIDTH=line-width
specifies the width of the centerline. The default is the width of the static centerline for this layer.
Range:1 – 20
Restriction:The CENTERLINE= option is valid only when TYPE=LINE is specified in the layer definition.
COMPOSITE=(composite-name-1<, ..., composite-name-n>)
lists one or more spatial composite names when you create a new key or link for a theme. If only one composite is listed, you can omit the parentheses. The composites are paired with the attribute data set variables that are named in the DATAVAR= argument. If the composite names and the data set variable names are the same, you can specify them once with either the COMPOSITE= or DATAVAR= lists, and those names will be used for both.
Note:This is not the same argument as the COMPOSITE = argument that is used to set up a WHERE expression when you create an AREA type layer.
DATASET=<libref.>data-set
specifies the attribute data set when you create a new key link for a theme. If you specify a one-level data set name, the default library is WORK.
DATAVAR=(variable-1<, ..., variable-n>)
lists attribute data set variables when you create a new key link for a theme. If only one variable is listed, you can omit the parentheses. These variables are paired with the spatial composites that are named in the COMPOSITE= argument. If the data set variable names and the composite names are the same, you can specify them once with either the COMPOSITE= or DATAVAR= lists, and those names will be used for both.
LINE=( (level-definition-1) <... (level-definition-n)> <BLENDCOLOR> <BLENDWIDTH>)
defines the appearance of the line for each level of a theme for a line layer. You can specify the following arguments:
level-definition
defines the appearance of a theme level for a line layer. Enclose each level definition in parentheses. The definition contains the following arguments:
COLOR=color-name | color-code | CURRENT
specifies the color of the line. The value must be one of the following:
  • a SAS color name
  • an RGB color code in the form CXrrggbb
  • an HLS color code in the form Hhhhllss
  • a gray-scale color code in the form GRAYnn
  • CURRENT when you use the BLENDCOLORS option and want to use this range level color as one of the colors between which to interpolate.
For more information about color-naming schemes, see “Specifying Colors in SAS/GRAPH Programs” in SAS/GRAPH: Reference.
LEVEL=level-number | FIRST | LAST
specifies which level of the theme is being modified. For example, LEVEL=1 refers to the first range level in this theme. LEVEL=FIRST and LEVEL=LAST can also be used to denote the initial and final range levels. If the LEVEL= arguments are omitted, the entered theme parameters are assigned to the range levels in sequence.
STYLE=SOLID | DASHED | DOTTED.
specifies the style of the line. The default is the style of the static line for this layer.
WIDTH=line-width | CURRENT
specifies the width of the line. The default is the width of the static line for this layer. Specify CURRENT when you use the BLENDWIDTH option and want to use this existing range level width as one of those between which to interpolate.
Range:1 – 20
BLENDCOLOR
interpolates the color values for any theme range levels between those specified with LEVEL=. If you want to blend between existing colors, indicate the colors with COLOR=CURRENT.
BLENDWIDTH
interpolates the line width for any theme range levels between those specified with LEVEL=. To blend between existing widths, indicate the widths as WIDTH=CURRENT.
Restriction:The LINE= option is valid only when TYPE=LINE is specified in the layer definition.
LINK=link-name
specifies the attribute data set containing the theme variable to be used. If you do not specify a link-name value and you are performing an update, the current data set link is used.
MAKE_CURRENT | NOT_CURRENT
MAKE_CURRENT
specifies that the specified theme is to be the current theme when the map opens. MAKE_CURRENT is the default when a theme is created or updated.
NOT_CURRENT
specifies that the specified theme should be created or modified but is not to be made the current theme.
NLEVELS=integer
specifies the number of range levels in the theme. The value for NLEVELS must be an integer greater than one. You cannot specify both NLEVELS and RANGE=DEFAULT or RANGE=DISCRETE. If you specify NLEVELS, RANGE=LEVELS is assumed and can be omitted.
OUTLINE=(outline-arguments)
defines the appearance of the polygon outlines for each level of a theme for an area layer. You can specify the following arguments:
COLOR=color-name | color-code
specifies the color of the outline. The color value must be one of the following:
  • a SAS color name
  • an RGB color code in the form CXrrggbb
  • an HLS color code in the form Hhhhllss
  • a gray-scale color code in the form GRAYnn
For more information about color-naming schemes, see “Specifying Colors in SAS/GRAPH Programs” in SAS/GRAPH: Reference. The default is the color of the static outline for this layer.
ON | OFF
specifies whether the area outline is displayed. The default is the display status of the static outline for this layer.
STYLE=SOLID | DASHED | DOTTED
specifies the style of the outline. The default is the style of the static outline for this layer.
WIDTH=
specifies the width of the outline. The default is the width of the static outline for this layer.
Range:1 – 20
Restriction: The OUTLINE= option is valid only when TYPE=AREA is specified in the layer definition.
POINT=( (level-definition-1) <... (level-definition-n)> <BLENDCOLOR> <BLENDSIZE>)
defines the appearance of the symbol for each level of a theme for a point layer. You can specify the following arguments:
level-definition
defines the appearance of a theme level for a point layer. Enclose each level definition in parentheses. The definition contains the following arguments:
CHARACTER=char
specifies the character to use for the point symbol. CHARACTER= must specify a single character in quotes. The default is the character of the static point symbol for this layer.
COLOR=color-name | color-code | CURRENT
specifies the color of the point symbol. The value must be one of the following:
  • a SAS color name
  • an RGB color code in the form CXrrggbb
  • an HLS color code in the form Hhhhllss
  • a gray-scale color code in the form GRAYnn
  • CURRENT when you use the BLENDCOLORS option and want to use this range level color as one of the colors between which to interpolate.
For more information about color naming schemes, see “Specifying Colors in SAS/GRAPH Programs” in SAS/GRAPH: Reference.
FONT=font-name
specifies the font to use for the point symbol. FONT= must specify a valid font name. The default is the font of the static point symbol for this layer. Font verification can be overridden by using the FORCE option in the LAYER statement.
LEVEL=level-number | FIRST | LAST
specifies which theme range is being modified. For example, LEVEL=1 refers to the first range level in this theme. LEVEL=FIRST and LEVEL=LAST can also be used to denote the initial and final range levels. If LEVEL=1 is omitted, the entered theme parameters are assigned to the range levels in sequence.
SIZE=symbol-size
specifies the size of the point symbol. The default is the size of the static point symbol for this layer. Specify CURRENT when you use the BLENDSIZE option and want to use this existing range level size as one of those points between which to interpolate.
Range:1 – 21
BLENDCOLOR
interpolates the color values for any theme range levels between those that you specified with LEVEL=. If you want to blend between existing colors, indicate the colors with COLOR=CURRENT.
BLENDSIZE
interpolates the point size for any theme range levels between those that you specified with LEVEL=. To blend between existing sizes, indicate the sizes as SIZE=CURRENT.
Restriction:The POINT= option is valid only when TYPE=POINT is specified in the layer definition.
POSITION=position-number
specifies the position number of the target theme, starting from position 1. Negative numbers refer to positions counted backward from the last theme of the layer. For example, position=-2 refers to the second from last theme of the layer. Zero refers to the current theme, regardless of its position in the theme list. If POSITION is omitted, the default for all operations is the last theme for the layer.
RANGE=DEFAULT | DISCRETE | LEVELS
specifies the thematic range type.
DEFAULT
Increments are calculated automatically using an algorithm that is based on the 1985 paper by G.R. Terrell and D. W. Scott, “Oversmoothed Nonparametric Density Estimates” in the Journal of the American Statistical Association, Volume 80, pages 209-214.
DISCRETE
The range is treated as a series of discrete values instead of a continuous variable. If the variable that is specified in the THEMEVAR= argument is a character variable, only RANGE=DISCRETE is allowed.
LEVELS
The range is divided into evenly spaced increments. You do not have to specify RANGE=LEVELS if you specify NLEVELS=integer instead.
If you do not specify RANGE=, DEFAULT is used for numeric variables and DISCRETE is used for character variables.
THEMEVAR=variable-name
specifies the theme variable in the linked attribute data set (specified in LINK=link-name). If you do not specify a variable-name value and you are performing an update, the current theme variable is used.
THEMEVAR=variable-name also specifies the theme to delete or to make current.

Details

A layer entry is a SAS catalog entry of type GISLAYER that stores information about a layer in a map. Each layer represents a different set of features on the map, but features can be displayed in more than one layer. The layer also defines how the features are displayed. For example, you could create a layer entry named RIVERS to represent the water features in your spatial data.
Layers can be displayed as either static or thematic. When a layer is displayed as static, it has a fixed set of graphical attributes (fill colors, outline colors, and so on) for all of the features in that layer. When a layer is displayed as thematic, it uses values of a response variable in an associated attribute data set to determine the graphical attributes for the layer. Information about the theme value ranges and the attribute data is stored in the layer entry.

Examples

Example 1: Define a Layer Using a Composite

If the chains data set contains pairs of variables that indicate values for the areas on the left and right sides of the chains, then you can use these variable pairs to define area layers. The following code fragment defines a composite that identifies county boundaries and uses that composite to define an area layer:
composite create county / var=(left=countyl,right=countyr)
                          class=area;
run;
polygonal index create county / composite=county
                                out=gmaps.cntyx;
run;
layer create county / composite=county
                      type=area;
run;
Note: The polygonal index must be defined for the composite in order to display this area layer in a map.

Example 2: Define a Layer Using a Category Variable

Assume that the spatial database contains a variable named CFCC that contains values that identify what each chain represents. Assume also that the values of the CFCC variable for all roads begin with the letter A (A0, A1, and so on, depending on the category of road). The following code fragment defines a line layer that consists of all features that are roads:
layer create roads / where='cfcc =: "A"'
                     type=line;
run;
Note: The colon (:) modifier to the equals operator restricts the comparison to only the first n characters of the variable value, where n is the number of characters in the comparison string. The WHERE expression tests for "where the value of CFCC begins with A."

Example 3: Create a Theme

This example creates a new theme for the SASUSER.MALL.STORES map, supplied with the SAS/GIS tutorial. The theme uses the SQFT variable in the MALLSTOR attribute data set to define the theme.
proc gis;
   spatial sasuser.mall.mall;
   layer update sasuser.mall.store / theme = (
      create
      themevar = sqft
      dataset = sasuser.mallstor
      datavar = store
      composite = store
      link = mallstor
      range = discrete
      pos = -1
      not_current);
run;
quit;

Example 4: Update an Existing Theme

This example uses the SQFT theme that was created in the previous example and modifies it as follows:
  • changes the theme variable to RENT from the same attribute data set
  • breaks the RENT values into nine theme range levels
  • makes the first level blue
  • makes the last level cxff0000 (red)
  • blends the colors for the intermediate range levels
proc gis c=sasuser.mall;
   spatial mall;
   layer update store / theme=(
      update
      pos=1
      themevar=rent
      range=levels
      nlevels=9
      area=((level=first color=blue)
            (level=last color=cxff0000)
            blendcolor));
run;
quit;