A Project Report on WEB ENABLED DYNAMIC AGRICULTURAL MARKET INFORMATION

November 22, 2006

Project submitted by: Ajay S Ani Prabu J Praveen Kumar V K P Ranjith

Project Guide: Mr. T Radhakrishnan CTO, IIITM-K

Indian Institute of Information Technology and Managment - Kerala (IIITM-K) 1

IIITM-K Acknowledgement

November 22, 2006

First of all we thank our project guide Mr. T Radhakrishnan, CTO, IIITM-K for guiding us throughout this project. Also we would like to convey our special thanks to Dr. Venkatesh Choppella, Associate Professor, IIITM-K, Mr. Praveen Kumar G, Associate instructor, Mr. David Mathews, Associate instructor, and other instructors of Web Technology course for their constant support and motivation throughout the course of the project. We thank all our friends and all others who had significantly contributed for our project. Without proper guidance from them it would have been impossible to complete this project. Above all we thank God Almighty for blessing us to work with these resourceful people and for the learning experience we gained.

Web Enabled Dynamic Agricultural Market Information

2

IIITM-K

November 22, 2006

Abstract

Agriculture market information can play an important role both in improving food marketing system and in promoting food security. Up-to date market information can enable farmers to negotiate with traders from a position of greater strength and can also facilitate the spatial distribution of products from rural areas to towns and between markets.

Well-analyzed historical market information enables farmers to make planting decisions, including those related to new crops. It also permits traders to make better decisions regarding the viability of intra and perhaps inter-seasonal storage. Accurate market information can assist agricultural planners, policy makers and administrators to make well-informed decisions about interventions necessary to promote food security.

Web Enabled Dynamic Agricultural Market Information is an interactive system intended for farmers, academicians, agricultural scientists , policy makers etc,which will equip them in taking better decisions about choosing the market to sell the farm produce, determining the route logistics and future plantations.

The system is designed such that all the information stated above can be accessed through a single interface. To address this purpose, the power of GIS is combined with the advantages of database and the system is implemented with open source technologies.

At present we have many systems that displays market information, but these systems give the market information in tabular form. The web enabled dynamic agricultural market information system displays the result on a map. At IIITM-K project wing a similar system is being designed on similar lines using proprietary software.

Web Enabled Dynamic Agricultural Market Information

3

IIITM-K

November 22, 2006

Contents
1 Introduction 6

2 Review of Related work

7

3 Problem Analysis

7

4 Design and Implementation 4.1 4.2 4.3 MapServer - Vesion 2.2.1 . . . . . . . . . . . . . . . . . . . . . PostgreSQL - Version 8.1 . . . . . . . . . . . . . . . . . . . . . Apache Tomcat - Version 5.5 . . . . . . . . . . . . . . . . . . .

8 8 9 9

5 Architecture

11

6 Use case Diagram

12

7 Deployment Diagram

14

8 Result and Evaluation

16

9 Future Enhancment

17

Web Enabled Dynamic Agricultural Market Information

4

IIITM-K

November 22, 2006

10 Conclusion

17

11 Screen Shots

18

List of Figures
1 2 3 4 5 6 7 8 9 System Architecture . . . . . . . . . . . . . . . . . . . . . . . 11 Usecase diagram for Administrator . . . . . . . . . . . . . . . 12 Usecase diagram for User . . . . . . . . . . . . . . . . . . . . . 13 Deployment Diagram . . . . . . . . . . . . . . . . . . . . . . . 14 Home Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Accessing Market Information . . . . . . . . . . . . . . . . . . 19 Updating Market Information . . . . . . . . . . . . . . . . . . 20 New User registeration . . . . . . . . . . . . . . . . . . . . . . 21 MapServer Interface . . . . . . . . . . . . . . . . . . . . . . . 22

Web Enabled Dynamic Agricultural Market Information

5

IIITM-K

November 22, 2006

1

Introduction
Internet based geographical data services involve management of spatial

and non-spatial (attribute) data. Geographic Information System (GIS) has become an indispensable tool for analyzing and managing spatial data. The development of a web-based system by integrating GIS and Database would serve two crucial purposes. The user can operate the system without having to grapple with the underlying intricacies of GIS and Database technology. Secondly it allows the sharing of information and technical expertise among a wide range of users. It is very difficult for normal people to use commercial GIS software because it requires a lot of technical expertise and technical training. Most commercially available off-the shelf GIS software are expensive and provide too much functionalities for data technicians and application developers to use in generating and maintaining spatial data, as well as performing special purpose analysis. The purpose of the web enabled dynamic agricultural market information system is to develop a system that brings in the power of GIS and database on to a web browser that helps farmers, traders, administrators, academicians etc for analyzing the agricultural market information through smart maps. The system aids in empowering farmers, extension officers, common people etc by providing them quick access to prices and quantity of goods available in different markets. This helps them in generating maximum profit for their produce. It also helps them in planning for the future season. Most of the GIS based applications run on the client side and the software is very costly. This system that we developed is based on open source 6

