Previous Page | Next Page

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.
LAYER operation <libref.catalog.>layer-entry </ options <theme-options>>;

Operations

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.

CREATE

creates a new layer entry to define a particular set of features in the spatial database.

An error occurs if a layer entry with the specified name already exists. The LAYER CREATE statement does not overwrite existing layer entries. Use LAYER REPLACE to replace an existing entry.

For a LAYER CREATE statement, 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.

No additional arguments (other than the layer entry name) are used with this operation. An error occurs if the specified layer entry does not exist.

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.

Note:   You must specify a new layer list for any map entries that refer to the deleted layer entry.  [cautionend]

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_.  [cautionend]

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.

For a LAYER REPLACE statement, 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.


Layer Entry Argument

The layer entry name argument identifies the layer entry that you want to create, delete, replace, or update. The general form of the argument is

<libref.catalog.>layer-entry

The layer-name must conform to the rules for SAS names:


Options

When you specify CONTENTS, CREATE, REPLACE, or UPDATE for operation in a LAYER statement, you can specify one or more additional arguments after the layer entry name.

Note:   Separate the list of arguments from the layer-entry name with a slash (/).  [cautionend]

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.  [cautionend]

DEFAULT=(static-arguments)

defines the static appearance of a layer. The following are the options:

POINT=(point-arguments)

defines the static appearance of the symbols in a point layer. This option enables you to specify the color, size, font, and a specific character to be used for the symbols. It is valid only when TYPE=POINT is in the layer definition. The following illustrates the syntax of POINT=:

   POINT = (COLOR = color-name | color-code | CURRENT
            SIZE = [1..21]
            FONT=font-name
            CHARACTER='character' )
COLOR=

specifies the color of the point symbol. COLOR= must specify a predefined SAS color name, an RGB color code in the form CXrrggbb, an HLS color code in the form Hhhhllss, or a gray-scale color code in the form GRAYll. For more information about color-naming schemes, see "SAS/GRAPH Colors" in SAS/GRAPH: Reference. The default color is BLACK. Specify CURRENT when you want to specify BLENDCOLORS and use this range level color as one of the colors between which to interpolate.

SIZE=

specifies the size of the point symbol. SIZE= must specify an integer that is greater than or equal to 1, and less than or equal to 21. The default size is 8.

FONT=

specifies the font to use for the point symbol. FONT= must specify a valid font name. The default font is MARKER. Font verification can be overridden by using the FORCE option in the LAYER statement.

CHARACTER=

specifies the character to use for the point symbol. CHARACTER= must specify a single character in quotes. The default character is 'W', which in the MARKER font represents a dot.

LINE=

defines the static appearance of the lines in a line layer. You can specify the color, width, and style to be used for the lines. Valid only when TYPE=LINE is in the layer definition. The following illustrates the syntax of LINE=:

LINE = (COLOR = color-name | color-code
                   WIDTH = [1..20]
                   STYLE = SOLID | DASHED | DOTTED)
COLOR=

specifies the color of the line. COLOR= must specify a predefined SAS color name, an RGB color code in the form CXrrggbb, an HLS color code in the form Hhhhllss, or a gray-scale color code in the form GRAYll. For more information about color-naming schemes, see "SAS/GRAPH Colors" in SAS/GRAPH: Reference. The default color is BLACK.

WIDTH=

specifies the width of the line. WIDTH= must specify an integer that is greater than or equal to 1, and less than or equal to 20. The default width is 1.

STYLE=

specifies the style of the line. Valid values for STYLE= are SOLID, DASHED, or DOTTED. The default style is SOLID.

CENTERLINE=

defines the static appearance of the optional centerline in a line layer. The option allows you to specify whether a centerline is displayed as well as the color, width, and style to be used for the centerlines. It is valid only when TYPE=LINE in the layer definition. The following illustrates the syntax of CENTERLINE=:

     DEFAULT = (CENTERLINE = (ON | OFF
                              COLOR = color-name | color-code
                              WIDTH = [1..20]
                              STYLE = SOLID | DASHED | DOTTED));
ON | OFF

specifies whether the optional centerline is displayed. The default is OFF.

