Service-Oriented Architecture
for Spatial Data Integration and Spatial Reasoning
R&D Project funded by
NRDM System Programme,
Dept. of Science and Technology, New Delhi
Year: 2011-14
Principal Investigator:
Sanjay Chaudhary, IICT, AU, till June, 2013
Minal Bhise, DA-IICT, From July, 2013
Research Fellows:
Aakash Goyal, Chetan Moradiya
Presentation Outline
Concepts and Terms
Research Issues/ Challenges
Related Work
Architecture, Components and Modules
Design Standards and Specifications
Implementation and Results
Work in-progress
Conclusion and Future Work
• Massive volumes of geospatial data being generated
every day
• Many sources are collecting and storing geographic
data. Data is available in different formats
Effective utilization only if data is sharable and
• GIS data acquired from different sources can be used
for complex applications
 Recommendation System for Agriculture / Crop
Production, Weather prediction, Disaster Management,
Climate Change and Impact on Agriculture
Introduction (Cont.)
• Different organizations collect and process data from
satellite in a real time manner.
• Collaboration among these organizations is required to
develop innovative applications.
• Urgent need to use these data based on standards and
integrating services.
 OGC has defined several standards
• Important and relevant applications can be developed
by adding Semantics or knowledge to these Data.
Representational State Transfer (REST)
• Properties of REST: addressability, statelessness,
connectedness (architectural styles) and a uniform interface
• A Web Service, which implements these properties, is called
RESTful Web Service.
• These properties are realized by using HTTP and URIs.
• The resource is a central aspect of REST.
• A resource is a specific entity in the system, which is
represented by a URI.
• Designing the resource correctly regarding the granularity and
the purpose of the service is important.
• All operations of a RESTful Web Services are represented by
the combination of a resource and HTTP [45].
• The vocabulary of HTTP describes some operational
semantics, which can be used to interact with the resources.
The key motivation is to develop SOA framework to make
use of existing and emerging OGC standards, GIS services,
spatial data and ontology (Knowledge Base) concepts
Integration of available spatial data can open doors for many
interesting applications.
Farmers need various types of information at different stages
of crop production cycle including the adverse effect of
climate change on crops.
To generate recommendations for the farmers of a specific
region (North Gujarat) and a specific crop (Cotton)
Information system should be able to deliver experts’
suggestions and knowledge on mobile phones in a regional
Related work
1. GISE research lab, IITB
Evacuation planning, Drinking Water Project, GIS Framework, IIT
Campus GIS, Tree Census Pune etc.
2. e-SAGU, IIIT Hyderabad
As a part of this service, agricultural expert advices are provided under
eSagu framework for agricultural field crops (duration of the crop is at
most one year) such as rice, cotton, maize, wheat, sugarcane, chilies etc.
3. aAQUA, IIT Bombay
All most all questions answered is an AIS for crops in India. The
recommendations are also available in Marathi language [3].
4. Agropedia Project, IITKanpur, ICRISAT
In this project, different knowledge models are developed for crops in
India [4], [25], [26].
5. m-Krishi, TCS [5]
Related work (cont.)
6. A system is implemented in rural Maharashtra for
managing information in a sugarcane cooperative with
an SMS-based mobile phone [6].
7. Significance and use of ontology for dynamic data
gathering of GIS, knowledge representation, semantic
resolution of geospatial query is discussed for
development of intelligent decision support system in
[7], [8], [9], [10].
8. A farmer helping system which integrate relevant web
services like soil, plant weather, pesticide and fungicides
information is proposed in [11].
Research Issues and Challenges
Lack of standards and specifications for REST based
Identifying the resource is a key concept in REST. How to
represent processes as resources ?
Automated discovery of services
Lack of required spatial data for various domains.
Lack of mechanisms by which geo-spatial information
can be communicated, assembled, integrated, and
Lack of semantic interoperability
Lack of relevant applications for farmers to improve their
Gujarati Unicode characters on android mobile devices.
Free messaging services in Unicode
System Architecture [12], [27]
Realization of Architecture
Spatial database (GIS)
Ontology based database (Knowledge base)
Crop yield prediction database *
Knowledge extraction service (SPARQL Query)
Spatial data extraction (WPS)
OGC REST services for integration of services
User Interfaces
Web interface
User interfaces on mobile devices
Architecture of WPS based Services
Seven capabilities that support CEC [42]
• Effective Web Services
• Federated Identity Management and Communications
• Security Beyond the Enterprise Border:
– Digital Rights Management (DRM) and Data Loss
Prevention (DLP) technologies
• Cloud Data Platforms
• Crowdsourcing Platforms
• Ubiquitous visualization and data analysis
– new mobile capabilities and the most valuable solutions will
incorporate the analytics
• Process-driven collaboration tools
– To streamline collaboration between members
Components and Modules
A. GIS based query and Information Representation
• To examine, process and analyze a wide range of
agricultural data up to the farm level.
• Spatial data is stored into PostgreSQL database and is
retrieved through RESTful web services for a specific
• Diversity of geospatial data is one of the main
concerns during integration.
• When a farmer enters input for the query, services will
be invoked through RESTful URI and processing will
be done on geospatial data stored in PostgreSQL.
Components and Modules (Cont.)
B. Knowledge Processing
• Knowledge is represented in form of ontologies
and it can be extracted by executing SPARQL
• We are developing cotton crop ontology using
Protégé [13].
It uses the standard agrovoc ontology [24] developed
by Food and Agriculture Organizations of United
Nations (FAO).
• Ontology contains intensive knowledge of cotton
cultivation practices at all the stages, starting
from soil preparation to post harvesting.
Components and Modules (Cont.)
C. An approach for RESTful Web Processing Service
• Geoprocessing services should be interconnected through
service chaining and orchestration to meet workflow
• The recommendations are generated by combining the
outputs of overlay analysis and the extracted knowledge.
• It can be interfaced with existing decision support systems
using JavaScript Object Notation (JSON) [14] messages.
• The system should allow users to post requests, i.e.
recommended fertilizer, pesticide, weed control application
etc. for a given crop.
• The system identifies the location and based on agro
meteorological parameters, and it generates relevant
recommendations or alerts regarding requests/queries from
the farmers.
Design Standards and Specification
A. RESTful web services for GIS
Standards followed:
• Open geographical Consortium (OGC) standards [15]
• Web Feature Service (WFS)
• Web Processing Service (WPS)
• Keyhole Markup Language (KML)
• REST [16]
• JSON [14]
• Open source software/platforms used:
PostgreSQL [17], QuantumGIS [18]
Open Weather Map API [19], Cloudbees [20]
Design Standards and Specification (Cont.)
B. RESTful web services for knowledge extraction and
knowledge base
• Standards followed:
REST [16]
JSON [14]
• Open source software/platforms used:
Protégé [22]
Sesame [23]
• Referred ontology:
Agrovoc ontology developed by Food and Agriculture
Organizations of United Nations (FAO) [24].
Design Standards and Specification (Cont.)
C. Mobile application development
• Standards followed:
JSON [14]
• Open source software/platforms used:
Android development Toolkit (ADT) - SDK
Eclipse Juno
• APIs required for Supported Devices
minimum: API 8 Froyo- Version 2.2
maximum: API 17 Jelly bean- Version 4.2
Learning Curve (analysis of spatial data):
• Spatial overlay analysis has been performed to identify
areas with a typical combination of temperature, rainfall,
soil quality and other related parameters.
• The classified data is passed to the reasoning engine for
generation of recommendations.
• The growth patterns of cotton in North Gujarat can be
analyzed by performing an overlay analysis of the crop
yield along with meteorological parameters and soil data.
• The overlay analysis can reveal relationship between crop
yield and meteorological parameters.
• Moreover, it can help to classify data based on climatic
parameters and soil conditions.
Implementation (cont.)
Displaying farm data using WMS
Implementation (cont. )
Integrating Village level data with Google Map data
Concepts in Ontology
• Crop, Cotton, Diseases, Pest, Weed Control,
Climate (Climatic requirement, Humidity),
Fertilizers (Application Rates, Fertilizer types),
Irrigation (Irrigation Interval and rates, irrigation
scheduling), Soil (Type, Soil Management, Soil
Texture), Weed (Description), Seed Rates,
Sowing Methods, Cropping systems, Cultivation,
Harvesting, Pesticides, Post Harvesting…
Populated Cotton Ontology
Implementation (cont. )
List of services developed:
Extraction of a user’s personal information based on his
mobile’s IMEI number in JSON format.
 The output generated is given to a JSON parser at the user
