CU Map Server: An implementation of OGC WMS


Dr Sanphet Chunithipaisan
LecturerDepartment of Survey Engineering
Faculty of EngineeringChulalongkorn University Bangkok, 10330,
Thailand
E-mail: Sanphet.C@chula.ac.th




Abstract
Open Geospatial Consortium is one of the organizations developing the geospatial standards and specifications to enhance the data interoperability. OGC WMS is an implementation interface specification that aid data sharing and data distribution. It has been widely accepted and implemented in several commercial/free GIS software. This paper reports the development of CU map server which implements the OGC WMS implementation specification in order to obtain the know-how for building map server and construct map server which is flexible and extensible for use in education and research. This paper describes OGC WMS and related technologies on developing the CU map server. The features of CU map server will be given. Tested results and the examples of applications are presented.

1. Introduction
Data interoperability is a major issue among geospatial community in last few years. As most organizations already have complete geospatial datasets together with the age of globalization and information technology (IT), data sharing and dissemination are major requirements for several organizations. Most departments/organizations are aware of the benefit of the data sharing and dissemination using the advantages of internet/intranet. Many interoperable geospatial standards and specifications have been actively developed by several organizations. The most prominent of these being the Open Geospatial Consortium (OGC) (formerly the Open GIS Consortium) which has developed and put forward a number of specifications and standards, aimed at promoting data sharing and dissemination amongst the geospatial information (GI) community. One of specifications which most GI people accept and implement is Web Map Service (WMS) specification [2]. All major GIS vendors have implemented OGC WMS in their solution. However, most of them also set their proprietary interface beyond the OGC WMS and deliberately promote such interface. As such, integrating data across map servers is still hindered and not straightforward. Moreover the cost of commercial internet map server (IMS) solution is also extremely high.

Thailand is one of many countries that use and import GIS technologies which cost multi millions a year. Many organizations who maintain GI already have digital data sets which are ready to be distributed. Currently several organizations have allocated budgets for building a distributed GI system for widely disseminating GI to many various sectors, and sharing data between agencies/organizations. This is obviously seen after Tsunami disaster that huge amount of various maps and GI has been deployed from many agencies. This is the main mechanism that enforce government agencies have to build the distributed GI system for data dissemination and sharing. Such system has been recognized as a powerful mechanism that distributes mapping information widely. Map server is generally acknowledged from GI community in it's capability to deploy mapping information in the picture form for visualization. OGC WMS is the specification that is widely accepted among GI community and generally implemented by commercial/free GIS software.

This paper reports the research on the development of CU Map Server which is the map server complying with the OGC WMS specification. The paper starts with the aims and objectives of the research. A brief of research methodology is given. The OGC WMS is outlined. The related technologies and tested results are presented with the examples of application using the CU map server. Finally conclusion and future work are drawn.

2. Aims and Objectives
The aim of this research is to develop the CU map server which conforms to OGC WMS to provide general basic functionalities for GI distribution. The objectives can be given as follows.
  • To study the OGC WMS specification.
  • To investigate the current open standards, protocols and technologies capable of developing the WMS system.
  • To implement OGC WMS for map server to disseminate GI online.
  • To develop the tools set which is open and extensible for building the CU map server.
  • To get the know-how for developing the GI system.

3. Methodologies
This research first studied the OGC WMS. The current open technologies e.g. XML, web server and programming language, as well as existing open GIS tools were investigated, adopted and adapted in developing the CU map server. XML was used for configuration documents. Java technology was chosen for developing such server. An open GIS tool, namely, JavGIS was used as the main engine to carry out the map making process which is taken place in the server side.

4. OGC WMS
OGC WMS is the implementation interface specifications providing guidelines for web map server with the specifications of HTTP contents and URI (Universal Resource Identifiers) communication syntax [3]. The OGC WMS specification focuses on identifying the syntax and semantics contents of the URI for map server. This allows users to send a request in the form of Uniform Resource Locators (URL) to map server and get the result back in a certain figure. The OGC WMS defines three main interfaces for services that should be available from map server:
  • GetCapabilities: returns the metadata of the service that is available
  • GetMap: returns an image of a map according to the user request
  • GetFeatureInfo: returns the information of feature at a query location

The GetCapabilities and GetMap are mandatory operations defined in OGC WMS, whilst the GetFeatureInfo is an optional operation. The specification uses HTTP protocol for the communication approach by identifying query string parameters for drawing a request statement. The following examples show the query string parameters encoded in the URL for three operations respectively.

GetCapabilities-http://hostname/wms?SERVICE=WMS&REQUEST=GetCapabilities
GetMap-http://hostname/wms?SERVICE=WMS&REQUEST=GetMap&LAYERS=admin,road&BBOX=123093, 550000,253211,780000&WIDTH=300&HEIGHT=400
GetFeatureInfo-http://hostname/wms?SERVICE=WMS&REQUEST=GetFeatureInfo&QUERY_LAYERS=admin&BBOX= 123093,555000,253211,780000&WIDTH=300& HEIGHT=400&I=100&J=66