COLOR=

specifies the color of the centerline. COLOR= must specify a predefined SAS color name, an RGB color code in the form CXrrggbb, an HLS color code in the form Hhhhllss, or a gray-scale color code in the form GRAYll. For more information about color naming schemes, see "SAS/GRAPH Colors" in SAS/GRAPH: Reference. The default color is BLACK.

WIDTH=

specifies the width of the centerline. WIDTH= must specify an integer that is greater than or equal to 1 and less than or equal to 20. The default width is 1.

STYLE=

specifies the style of the centerline. Valid values for STYLE= are SOLID, DASHED, or DOTTED. The default style is SOLID.

AREA=

defines the static appearance of the area fills in an area layer. Area allows you to specify the color and fill style as well as angle and spacing parameters for hatched and crosshatched fill styles. It is valid only when TYPE=AREA in the layer definition. The following illustrates the syntax of AREA=:

DEFAULT = (AREA = (COLOR = color-name | color-code
                   STYLE = EMPTY | FILLED | HATCH | CROSSHATCH
                   ANGLE = angle-value
                   SPACING = [2..10] ));
COLOR=

specifies the fill color of the area. COLOR= must specify a predefined SAS color name, an RGB color code in the form CXrrggbb, an HLS color code in the form Hhhhllss, or a gray-scale color code in the form GRAYll. For more information about color-naming schemes, see "SAS/GRAPH Colors" in SAS/GRAPH: Reference. The default color is GRAY.

STYLE=

specifies the fill style of the area. Valid values for STYLE= EMPTY, FILLED, HATCH, or CROSSHATCH. The default style is FILLED, which means the area contains one, solid color.

ANGLE=

specifies an angle for hatched and crosshatched lines. ANGLE= must specify a real number that is 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). The default angle for both the hatch and crosshatch is 0.

SPACING=

specifies the spacing between hatched lines or crosshatched lines. SPACING= must specify an integer that is greater than or equal to 2 and less than or equal to 10. The lower the number, the less space between lines (the higher the number, the more space between lines). The default spacing is 7.

OUTLINE=

defines the appearance of the area outlines in an area layer. The option allows you to specify the color, width, and style to be used for the outlines. It is valid only when TYPE=AREA is in the layer definition. The following illustrates the syntax of OUTLINE=:

DEFAULT = (OUTLINE = (ON | OFF
                      COLOR = color-name | color-code
                      WIDTH = [1..20]
                      STYLE = SOLID | DASHED | DOTTED));
ON | OFF

specifies whether the area outline is displayed. The default is ON.

COLOR=

specifies the color of the outline. COLOR= must specify a predefined SAS color name, an RGB color code in the form CXrrggbb, an HLS color code in the form Hhhhllss, or a gray-scale color code in the form GRAYll. For more information about color-naming schemes, see "SAS/GRAPH Colors" in SAS/GRAPH: Reference. The default color is BLACK.

WIDTH=

specifies the width of the outline. WIDTH= must specify an integer that is greater than or equal to 1 and less than or equal to 20. The default width is 1.

STYLE=

specifies the style of the outline. STYLE= must specify either SOLID, DASHED, or DOTTED. The default style is SOLID.

DESCRIPTION='string'

specifies a descriptive phrase, up to 256 characters long, that is stored in the description field of the layer entry. The default description is 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.

Note:   The DETAILON= argument is effective only when detail coordinates are read for the layer. The DETAILS argument controls whether detail coordinates are read.  [cautionend]

DETAILS | NODETAILS

specifies whether the detail coordinates are read for this layer. The default is NODETAILS.

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.

FORCE

allows 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.

Note:   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.  [cautionend]

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, and is the default setting.

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.

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, and is the default setting.

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.

STATIC | THEMATIC
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 the description of the DEFAULT= option 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 the description of the THEME= option for more information.

THEME=(theme-arguments)

enables you to modify or delete existing themes or to create new themes. In the LAYER statement THEME argument, the operation argument can be one of the following:

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.

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.

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 arguments LINK=, VAR=, RANGE=, NLEVELS=, MAKE_CURRENT, or NOT_CURRENT.

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 THEMEVAR=variable-name or POSITION=integer. An error occurs if you specify THEMEVAR=variable-name and if 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.  [cautionend]

