Skip Headers
Oracle® Application Server MapViewer User's Guide
10g Release 2 (10.1.2)
B14036-02
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

7 Map Definition Tool

This chapter describes the graphical interface to the Oracle Map Definition Tool. This tool is a standalone application that lets you create and manage mapping metadata that is stored in the database. This mapping metadata can be used by applications that use OracleAS MapViewer to generate customized maps.


Note:

The Map Definition Tool is currently an unsupported tool, and to use it you must download the software from the Oracle Technology Network at

http://www.oracle.com/technology/

The information in this chapter reflects the Map Definition Tool interface at the time this guide was published. The online help for the Map Definition Tool may contain additional or more recent information.


To use the Map Definition Tool effectively, you must understand the OracleAS MapViewer concepts explained in Chapter 2 and the information about map requests in Chapter 3.

The Map Definition Tool is shipped as a JAR file (mapdef.jar). You can run it as a standalone Java application in a Java Development Kit (J2SE SDK) 1.4 or later environment, as follows (all on a single command line):

% java [-classpath <path>]  [-Dhost= <host> ] [-Dsid=<sid>] [-Dport=<port>] 
[-Duser=<user>] [-Dpassword=<password>]  oracle.eLocation.console.GeneralManager

In the preceding command-line format:

If you include any of the connection options in your command line, their values will be used as the defaults for the corresponding fields in the connection box on the Connection page (described in Section 7.2); otherwise, you must specify their values in the connection box to connect to the database.

The following example (which must be entered all on a single command line) starts the Map Definition Tool on a UNIX system. (Note the use of the colon to separate files in the CLASSPATH specification on UNIX systems.)

%java -classpath 
/usr/lbs/lib/mapdef.jar:/private/oracle/ora90/jdbc/lib/classes12.zip 
-Dhost="127.0.0.1" -Dsid="orcl"  -Dport="1521" -Duser="scott" -Dpassword="tiger" 
oracle.eLocation.console.GeneralManager 

This chapter contains the following major sections:

7.1 Overview of the Map Definition Tool

The Map Definition Tool lets you create, modify, and delete styles, themes, and base maps. For example, you can enter the design information for a new line style, see a preview of the style, modify your design if you wish, and then click Insert to insert your style definition in XML format into the database. The tool uses the information that you entered to generate the XML document for the style definition.

The styles, themes, and base maps for a user are maintained in that user's USER_SDO_STYLES, USER_SDO_THEMES, and USER_SDO_MAPS views, respectively. These views are created by MDSYS so that you can access your mapping metadata. You can create your new mapping metadata in these views. However, the styles that you create in your USER_SDO_STYLES view will be shared by all other database users.

These views are described in Section 2.8.

Whenever possible, you should use the Map Definition Tool instead of directly modifying OracleAS MapViewer metadata views to create, modify, and delete information about styles, themes, and maps. The Map Definition Tool always checks and maintains the referential integrity between objects. If you perform these operations by using SQL procedures or SQL*Plus statements, the referential integrity of the mapping metadata may become corrupted if you are not careful. For example, if you delete a style using SQL*Plus, a theme may still be referencing the name of that style.

However, some OracleAS MapViewer features are not available through the Map Definition Tool. For example, you cannot use the tool to create or modify image themes, GeoRaster themes, topology themes, or network themes. For features not supported by the tool, you must use SQL procedures or SQL*Plus statements to modify the appropriate OracleAS MapViewer metadata views.

The tool consists of pages grouped under the following categories:

For detailed information about the options on each page, see later sections in this chapter or click Help on that page when using the Map Definition Tool.

For all Name fields, any entry that you type is automatically converted to and stored in uppercase. (Names of mapping metadata objects are not case-sensitive.)

7.2 Connection Page

Figure 7-1 shows the Connection page after the user has clicked the Connect To button.

Figure 7-1 Connection Page

Description of Figure 7-1  follows
Description of "Figure 7-1 Connection Page"

Currently connected to: Contains information about your database connection, or contains Not connected if you are not currently connected to an Oracle database.

Connect To: Click this button to display a JDBC database connection dialog box, in which you specify the host, SID, port, user, password, and mapping metadata views. You can change your connection at any time; the old connection is disconnected when you click OK for a new connection.

Map Metadata: For maps and themes, you must use the USER_SDO_MAPS and USER_SDO_THEMES views, respectively.

For styles, if you select the ALL_SDO_STYLES view, you can see all styles that all users have created, but you cannot create, modify, or delete any styles. (The Insert, New, Update, and Delete buttons are disabled.) The ALL_SDO_xxx views are for read-only access. If you select the USER_SDO_STYLES view, you can see only the styles that you have created, but you can create, modify, and delete these styles.

For example, you might connect using the ALL_SDO_STYLES view to see all available styles and get design ideas, and then connect again later using the USER_SDO_STYLES view to create and modify your own styles. However, with either styles view, you have access to all styles defined on your system when you create or edit themes.