end which parses the data and displays the output on android
based mobile devices.
Display of Soil Health Card
 A web service is responding to a request with a JSON object
detailing about the evaluation results on the quality of soil as
a function of its characteristics, water and other biological
properties in the form of Soil Health Card.
 The Health Card is shown in a tabular format at the user end
with values of each element of the soil.
Implementation (Cont. )
Generation of recommendation for crop cultivation based on
the current Agro-Ecological Zone (AEZ)
 The RESTful web service is invoked at the user end and
the current location values of the user are sent to the
service. The service deduces the current AEZ of the user
and recommends crops to cultivate based on that
A web service is developed which takes the current latitudelongitude values of the farmer and responds with the
coordinates of the nearest entity useful for the farmer, such as
the nearest warehouse, well, market yard, canal etc.
 The administrative boundary data of the nearest entities
has been made available by Space Application Center
Implementation (Cont. )
User is expected to input the observations about cotton crop
and recommendations are generated based on the available
knowledge in the ontology.
 When user is entering observations, a service is invoked
and it finds the pest symptoms based on the observations.
In subsequent steps, pest and its related prevention is
searched and respective description is returned in the form
of a recommendation.
OpenWeatherMap APIs:
 Various current climatic condition parameters are fetched
and passed onto the ontology module.
 Forecast conditions of various Northern Gujarat locations