For more information about the optional arguments that you can specify with THEME= operations, see Theme Options.
TYPE=POINT | LINE | AREA

specifies the type of layer. The TYPE argument affects how the layer is displayed in a map. The default is TYPE=LINE.

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.

Note:   Each area layer must have a polygonal index for the composite that defines the area boundaries.   [cautionend]

UNITS=unit-specification

specifies the scale units for subsequent ONSCALE=, OFFSCALE=, and DETAILON= argument values. The default is UNITS=METRIC (for example, kilometers per centimeter). Unit-specification 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.
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. Where-string 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.  [cautionend]


Theme Options

When you specify CONTENTS, CREATE, REPLACE, or UPDATE for the operation keyword in a LAYER statement and specify the THEME= option, you can specify the following additional options.

AREA=(argument)

defines the appearance of the area fill for each level of the specified theme in an area layer. AREA= allows you to specify the color and fill style as well as angle and spacing parameters for hatched and crosshatched fill styles. It is valid only with TYPE=AREA in the layer definition. The following illustrates the syntax for AREA=:

THEME = (AREA = ((LEVEL = integer | FIRST | LAST
                  COLOR = color | CURRENT | color-code
                  STYLE = EMPTY | FILLED | HATCH | CROSSHATCH
                  ANGLE = angle-value
                  SPACING = [2..10]) | CURRENT
                 BLENDCOLOR
                 BLENDSPACING));
ANGLE=

specifies an angle for hatched and crosshatched lines. ANGLE= must specify a real number that is 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.

COLOR=

specifies the fill color of the area. COLOR= must specify a predefined SAS color name, an RGB color code in the form CXrrggbb, an HLS color code in the form Hhhhllss, or a gray-scale color code in the form GRAYll. For more information about color-naming schemes, see "SAS/GRAPH Colors" in SAS/GRAPH: Reference. The default is GRAY. Specify CURRENT when you want to specify BLENDCOLORS and use this range level color as one of the colors between which to interpolate.

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.

LEVEL=

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=

specifies the spacing between hatched lines or crosshatched lines. SPACING= must specify an integer that is greater than or equal to 2 and less than or equal to 10. The lower the number, the less space between lines (the higher the number, the more space between lines). The default is the spacing of the static area for this layer. CURRENT is specified when you want to specify BLENDSPACING and use this range as one of the spacing values between which to interpolate.

STYLE=

specifies the fill style of the area. Valid values for STYLE= are EMPTY, FILLED, HATCH, or CROSSHATCH. The default is the style of the static area for this layer.

CENTERLINE=(argument)

defines the appearance of the optional centerline for the specified theme in a line layer. The option allows you to specify whether a centerline is displayed as well as the color, width, and style to be used for the centerlines. It is valid only when TYPE=LINE is in the layer definition. The following illustrates the syntax of CENTERLINE=.

Note:   A centerline does not vary in a single theme. Its appearance is the same for all range levels.  [cautionend]

     THEME = (CENTERLINE = (ON | OFF
                            COLOR = color | CURRENT | color-code
                            WIDTH = [1..20]
                            STYLE = SOLID | DASHED | DOTTED));
COLOR=

specifies the color of the centerline. COLOR= must specify a predefined SAS color name, an RGB color code in the form CXrrggbb, an HLS color code in the form Hhhhllss, or a gray-scale color code in the form GRAYll. For more information about color-naming schemes, see "SAS/GRAPH Colors" in SAS/GRAPH: Reference. The default is the color of the static centerline for this layer. Specify CURRENT when you want to specify BLENDCOLORS and use this range level color as one of the colors between which to interpolate.

STYLE=

specifies the style of the centerline. Valid values for STYLE= are SOLID, DASHED, or DOTTED. 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 same on/off status as the static centerline for this layer.

WIDTH=

specifies the width of the centerline. WIDTH= must specify an integer that is greater than or equal to 1 and less than or equal to 20. The default is the width of the static centerline for this layer.

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.  [cautionend]

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=(argument)

