26.02.2013 Views

MapInfo Spatial Server Web Map Service - Product Documentation ...

MapInfo Spatial Server Web Map Service - Product Documentation ...

MapInfo Spatial Server Web Map Service - Product Documentation ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong><br />

Version 1.0<br />

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> <strong>Web</strong> <strong>Map</strong> <strong>Service</strong>


Information in this document is subject to change without notice and does not represent a commitment on the<br />

part of the vendor or its representatives. No part of this document may be reproduced or transmitted in any<br />

form or by any means, electronic or mechanical, including photocopying, without the written permission of Pitney<br />

Bowes Software Inc., One Global View, Troy, New York 12180-8399.<br />

© 2012 Pitney Bowes Software Inc. All rights reserved. Pitney Bowes Software Inc. is a wholly-owned subsidiary<br />

of Pitney Bowes Inc. Pitney Bowes, the Corporate logo, <strong><strong>Map</strong>Info</strong>, Group 1 Software, and <strong><strong>Map</strong>Info</strong> Professional<br />

are [registered] trademarks of Pitney Bowes Inc. or a subsidiary. All other trademarks are the property of their<br />

respective owners.<br />

United States:<br />

Phone: 518.285.6000<br />

Fax: 518.285.6070<br />

Sales: 800.327.8627<br />

Government Sales: 800.619.2333<br />

Technical Support: 518.285.7283<br />

Technical Support Fax: 518.285.7575<br />

www.pb.com/software<br />

Canada:<br />

Phone: 416.594.5200<br />

Fax: 416.594.5201<br />

Sales: 800.268.3282<br />

Technical Support:.518.285.7283<br />

Technical Support Fax: 518.285.7575<br />

www.pb.com/software<br />

Europe/United Kingdom:<br />

Phone: +44.1753.848.200<br />

Fax: +44.1753.621.140<br />

Technical Support: +44.1753.848.229<br />

www.pitneybowes.co.uk/software<br />

Asia Pacific/Australia:<br />

Phone: +61.2.9437.6255<br />

Fax: +61.2.9439.1773<br />

Technical Support: 1.800.648.899<br />

www.pitneybowes.com.au/software<br />

Contact information for all Pitney Bowes offices is located at: www.pb.com/contact-us.<br />

<strong>Product</strong>s named herein may be trademarks of their respective manufacturers and are hereby recognized.<br />

Trademarked names are used editorially, to the benefit of the trademark owner, with no intent to infringe on<br />

the trademark.<br />

30 / 04 / 2012


Contents<br />

Chapter 1: Introduction..............................................................................................5<br />

Overview...............................................................................................................................6<br />

Layers and Styles.............................................................................................................6<br />

WMS <strong>Server</strong>s...................................................................................................................6<br />

Understanding the WMS <strong>Server</strong> Functionality.................................................................6<br />

How to Get Information About a WMS <strong>Server</strong>.................................................................7<br />

How to Retrieve a <strong>Map</strong> From a WMS <strong>Server</strong>...................................................................7<br />

How to Use the WMS <strong>Server</strong> GetFeatureInfo Operations...............................................7<br />

Chapter 2: Managing WMS Resources and Configuration.....................................9<br />

Accessing and Modifying the Configuration File...........................................................10<br />

Accessing the Repository using <strong>Web</strong>DAV.....................................................................10<br />

Reload the <strong>Service</strong> Configuration using JMX Console..................................................12<br />

Configuration File Parameters.........................................................................................13<br />

<strong>Service</strong> Parameters........................................................................................................13<br />

Defining a WMSLayer....................................................................................................14<br />

Creating a WMSLayerTree............................................................................................15<br />

Accessing the <strong>Web</strong> <strong>Map</strong> <strong>Service</strong> From Within <strong><strong>Map</strong>Info</strong> Professional..........................16<br />

Adding a WMS <strong>Server</strong> in <strong><strong>Map</strong>Info</strong> Professional.............................................................16<br />

Chapter 3: <strong>Web</strong> <strong>Map</strong> <strong>Service</strong> Capabilities...............................................................19<br />

Getting <strong>Service</strong>-level Metadata About a WMS................................................................20<br />

Inputs and Behaviors.....................................................................................................20<br />

Output............................................................................................................................20<br />

Getting <strong>Map</strong>s......................................................................................................................23<br />

Inputs and Behaviors.....................................................................................................23<br />

Sample Response..........................................................................................................24<br />

Getting Information About <strong>Map</strong> Features.......................................................................25


4<br />

Inputs and Behaviors.....................................................................................................25<br />

Output............................................................................................................................26<br />

Chapter 4: <strong>Web</strong> <strong>Map</strong> <strong>Service</strong> Fundamentals..........................................................27<br />

WMS <strong>Server</strong> Technology...................................................................................................28<br />

HTTP GET...........................................................................................................................28<br />

Basic Authentication.........................................................................................................28<br />

Layers and Styles..............................................................................................................29<br />

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> 1.0


Introduction<br />

This guide provides descriptions and examples for the developer who is writing<br />

applications that access the <strong>Web</strong> <strong>Map</strong> <strong>Service</strong>.<br />

The <strong>Web</strong> <strong>Map</strong> <strong>Service</strong> lets an application render layers of geographic data onto<br />

a map image. The OpenGIS Consortium (OGC) <strong>Web</strong> <strong>Map</strong> <strong>Service</strong> standard<br />

(version 1.1.1 and 1.3.0 located at www.opengeospatial.org/specs) defines<br />

how a client can retrieve map images over the Internet or a private intranet by<br />

submitting requests through HTTP. <strong>Product</strong>s that can use results from an OGC<br />

compliant WMS server will work with the <strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> OGC <strong>Web</strong> <strong>Map</strong><br />

<strong>Service</strong>, such as <strong><strong>Map</strong>Info</strong> Professional and <strong>Map</strong>Xtreme or other vendor software.<br />

In this section:<br />

• Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6<br />

• Understanding the WMS <strong>Server</strong> Functionality . . . . . . . . . .6<br />

1


Overview<br />

Overview<br />

