You are on page 1of 32

Final Project Report Submission

An Open Source Web GIS Application


Showing Dynamic Spatial Object by Simulating
Real World Event

Submitted By

Mr. Pravin Chavan.


Ms. Ananya Dutta.
Mr. Hemchandra Pawar.
Under the guidance of
 Mr. I. PRABU
Outline

 Introduction
 Objectives
 Methodology
 Result and Discussion
 Conclusion
 References
Introduction

An attempt to show the dynamic


object by simulating the real world
event such as vehicle moving on
the road by using open source
softwares
This is a server side application.
Objectives

To prepare map layers


To create web pages in HTML & PHP
To create map files
To create simulated database
To display dynamic spatial object
Study Area

The study area is part of Pune city, which lies between


latitude 18.441546N to 18.632791N and longitude 73.697868
E to 73.945611 E.

Nine major bus routes have been chosen for survey. And the
area formed by connecting this stops is taken as study area.
Study Area
Methodology
Identification of Study Area
and layers required for study
Field survey
for collecting Collecting and generation Generation of
Data of the spatial and non- attribute data
Spatial Data spatial data
Preparation
Display of map on web
HTML & PHP
page
Coding

VB Coding Display dynamic object on web Creation of


page database
for Simulation

Testing
Data
Collection
 Data collection : collection of PMT bus route
name & bus stops name.

 Spatial Data Preparation :


 Layers such as bus stops and famous spots near
the bus routes are prepared as a point layer,
 Roads as line layer, and
 Rivers, lakes, boundary as polygon layer.

 KML to GML Conversion:


Use of OGR tools available with the MapServer
Installation of UMN MapServer

OSGeo4W Windows installer downloads and/or


updates UMN MapServer
http://download.osgeo.org/osgeo4w
Hardware Used:
Intel Core 2 Duo Processor, 2 GB RAM, 80 GB HDD,
Monitor, Keyboard and Mouse

Software Environment Used:


UMN Map server, Apache Web Server, KaMap, PostgreSQL,
HTML and PHP language.
Creation of map files:
Basic configuration file for data access and styling for
MapServer.
It is made up of different objects such as
Map Object
LAYER Object
CLASS Object
STYLE Object
MapServer parses mapfiles from top to bottom.
Layers at the end of the mapfile will be drawn last, It Means
they will be displayed on top of other layers
Map files have been prepared as follows:

Map Object:

MAP
NAME VEHI
STATUS ON
EXTENT 362961.8 2039684.8 388789 2060443.7
SYMBOLSET ../etc/symbols.sym
SIZE 1250 750
IMAGECOLOR 100 255 200
END
Layer Object:

LAYER

NAME Roads
CONNECTIONTYPE OGR
CONNECTION "C:/ms4w/apps/test/data/Roads.gml"
STATUS ON
TYPE LINE

CLASS
NAME "Roads"
SYMBOL 3
COLOR 100 0 0
END # symbol
END # class

END # layer
CLASS and STYLE Objects
CLASS
NAME “vehicle"
STYLE
SYMBOL 2
COLOR 255 0 0
SIZE 12
END #style1
END
Creation of web pages:
In order to display the map generated by MapServer, we need to
embed it into web page.
HTML(Hyper Text Markup Language) used for creating web pages.
HTML files are text files that, unlike completely plain text, contain
additional formatting markup—
sequences of characters telling web browsers what parts of text
should be bold, where the headings are, or where tables, table
rows and table cells start and end.
HTML is displayed by a visual web browser, a browser that reads
the text of the page to the user.
PHP is a server side HTML scripting/programming language.

PHP is a tool that lets you create dynamic web pages

PHP-enabled web pages are treated just like regular


HTML pages and we can create and edit them the same
way we normally create regular HTML pages

Login page, home page and page displaying moving vehicle


have been created by using PHP, HTML
Ka-map Customization
It is an open source project that is aimed at
providing JavaScript APIs for developing
highly interactive web-mapping interfaces.