Web Enabled Dynamic Agricultural Market Information

IIITM-K

November 22, 2006

software MapServer and runs on a browser. Another advantage is the dynamic nature of the results generated. The information so generated serves the purpose and need of a whole class of people ranging from farmers to policy makers.

2

Review of Related work

No identical GIS based system could be located anywhere. Market information is provided in tabular form in many existing systems including the VUAT portal of IIITM-K. The project wing of IIITM-K is developing a GIS based system, which works on proprietary software such as ArcIMS and Oracle. The VUAT portal can be accessed at http://www.vuatkerala.org/

3

Problem Analysis
The intended system has to reach a large set of population, but the

commercially available GIS software has a huge cost factor associated with it. Therefore the ideal solution will be to develop the system using open source system, which can be easily implemented in a distributed spatial database environment at a low overall cost. Also the program will run on the server side so that the client can access it using a browser.

Web Enabled Dynamic Agricultural Market Information

7

IIITM-K

November 22, 2006

4

Design and Implementation
In this system the salient features of spatial database is developed by

integrating the Open Source Software (OSS) MapServer and PostgreSQL Object-Relational database into a web based client/server environment. This feature makes the system accessible from anywhere on the planet with only a browser running in the client side.

4.1

MapServer - Vesion 2.2.1
MapServer is an Open Source development environment for building

spatially enabled Internet applications. MapServer is not a full-featured GIS system. MapServer excels at rendering spatial data (maps, images, and vector data) for the web. Beyond browsing GIS data, MapServer allows you create ”geographic image maps”, that is, maps that can direct users to content. MapServer was originally developed by the University of Minnesota (UMN) ForNet project in cooperation with NASA and the Minnesota Department of Natural Resources (MNDNR). Presently, the MapServer project is hosted by the TerraSIP project, a NASA sponsored project between the UMN and consortium of land management interests. The system that we are developing has to be of low cost and has to be web enabled. Mapserver meets these two attributes and hence this was a design decision to use Mapserver over other internet MapServer.

Web Enabled Dynamic Agricultural Market Information

8

IIITM-K

November 22, 2006

4.2

PostgreSQL - Version 8.1
PostgreSQL is an object-relational database system that has the fea-

tures of traditional commercial database systems with enhancements to be found in next-generation DBMS systems. PostgreSQL is free and the complete source code is available. Its a highly scalable, SQL compliant, open source object-relational database management system. Since the application that we develop is a GIS enabled application we will have spatial data and in order to store and retrieve spatial data we need to have a spatially extendable database. PostGIS adds support for geographic objects to the PostgreSQL objectrelational database. In effect, PostGIS ”spatially enables” the PostgreSQL server, allowing it to be used as a backend spatial database for geographic information systems (GIS), much like ESRI’s SDE or Oracle’s Spatial extension. PostGIS follows the OpenGIS ”Simple Features Specification for SQL” and has been certified as compliant with the ”Types and Functions” profile.

4.3

Apache Tomcat - Version 5.5
Apache Tomcat is the servlet container that is used in the official Refer-

ence Implementation for the Java Servlet and JavaServer Pages technologies. The Java Servlet and JavaServer Pages specifications are developed by Sun under the Java Community Process. Apache Tomcat powers numerous largescale, mission-critical web applications across a diverse range of industries and organizations. Market information such as name of the market, place of the market, name of the commodity and price of the commodity are stored in the PostgreSQL these data are stored, retrieved and updated using Java Servlets and
Web Enabled Dynamic Agricultural Market Information

9

IIITM-K

November 22, 2006

JSP. This forms our business Logic. The results will be queried and displayed on a map.

Web Enabled Dynamic Agricultural Market Information

10

IIITM-K

November 22, 2006

5

Architecture

Figure 1: System Architecture

The browser communicates with the http server via http request and response objects . The http server handles static data which includes displaying map and static html pages. If there is a request for a dynamic content then the request will be forwarded to the Servlet container which handles the dynamic information . A servlet container comprises essentially the component of a web server that hosts and interacts with Java servlets. Servlets are not allowed to access the database directly. The Servlets transfers the control to the java bean, which acts as the abstraction of the database. The communication with the database takes place through the bean. The database that we use here is PostgreSQL.

Web Enabled Dynamic Agricultural Market Information

11

IIITM-K

November 22, 2006

6

Use case Diagram

Figure 2: Usecase diagram for Administrator

There are two types of users in the system, one is the ordinary user and the other is the administrator approved by the central agency. The above use case diagram shows an Administrator logging in to the system. The user will have to enter the username and password in order to login, which is provided by the central agency. The administrator has the privilege to populate and update the database and the map.

Web Enabled Dynamic Agricultural Market Information

12

IIITM-K

