2.8 Map Visualization Component Metadata Views

The mapping metadata describing base maps, themes, and styles is stored in the global tables SDO_MAPS_TABLE, SDO_THEMES_TABLE, and SDO_STYLES_TABLE, which are owned by MDSYS.

However, you should never directly update these tables. Each map visualization component user has the following views available in the schema associated with that user:

  • USER_SDO_STYLES and ALL_SDO_STYLES contain information about styles. These views are described in xxx_SDO_STYLES Views.

  • USER_SDO_THEMES and ALL_SDO_THEMES contain information about themes. These views are described in xxx_SDO_THEMES Views.

  • USER_SDO_MAPS and ALL_SDO_MAPS contain information about base maps. These views are described in xxx_SDO_MAPS Views.

  • USER_SDO_CACHED_MAPS and ALL_SDO_CACHED_MAPS contain information about configuration settings for map tile layers. These views are described in xxx_SDO_CACHED_MAPS Views.

Note:

You can use the Map Builder tool (described in Oracle Map Builder Tool) to manage most mapping metadata. However, for some features you must use SQL statements to update the map visualization component metadata views.

The USER_SDO_xxx views contain metadata information about mapping elements (styles, themes, base maps, cached maps) owned by the user (schema), and the ALL_SDO_xxx views contain metadata information about mapping elements on which the user has SELECT permission.

The ALL_SDO_xxx views include an OWNER column that identifies the schema of the owner of the object. The USER_SDO_xxx views do not include an OWNER column.

All styles defined in the database can be referenced by any user to define that user's themes, markers with a text style, or advanced styles. However, themes and base maps are not shared among users; so, for example, you cannot reference another user's themes in a base map that you create.

The following rules apply for accessing the mapping metadata:

  • If you need to add, delete, or modify any metadata, you must perform the operations using the USER_SDO_xxx views. The ALL_SDO_xxx views are automatically updated to reflect any changes that you make to USER_SDO_xxx views.

  • If you need only read access to the metadata for all styles, you should use the ALL_SDO_STYLES view. Both the OWNER and NAME columns make up the primary key; therefore, when you specify a style, be sure to include both the OWNER and NAME.

The preceding map visualization component metadata views are defined in the following file:

$ORACLE_HOME/lbs/admin/mapdefinition.sql

The map visualization component also uses some other metadata views, which may be defined in other files. You should never modify the contents of these views, which include the following:

  • MDSYS.USER_SDO_TILE_ADMIN_TASKS includes information about long tasks related to map tile management. If you stop a long map tile layer task such as prefetching and then restart the task, the map visualization component uses the information in the USER_SDO_TILE_ADMIN_TASKS view to resume the task rather than start over at the beginning.

2.8.1 xxx_SDO_STYLES Views

The USER_SDO_STYLES and ALL_SDO_STYLES views have the columns listed in Table 2-3.

Table 2-3 xxx_SDO_STYLES Views

Column Name Data Type Description

OWNER

VARCHAR2

Schema that owns the style (ALL_SDO_STYLES only)

NAME

VARCHAR2

Unique name to be associated with the style

TYPE

VARCHAR2

One of the following values: COLOR, MARKER, LINE, AREA, TEXT, or ADVANCED

DESCRIPTION

VARCHAR2

Optional descriptive text about the style

DEFINITION

CLOB

XML definition of the style

IMAGE

BLOB

Image content (for example, airport.gif) for marker or area styles that use image-based symbols (for markers) or fillers (for areas)

GEOMETRY

SDO_GEOMETRY

(Reserved for future use)

Depending on the Oracle Database release, the ALL_SDO_STYLES view may contain sample styles owned by the MDSYS schema. If these styles are defined on your system, you can specify them in theme definitions and map requests, and you can examine the XML definitions for ideas to use in defining your own styles.

To specify a style (or other type of map visualization component object) that is owned by a schema other than the one for the current user, you must specify the schema name, and you must use a colon (:), not a period, between the schema name and the object name. The following excerpt from a <jdbc_query> element refers to the style named C.RED owned by the MDSYS schema:

<jdbc_query . . . render_style="MDSYS:C.RED">
. . .
 </jdbc_query>

Example 2-58 finds the names of all currently defined styles owned by the MDSYS schema, and it displays the type, description, and XML definition of one of the styles. (The example output is reformatted for readability.)

Example 2-58 Finding Styles Owned by the MDSYS Schema

SELECT owner, name FROM all_sdo_styles 
  WHERE owner = 'MDSYS';
 