To exit the Map Definition Tool: Select Close from the application window menu (upper-left corner), or click the "X" box (upper-right corner).

7.3 Styles: Color Page

Figure 7-2 shows the Color page under the Styles category.

Name and Preview columns: List currently defined color styles, with a preview of each. (The styles listed depend on whether you selected the ALL_SDO_STYLES or USER_SDO_STYLES view at connection time.)

Name: Name of the style. Must be unique within a schema.

Description: Optional descriptive text about the style.

Stroke Color (for the border) and Fill Color:

Buttons: New lets you enter information for a new style; Insert inserts a new style using the specified information; Update updates the style using the specified information; Delete removes the style; Cancel clears any information that you have entered for a new style.

7.4 Styles: Marker Page

Figure 7-3 shows the Marker page under the Styles category.

Name and Preview columns: List currently defined marker styles, with a preview of each. (The styles listed depend on whether you selected the ALL_SDO_STYLES or USER_SDO_STYLES view at connection time.)

Name: Name of the style. Must be unique within a schema.

Description: Optional descriptive text about the style.

Preferred Width: Number of screen pixels for the preferred width of the marker. If no value is specified, the actual width of the marker is used; no scaling is performed.

Preferred Height: Number of screen pixels for the preferred height of the marker. If no value is specified, the actual height of the marker is used; no scaling is performed.

Marker Type: Raster Marker for an image marker, or Vector Marker for a vector graphics marker.

Raster Marker (for image graphics):

Vector Marker (for vector graphics):

Buttons: New lets you enter information for a new style; Insert inserts a new style using the specified information; Update updates the style using the specified information; Delete removes the style; Cancel clears any information that you have entered for a new style.

7.5 Styles: Line Page

Figure 7-4 shows the Line page under the Styles category.

Name and Preview columns: List currently defined line styles, with a preview of each. (The styles listed depend on whether you selected the ALL_SDO_STYLES or USER_SDO_STYLES view at connection time.)

Name: Name of the style. Must be unique within a schema.

Description: Optional descriptive text about the style.

Overall Style:

Base Line: If applied, specifies attributes for the center line of the linear feature (for example, of a highway or river).

Parallel Lines: If applied, specifies attributes for the edges of the linear feature. Edges are two parallel lines, each an equal distance from the center line.

Hashmark on Base Line: If applied, specifies attributes for hash marks on each side of the center line of the linear feature.

Preview: Shows a sample of the style as it would look with the current specifications. However, no changes are made to the style until you click the New, Insert, or Update button.

Buttons: New lets you enter information for a new style; Insert inserts a new style using the specified information; Update updates the style using the specified information; Delete removes the style; Cancel clears any information that you have entered for a new style.

7.6 Styles: Area Page

Figure 7-5 shows the Area page under the Styles category.

Name and Preview columns: List currently defined area styles, with a preview of each. (The styles listed depend on whether you selected the ALL_SDO_STYLES or USER_SDO_STYLES view at connection time.)

Name: Name of the style. Must be unique within a schema.

Description: Optional descriptive text about the style.

Stroke Color (for the border) and Fill Color:

Import Image: Click this button to display a dialog box for specifying the file for the image to be used as a pattern for the area.

Preview: Shows a sample of the style as it would look with the imported image. However, no changes are made to the style until you click the New, Insert, or Update button.

Buttons: New lets you enter information for a new style; Insert inserts a new style using the specified information; Update updates the style using the specified information; Delete removes the style; Cancel clears any information that you have entered for a new style.

7.7 Styles: Text Page

Figure 7-6 shows the Text page under the Styles category.

Name and Preview columns: List currently defined text styles, with a preview of each. (The styles listed depend on whether you selected the ALL_SDO_STYLES or USER_SDO_STYLES view at connection time.)

Name: Name of the style. Must be unique within a schema.

Description: Optional descriptive text about the style.

Bold: If checked, displays the text in bold.

Italic: If checked, displays the text in italic.

Size: Font size.

Family: Font family. (Currently, only Java native font families are supported.)

Foreground Color: The rectangle button displays the current text foreground color in its foreground text. You can click the rectangle button to display a dialog box to specify a new color by a swatch, HSB value, or RGB value.

Preview Sample: Shows a sample of the style as it would look with the current information. However, no changes are made to the style until you click the New, Insert, or Update button.

Buttons: New lets you enter information for a new style; Insert inserts a new style using the specified information; Update updates the style using the specified information; Delete removes the style; Cancel clears any information that you have entered for a new style.

7.8 Styles: Advanced Page

Figure 7-7 shows the Advanced page under the Styles category. (For a discussion of thematic mapping using advanced styles, including several examples, see Section 2.3.3.)

To create and modify advanced styles, you must understand the types of advanced styles, which are explained in detail (with XML examples) in Section A.6.