November 22, 2006

Figure 3: Usecase diagram for User

The above use case diagram describes the activities of the user. The user doesn’t have permission to update the database but will be able to view all the market information and the corresponding map.

Web Enabled Dynamic Agricultural Market Information

13

IIITM-K

November 22, 2006

7

Deployment Diagram

Figure 4: Deployment Diagram

Viewer client is actually a series of HTML pages running inside a Web browser that can interact directly with a map server via the HTTP profile of the Open Geospatial Consortium (OGC) Web Mapping Interface. WMS client manages the interactions with OGC web mapping interfaces via HTTP, and dynamically generates HTML that can run in the Web Browser. WMS server is a map server that provides three OGC Web Mapping Interfaces. WMS server accepts requests from WMS client and viewer client in the form of HTTP URL strings, and returns results encoded as XML, GIF, GML, and so on. The database stores geo-feature data that can be accessed and utilized by the WMS server to generate GML documents or draw maps. The user interacts locally with Viewer Client and submits HTTP GET/POST requests to the WMS client. The web server in the WMS client accepts user requests and parses them before forwarding them to the apWeb Enabled Dynamic Agricultural Market Information

14

IIITM-K

November 22, 2006

plication server. The application server then processes these requests in an application, and returns dynamically generated HTML pages to the web browser. GetMap request is embedded in the PHTML pages to fetch an image map from the map server and display it directly in the web browser. The vector datasets to be stored in the PostGIS can be converted from shapefiles. Environmental Systems Research Institute (ESRI) publishes the shape file format for simple vector data with attributes. An ESRI shapefile consists of three files with the same basename:

• .shp - the main file holding the actual vertices that describe shapes • .shx - the index file holding index data pointing to the structures in the main file • .dbf - the dBase table holding the feature attributes

PostGIS provides a tool called ”shp2pgsql” to create a SQL file from a shapefile. The SQL file holds SQL commands such as ”create table” and ”insert data”, which can be executed directly by PostGIS. One shapefile corresponds to one PostGIS table, containing the points, lines, or polygons to display as map layers.

Web Enabled Dynamic Agricultural Market Information

15

IIITM-K

November 22, 2006

8

Result and Evaluation
There are two types of users in the system . The first class of users are

the administrators who are authorized to update or modify current market information . These set of users should get authorization from the central agency, who owns and manages the system. The central agency decides the administrators. The next group of users are the general users who are the real beneficiaries of the system . They are entitled to view the market prices without a user account. Since the information is displayed on a geographical context the users will be in a position to get the current market price as well as retrieving information regarding other factors such as the location of the market, distance between markets, route logistics, whether the market is accessible in all seasons etc. The central agency decides and appoints administrators for each market. The administrator applies for the administrative account by sending the new user registration form. The central agency then approves the account of the administrator by providing an administrative account. The administrator logs in to the system using the userid and password. The administrator populates the database.

Web Enabled Dynamic Agricultural Market Information

16

IIITM-K

November 22, 2006

9

Future Enhancment
1. Implementing route logistics 2. Finding shortest route between any two markets using Dijkstras algorithm 3. Implementing market index by displaying high market price and low market price of a particular product

10

Conclusion
This system could cater to the needs of a large section of people ranging

from farmers, traders, agricultural scientists, academicians and policy makers. All this was implemented using open source technologies and therefore has only a small cost factor associated with it . This system is designed based on the client server model and being web enabled GIS, this system can be accessed and updated from anywhere in the planet. The power of GIS enables the system to display the results in a geographical context, which helps the users to take better decisions about the market produce as well as route logistics. These factors enable the system to be used by any administration or organization dealing with market information.

Web Enabled Dynamic Agricultural Market Information

17

IIITM-K

November 22, 2006

11

Screen Shots

Figure 5: Home Page

Web Enabled Dynamic Agricultural Market Information

18

IIITM-K

November 22, 2006

Figure 6: Accessing Market Information

Web Enabled Dynamic Agricultural Market Information

19

IIITM-K

November 22, 2006

Figure 7: Updating Market Information

Web Enabled Dynamic Agricultural Market Information

20

IIITM-K

November 22, 2006

Figure 8: New User registeration

Web Enabled Dynamic Agricultural Market Information

21

IIITM-K

November 22, 2006

Figure 9: MapServer Interface

Web Enabled Dynamic Agricultural Market Information

22

IIITM-K

November 22, 2006

References
http://mapserver.gis.umn.edu/docs/howto/phpmapscript-byexample http://postgis.refractions.net/docs/postgis.pdf http://gis.esri.com/library/userconf/proc02/pap0477/p0477.htm http://www.dambd.org/agri-business.htm http://www.vuatkerala.org/ http://tortoisesvn.net http://iiitmk.ac.in/newsletter.html

Web Enabled Dynamic Agricultural Market Information

23

Sign up to vote on this title
UsefulNot useful