You are on page 1of 4

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/260319036

An Open Source Approach to Build a Web GIS Application

Article · March 2014

CITATIONS READS

6 4,694

2 authors:

Harpinder Singh Dheeraj Gambhir


Punjab Remote Sensing Centre Accenture India
77 PUBLICATIONS   143 CITATIONS    16 PUBLICATIONS   9 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

UNDP - TIFAC View project

Creation of Digital Database of Rural Drinking Water Supply Sources (RWSS) in Punjab View project

All content following this page was uploaded by Harpinder Singh on 25 February 2014.

The user has requested enhancement of the downloaded file.


IJCST Vol. 5, Issue 1, Jan - March 2014 ISSN : 0976-8491 (Online) | ISSN : 2229-4333 (Print)

An Open Source Approach to Build a Web GIS Application


1
Harpinder Singh, 2Dheeraj Gambhir
1,2
Punjab Remote Sensing Centre, Ludhiana, Punjab, India

Abstract Raster layers etc.) or services (WFS, WMS), details about the
Deployment of Free and Open Source GIS (Geographic Information query and symbology/styling of the layers, extent and projection
Systems) tools (FOSS-GIS) is increasing day by day. Technical information of the map and reference map details etc.
features provided by FOSS software are comparable to their The basic structure of a map file is as follows:
proprietary peers. There is a variety of open source web GIS MAP
software available on the internet and they differ on parameters like |-LAYER
ease of use, technology, complexity and support etc. In this paper |-CLASS
review of open source software combination of MapServer and |-STYLE
pmapper has been done. A reader working on Windows platform, Objects like MAP, LAYER etc have various parameters to define
with no prior technical web GIS and programming skills can use the desired property e.g. EXTENT to define the bounding box of
this simple and easy to use software combination to build a web the map. The location of the map file is included in the pmapper’s
GIS application within a short period of time. configuration file.
The Mapfile can be created manually in a text editor or can be
Keywords automatically generated with the help of “MapServer Export”
MapServer, pmapper, Web GIS plugin of Quantum GIS.
Combination of Mapserver and pmapper has been used worldwide
I. Introduction to create various web GIS projects. [5] has used this combination
Today, World Wide Web is a popular medium for the distribution to develop a collaborative system for environment and tourism
and online processing of geo-spatial data. Open Source Web information authoring and Web publishing. Steps to publish health
GIS software systems have matured over time and provide the maps on the internet using MapServer have been defined in [6].
functionality, elegance, strength and user friendliness equivalent to Ground water quality maps [7] have been published using these
that of proprietary Web GIS products. There are many technologies open software for bringing the generated ground water quality
and open source software (Server and Clients) to create a Web maps to the authority and or the community and to alert the local
GIS application like Geoserver, Geomoose, degree, MapServer, community about the steps to be taken about the contaminated
MapBuilder, MapFish, OpenLayers etc. This paper reviews water and decision making. [8] & [9] has used MapServer for
MapServer and pmapper software to create a simple web GIS natural resources management. Details about the design and
application. Below given is a brief description of the software/ implementation of spatially explicit online decision support
technologies used: systems for disaster management has been provided by [10], it
also uses free or open source GIS tools.
A. MapServer
It is an open source platform to publish spatial data and interactive II. Objective
mapping applications to the internet [1]. Originally developed by The objective of this review paper is to provide methodology
University of Minnesota, it runs on Windows, Linux and Mac OS. to develop a web GIS application using open source tools. The
MapServer features MapScript, a scripting environment, which resultant application has features like pan, zoom, identity, query etc.
makes it easy to build intricate Web GIS applications. It supports The software reviewed in this paper are MapServer and pmapper. A
many languages like, Java, PHP, C#, Python and Perl. According reader working on Windows platform, with no technical web GIS
to [2] MapServer is a high-performance, interoperable and open and programming skills can follow the step-by-step instructions
source web mapping and geo-spatial analysis system. to develop a web GIS application.
MS4W package can be used for easy installation of MapServer
on Windows platforms. MS4W package installs a preconfigured III. Tools & Methodology
Web Server environment that includes components like: Apache The various tools required are:
HTTP Server, PHP, MapServer CGI, Map script, GDAL/OGR Server Side, Development and other: MS4W 3.1.0 (MapServer
and other utilities [3]. There are various applications which have 4 Windows) which contain the packages : Apache 2.2.24 HTTP
been packaged for MS4W like Chameleon, Fusion, pmapper, server, PHP 5.4.14, Map Server CGI 6.2.1 etc, pmapper 4.3.2.,
GeoMoose, kaMap etc. Quantum GIS 1.7.3 and Notepad++.
Client Side: Simple Browser
B. pmapper The methodology for creation of the web application is as
This framework is based on MapServer and PHP/MapScript follows:
and is used to create the graphical user interface (GUI) of the 1. Download the MS4W zip archive file and extract the contents to
application. It offers broad functionalities like pan, zoom, identify, the root of the drive , if successful a folder ms4w will be created
search, select, distance/area measurement and various ready to e.g. C:\ms4w
use plugins. It uses HTML, CSS, Javascript, PHP and XML [4]. 2. Double click on C:\ms4w\apache-install.bat to install the Apache
web server. Open the link http://localhost/ or http://127.0.0.1/ on
C. Mapfile your browser, if the MS4W page (Fig. 1) opens then the package
Mapfile is the core of MapServer. It helps MapServer to locate has installed properly. Note: for Windows 7 and higher use the
the data, style it and create relationship between various map option “Run as Administrator” during installation.
objects. It contains links to the data layers (Shapefile, PostGIS,

50 International Journal of Computer Science And Technology w w w. i j c s t. c o m


ISSN : 0976-8491 (Online) | ISSN : 2229-4333 (Print) IJCST Vol. 5, Issue 1, Jan - March 2014

layers, the desired layers will be shown in the map window.

IV. Discussions
In this application pmapper has been used to create the GUI in
which the map images created by MapServer are displayed on
each pan, zoom, query etc events. pmapper has various plugins
and configuration options to enhance the application but only
the basic configurations and plugins has been used in this paper
for the development of the web GIS e.g. there is a plugin to add
a advance query editor and configuration settings to modify the
GUI also.
Shapefiles have been used in this application but PostGIS database
layers can also be used.
Since the software is open source, the core pmapper framework
can be used by the software developers to build complex web
GIS applications.

Fig. 1: MS4W Home Page

3. Download the pmapper zip archive file and extract its content
to the root of the drive where ms4w folder is located. Open the
link http://localhost/ and check if the pmapper has been listed in
the applications in MS4W page.
4. Click on the “p.mapper: start demo application” to check if
the demo application (Fig. 2) is running. Else, restart the Apache
server by running the batch file C:\ms4w\apache-rerstart.bat
5. To start the development of the web GIS application, copy all
the shapefiles related to the project in the folder C:\ms4w\apps\
pmapper\pmapper_demodata.
6. Creation of a Map file: Open Quantum GIS (QGIS). Add a
plugin “MapServer Export”. Add the shapefile to QGIS, symbolize Fig. 2: Pmapper Demo Application
, add categories and labels etc. and save the project. Use the
Mapserver Export plugin to convert the QGIS project to a map References
file which will be used by pmapper. Open the file in Notepad++ [1] [Online] Available: http://www.mapserver.org/
editor and check the generated map file for the projection, extent [2] R. R. Vatsavai, S. Shekhar, T. E. Burk, S. Lime,“Umn-
and the shapefile layers information. mapserver: A high-performance, interoperable, and open
7. Copy the map file to the path C:\ms4w\apps\pmapper\pmapper- source web mapping and geo-spatial analysis system”,
4.3.2\ config \ default as pmapper_demo.map Geographic Information Science, pp. 400-417, 2006.
8. Check and edit the file config_default.xml which is the main [3] [Online] Available: http://www.maptools.org/ms4w/
configuration file of the application. It is present in the folder, [4] [Online] Available: http://www.pmapper.net/
C:\ms4w\apps\pmapper\pmapper-4.3.2\ config. It contains the [5] B. R. Barricelli, N. Maiellaro, M. Padula, P. L. Scala,
information about: “A collaborative system for environment and tourism
• List of plugins. information authoring and Web publishing: An institutional
• Map file to be used. case study”, In Internet and Web Applications and Services,
• Categories of the layers to be added. 2008. ICIW’08. Third International Conference on, 2008,
• User Interface settings pp. 279-282.
• Export plugin formats. [6] M. N. Boulos, K. Honda,“Web GIS in practice IV: publishing
• Search item settings your health maps and connecting to remote WMS sources
• Print formats using the Open Source UMN MapServer and DM Solutions
• Query settings etc. MapLab”, International Journal of Health Geographics, Vol.
For the current objective only the Categories of the layers and 5, pp. 6, 2006.
the Search sections need to be edited to include the name of the [7] A. K. Das, P. Prakash, C. Sandilya, S. Subhani, “Development
layers referred in the mapfile and the attributes on which search of Web-Based Application for Generating and Publishing
need to be performed. Groundwater Quality Maps Using RS/GIS Technology and
9. Check and edit the file js_config.php located in the folder C:\ P. Mapper in Sattenapalle, Mandal, Guntur District, Andhra
ms4w\ pps\ mapper\ mapper-4.3.2\config\default. It contains Pradesh”, In ICT and Critical Infrastructure: Proceedings of
information about: scale levels, query layouts, measuring units, the 48th Annual Convention of Computer Society of India,
layout of the toolbar and tool elements etc. Vol. 2, 2014, pp. 679-686.
10. For the current objective, it need not be edited. [8] L. Kooistra, A. Bergsma, B. Chuma, S. De Bruin,
Test the application by running the link http://localhost/pmapper/ “Development of a dynamic web mapping service for
map_default.phtml, on the browser. Now instead of the demo vegetation productivity using earth observation and in situ

w w w. i j c s t. c o m International Journal of Computer Science And Technology   51


IJCST Vol. 5, Issue 1, Jan - March 2014 ISSN : 0976-8491 (Online) | ISSN : 2229-4333 (Print)

sensors in a sensor web based approach”, Sensors, Vol. 9,


pp. 2371-2388, 2009.
[9] Z. Zang, J.-N. Shi, L. Zhao, Y.-X. Xu,“Map Publication
and Query System of Wetland with MapServer: A Case of
Wetland of Dongting Lake”, Wetland Science, Vol. 6, pp.
473-478, 2008.
[10] V. G. García, H. L. Perotto-Baldivieso, S. Hallett,“A prototype
design for a Web-GIS disaster support system: The Bolivia
Amazon case study”, 2010.

52 International Journal of Computer Science And Technology w w w. i j c s t. c o m

View publication stats

You might also like