C.1 Setting Up the WMS Interface for the Map Visualization Component

The map visualization component is preconfigured to run as a WMS service.

Internally, the map visualization component translates all incoming WMS requests into proper XML requests to the map visualization component server. For example, the following HTTP request invokes the GetCapabilities service of a the map visualization component server:

http://localhost:8888/mapviewer/wms?REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1
or
http://localhost:8888/mapviewer/wms?REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.3.0

As shown in this example, the URL for the map visualization component WMS service is typically http://host:port/mapviewer/wms?, where host and port refer to the host and HTTP port of the map visualization component server. The context path /mapviewer/wms refers to the WMS interface of map visualization component.

Note:

All WMS requests must be on a single line, so ignore any line breaks that might appear in WMS request examples in this chapter.

C.1.1 Preparing the Data Sources and Editing the wmsConfig.xml File

For a data source to provide WMS services, you may first need to define themes and base maps, because they will become the actual service content that the map visualization server will be providing. You can use the Oracle Map Builder Tool to create the themes and base maps.

After creating themes and base maps, you can edit the wmsConfig.xml file in the WEB-INF/conf/ folder, which is the same folder for the mapViewerConfig.xml file. For example, if data sources named nedata and mvdemo are allowed to provide WMS services, the wmsConfig.xml file may contain a section similar to the following:

<?xml version="1.0" ?>
<wms_config>
   . . . . . . 
  <custom_parameters  
            host="localhost" port="80" protocol="http" 
            public_datasources="nedata, mvdemo">
    </custom_parameters>   
   . . . . . . 
</wms_config>

For changes to the wmsConfig.xml file take effect, you must restart the map visualization server.

To test the server, you can send a getCapabilities request. For example:

http://localhost:8080/mapviewer/wms?REQUEST=GetCapabilities&VERSION=1.3.0

C.1.2 Data Source Named wms

You must define a map visualization component data source named wms, unless every incoming WMS request explicitly specifies a datasource CGI parameter. All requests that do not specify the datasource parameter are by default directed to the data source named wms. For example, the GetCapabilities request will by default list all the available themes that are in the wms data source. (To configure the information returned by a GetCapabilities request, see Customizing WMS GetCapabilities Responses.)

C.1.3 SDO to EPSG SRID Mapping File

By default, the map visualization component uses the Oracle Spatial (SDO) native SRID (spatial reference ID) values when such information is requested in a WMS request such as GetCapabilities. The EPSG SRID values, however, are more widely used in WMS applications. To have the map visualization component use EPSG SRID values when processing WMS requests and generating responses, specify a mapping file. This mapping file is a text file that tells the map visualization component which SDO SRID values map to which EPSG SRID values. (Each pair of matching SRID values refers to the same spatial reference system.)

The mapping file contains lines where each line defines one pair of equivalent SRID values in the following format:

sdo_srid=epsg_srid

For example, the following lines define SDO SRID 8307 as equivalent to EPSG SRID 4326, and SDO SRID 81922 as equivalent to EPSG SRID 20248:

8307=4326
81922=20248

After you have created an SDO to EPSG mapping file, you can save it on the server where the map visualization component is running, and specify its location in the map visualization component configuration file using the <sdo_epsg_mapfile> element in the <wms_config> element, as explained in Customizing WMS GetCapabilities Responses.