XML is recommended for the output format of the GetCapabilities and GetFeatureInfo operations. GetMap operation returns the output in pictorial format e.g. PNG, JPEG, or vector-based graphic elements in Scaleable Vector Graphics (SVG) or Web Computer Graphics Metafile (WebCGM) formats.

5. JavGIS Open source GIS tool

JavGIS is an open source Java GIS toolkit for developing GIS solutions. It provides several packages and classes for dealing with the GIS components and processing. Some of the main packages which are adopted to develop the CU map server include:
  • [db] - contains classes to handle the real world features properties and processing e.g. metadata, attributes, feature query and rendering.
  • [geom.] - is composed of several classes for dealing with the geometry objects which comply the simple feature geometry [1] .
  • [gisdata] - provides tools for reading external GIS data set which currently supports Shapefile, GML and MySQL.
  • [ogc] - supplies classes to support the objects which are used in OGC web service e.g. serviced layers, service metadata.
There are also additional packages which are provided in JavGIS such as the package to cope with the image and GUI.

6. CU Map Server
CU map server is developed using Java servlet technology which is capable of getting client user request and sending back the document through HTTP protocol. The CU map server is powered by the JavGIS which provides several tools for dealing with the services and geospatial processing. The working system of CU Map server is shown in figure 1.



Figure 1. The working system of the CU map server


The service information of the CU map server is configured through configuration file which is encoded as value pair as shown in figure 2.



Figure 2. The CU map server configuration file


The configuration file gives a link to a document, called project file, which identifies which layers to be served through the CU map server. The project file is encoded in XML as shown in figure 3.



Figure 3. The XML encoding for serviced layers


The project file contains the information of layers to be serviced. The details of serviced layers can be encoded in whether project file or another. Figure 4 show encoding the details of serviced layer and rendering information.



Figure 4. The encoding of layer and rendering information


7. The supported OGC WMS operations and CU Map Server features
The CU map server was designed to conform to OGC WMS. It supports three main WMS operations: GetCapabilities, GetMap and GetFeatureInfo. The OGC WMS query string parameters which are implemented in the CU map server are listed below.





The CU map server supports vector data (Shapefile) and raster data (JPEG, GIF and PNG). The output image format generated by GetMap request is PNG. The output format from GetCapabilities request is in XML format. GetFeatureInfo request can returns output in XML or HTML format.

8. Testing Service
The following figures show the results from the CU map server.



Figure 5. (a) GetCapabilities and (b) GetMap




Figure 6. GetFeatureInfo (a) default format, (b) html


9. Web GIS Applications using CU Map Server
A simple Web GIS application which uses the CU map server is a Thailand map viewer at http://161.200.86.141/cuviewer1/ which is shown in figure 7. This application shows the capabilities of OGC WMS specification to get the information of the map service through GetCapabilities, GetMap and GetFeatureInfo.



Figure 7. A map viewer


Another application using the CU map server is a clearinghouse application for checking availability of Tsunami data set for use in Tsunami projects in Chulalongkorn University (http://tsunami.chula.ac.th/search/ ) which is shown in figure 8. The CU map server was used for providing map for graphically identifying location to search data available in selected area.



Figure 8. Clearinghouse application


As CU map server was developed by using JavGIS for back-end engine, it is therefore flexible and extensible to customize map server for specific purposes. Figure 9 shows the Web GIS application of CORE Mapping Project which presents the information of HIV/AIDS programs surveyed and collected by CARE organization. The map server used with the application extended the CU map server in order to simplify the protocol interface and GIS data management which have to associate with external relational database.



Figure 9. Web GIS application of CORE Mapping Project


10. Conclusion and Future Work
This paper has presented the development of CU map server which implements the OGC WMS implementation specification. The CU map server supports three OGC WMS operations: GetCapabilities, GetMap and GetFeatureInfo. This research has achieved the aims and objectives to learn the OGC WMS specification and, most importantly, to get the know-how for building the map server using current open standards and technologies. Future work will focus on extending the CU map server to support more features specified in the OGC WMS, e.g. style, transformation. The CU map server is used for education and research in Chulalongkorn University. The web site of CU map server is avaliable at http://www.sv.eng.chula.ac.th/cuwms/.

References
  1. Open Geospatial Consortium (OGC) (2001), The OpenGIS Abstract Specification - Topic 1: Feature Geometry
  2. Open Geospatial Consortium (OGC) (2004), Geographic information - Web map server interface
  3. Peng, Z. R. and Tsou, M. H. (2003) Internet GIS, John Wiley & Sons, inc.




Page 1 of 1