Features:
Interactive, continuous panning without
reloading the page
navigation zooming, panning
Zooming to pre-set scales
Scalebar, legend
Creation of database in
PostgreSQL
Table is created in the PostgreSQL to store user
records for accessing the web GIS application.

When the user logs-in, validation is done at the


server end and access is granted to the user.

Also registering of new users can be done, which will


directly add records to the PostgreSQL users table.
Creation of Database for
simulation

Each route is divided in small line segments


to create the co-ordinate points for simulation.

The GML files of the bus routes have been


converted into the Excle sheet and then
transferred into the MS Access database.
Simulation Application
Developed in Microsoft Visual Basic.

Global variables have been defined to store the X and Y


co-ordinate values.

The co-ordinate values are taken from the MS Access


database and assinged to the above defined variables
by using the Adodc Object.

Timer function is used to move the recordset to next


record.

The Filestream class of Microsoft Scripting Object is


used to replace the co-ordinate values of vehicle in the
GML file by global variables defined earlier.
Displaying dynamic object on
the map

The PHP page is accessed by the client to display


spatial data which is controlled by Map File of
MapServer.

The Map file has the vehicle object in a point layer.

When the simulation application is started in the server,


the client will show the vehicle position.

Timer function running in the Simulation application,


which constantly updates the GML file, the client shows
the vehicle movement in a dynamic style on the Web
page.
Testing
Testing of login page:
Tested for user’s registration and authenticity.

Testing of home page:


Tested for proper functionalities of differnet tools.

Testing of Vehicle display page:


Tested for display of map with dynamic object.
And also for proper functioning of “logout” and
“Home” links.

Tetsing of Simulation system:


Tested for proper functioning of all “start” and
“stop” buttons.
Result and Discussion

Login page: Click


Users can register for this application through this page.
After registration he/she can use the login facility for
further access.

Map of the study area: Click


On this page user can utilize the different tools such as
zoom in, zoom out, pan.

Legend shows the different layers such as road layer, bus


stops layer, river layer.

user can click on “See Vehicle” link to see the dynamic


vehicle.
Simulation system for dynamic object:
Click

Once we click on simulation button


simulation window opens.

Clicking on “start” button start the


movement of vehicles from origin towards
the its destination.

Clicking on the “stop” button disappears


the vehicle movement.
Displaying vehicle as dynamic
object Click

Once user click on the “See Vehicle”


link, user can see this page.

The motion of bus can be seen on web


page, as base layers are stationary and
the coordinates of moving vehicle
changes continuously.
Conclusi
on

This project displays successfully vehicle’s


position in a dynamic style on a simple HTML /
PHP page.

 Use of open source software adds


advantage as it meets the requirements of
projects at a negligible cost.

cont….
This project successfully demonstrated Point
data in dynamic style. In future, line and polygon
data can also be tested for dynamic display in
real time such as …

 movement of carbon monoxide in an area


affected by air pollution,
 movement of radioactive plume near
nuclear reactors,
 movement of water in flood affected areas.
References
Books: Papers and Presentations:
1. PHP Manual By stig saether
Bakken 1. A Feature-Based Vehicle Tracking System
2. Beginning Visual Basics 2005 in Congested Traffic Video Sequences By
By Thearon Willis and Bryan Young-Kee Jung and Yo-Sung Ho
Newsome
3. MapServer manual. 2. Interactive map for web mapping
technology. By Peter Pehani, Marion
Web Sites: Landre and Kristof Ostir
http://en. wikipedia .org/wiki/ 3. Web GIS and its application. By AA.
http://www.osgeo.org Alesheikh, H. Helali, HA. Behroz
http://www.mapserver.org
http://www.opengeospatial.org
http://www.apache.org 4. Vehicle Tracking System: Technologies
http://www.opensource.org and benefits By Srinivas Manda
http://www.pgadmin.org
http://www.gisdevelopment.net 5. GPS based vehicle tracking system By J.
http://ka-map.maptools.org/ Padmanabhan
 
Map of the study area back
Displaying vehicle as dynamic object back
Login page back
Simulation system for
dynamic object
back