are fetched and stored in the database.
 Populated database could be used for future purpose
Implementation (Cont. )
Interfacing Rule Engine With GIS
• We need to interface the reasoning engine with the GIS
• We are currently exploring the ways of accessing
ArcObjects with Java API.
• An interconnection component will be developed
which will serve to transfer the data obtained from GIS
analysis to the rule engine in JSON format.
• Finally, the system should allow access to services in a
platform independent manner.
Implementation (Cont. )
• Pull values from structured and semi-structured data
• Explore data by querying unknown relationships
• Perform complex joins of disparate databases in a single,
simple query
• Transform RDF data from one vocabulary to another
SPARQL Architecture and Endpoints:
• SPARQL queries are executed against RDF datasets,
consisting of RDF graphs.
• A SPARQL endpoint accepts queries and returns results via
–Generic endpoints will query any Web-accessible RDF data
–Specific endpoints are hardwired to query against particular datasets
Results in various forms
Implementation (Cont. )
• The fat free alternative to XML.
• Less verbose than XML, and it is lightweight.
• Mobile devices have limited bandwidth.
• JSON data cleanly maps onto the objects of most
object-oriented languages
Implementation (Cont. )
JSON on android platform
Sample JSON object
Use the JSONObject to parse.
JSONObject jo = new JSONObject(sampleJSONObject);
JSONArray ja = jo.getJSONArray(“soilhealthcard”);
String carb =
Service Integration Algorithms
Algorithm Part 1
Algorithm Part 2
Output of algorithm 2 after execution
Algorithm Part 3
Recursive execution of algorithm 2
Recursive execution of algorithm 2
Time complexity of the algorithm
• The length of candidate web services is limited by the
total number of web services (N).
• Web Service function will take O(N) in worst case.
• Composition function will take O( 2 ) in worst case.
• Composable function check dependencies between
services within O(1) time.
Finally, the time complexity of the Algorithm is O( 2 ) in
worst case.
Web Portal
Nearest Warehouse
Nearest Requested Object using Google Map
Home Page
Main Menu
New Registration
Farmer’s personal Information
Soil Health Card Information
Zone Identified Based on AEZ
Crops Suggested Based on
Identified AEZ
Crop Varieties Suggested Based on Crop Selection
Pest Observation Selection to get Preventive Actions
Recommendation for Pest Prevention
Service Integration and Mashup Results
JSON Response of Data Weave Service and List View of JSON
Data Parsing
JSON Response of Geocode API with Source and Destination
Latitude-Longitude II
Google Map and Satellite View
Work in-progress
Generations of Alerts/Notifications
• The processing of spatial data based on spatio
temporal modeling will provide useful information
regarding the possible crop outcome in a particular
• Based on the outcomes, alerts/recommendations can
be generated for a specific region depending on its
climatic conditions.
• The recommendations will guide the farmers in their
choice for fertilizers, irrigation, pesticides etc.
Generations of Alerts/Notifications
Push Notification
Cloud Services
Ontology in
OWL format
Krishimantra Infrastructure(Cloud based-scalable)
Open services over
Internet like Weather etc
The User interacts with the SQL
database, the OWL knowledge base and
other open services over the internet
via REST based Krishimantra services.
All responses are in JSON format which
is more lightweight as compared to
Work in-progress
The mobile user can access our service through an application
created and freely available. The application has been created for
Android OS v4.0 for now and can be extended to other mobile
operating systems
 The SQL database, OWL knowledge base and RESTful services are
