Technology Update

Bringing GIS to Mainstream IT through Service Oriented GIS

Information and Communications Technologies (ICTs) are playing an increasingly vital role in the daily activities of Government departments, revolutionizing work culture, promising to enhance the delivery of good, essential services to citizens by improving the process and management of Government. Importance of GIS and its potential are also being realized across Government departments.

The restrictions being imposed on map data are not so encouraging because the GIS datasets cannot be distributed across easily for various reasons. Further, the software cost, technology related issues and dedicated GIS resources and time in each and every department for implementing the technology are the challenges blocking the growth of the GIS community.

By conventional method, to depict tabular data in a map form, the typical requirements would be a GIS server, GIS database with appropriate data loaded in each application’s database server, apart from the attribute data itself and necessary scripts that could interact with all these components to generate maps on the fly. However, by adopting open standards and services based architecture, GIS databases could be distributed geographically, but opened and federated through GIS services while applications themselves could be run geographically anywhere else, in any platform, using any technology.

Individual applications could consume these services, query, filter and apply styles appropriately for depiction locally, based on their application data and make the integration happen seamlessly.

STANDARDS SPECIFICATIONS FOR GIS WEB SERVICES / OPENGIS STANDARDS

Open standards promote interoperability of systems, and Open Geospatial Consortium (OGC) is the group that specifies the development and implementation of open standards for geospatial content and services, GIS data processing and data sharing. The specifications for GIS based services are laid out by OGC and adhered by different vendors including open source developers.

The Web Map Server (WMS) is the most promising services for amalgamation of GIS into IT services. WMS renders the map as a standard image format (PNG, GIF, JPG, SVG, etc.) to the client, by adopting the default style or any application supplied style. Through WMS, Service level metadata, map - whose geographic dimensional parameters are well defined and information about particular features could be returned.

The styling of WMS map presentation is defined by an XML document called the Styled Layer Descriptor (SLD) and fed through URL. Any application could create SLD on the fly, based on its own database, stream it to the WMS Server and thus could control the visual portrayal of any geospatial data.

USAGE OF THESE OPENGIS STANDARDS WOULD ENSURE THE FOLLOWING ADVANTAGES:

  • The client could be any desktop GIS software or any browser based application
  • Can consume / overlay local layers or geospatial data from one or more servers and visualize / query / analyse
  • Query these data with reference to the spatial or attribute data
  • Ensure interoperability among software / application / tools, by adopting open standards.

SOFTWARE

Almost all major vendors dealing with proprietary software provide OGC services support. The following lists server and client software in the open source arena with various levels of implementation:

Servers:

  • UMN MapServer
  • Deegree
  • GeoServer
  • MapGuide Open Source

Clients:

  • Desktop GIS tools like GRASS, uDig, QGIS, OpenJump, gvSig, etc.
  • OpenLayers (Simple JavaScript interface for Web applications)

USE OF SLD FOR THEMATIC MAPPING THROUGH A GENERIC SYSTEM

SLD could be used to draw simple choropleth maps, for example: colour all the roads (line) features as 4 pixel line in red for National Highways, 3 pixel line in blue for State Highways, and other roads in green; Colour all districts (polygons) red which are having sex ratio less than 800, orange for those between 800 and 1000 and green for others, etc. Proportional Symbols / graduated symbol maps could be generated for point features where the individual symbol’s size and colours could be applied depending upon the value of attribute. Symbols themselves could be a dynamic image retrievable through a valid URL. Bivariate symbols with a mix of the fill colour and varied symbol size could also be generated.

Fig. 1: Interactions of different components of the
generic system

Fig. 1: Interactions of different components of the generic system

A generic interface has been designed and developed by NIC Chennai using completely open source software stack, to create dynamic thematic / choropleth maps for use in any platform, from any technology. By reading the XML data generated by individual applications on the fly, using any technology, SLD is generated dynamically and the map rendered using the WMS layer.

ARCHITECTURE USED FOR THE GENERIC GIS INTERFACE

This service oriented application gives us the freedom of platform independent deployment and the advantage of distributed environment. The attribute and spatial components collaborate over XML technologies from different servers.

The set of processes for generic GIS interface has been planned as given below:

  • At the application server side, individual applications generate attribute XML for thematic representation using any technology;
  • Dynamic SLD generation using PHP technology and
  • The WMS server that hosts the spatial datasets interprets the SLD and renders map images.
  • Here, the last two process could probably be out of the same server or be distributed too. The process flow is given in fig. 2.

    fig.2: Rrocess flow on getting XMl request from Application
    fig.2: Rrocess flow on getting XMl request from Application

  • Application Server: The Application server has to create the XML Attribute file for the attributes to be thematically represented in the maps, in a pre-designed format, and this could be using any technology viz. ASP, ASP.NET, PHP, JSP, etc. This could also initiate a map request through this Attribute XML file whose URL is passed onto SLD generation process server.