defines the appearance of the line for each level of the specified theme in a line layer. The option allows you to specify the color, width and style to be used for the lines. It is valid only when TYPE=LINE in the layer definition. The following illustrates the syntax of LINE=:

     THEME = ( LINE= ((LEVEL = integer | FIRST | LAST
                       COLOR = color | CURRENT | color-code
                       WIDTH = [1..20] | CURRENT
                       STYLE = SOLID | DASHED | DOTTED)
                      BLENDCOLOR
                      BLENDWIDTH));
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.

COLOR=

specifies the color of the line. COLOR= must specify a predefined SAS color name, an RGB color code in the form CXrrggbb, an HLS color code in the form Hhhhllss, or a gray-scale color code in the form GRAYll. For more information about color-naming schemes, see "SAS/GRAPH Colors" in SAS/GRAPH: Reference. CURRENT is used when you want to BLENDCOLORS and use this range level color as one of the colors between which to interpolate.

LEVEL=

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=

specifies the style of the line. Valid values for STYLE= are SOLID, DASHED, or DOTTED. The default is the style of the static line for this layer.

WIDTH=

specifies the width of the line. WIDTH= must specify an integer that is greater than or equal to 1 and less than or equal to 20. The default is the width of the static line for this layer. CURRENT is used when you want to specify BLENDWIDTH and use this existing range level width as one of those between which to interpolate.

LINK=link-name

specifies the attribute data set containing the theme variable to be used. If you do not specify link-name 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=(argument)

defines the appearance of the polygon outlines for each level of the specified theme in an area layer. OUTLINE= enables you to specify the color, width, and style to be used for the outlines. It is valid only when TYPE=AREA in the layer definition. The following illustrates the syntax of OUTLINE=:

THEME = (OUTLINE = (ON | OFF
                    COLOR = color | color-code
                    WIDTH = [1..20]
                    STYLE = SOLID | DASHED | DOTTED));
COLOR=

specifies the color of the outline. COLOR= must specify a predefined SAS color name, an RGB color code in the form CXrrggbb, an HLS color code in the form Hhhhllss, or a gray-scale color code in the form GRAYll. For more information about color-naming schemes, see "SAS/GRAPH Colors" 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 same on/off status as the static outline for this layer.

STYLE=

specifies the style of the outline. Valid values for STYLE= are SOLID, DASHED, or DOTTED. The default is the style of the static outline for this layer.

WIDTH=

specifies the width of the outline. WIDTH= must specify an integer that is greater than or equal to 1 and less than or equal to 20. The default is the width of the static outline for this layer.

POINT=(argument)

defines the appearance of the symbol for each level of the specified theme in a point layer. The option enables you to specify the color, size, font and specific character to be used for the symbols. It is valid only when TYPE=POINT is specified in the layer definition. The following illustrates the syntax of POINT=:

THEME = (POINT = ((LEVEL = integer | FIRST | LAST
                   COLOR = color | CURRENT | color-code
                   SIZE = [1..21] | CURRENT
                   FONT = font1
                   CHARACTER='char')
                  BLENDCOLOR
                  BLENDSIZE));
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.

CHARACTER=

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=

specifies the color of the point symbol. COLOR= must specify a predefined SAS color name, an RGB color code in the form CXrrggbb, an HLS color code in the form Hhhhllss, or a gray-scale color code in the form GRAYll. For more information on color naming schemes, see "SAS/GRAPH Colors" in SAS/GRAPH: Reference. CURRENT is used when you want to BLENDCOLORS and use this range level color as one of the colors between which to interpolate.

FONT=

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=

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=

specifies the size of the point symbol. SIZE= must specify an integer that is greater than or equal to 1 and less than or equal to 21. It defaults to the size of the static point symbol for this layer. Specify CURRENT when you want to specify BLENDSIZE and use this existing range level size as one of those points between which to interpolate.

POSITION=integer

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 variable-name 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


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.  [cautionend]


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."  [cautionend]


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;


Update an Existing Theme

This example uses the SQFT theme that was created in the previous example and modifies it as follows:

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;

Previous Page | Next Page | Top of Page