2-36 Oracle Fusion Middleware Users Guide for Oracle MapViewer
is inserted in the BASE_TABLE column of the USER_SDO_THEMES view, the link geometry column name GEOMETRY in this example is inserted in the GEOMETRY_
COLUMN column, and an XML document with one styling_rules element is inserted in the STYLING_RULES column.
In the styling_rules element for a network theme, theme_type must be network in order for this theme to be recognized as a network theme. Elements for
links, paths, and nodes can be specified in the same features element, as is done in
Example 2–20 :
■
The link feature rule specifies the style C.RED and direction marker attributes for all links.
■
The path feature rule specifies the style C.BLUE for paths with the path ID value 1, and the style C.GREEN for paths with the path ID value 3.
■
The node feature rule specifies the style M.CIRCLE and a marker size of 5. Example 2–20
also contains a label element for links, specifying the link column LINK_ID and the label style T.STREET NAME.
The DTD for the styling_rules element is presented in Section A.7
.
2.3.5.2 Using MapViewer for Network Analysis
The network model Java API provides several network analysis capabilities. You can define MapViewer network themes that support the shortest-path and within-cost
analysis capabilities. Some attributes apply to both capabilities, and some attributes apply only to the relevant associated capability.
For all network analysis capabilities, the jdbc_network_query element and the network-related attributes described in
Section 2.3.5 apply to the definition of the
network theme. For shortest-path analysis, the following attributes apply to the definition of the
network theme:
■
analysis_algorithm attribute: Specifies the shortest-path analysis algorithm to use. Must be either DIJKSTRA or ASEARCH.
■
shortestpath_style attribute: Specifies the style name to be used for the shortest path.
■
shortestpath_startnode attribute: Specifies the start node to be used for the analysis.
■
shortestpath_endnode attribute: Specifies the end node to be used for the analysis.
■
shortestpath_startstyle attribute optional: Specifies the style name to be used for the start node.
■
shortestpath_endstyle attribute optional: Specifies the style name to be used for the end node.
Example 2–21 defines a network theme that can be used for shortest-path analysis.
Example 2–21 Network Theme for Shortest-Path Analysis
theme name=shortest_path_theme user_clickable=false jdbc_network_query
network_name=BI_TEST network_level=1
jdbc_srid=0
MapViewer Concepts 2-37
datasource=mvdemo analysis_algorithm=DIJKSTRA
shortestpath_style=L.PH shortestpath_startnode=20
shortestpath_endnode=101 shortestpath_startstyle=M.STAR
shortestpath_endstyle=M.CIRCLE asis=false
jdbc_network_query theme
For within-cost analysis, the following attributes apply to the definition of the network theme:
■
analysis_algorithm attribute: Must be WITHINCOST.
■
withincost_startnode attribute: Specifies the start node to be used for the analysis.
■
withincost_cost attribute: Specifies the cost cutoff value for nodes to be included. All nodes that can be reached from the start node at a cost less than or
equal to the specified value are included in the resulting display. Nodes that cannot be reached from the start node or that can be reached only at a cost greater
than the specified value are not included.
■
withincost_startstyle attribute optional: Specifies the style name to be used for the start node.
■
withincost_style attribute: Specifies the style name to be used for links in the displayed paths between the start node and each node that is within the specified
cost cutoff value.
Example 2–22 defines a network theme that can be used for within-cost analysis.
Example 2–22 Network Theme for Within-Cost Analysis
theme name=within_cost_theme user_clickable=false jdbc_network_query
network_name=BI_TEST network_level=1
jdbc_srid=0 datasource=mvdemo
analysis_algorithm=WITHINCOST withincost_startnode=20
withincost_style=L.PH withincost_cost=1
withincost_startstyle=M.STAR asis=false
jdbc_network_query theme
2.3.6 Topology Themes