The attribute XML is required to be in a specific format that provides the following parameters: which layer is to be displayed, column to link in WMS (that is, linking column between spatial and attribute), column to use for labeling maps, symbology type (default - Equal interval), range (default - 5), filters to apply, if any (both the column name and value pair for filter) and title. Also, the code-value pairs for the administrative units / features chosen are to be provided in the XML file. The administrative / feature codes need to be unique. It is also possible to provide a drill down effect on the thematic map to traverse down to the hierarchically next level maps. For this, necessary parameter could be set to appropriate URL of the XML file that would generate thematic map at the required map level.

SLD generation: The SLD generation / GIS Server reads the attribute XML file on the fly, for the parameters necessary and the code-value pairs and generates Styled Layer Descriptor (SLD), through PHP scripting.

Based on the request, the attribute XML data is classified (equal interval, equal count and custom ranges are currently possible) for the codevalue pairs in the XML data. SLD file identifies the correct symbolizer to use, for the selected layer, to apply different styles / colours over different features. This SLD file gets stored temporarily on the Server. The layer request to the WMS server has this SLD file link as one of the parameters in the URL. Passing the SLD file link as a URL makes it possible to separate the SLD generation server and the actual WMS server that applies the style and renders the image on the client as an image viz. jpeg, gif or png.

WMS Server: WMS Server hosts the spatial data as geospatial services. The SLD=http://someserver /sld.xml parameter in the request URL applies the styles on the fly.

ADMINISTRATIVE CODES / FEATURE CODES

Generally, Census 2001 codes have been used in the administrative layers. It is possible to link the layers with other codes also. For this, necessary codes need to be added in the GIS layer first. For example, if Revenue codes need to be used for Tamil Nadu District layer, these codes need to be included in the layer and then the newly added column could be used for linking spatial and the attributes.

Salient Features in the generic interface.

  • Customizable for layer selection, linkable column selection, filtering for a column name-value pair and label column selection.
  • User selectable Number of ranges, classification type like Equal Interval / Equal Count / custom ranges, colours and title through parameters. The thematic parameter could be either integer or floating values.
  • Drill down map hierarchically by enabling clickable map through appropriate URL in the XML parameters.
  • Has RIA interface including Accordion interface that could be docked / expanded for Data, Legend, Query Builder and Symbology selection
  • Map panel with Ajax based Zoom in / out, pan, information query, previous / next extents, label on / off, distance and area calculations in the map, etc.
  • Built completely on Open Source software stack

IMPLEMENTATION

The generic model has been implemented for thematic representations in the following department websites in Tamil Nadu State:

Industries Department – Number of Micro, Small and Medium Entrepreneurs applications applied online in Tamil Nadu (PHP)

Revenue Department - Daily / Weekly / Monthly Rainfall Map (ASP)

Rural Development Department - Financial Progress and Physical Progress of Schemes for Rural Development (PHP)

Civil Supplies & Consumer Protection Department - Daily / Weekly / Monthly price of commodities for (JSP)

ADVANTAGES

This architecture overcomes the following drawbacks over usage of GIS interfaces across multiple applications:

  • Sharing the spatial data across the organization / websites for various security reasons by retaining source data at the source itself leading to savings on costs incurred for procuring spatial data.
  • Enables easy administration of maps (as the changes on maps would be required less frequently but to be carried out in only one database)
  • Since the map rendering is Service oriented, the backend technologies do not matter. Interoperability is achieved using XML technologies.
  • Fully compliant with the Open Geospatial Consortium Standards being proposed by the OGC
  • Supports a distributed architecture

ADVANCING TOWARDS FUTURE GIS

This acts as a proof of concept on how a common unified GIS server can provide simple thematic services to n-number of applications, independent of platform and technologies, to start with.

Chennai Utility Mapping
Chennai Utility Mapping

Distributed architecture based on Services would have much wider scope or reach than any regular / conventional GIS website could deliver. This concept could be enhanced to draw graduated symbol maps, charts, etc.

WFS or Web Feature service allows requests for geographical features (and not images) over the web using platform-independent calls. Actual geospatial objects are returned as GML to the client. Creation / Updation / Deletion of features a nd get / query features based on spatial and attribute data could be performed. The OGC Web Processing Service (WPS) Interface Standard provides rules for standardizing how the requests and responses should be, for invoking geospatial processing services, such as creating a buffer around any feature, intersection, union, overlay of spatial entities, etc., through the web service.



MAHALAKSHMI NARAYANAN, Principal Systems Analyst, NIC Tamil Nadu

MAHALAKSHMI NARAYANAN, Principal Systems Analyst, NIC Tamil Nadu
mhln.tn[at]nic[dot]in



Edited by: R. Gayatri