The <strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> <strong>Web</strong> <strong>Map</strong> <strong>Service</strong> (WMS) allows software clients to reference map images<br />

over the Internet or a private intranet. The WMS implementation is based on the WMS 1.1.1 and 1.3.0<br />

OGC specification. Using HTTP requests, the WMS provides georeferenced data to a client that displays<br />

this data as an image. Georeferenced data is information associated with maps that describe the real<br />

world extents of specific features and the projection upon which it is based.<br />

The images can be provided as GIF, JPEG, PNG, and other image formats.<br />

Layers and Styles<br />

The images rendered can be made of layers that are hierarchical—an image can be served that is made<br />

up of a layer that is a collection of other layers. Since WMS renders layers, the characteristics that<br />

modify the view of layers, such as styles and coordinate systems, can also be included in the layers<br />

provided. This lets you customize images because each image can act as a separate layer within the<br />

client that is accessing these images.<br />

WMS <strong>Server</strong>s<br />

Aside from the servers provided by Pitney Bowes Software Inc. and any service that you provide through<br />

your own organization, there are many public access WMS servers available on the World Wide <strong>Web</strong>.<br />

There are WMS servers for LandSat data, USGS DOQ photos, bathymetry, weather, and many other<br />

data types. Pitney Bowes Software Inc. maintains a <strong>Web</strong> <strong>Map</strong> <strong>Server</strong> of many of our data products. To<br />

view these products, open the following URI in a WMS client, such as <strong><strong>Map</strong>Info</strong> Professional:<br />

http://www.mapinfo.com/miwms<br />

If you are accessing maps from different sources, it is not a complicated task to combine the images into<br />

a single coherent image that your users can work with. It is important to keep the spatial information<br />

(bounding box, spatial reference system, height, and width) identical. This ensures that the different images<br />

align with each other properly.<br />

Note:<br />

Not all <strong>Web</strong> <strong>Map</strong> <strong>Server</strong>s adhere to the OGC standards and may or may not be compatible with<br />

your WMS client.<br />

Please refer to the OGC WMS 1.1.1 or 1.3.0 specifications (www.opengeospatial.org/standards/) for<br />

more information about developing a WMS client to the WMS 1.1.1 or 1.3.0 specification.<br />

Understanding the WMS <strong>Server</strong> Functionality<br />

6<br />

There are three WMS server-specific methods that provide the basis for the server implementation:<br />

• GetCapabilities<br />

• Get<strong>Map</strong><br />

• GetFeatureInfo<br />

Each of these methods is discussed below.<br />

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> 1.0


Note:<br />

A basic <strong>Web</strong> <strong>Map</strong> <strong>Service</strong> classifies its georeferenced information holdings into "layers" and offers<br />

a number of predefined "styles" in which to display those layers.<br />

How to Get Information About a WMS <strong>Server</strong><br />

When first finding a <strong>Web</strong> <strong>Map</strong> <strong>Server</strong>, it is necessary to find out the names of available layers, styles in<br />

use, spatial information in use, and other information that the server provides, in order to make a request<br />

for an image that is within the parameters of the server.<br />

The GetCapabilities request retrieves service-level metadata over the Internet or intranet, including the<br />

server name, the layer names, abstracts about the data, and valid request parameters, among other<br />

data. The following section highlights potential ways to apply this capability: Getting <strong>Service</strong>-level<br />

Metadata About a WMS on page 20.<br />

How to Retrieve a <strong>Map</strong> From a WMS <strong>Server</strong><br />

Get<strong>Map</strong> retrieves the geospatial information, over the Internet or an intranet, based on a specific request<br />

of the data you want and returns it as a raster image. When invoking Get<strong>Map</strong> a WMS client can specify:<br />

• Layers<br />

• Styles<br />

• A bounding box (the area to be mapped)<br />

• A coordinate reference system (also known as the spatial reference system)<br />

• Output image format (JPEG, GIF, PNG. and others).<br />

• Output size (height and width of the returned image)<br />

• Background transparency and color<br />

The following section highlights potential ways to apply this capability: Getting <strong>Map</strong>s on page 23.<br />

How to Use the WMS <strong>Server</strong> GetFeatureInfo Operations<br />

GetFeatureInfo returns request information for a feature at a given point on the map after a Get<strong>Map</strong> has<br />

been called. This is a search-at-point operation in which, after a Get<strong>Map</strong> request, the GetFeatureInfo<br />

request supplies the X, Y pixel coordinates of the location about which you want more information. The<br />

following section highlights potential ways to apply this capability: Getting Information About <strong>Map</strong><br />

Features on page 25.<br />

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> <strong>Web</strong> <strong>Map</strong> <strong>Service</strong><br />

Chapter 1: Introduction<br />

7


Managing WMS Resources<br />

and Configuration<br />

This section describes how to configure and add resources to the <strong>Web</strong> <strong>Map</strong><br />

<strong>Service</strong>. The WMS is installed and pre-configured with the configuration file (named<br />

configuration) located in the repository. WMS uses the standard XML service<br />

configuration similar to the other <strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> services.<br />

The named WMS configuration file WMSConfiguration is located in the Configuration<br />

directory under the root repository. For example, a default installation<br />

will place the WMS configuration file at http://localhost:8080/Repository<strong>Service</strong>/repository/default/Configuration/WMSConfiguration<br />

You can use your standard <strong>Web</strong>DAV protocol tools (e.g., Windows <strong>Web</strong>Folders,<br />

DAVExplorer, etc.) to copy the configuration file from the repository, and then<br />

upload the modified configuration file back. Once uploaded, you must use the<br />

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> JMX Console to invoke the new configuration for the<br />

service.<br />

Note:<br />

You must be on the local machine hosting <strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> to access<br />

and make changes to resources in the repository.<br />

In this section:<br />

• Accessing and Modifying the Configuration File . . . . . .10<br />

• Configuration File Parameters . . . . . . . . . . . . . . . . . . . . . .13<br />

• Accessing the <strong>Web</strong> <strong>Map</strong> <strong>Service</strong> From Within <strong><strong>Map</strong>Info</strong> Professional<br />

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16<br />

