12.2. What Do Web Services for Mapping Do?

 < Day Day Up > 

Mapping web services has been developed independently of the Web. They use similar approaches and follow some common communication protocols, but the web services for mapping are maintained independent of web services in general.

Web services for mapping are the future of web mapping. Computing and network resources have reached the level of sophistication to make this possible. As data sources continue to expand, the demand to have access to them increases. Meeting this demand will only be possible using mapping web services.

Web services for mapping essentially fill two roles: accessing remote data sources as a consumer and serving up or sharing data as a provider for others. Web services for mapping are all about sharing information.

Accessing remote data sources requires some specific knowledge about the data source. Particulars may include the server address to connect to, the data layers available, or the format the data can be sent to you in. Once you know the details, you can set up your application to request exactly what you want. MapServer will add in its own pieces of information to each request so you get something logical back on a map.

Sharing (a.k.a. publishing) your own data is relatively easy to do. A few additions to your application will allow others to query it for such things as available layers and data format options. Once you've made a few modifications to your map file, other users can add your layers to their applications.

Web services for mapping don't require you to know a bunch of details about how requests are made or sent. MapServer will take care of the guts of the operation for you, such as sending HTTP or XML-based requests and receiving responses and data. You usually won't have to read XML when using these services. However, you might occasionally need to review an XML-based document to learn more about a service.

The examples in this chapter walk you through the steps of building your own request manually. You can then incorporate this technology into your own applications. If you are just planning to have MapServer broker requests to a WMS server, then you won't need to pay as much attention to the manual examples.


Just as telephones or CD players use common methods for sending or receiving information, so do mapping web services. Therefore, other products or applications can work together as long as they use the common standards or protocols.

12.2.1. Why Use These Services?

There are various reasons for sharing and accessing map data using web services. A government or large corporation may make map data available so that other divisions or departments don't need to store their data locally. Consider the cost savings often touted for centralizing data storage. If data is centralized, the users still need to access it. Web services for mapping make the data available.

Perhaps someone is willing to share data with you but can't allow you to have a complete copy, for whatever reason. A web service can facilitate that. Some map data, such as hurricane locations, is constantly changing. Downloading that data might not be possible or timely. Integrating a layer in your map that accesses a web service in realtime might be the answer. Some data repositories are so large that it would be unrealistic to copy them to your location. Web services can make that data available for you at the time you need it. This helps reduce the need for continual data storage upgrades. Figure 12-1 illustrates the basic function of a MapServer application accessing remote data through a web services request.

Whether sharing or accessing, it is all about making the most of our time and resources. Continually changing an application to point to new data can be inefficient. Storing large amounts of data locally may also be an unreasonable option.

12.2.2. Internal Versus External Needs

Some service providers sharing data will never use the information internally. For example, think of a government agency that makes mapping data available to the public. The public benefits by having free and open access to mapping information. The government benefits by successfully fulfilling their mandate. Providing web services for mapping data can require a serious commitment to openness and support for clients.

On the other end of the spectrum, a company might share data internally and never share it with the public. Web services don't require that the data be publicly accessible. Services can be securely guarded like any other web page or internal application. Large corporations may use services internally to make data broadly accessible

Figure 12-1. MapServer requesting map data from a remote web server


without having to maintain redundant hardware infrastructures across divisions. This can be a cost-reduction measure, but it can also improve service to users. Users need two things: access to information and access to information in the right format. The benefit of mapping services is that a data source can be made available, and how the data sources are formatted or presented can be managed as well.

Both internal and external needs scenarios can be handled equally well through web services for mapping with MapServer.

     < Day Day Up > 


    Web Mapping
    Web Mapping Illustrated: Using Open Source GIS Toolkits
    ISBN: 0596008651
    EAN: 2147483647
    Year: 2005
    Pages: 138

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net