OWNER                            NAME
-------------------------------- --------------------------------
MDSYS                            C.BLACK
MDSYS                            C.BLACK GRAY
MDSYS                            C.BLUE
MDSYS                            C.COUNTIES
MDSYS                            C.FACILITY
. . .
MDSYS                            L.MAJOR STREET
MDSYS                            L.MAJOR TOLL ROAD
MDSYS                            L.MQ_ROAD2
MDSYS                            L.PH
MDSYS                            L.POOR_ROADS
MDSYS                            L.PTH
MDSYS                            L.RAILROAD
MDSYS                            L.RAMP
MDSYS                            L.SH
MDSYS                            L.STATE BOUNDARY
. . .
MDSYS                            M.REDSQ
MDSYS                            M.SMALL TRIANGLE
MDSYS                            M.STAR
MDSYS                            M.TOWN HALL
MDSYS                            M.TRIANGLE
MDSYS                            T.AIRPORT NAME
MDSYS                            T.CITY NAME
MDSYS                            T.MAP TITLE
MDSYS                            T.PARK NAME
MDSYS                            T.RED STREET
MDSYS                            T.ROAD NAME
MDSYS                            T.SHIELD1
MDSYS                            T.SHIELD2
MDSYS                            T.STATE NAME
MDSYS                            T.STREET NAME
. . .
 
-- Display the type, description, and XML definition of one style.
SET LONG 4000;
SELECT owner, name, type, description, definition 
  FROM all_sdo_styles WHERE name = 'L.PH';
 
OWNER   NAME     TYPE       DESCRIPTION
------  -----    ------     ------------------
MDSYS   L.PH     LINE       Primary highways
 
DEFINITION
---------------------------------------------------------------------------
<?xml version="1.0" standalone="yes"?>
<svg width="1in" height="1in">
<desc></desc>
<g class="line" style="fill:#33a9ff;stroke-width:4">
<line class="parallel" style="fill:#aa55cc;stroke-width:1.0"/>
</g>
</svg>

2.8.2 xxx_SDO_THEMES Views

The USER_SDO_THEMES and ALL_SDO_THEMES views have the columns listed in Table 2-4.

Table 2-4 xxx_SDO_THEMES Views

Column Name Data Type Description

OWNER

VARCHAR2

Schema that owns the theme (ALL_SDO_THEMES only)

NAME

VARCHAR2

Unique name to be associated with the theme

DESCRIPTION

VARCHAR2

Optional descriptive text about the theme

BASE_TABLE

VARCHAR2

Table or view containing the spatial geometry column

GEOMETRY_COLUMN

VARCHAR2

Name of the spatial geometry column (of type SDO_GEOMETRY)

STYLING_RULES

CLOB

XML definition of the styling rules to be associated with the theme

2.8.3 xxx_SDO_MAPS Views

The USER_SDO_MAPS and ALL_SDO_MAPS views have the columns listed in Table 2-5.

Table 2-5 xxx_SDO_MAPS Views

Column Name Data Type Description

OWNER

VARCHAR2

Schema that owns the base map (ALL_SDO_MAPS only)

NAME

VARCHAR2

Unique name to be associated with the base map

DESCRIPTION

VARCHAR2

Optional descriptive text about the base map

DEFINITION

CLOB

XML definition of the list of themes and their scale value range information to be associated with the base map

2.8.4 xxx_SDO_CACHED_MAPS Views

The USER_SDO_MAPS and ALL_SDO_MAPS views have the columns listed in Table 2-6.

Table 2-6 xxx_SDO_CACHED_MAPS Views

Column Name Data Type Description

NAME

VARCHAR2

Unique name of the cached map source

DESCRIPTION

VARCHAR2

Optional descriptive text about the cached map source

TILES_TABLE

VARCHAR2

(Not currently used)

IS_ONLINE

VARCHAR2

YES if the map tile layer is online, or NO if the map tile layer is offline. When a tile is missing from the cache and the map tile layer is online, the map tile server will fetch the tile and return the fetched tile to the client. When a tile is missing and the map tile layer is offline, the map tile server will not fetch the tile but will return a blank image to the client.

IS_INTERNAL

VARCHAR2

YES if the map source is an internal map source, or NO if the map source is an external map source

DEFINITION

CLOB

XML definition of the map tile layer, as described later in this section.

BASE_MAP

VARCHAR2

Name of the cached map visualization component base map, if the map source is an internal map source

MAP_ADAPTER

BLOB

The jar file that contains the adapter Java classes of the external map services provider, as described later in this section.

For detailed information about using the USER_SDO_CACHED_MAPS view, see Map Tile Server Configuration.