deployed on Heroku Cloud( platform making them
scalable and easily accessible along with high availability.
 The RESTful services fetch data from the database as per the
request, query the knowledge base and use other open services over
the internet to provide the end user information relevant.
Technology used
For mobile application we are using Android SDK v17 for Android
OS v4.0(min) and Eclipse Juno IDE.
 For RESTful services in Java we are using Jersey / JAX-RS library v2.2
and JDK 1.6 deployed on Heroku Cloud platform.
 For SQL database we are using PostgreSQL v9.2.4 deployed on
Heroku Cloud database platform.
 Open services like OpenWeather API are utilized for gathering
relevant information useful to generate recommendations.
Work in-progress
For using Geographic features in Postgres we require PostGIS extension to be
installed with our Postgres database. Currently GIS services are not deployed
on the cloud services due to inavailibility of the extension in our current
plan(Dev plan on Heroku).
 We will be migrating to our own Web server farm to deploy the services and
database, giving us complete control and removing dependaecies over the
private cloud providers.
 Various service integration / composition algorithms will be implemented to
combine our services and provide more functionality to the overall system.
 We are designing various forms using services provided by that
will be used for data collection via web interface or mobile app, being online is
not necessary for using these services making them the preferred choice. Also
data collection forms can be easily translated in various languages and various
kinds of data including geographic data can be recorded using these forms.
Public comments on GeoServices REST API Candidate Standard
Requests Digest, Vol 36, Issue 14.
Research Paper (accepted): ‘KrishiMantra: agricultural
recommendation system’ in the ACM Third Annual Symposium on
Computing for Development (ACM DEV 2013), Bangalore,
January 11-12, 2013. Available on:
Research Paper (accepted): ‘Crop Cultivation Information System
on Mobile Devices’ in Global Humanitarian Technology
Conference- South Asia Satellite Conference (GHTC-SAS), Kerala,
August 23-24, 2013
M. H. Bohara, M. Mishra and S. Chaudhary, 'RESTful Web Service
Integration Using Android Platform', Fourth International
Conference on Computing Communication and Networking
Technologies (ICCCNT 2013) , Tiruchengode, Tamilnadu, India, on
July 4-6, 2013
• Web Processing Service interface specification provides
an approach to publish and execute geo-processes on the
• A transparent workflow can be created using these WPS
• Ontology is the basic building block for knowledge
sharing among the organizations.
• Effective Cross Enterprise Collaboration can be achieved
by using ontologies
• Geo-spatial analysis plays critical role to generate alerts
and recommendations
• Recent OGC specifications can be used to develop
geoservices for spatial data infrastructures for interesting
and relevant domains.
Future Work
Develop Ontology of cotton crop for North Gujarat in
Gujarati language
Ontology reasoning and search based on unstructured queries
by users
Research area on ‘Ontology Learning’ is emerging, which
aim to populate ontology from the text to generate a large
knowledge base.
Develop components for JSON parser, alert and messaging
Service Composition / Integration and Choreography of
RESTful Web services. Develop and implement algorithm for
service composition / integration
To develop ontology based framework for semantic
geospatial data integration within the SOA architecture.
Future Work (cont)
• Develop and deploy Portal / Set of Services in the form
of Cloud Services:
RESTful web services will be hosted on the cloud environment
Use of sms provides, Google Cloud Messaging Service, Alerts
and Notification Services
• Make a set of services as an integrated Android
• Initiate field tests in few selected villages of North
• Mobile interfaces in a regional language.
• Context aware alerts and notifications.
Future Work (cont.)
• If feasible, integration with Rainfall prediction using
time series modeling (using seasonal ARIMA model and
Genetic programming)
• Various important data sources that are available, one of
them is “IRI/LDEO Climate Data Library” (University of
It provides data related to past precipitation , weather
prediction , and crop model simulations, which can be of
immense importance to the farmers.
The data can be made available to farmers by collecting it from
such sources and developing a farmer-friendly interfaces on
android based devices to access it.
• Speech to text engine for regional languages
• This work is a part of a research project on ‘ServiceOriented Architecture for Spatial Data Integration and
Spatial Reasoning’, funded by The NRDMS and NSDI,
Department of Science and Technology, Govt. of India,
year: 2011-2014
• Data providers :
ISRO, Ahmedabad
India Meteorologiical Department (IMD), Pune
Anand Agricultural University
Soil Testing Lab, Gandhinagar
Farmers located in villages, Ta. Mansa, Dist. Gandhinagar
[1] Xiaolin Lu. An investigation on service-oriented architecture for constructing distributed
web gis application. In Services Computing, 2005 IEEE International Conference on Volume I,
DOI 10.1109/SCC.2005.27, 2005
[2] Krishna Reddy, G Syamasundar Reddy, and Bhaskar Reddy. Overview of esagu and future
plan. In Presented at IEEE Conference on Technologies for Humanitarian Challenges, 2009.
[3] Krithi Ramamritham, Saurabh Sahni, Malathy Baru, Chaitra Bahuman, Arun Chandran,
Manjiri Joshi, and A Bahuman. The aaqua approach: innovative web 2.0 tools for developing
countries. Internet Computing, IEEE, 12(2):62–70, 2008.
[6] R Veeraraghavan, N Yasodhar, and K Toyama. Warana Unwired: Replacing PCs with mobile
phones in a rural sugarcane cooperative. 2007 International Conference on Information and
Communication Technologies and Development, 5(1):1–10, 2007.
[7] Shrutilipi Bhattacharjee, Rendhir R Prasad, Akash Dwivedi, Arindam Dasgupta, and
Soumya K Ghosh. Ontology based framework for semantic resolution of geospatial query. In
Intelligent Systems Design and Applications (ISDA), 2012 12th International Conference on,
pages 437–442. IEEE, 2012.
[8] Wei Yuanyuan, Wang Rujing, Wang Xue, and Hu Yimin. Ontology-Based Knowledge
Representation for Agricultural Intelligent Information Systems. Management and Service
Science MASS 2010 International Conference on, pages 9–12, 2010.
[9] Xi Mao and Qi Li. Ontology-based web spatial decision support system. 2011 19th
International Conference on Geoinformatics, 08193:1–4, 2011.
[10] Ren Chen. Ontology-based dynamic data gathering of geographic information services.
Future Information Technology and Management Engineering FITME 2010 International
Conference on, 1:181–184, 2010.
[11] K Shyamaladevi, TT Mirnalinee, TE Trueman, and R Kaladevi. Design of ontology based
ubiquitous web for agriculturea farmer helping system. In Computing, Communication and
Applications (ICCCA), 2012 International Conference on, pages 1–6. IEEE, 2012.
[12] Vikas Kumar, Vishal Dave, Rahul Bhadauriya, and Sanjay Chaudhary. Krishimantra:
agricultural recommendation system. In ACM DEV, page 45, 2013.
[13] Natalya F Noy, Michael Sintek, Stefan Decker, Monica Crub´ezy, Ray W Fergerson, and
Mark A Musen. Creating semantic web contents with protege-2000. Intelligent Systems, IEEE,
16(2):60–71, 2001.
[25] Nagaraju Pappu, Runa Sarkar, and TV Prabhakar. Agropedia: Humanization of agricultural
knowledge. Internet Computing, IEEE, 14(5):57–59, 2010.
[26] Margherita Sini, Vimlesh Yadav, Jeetendra Singh, and Vikas Awasthi. Knowledge models
in agropedia indica. 2009.
[27] Vikas Kumar Yash Jain, Amita Sharma and Sanjay Chaudhary. Spatial analysis for
generating recommendations for agricultural crop production. In India Conference On
Geospatial Technologies And Applications (ICGTA-12), IITB, 2012.
Ontology Building References:
[34] Changing Scenario of Cotton Diseases in India—The Challenge Ahead by D. Monga, K.R. Kranthi, N.
Gopalakrishnan and C.D. Mayee.
Online available:
[35] N.K. Perumal, K.B. Hebbar , M.R.K. Rao, Phundan Singh. Physiological disorders in cotton. CICR
technical bulletin no: 28.
[40] Handbook of Agriculture. Indian Council of Agricultural Research (ICAR), 2004, pp. 348-351
[41] G.K. Koutu, P.P. Shastry, D.K. Mishra, K.C. Mandloi. Handbook of COTTON, 2012, pp. 19-24, 104-142.
[42] Kelly Dempski and Alex Kass, Technology for Supporting Collaboration Across Enterprise Boundaries
Enterprise Social Collaboration - 2012 White Paper #5, Accenture Technology Labs, 2012
[43] “Web Services: Concepts, Architectures and Applications”, Gustavo Alonso, Fabio Casati, Harumi Kuno,
Vijay Machiraju, Springer Verlag
[44] Carlos Granell, Laura, Alain Tamayo, Joaqu.n Huerta, “Assessment of OGC Web Processing
Services for REST principles”, CoRR Feb 2012
[45] Didier G. Leibovici , Suchith Anand , Jerry Swan, “Workflow Issues for Health mapping mashups of OGC
Web Services”
Thank you for your kind attention !!
Questions and Suggestions Please

Service-Oriented Architecture for Spatial Data Integration