Name and Preview columns: List currently defined advanced styles, with a preview of each. (The styles listed depend on whether you selected the ALL_SDO_STYLES or USER_SDO_STYLES view at connection time.)

Name: Name of the style. Must be unique within a schema.

Description: Optional descriptive text about the style.

Style: Type of style:

Range: Equal if the style contains a series of buckets that contain an equally divided range of a master range; Variable if the style contains a series of buckets that do not necessarily contain an equally divided range of a master range.

Bucket Definition: (Options and content vary depending on Style and Range settings.)

Icon Buttons: Insert an Empty Row inserts an empty row above the selected row; Delete a Row removes the selected row; Move to Top moves the selected row to the first row position; Move Up One Row moves the selected row above the row that is currently above it; Move Down One Row moves the selected row below the row that is currently below it; Move to Bottom moves the selected row to the last row position.

Buttons: New lets you enter information for a new style; Insert inserts a new style using the specified information; Update updates the style using the specified information; Delete removes the style; Cancel clears any information that you have entered for a new style.

7.9 Themes Page

Figure 7-8 shows the Themes page.

Theme Name column: Lists the names of currently defined themes.

Name: Name of the theme. Must be unique within a schema.

Description: Optional descriptive text about the theme.

Base Table: Name of the table or view that has the spatial geometry column to be associated with this theme. You can enter the name, or you can select from a list of tables. (The list contains all tables with entries in your USER_SDO_GEOM_METADATA view.)

Geometry Column: Name of the geometry column in the table or view to be associated with the theme. You can enter the name, or you can select from a list of columns. (The list contains all geometry columns in the selected table or view.)

Theme Type: Optional descriptive text to identify a type for the theme. Examples: political, demographic, nature.

Styling Rules: A tabular visual representation of the XML styling rules to be used with the theme.

For more information about theme definition, see Section 2.3, especially Section 2.3.1.1, "Styling Rules in Predefined Spatial Geometry Themes".

Attr Col: Name of the attribute column (not of type SDO_GEOMETRY) in the table or view, or a SQL expression that references an attribute column in the table or view (for example, to specify a label that is a substring of the value in the column), to use with the bucket ranges or values in the advanced feature style (identified in the Feature Style column). If this column is empty or contains an asterisk (*), no attribute column is used with the feature style.

Feature Style: Name of the style to use for the styling rule.

Feature Query: A SQL condition to select rows from the table or view to use the feature style specified in the same row. You should use XML internal entities to identify special characters in the query (for example, &lt; instead of <). Examples:

name like 'I-%' and length(name) &lt; 6
name_class='U'
name_class in ('A', 'B', 'C')

Label Col: Name of the label column (not of type SDO_GEOMETRY) in the table or view, or a SQL expression that references one or more columns (not of type SDO_GEOMETRY) in the table or view (for example, to specify a label that is a substring of the value in the column), to use for text labels.

Label Style: Name of the text style to be used for the labels.

Label Func: A SQL expression or a value to determine whether or not the feature will be identified using the value in the label column. If the specified value or the value returned by the specified function is less than or equal to zero, the feature will not be identified. Examples:

0
1
8-length(label)

Icon Buttons: Insert an Empty Row inserts an empty row above the selected row; Delete a Row removes the selected row; Move to Top moves the selected row to the first row position; Move Up One Row moves the selected row above the row that is currently above it; Move Down One Row moves the selected row below the row that is currently below it; Move to Bottom moves the selected row to the last row position.

Buttons: New lets you enter information for a new theme; Insert inserts a new theme using the specified information; Update updates the theme using the specified information; Delete removes the theme; Cancel clears any information that you have entered for a new theme.

7.10 Maps Page

Figure 7-9 shows the Maps page.

Map Name column: Lists the names of currently defined base maps.

Name: Name of the base map. Must be unique within a schema.

Description: Optional descriptive text about the base map.

Map Definition: A tabular visual representation of the XML definition of the base map. The order in which the themes are listed determines the order in which they are rendered, with the last listed theme on top.

For more information about base map definition, see Section 2.4; for information about the minimum and maximum scale values, see Section 2.4.1.

Theme Name: Name of the theme to use for a layer in the base map.

Min Scale: Minimum value of the scale range for the theme.

Max Scale: Maximum value of the scale range for the theme.

Icon Buttons: Insert an Empty Row inserts an empty row above the selected row; Delete a Row removes the selected row; Move to Top moves the selected row to the first row position; Move Up One Row moves the selected row above the row that is currently above it; Move Down One Row moves the selected row below the row that is currently below it; Move to Bottom moves the selected row to the last row position.

Buttons: New lets you enter information for a new base map; Insert inserts a new base map using the specified information; Update updates the base map using the specified information; Delete removes the base map; Cancel clears any information that you have entered for a new base map.