2


Accessing and Modifying the Configuration File<br />

Accessing and Modifying the Configuration File<br />

The named WMS configuration file WMSConfigurationis located in the Configuration directory<br />

under the root repository. For example, a default installation will place the WMS configuration file at http://localhost:8080/Repository<strong>Service</strong>/repository/default/Configuration/WMSConfiguration<br />

To configure the WMS, perform the following:<br />

1. You must be located on the local machine hosting <strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> and the repository.<br />

2. Use a standard <strong>Web</strong>DAV protocol tool to access the repository (e.g., Windows <strong>Web</strong>Folders, DAVExplorer,<br />

etc.) and copy the configuration file from the repository to a directory on your local machine.<br />

The WMS configuration file is located at http://localhost:8080/Repository<strong>Service</strong>/repository/default/Configuration/WMSConfiguration<br />

For examples of using standard <strong>Web</strong>DAV tools, see Accessing the Repository using <strong>Web</strong>DAV<br />

on page 10<br />

3. Make changes to the local WMSConfiguration file.<br />

4. Upload the modified configuration file back to the same location (and name) in the repository using<br />

your <strong>Web</strong>DAV tool.<br />

5. Use the <strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> JMX Console to invoke the new configuration for the service. For<br />

instruction on how to reload the configuration using the JMX Console, see Reload the <strong>Service</strong><br />

Configuration using JMX Console on page 12<br />

Accessing the Repository using <strong>Web</strong>DAV<br />

10<br />

Configuration files are pre-loaded in the repository for each service. These configuration files are located<br />

at http://localhost:8080/Repository<strong>Service</strong>/repository/default/Configuration/.<br />

To configure the services, you must use a <strong>Web</strong>DAV protocol tool to access the JCR repository, copy<br />

the configuration file locally, make changes to the file, copy the configuration file back to the repository,<br />

and reload the configuration using the JMX Console. There are many tools available to accomplish the<br />

<strong>Web</strong>DAV connection tasks. We have provided two examples:<br />

Using <strong>Web</strong>Folders to Access the Repository Resources<br />

To add or modify a resource, you must copy the resource to or from the repository using a <strong>Web</strong>DAV<br />

tool. Using <strong>Web</strong>Folders is an easy way to access the repository and the resources contained in the repository.<br />

Note:<br />

<strong>Web</strong>Folders is for Windows machines only. To access the repository, you must be on the same<br />

machine where <strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> and the repository are installed.<br />

To configure a <strong>Web</strong>Folder:<br />

1. Using the Windows file explore, for the method appropriate for your version of Windows, select <strong>Map</strong><br />

Network Drive...<br />

2. In the pop-up window, click on the link 'sign up for online storage or connect to a<br />

network server' or you may have a link that mentions'Connect to a website...'.<br />

3. Click the Next and select Choose another network location. Click Next.<br />

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> 1.0


4. In the Internet or network addressfield add the repository URL http://localhost:8080/Repository<strong>Service</strong>/repository/default/.<br />

Click Next.<br />

5. If you are asked for cridentials, use the username and password Admin/Admin<br />

6. Give this connection a name. For example, <strong>Spatial</strong> <strong>Server</strong> Repository. Click Next.<br />

Once finished, you will have a folder connection to the contents of the repository under your network<br />

places.<br />

The <strong>Web</strong>Folder connection to the repository can be used like any other windows explorer folder, where<br />

files can be copied from the repository, modified, and copied back to the same location in the repository.<br />

Using DAVExplorer to Access the Repository Resources<br />

To add or modify a resource, you must copy the resource to or from the repository using a <strong>Web</strong>DAV<br />

tool. Using DavExplorer is an easy way to access the repository and the resources contained in the repository.<br />

DAVExplorer is a freely available <strong>Web</strong>DAV client application. This software is available from<br />

http://www.davexplorer.org.<br />

Note:<br />

DavExplorer is for Windows machines only. To access the repository, you must be on the same<br />

machine where <strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> and the repository are installed.<br />

To get or add resources from the repository using DAVExplorer, use the following instructions:<br />

Getting Resources From the Repository Using DAVExplorer<br />

Use the following steps to get resources from the repository using DAV Explorer:<br />

1. Open DAVExplorer.<br />

2. In DAVExplorer, enter the URL of the <strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> repository and click the Connect button.<br />

For example, enter localhost:8080/Repository<strong>Service</strong>/repository/default/. (Note<br />

that DAVExplorer prepends http:// automatically.)<br />

If prompted, enter the admin/admin login name and password required to connect to the repository.<br />

Once you are connected to the repository, a node for the repository appears in the treeview pane<br />

on the left.<br />

3. In the treeview pane on the left, expand the nodes under the repository node until you see the node<br />

that contains the type of resource you want to get.<br />

For example, if the named resource you want to get is a configuration, expand the repository nodes<br />

until you see the Configuration node. Click on the node to select it. The named configuration resources<br />

in the repository are then listed in the right pane.<br />

4. In the right pane, click on the resource you want to get.<br />

You may click on any of the fields of the named resource to select it.<br />

5. On the File menu, select Get File.<br />

The Save As dialog box opens.<br />

6. In the Save As dialog box, enter a name for the named resource definition file and select the directory<br />

in which you want to save it, then click the Save button.<br />

The selected named resource definition file is saved to the selected file location.<br />

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> <strong>Web</strong> <strong>Map</strong> <strong>Service</strong><br />

Chapter 2: Managing WMS Resources and Configuration<br />

11


Reload the <strong>Service</strong> Configuration using JMX Console<br />

Note:<br />

You should always save the resource as the same name as it appears in the repository. By<br />

using this technique, you will never have a conflict when adding the resource back to the repository.<br />

Adding Resources to the Repository Using DAVExplorer<br />

Use the following steps to add resources to the repository using DAVExplorer:<br />

1. Open DAVExplorer.<br />

2. In DAVExplorer, enter the URL of the <strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> repository and click the Connect button.<br />

For example, enter localhost:8080/Repository<strong>Service</strong>/repository/default/. (Note<br />

that DAVExplorer prepends http:// automatically.)<br />

If prompted, enter the admin/admin login name and password required to connect to the repository.<br />

Once you are connected to the repository, a node for the repository appears in the treeview pane<br />

on the left.<br />

3. In the treeview pane on the left, expand the nodes under the repository node until you see the node<br />

that corresponds to the type of resource you are adding.<br />

For example, if you are adding a configuration resource, expand the repository nodes until you see<br />

the Configuration node. Click on the node to select it.<br />

4. On the File menu, select Write File.<br />

The Write File dialog box opens.<br />

5. In the Write File dialog box, select the definition file of the resource you want to add to the repository,<br />

then click the Open button.<br />

The selected resource is added to the repository.<br />

Reload the <strong>Service</strong> Configuration using JMX Console<br />

12<br />

Once you have modified a service configuration, you must reload the configuration in the repository using<br />

the JMX Console. The JMX console allows you to reload and administer a service, without having to<br />

restart the application container.<br />

To reload the service configuration:<br />

1. Access the JMX Console using the following URL: http://localhost:8080/jmx-console/<br />

2. Under the Domain: Enterprise<strong>Map</strong>ping section, select the administration link for the service.<br />

For example, Enterprise<strong>Map</strong>ping:name=Administration,type=WMS <strong>Service</strong>.<br />

3. Click the Invoke button for the reloadConfiguration operation.<br />

You will get a message on the status of the invocation.<br />

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> 1.0


Configuration File Parameters<br />

The named WMS configuration file is pre-configured in the repository. See the following sections for<br />

detailed descriptions of the configuration parameters and how to specify layers accessed by the WMS:<br />

<strong>Service</strong> Parameters<br />

The service parameters define the base WMS configuration.<br />

Parameter<br />

Title<br />

Abstract<br />

OnlineResource<br />

ResourceRoot<br />

DisableGetFeature-<br />

Info<br />

MIMETypes<br />

Description<br />

Human-readable name for your WMS service. Edit the Title to add your WMS<br />

name.<br />

Descriptive introduction to your WMS service. Edit the Abstract to describe what<br />

type of features or content your WMS service provides.<br />

Top level HTTP URL for your WMS <strong>Service</strong>. Edit the OnlineResource hostname<br />

and port number with your services WMS top level URL.<br />

Defines the location of your local repository where resources are stored that are<br />

accessed by the WMS service. Edit the ResourceRoot hostname and port number<br />

to match your WMS service container. This URL should point to the Repository<br />

<strong>Service</strong> rmi.<br />

Determines if the GetFeatureInfo operation is enabled. Default is set to false. If<br />

you would like to disable the GetFeatureInfo operation for the service set this<br />

parameter to true.<br />

List of supported image MIME types the user can use to return maps.<br />

<br />

PBBI WMS <strong>Server</strong><br />

Provides WMS-compliant services.<br />

http://localhost:8080/WMS<strong>Service</strong>/WMS<br />

false<br />

<br />

image/gif<br />

image/jpg<br />

image/jpeg<br />

image/png<br />

image/tiff<br />

<br />

http://localhost:8080/Repository<strong>Service</strong>/rmi<br />

<br />

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> <strong>Web</strong> <strong>Map</strong> <strong>Service</strong><br />

Chapter 2: Managing WMS Resources and Configuration<br />

13


Defining a WMSLayer<br />

Defining a WMSLayer<br />

14<br />

Since you can have multiple configurations, the layer list and layer tree has been separated to allow for<br />

configuration merging. The WMSLayerList has the list of all available layers that can be provided by the<br />

service.<br />

The WMSLayer parameters define the individual layer configurations.<br />

Parameter<br />

Name<br />

Title<br />

Abstract<br />

Queryable<br />

KeywordList<br />

SRSList<br />

NamedResourceList<br />

NamedStyleList<br />

LatLonBounding-<br />

Box<br />

Description<br />

Example of how to define a layer:<br />

The name of your Layer. This is the name of your named layer. The name specified<br />

in the Name element is the name used in the Title element when defining the<br />

WMSLayerTree.<br />

Human-readable name for your layer. Edit the Title to add your layer name.<br />

Descriptive introduction to your layer. Edit the Abstract to describe what type of<br />

features or content the layer provides.<br />

Boolean that indicates whether the server supports the GetFeatureInfo operation<br />

on that Layer.<br />

Contains elements to aid in catalog searches.<br />

List of the <strong>Spatial</strong> Reference Systems used by the layer.<br />

The absolute path of the NamedLayer within the repository root. All ResourcePaths<br />

must start with a slash (/) character.<br />

List of available styles for this layer. Any number of styles may be defined for a<br />

Layer. Each style must have a Name, Title, and ResourcePath element. The ResourcePath<br />

is the absolute path of the NamedStyle within the repository root. All<br />

ResourcePaths must start with a slash (/) character.<br />

Describes the bounding box for the Layer. The information specified for the<br />

LatLonBoundingBox will be returned in a GetFeatureInfo request.<br />

<br />

World<br />

World<br />

The entire world base map<br />

<br />

World<br />

<br />

true<br />

<br />

EPSG:4326<br />

<br />

<br />

/NamedLayers/LayerWithTable<br />

<br />

<br />

<br />

PointStylePin<br />

PointStylePin<br />

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> 1.0


NamedStyles/PointStylePin<br />

<br />

<br />

-180, -90, 180, 90<br />

<br />

Once you have defined your Layers, the WMSLayerTree defines both what layers the server's GetCapabilities<br />

response will contain, and what layers can be used by the service. By doing this, it allows for a<br />

central default configuration to be defined for all layers, and then for a specific instance of the server,<br />

these default layers can be exposed or hidden using the WMSLayerTree, or existing layers can be redefined,<br />

or new layer definitions can be added.<br />

Creating a WMSLayerTree<br />

The WMSLayerTree defines the layers that are exposed through the WMS and also defines the structure<br />

of how these layers are organized. Only the layers defined in the WMSLayerTree are returned in a<br />

GetCapabilites response, and can be defined and returned in a Get<strong>Map</strong> or GetFeatureInfo query.<br />

WMSLayerTree Rules<br />

The following rules apply when creating a WMSLayerTree:<br />

• The Title element of the layer defined in the WMSLayerTree must match the Name element defined<br />

in the WMSLayerList.<br />

• Each Title element must be wrapped in a WMSLayerTree element.<br />

• Each WMSLayerTree element can contain one or more WMSLayerTree elements.<br />

• There can be only one WMSLayerTree at the root. That root layer can have any number of children,<br />

as can any of those children.<br />

• If more than one root WMSLayerTree is defined in a configuration file, only the first WMSLayerTree<br />

will be exposed through the service.<br />

• If multiple configuration files have WMSLayerTrees defined, the last configuration file listed in the<br />

beans.xml file that has a WMSLayerTree will be the one exposed through the service.<br />

In the following example, the World layer contains the North America layer. The North America layer<br />

contains both the Canada and United States layers.<br />

<br />

World<br />

<br />

North America<br />

<br />

Canada<br />

<br />

<br />

United States<br />

<br />

<br />

<br />

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> <strong>Web</strong> <strong>Map</strong> <strong>Service</strong><br />

Chapter 2: Managing WMS Resources and Configuration<br />

15


Accessing the <strong>Web</strong> <strong>Map</strong> <strong>Service</strong> From Within <strong><strong>Map</strong>Info</strong> Professional<br />

Accessing the <strong>Web</strong> <strong>Map</strong> <strong>Service</strong> From Within<br />

<strong><strong>Map</strong>Info</strong> Professional<br />

You can access the <strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> <strong>Web</strong> <strong>Map</strong> <strong>Service</strong> from within <strong><strong>Map</strong>Info</strong> Professional. For<br />

more information, refer to the topic entitled Enhancing <strong>Map</strong> Data Using a <strong>Web</strong> <strong>Map</strong> <strong>Service</strong> in the <strong><strong>Map</strong>Info</strong><br />

Professional online help.<br />

Adding a WMS <strong>Server</strong> in <strong><strong>Map</strong>Info</strong> Professional<br />

16<br />

Before you can access a WMS server, you must first add it to the list of available servers.<br />

To add a WMS server:<br />

1. On the Options menu, select Preferences > <strong>Web</strong> <strong>Service</strong>s.<br />

2. In the <strong>Web</strong> <strong>Service</strong>s Preferences dialog box, select the WMS tab.<br />

3. Click <strong>Server</strong>s to open the WMS <strong>Server</strong>s List dialog box.<br />

4. Click Add to open the WMS <strong>Server</strong> Information dialog box.<br />

In the WMS <strong>Server</strong> Information dialog box you can add the new web server address and description<br />

in the fields provided.<br />

5. Enter the WMS server's URL in the <strong>Server</strong> URL field.<br />

Click Test URL to ensure that <strong><strong>Map</strong>Info</strong> Professional can locate the server.<br />

Click Get Description to get the server-provided description, or enter your own description.<br />

6. If you know that the connect times, send times, or receive times for this server are particularly long<br />

or unusually short, you may want to override the default values for this server.<br />

To establish specific overrides for this server, select the Override Default Values check box and<br />

enter new values, as appropriate, in the following fields:<br />

Field<br />

Connect Timeout<br />

Send Timeout<br />

Receive Timeout<br />

Description<br />

Indicates the amount of time (in seconds) allowed to establish an Internet<br />

connection request to a <strong>Web</strong> <strong>Map</strong> server. If the request takes longer than<br />

this value, a timeout occurs. The default connect timeout is 60 seconds.<br />

Indicates the amount of time (in seconds) allowed to send an Internet request<br />

to a <strong>Web</strong> <strong>Map</strong> server. If the request takes longer than this value, a timeout<br />

occurs. The default send timeout is 60 seconds.<br />

Indicates the amount of time (in seconds) allowed to begin to receive a response<br />

from a request from a <strong>Web</strong> <strong>Map</strong> server. The download can take longer<br />

than the timeout, but the response has to occur within the timeout setting.<br />

The default receive timeout is 300 seconds.<br />

7. If you want to limit the amount of time it takes to retrieve a map or if your map does not require a<br />

great deal of detail, you may want to override the standard number of pixels that are retrieved.<br />

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> 1.0


To establish specific Get<strong>Map</strong> Pixel limits, select the Override Default Values check box and enter<br />

new values, as appropriate, in the following fields:<br />

Field<br />

Max Width<br />

Max Height<br />

Description<br />

Specifies the maximum number of pixels for a Get<strong>Map</strong> request in the<br />

X direction.<br />

Specifies the maximum number of pixels for a Get<strong>Map</strong> request in the<br />

Y direction.<br />

8. Click OK to save your server settings and close the WMS <strong>Server</strong> Information dialog box.<br />

9. In the WMS <strong>Server</strong>s List dialog box, click Set Default to select a default server.<br />

The default server will be selected the next time you open the Open WMS Table dialog box. When<br />

you set a default WMS server, a check mark appears beside it. If you do not select a default server,<br />

<strong><strong>Map</strong>Info</strong> Professional displays the first server in the list when you begin your WMS <strong>Server</strong> session.<br />

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> <strong>Web</strong> <strong>Map</strong> <strong>Service</strong><br />

Chapter 2: Managing WMS Resources and Configuration<br />

17


<strong>Web</strong> <strong>Map</strong> <strong>Service</strong><br />

Capabilities<br />

The <strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> <strong>Web</strong> <strong>Map</strong> <strong>Service</strong> supports three capabilities which<br />

are described in detail in this section.<br />

In accordance with the Open GIS Consortium's <strong>Web</strong> <strong>Map</strong> <strong>Service</strong> Implementation<br />

Specification, the <strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> WMS provides the following operations:<br />

GetCapabilities – This capability retrieves service-level metadata including the<br />

server name, the layer names, abstracts about the data, and the valid request<br />

parameters.<br />

Get<strong>Map</strong> – This capability is used to request a map image using well-defined<br />

geospatial and dimensional parameters containing layers, styles, boundaries,<br />

and the spatial reference system (coordinate system of the data being retrieved).<br />

You can also specify the image format (JPEG, GIF, PNG, and others) and styles.<br />

GetFeatureInfo – This capability is used to request information for a feature at<br />

a given point on the map after a Get<strong>Map</strong> has been called.<br />

All of these request types are case-sensitive.<br />

In this section:<br />

• Getting <strong>Service</strong>-level Metadata About a WMS . . . . . . . . .20<br />

• Getting <strong>Map</strong>s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .23<br />

• Getting Information About <strong>Map</strong> Features . . . . . . . . . . . . .25<br />

3


Getting <strong>Service</strong>-level Metadata About a WMS<br />

Getting <strong>Service</strong>-level Metadata About a WMS<br />

Before obtaining a map from a WMS server, it is important to determine the names of available layers,<br />

their contents, their SRS (spatial reference system, or coordinate system) settings, and other information<br />

about the data. Use the GetCapabilities request to obtain this information from a server.<br />

The GetCapabilities request returns service-level metadata in XML format. This metadata is a description<br />

of the information content and valid request parameters of the service.<br />

Inputs and Behaviors<br />

The following table lists the possible request inputs:<br />

Input<br />

Output<br />

20<br />

VERSION=version<br />

SERVICE=WMS<br />

REQUEST=GetCapabilities<br />

Required<br />

No<br />

Yes<br />

Yes<br />

Description<br />

Request version. Currently versions 1.1.1 and 1.3.0 are supported.<br />

<strong>Service</strong> type. The SERVICE attribute is always set to WMS.<br />

Request name<br />

The request parameters are always sent as an HTTP query string. The following is a sample GetCapabilities<br />

request:<br />

http://localhost:8080/rest/Enterprise<strong>Map</strong>ping/WMS?VERSION=1.3.0&SERVICE=WMS&RE-<br />

QUEST=GetCapabilities<br />

After a successful GetCapabilities request, the service returns a GetCapabilities response which is a<br />

descriptive XML file. The GetCapabilities.xml file contains the information on the services metadata,<br />

capabilities, and layers.<br />

General <strong>Service</strong> Metadata<br />

The first part of a GetCapabilities response contains the name of the <strong>Web</strong> service (always OGC:WMS),<br />

the title of the <strong>Web</strong> service, and the URL of the service.<br />

Note:<br />

The Name is usually a single word read by a machine, while the Title is designed to be humanreadable.<br />

The following code illustrates an example of this section:<br />

<br />

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> 1.0


OGC:WMS<br />

Pitney Bowes Software Inc. <strong>Web</strong> <strong>Map</strong> <strong>Server</strong><br />

<br />

<br />

Capabilities<br />

This section names the actual operations that are supported by the service, the output formats offered<br />

by these operations, and the URL prefix for each operation. For most WMS services this section has<br />

three parts, one for GetCapabilities, one for Get<strong>Map</strong>, and one for GetFeatureInfo. The following example<br />

illustrates the Get<strong>Map</strong> section:<br />

<br />

image/gif<br />

image/jpeg<br />

image/jpg<br />

image/png<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Layers<br />

Within the Capabilities is a Layer element for each map that can be provided by the service. WMS also<br />

allows layers to be made up of layers so some nesting of layers can also be seen in these elements.<br />

Each Layer element includes the following:<br />

• Title – a name of the layer that is readable by the user.<br />

• Name – a name of the layer that is used to reference the layer in requests.<br />

• Style – a predefined style that can be used with this particular layer.<br />

• SRS – the spatial reference system(s) that applies to this layer. If more than one SRS can be used<br />

on the layer, each one can be listed.<br />

• LatLonBoundingBox – a set of attributes that state the minimum bounding rectangle of the map data<br />

in the default coordinate system (EPSG:4326). These numbers are expressed in decimal degrees<br />

These values are important when making a Get<strong>Map</strong> request, as that request requires the correct values<br />

that are specific to each individual <strong>Web</strong> <strong>Map</strong> service.<br />

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> <strong>Web</strong> <strong>Map</strong> <strong>Service</strong><br />

Chapter 3: <strong>Web</strong> <strong>Map</strong> <strong>Service</strong> Capabilities<br />

21


Output<br />

22<br />

When layers are nested, the values set for a parent layer cascade down to subsidiary elements unless<br />

specifically set differently in the child layers. The example below shows portions of the layer element to<br />

illustrate the different settings.<br />

<br />

Pitney Bowes <strong><strong>Map</strong>Info</strong> <strong>Web</strong> <strong>Map</strong> <strong>Server</strong><br />

<br />

<br />

<br />

BigRedStar<br />

BigRedStar<br />

<br />

<br />

POITextStyle<br />

POITextStyle<br />

<br />

<br />

PositionStyle<br />

PositionStyle<br />

<br />

<br />

RouteEndPointStyle<br />

RouteEndPointStyle<br />

<br />

<br />

FeatureLayers<br />

EPSG:4201<br />

EPSG:4205<br />

...<br />

<br />

PUBLIC<br />

<br />

uscity<br />

US Cities<br />

<br />

<br />

<br />

WorldCountries<br />

WorldCountries<br />

<br />

<br />

<br />

<br />

...<br />

<br />

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> 1.0


Getting <strong>Map</strong>s<br />

The primary reason to use or establish a <strong>Web</strong> <strong>Map</strong> <strong>Server</strong> is to obtain or serve maps. Use the Get<strong>Map</strong><br />

request to obtain images from a WMS server. Get<strong>Map</strong> requests are always sent as HTTP strings and<br />

the response is a map image with well-defined geospatial and dimensional parameters in the image<br />

format specified in the request.<br />

Inputs and Behaviors<br />

When invoking Get<strong>Map</strong> a WMS query can specify:<br />

Input<br />

VERSION=version<br />

SERVICE=WMS<br />

REQUEST=Get<strong>Map</strong><br />

LAYERS=layer_list<br />

STYLES=style_list<br />

SRS=namespace:identifier<br />

CRS=namespace:identifier<br />

Required<br />

Yes<br />

Yes<br />

Yes<br />

Yes<br />

Yes<br />

Yes for<br />

1.1.1<br />

Yes for<br />

1.3.0<br />

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> <strong>Web</strong> <strong>Map</strong> <strong>Service</strong><br />

Description<br />

Request version. <strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> WMS supports both<br />

version 1.1.1 and 1.3.0 of the OGC specification.<br />

<strong>Service</strong> type. This is always WMS.<br />

Request name. For a Get<strong>Map</strong> request this is always Get<strong>Map</strong>.<br />

The layer or layers to be included in the map image. Each<br />

layer should be separated by a comma. For example:<br />

LAYERS=Layer1,Layer2,Layer3<br />

Comma-separated list of one rendering style per requested<br />

layer. A style is required for each layer requested. If no style<br />

is requested, the attribute must be present but without a value.<br />

If requesting multiple layers, the styles listed should be in the<br />

same order as the layers. For example:<br />

STYLES=Style1,,Style3<br />

Chapter 3: <strong>Web</strong> <strong>Map</strong> <strong>Service</strong> Capabilities<br />

In the above example the second style (for the second layer<br />

requested) is left blank, allowing the default style defined for<br />

the layer to be used.<br />

The spatial reference system used in the map (numeric representation<br />

of the projection of the map, also known as the<br />

coordinate reference system). This parameter is only used<br />

for 1.1.1 versions of the OGC specification. If this is not specified,<br />

the default spatial reference system, as defined in the<br />

default style of the layer, is used.<br />

The coordinate reference system used in the map (numeric<br />

representation of the projection of the map, also known as<br />

the spatial reference system). This parameter is only used<br />

for 1.1.1 versions of the OGC specification. If this is not specified,<br />

the default coordinate reference system, as defined in<br />

the default style of the layer, is used.<br />

23


Sample Response<br />

Input<br />

BBOX=minx,miny,maxx,maxy<br />

WIDTH=output_width<br />

HEIGHT=output_height<br />

FORMAT=output_format<br />

TRANSPARENT=TRUE|FALSE<br />

BGCOLOR=color_value<br />

EXCEPTIONS=exception_format<br />

Required<br />

Yes<br />

Yes<br />

Yes<br />

Yes<br />

No<br />

No<br />

No<br />

Description<br />

The area to be mapped. the bounding box is specified as the<br />

four coordinates of the corners of the box that bounds the<br />

map area to be included in the image. The BBOX coordinates<br />

are always expressed in the units of the SRS.<br />

Width in pixels of map picture.<br />

Height in pixels of map picture.<br />

The format in which the map image is to be returned.<br />

The transparency and color of the background of the image.<br />

If nothing is specified, the value is FALSE.<br />

Hexadecimal red-green-blue color value for the background<br />

color (default=0xFFFFFF).<br />

The format in which exceptions are to be reported by the<br />

WMS (default=SE_XML).<br />

The request parameters are always sent as an HTTP query string. The following are sample Get<strong>Map</strong><br />

requests:<br />

WMS version 1.3:<br />

http://localhost:8080/rest/Enterprise<strong>Map</strong>ping/WMS?VERSION=1.3.0&SERVICE=WMS&RE-<br />

QUEST=Get<strong>Map</strong><br />

&CRS=EPSG:4326&BBOX=-100,0,90,100&WIDTH=400&HEIGHT=300&Layers=World&STYLES=AreaStyle<br />

&FORMAT=image/png<br />

WMS version 1.1.1:<br />

http://localhost:8080/rest/Enterprise<strong>Map</strong>ping/WMS?VERSION=1.1.1&SERVICE=WMS&RE-<br />

QUEST=Get<strong>Map</strong><br />

&SRS=EPSG:4326&BBOX=-100,0,90,100&WIDTH=400&HEIGHT=300&Layers=World&STYLES=AreaStyle<br />

&FORMAT=image/png<br />

Note:<br />

Sample Response<br />

24<br />

The code above should all be on a single line with no breaks. Due to space limitations, we cannot<br />

display the request in such a way in this document.<br />

After a successful Get<strong>Map</strong> request, the service returns a Get<strong>Map</strong> response that is an image of the map<br />

specified by the parameters in the request. The following is the response to the above request:<br />

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> 1.0


Getting Information About <strong>Map</strong> Features<br />

Once a Get<strong>Map</strong> request has been successfully completed the user may want further information about<br />

the features included in the map. Use the GetFeatureInfo request to get this further information from a<br />

server. A GetFeatureInfo request returns information regarding the layers in the map and the queryable<br />

attributes of each layer. This operation is optional. If GetFeatureInfo is employed, it must be issued after<br />

a Get<strong>Map</strong> request is sent, as the X/Y pixel coordinate of a point on that map is a required input of a<br />

GetFeatureInfo request. Refer to the <strong>Web</strong> <strong>Map</strong>ping <strong>Service</strong> OGC Specification for more information<br />

about this capability (http://www.opengeospatial.org/standards/).<br />

Inputs and Behaviors<br />

The following table lists the possible GetFeatureInfo request inputs.<br />

Input<br />

VERSION=version<br />

REQUEST=GetFeatureInfo<br />

<br />

QUERY_LAYERS=layer_list<br />

Required<br />

Yes<br />

Yes<br />

Yes<br />

Yes<br />

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> <strong>Web</strong> <strong>Map</strong> <strong>Service</strong><br />

Description<br />

Chapter 3: <strong>Web</strong> <strong>Map</strong> <strong>Service</strong> Capabilities<br />

Request version. <strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> WMS supports both<br />

version 1.1.1 and 1.3.0 of the OGC specification.<br />

Request name. For a GetFeatureInfo request this is always<br />

GetFeatureInfo.<br />

Partial copy of the Get<strong>Map</strong> request parameters that generated<br />

the map for which information is desired. The spatial reference<br />

system, bounding box, width, height, and layers of the Get<strong>Map</strong><br />

request are required parameters. See the sample request<br />

below.<br />

Comma-separated list of one or more layers to be queried.<br />

You do not need to include every layer included in the initial<br />

Get<strong>Map</strong> request.<br />

25


Output<br />

Input<br />

INFO_FORMAT=output_format<br />

FEATURE_COUNT=number<br />

X=pixel_column<br />

Y=pixel_row<br />

I=pixel_column<br />

J=pixel_row<br />

Required<br />

No<br />

No<br />

Yes for<br />

1.1.1<br />

Yes for<br />

1.1.1<br />

Yes for<br />

1.3.0<br />

Yes for<br />

1.3.0<br />

Description<br />

Return format of feature information (MIME type).<br />

The maximum number of features about which to return information.<br />

X-coordinate in pixels of feature (measured from the upper<br />

left corner which is 0).This parameter is only used for 1.1.1<br />

versions of the OGC specification.<br />

Y-coordinate in pixels of feature (measured from the upper<br />

left corner which is 0).This parameter is only used for 1.1.1<br />

versions of the OGC specification.<br />

I-coordinate in pixels of feature (measured from the upper left<br />

corner which is 0).This parameter is only used for 1.3.0 versions<br />

of the OGC specification.<br />

J-coordinate in pixels of feature (measured from the upper<br />

left corner which is 0).This parameter is only used for 1.3.0<br />

versions of the OGC specification.<br />

The request parameters are always sent as an HTTP query string. The following are sample GetFeature-<br />

Info requests:<br />

WMS version 1.3:<br />

http://localhost:8080/rest/Enterprise<strong>Map</strong>ping/WMS/?VERSION=1.1.1&SERVICE=WMS&RE-<br />

QUEST=GetFeatureInfo<br />

&SRS=EPSG:4326&BBOX=-100,0,90,100&WIDTH=400&HEIGHT=300&LAYERS=World&QUERY_LAY-<br />

ERS=World&X=1&Y=1<br />

WMS version 1.1.1:<br />

http://localhost:8080/rest/Enterprise<strong>Map</strong>ping/WMS/?VERSION=1.3.0&SERVICE=WMS&RE-<br />

QUEST=GetFeatureInfo<br />

&CRS=EPSG:4326&BBOX=-100,0,90,100&WIDTH=400&HEIGHT=300&LAYERS=World&QUERY_LAY-<br />

ERS=World&I=1&J=1<br />

Note:<br />

Output<br />

26<br />

The code above should all be on a single line with no breaks. Due to space limitations, we cannot<br />

display the request in such a way in this document.<br />

After a successful GetFeatureInfo request, the service returns a GetFeatureInfo response. A GetFeature-<br />

Info response is an XML file. The returned file includes information about the layers in the map, the<br />

queryable attributes of those layers, and the bounding box and SRS information of the map.<br />

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> 1.0


<strong>Web</strong> <strong>Map</strong> <strong>Service</strong><br />

Fundamentals<br />

The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed,<br />

collaborative, hypermedia information systems. The <strong>Web</strong> <strong>Map</strong> <strong>Service</strong> uses<br />

HTTP for the transfer of information. Specifically two methods are used. They are<br />

described in detail in this section.<br />

In this section:<br />

• WMS <strong>Server</strong> Technology . . . . . . . . . . . . . . . . . . . . . . . . . .28<br />

• HTTP GET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28<br />

• Basic Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28<br />

• Layers and Styles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29<br />

4


WMS <strong>Server</strong> Technology<br />

WMS <strong>Server</strong> Technology<br />

The WMS server functions using the HTTP GET method. For a full discussion of HTTP and its methods,<br />

refer to the Internet Engineering Task Force HTTP specification (www.ietf.org).<br />

HTTP GET<br />

The GET method retrieves whatever information (in the form of an entity) is identified by the Request-<br />

URI. If the Request-URI refers to a data-producing process, it is the produced data that is returned as<br />

the entity in the response and not the source text of the process, unless that text happens to be the<br />

output of the process.<br />

For the <strong>Web</strong> <strong>Map</strong> <strong>Service</strong>, the GET method is used to retrieve entire images from whatever server is<br />

being accessed.<br />

Basic Authentication<br />

28<br />

Usually a <strong>Web</strong> <strong>Map</strong> <strong>Service</strong> is open to the general public and needs no authentication. From time to<br />

time, a server may limit access to only authorized users. <strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> allows you to access<br />

WMS servers that use HTTP Basic Authentication. When defining a WMS layer, you can add a username<br />

and password to your Connection URL. The format of the HTTP URL is:<br />

wms:http://:@<br />

For example:<br />

wms:http://admin:admin@localhost:8008/rest/Enterprise<strong>Map</strong>ping/WMS?<br />

If you do not want to include IDs or passwords in a WMS request query, you have the option to set authentication<br />

in your client by including additional information in the HTTP header on the <strong>Web</strong> page. The<br />

following is a sample HTTP header that includes basic authorization information:<br />

GET /rest/Enterprise<strong>Map</strong>ping/WMS?SERVICE=WMS&REQUEST=GetCapabilities HTTP/1.1<br />

Authorization: BASIC YWRtaW46aDdhU1ZEd2o3RVd5a1gzRUhNbW5Pdz09<br />

User-Agent: Java/1.4.1<br />

Host: 127.0.0.1:8080<br />

Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2<br />

Connection: keep-alive<br />

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> 1.0


Layers and Styles<br />

The images rendered can be made of layers that are hierarchical—an image can be served that is made<br />

up of a layer that is a collection of other layers. Since WMS renders layers, the characteristics that<br />

modify the view of layers, such as styles and coordinate systems, can also be included in the layers<br />

provided. This lets you customize images because each image can act as a separate layer within the<br />

client that is accessing these images.<br />

You can find out what map layers are available from a WMS server by submitting a GetCapabilities request<br />

and examining the GetCapabilities.xml file returned in the response. (Refer to Getting <strong>Service</strong>level<br />

Metadata About a WMS on page 20 for more information.)<br />

<strong><strong>Map</strong>Info</strong> <strong>Spatial</strong> <strong>Server</strong> <strong>Web</strong> <strong>Map</strong> <strong>Service</strong><br />

Chapter 4: <strong>Web</strong> <strong>Map</strong> <strong>Service</strong> Fundamentals<br />

29

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!