GIS Link to the Web of Things

Back to GSoC2012 Projects page.

Name: Sidhant Hasija []

Mentor: Arne Bröring

SVN Repository :


The 52°Nortth SenseBox project aimed at integrating real world things into the existing Web by turning their data into RESTful resources. To address this, a small web server is implemented on tiny embedded devices offering REST API whose services can be accessed by a client using http. The underlying concept is Web of Things paradigm which aims at blending various physical objects into the web so that their properties become browsable by any web server or standrad GIS software. To implement that on small embedded devices we need a light weight and simple protocol and the REST API provides just that. In particular, REST uses the Web as an application platform and avoids some features inherent to HTTP such as authentication, authorization, encryption,compression, and caching. It turns eveythings that offers some services (like Senor data) into resouces which can be identified unambiguously over web using URI's. The four main operations provided by HTTP (GET, POST, PUT, DELETE) are the only available operations on resources, but our purpose will ony be limited to GET requests originating from GIS software.

GeoServices REST

Presently, REST is highly unstandardized and there is no set pattern of communication. Over that, GeoServices REST Specification nicely describes a way to develop GIS Web services that follow an expected pattern of communication. To implement the GeoServices REST Specification, developers architect the back-end server to respond to specifically structured REST requests in an expected way. The documnetation of this is provided at . The devices that implement GeoServies REST API over their web servers, can be accessed by a client API like ArcGIS Explorer creating a GIS link to the Web of Things. To achive the same, our task will be to implement some basic services offered by GeoServices REST API on small embedded devices.


  • Client Side: It's function is to generate http request for the server. For this purpose we will be using ArcGIS Explorer Desktop client
  • Server Side: It role is to recieve http request and send an appropriate reponse.In our case, we will be implementing a small web server on Arduino Mega 2560
  • GeoServices

Hardware Implementation

The implementation of the web server and sensor operations are performed on open source electronics platform - Arduino. It simplifies the development work as a large number of libraries for connecting various peripherals are available. For the magnitude of our work, we would be requiring Arduino Mega 2560 and Arduino Ethernet shield. In the course of project, other peripherals like GPS device and some sensors will also be added.

Mega 2560

This is the actual processing unit over which Web Server offering GeoServices REST API will be implemented and also various sensors will be attached. It consists of ATMEGA 2560 and the hex code is transmiited from PC via USB port. Its specification are listed below :

  • Operating Volatage - 5 V
  • Flash Memory - 256 KB
  • SRAM - 8 KB
  • 54 digital I/O pins and 4 Serial Ports
Web connectivity to the device is provided through Arduino Ethernet Shield which is mounted over Mega and communicates via SPI.

Ethernet Shield

The Arduino Ethernet Shield connects Arduino to the internet in mere minutes. A RJ45 jack is provided atop it to connect to a network or ISP. It is based on the Wiznet W5100 ethernet chip. The Wiznet W5100 provides a network (IP) stack capable of both TCP and UDP. It supports up to four simultaneous socket connections. The shield has an IP and mac address of its own sufficient to give it a unique identity on the web. Request for a particular resource hosted by the web server (For ex: Sensor data) from a client, passes form the shield to Mega where it is processed and a response is sent again to the shield to be eventually sent to the client. It also contains an Micro SD card slot which is also communicated via SPI bus

Libraries and Software

The code is written in Arduino IDE and uploaded to the board through USB port. Various libraries which will be employed in the due course of project are:

  • Flash: Flash library lets us avoid the daunting task of writing static program data in Flash memory to save precious amount of space in RAM. The documentation and source code can be found at .
  • TinyGPS: TinyGPS is designed to provide most of the NMEA GPS functionality. It provides for the latitude, longitude, date, time, velocity without having to write large chunks of code. To keep resource consumption low, the library avoids any floating point dependency and ignores all but a few key GPS fields. The documentation and source code can be found at .
  • SDfat: SdFat is an Arduino library that supports FAT16 and FAT32 file systems on standard and high capacity SD cards. In our case SD card is placed in the SD card slot on Ethernet Shield. SdFat supports file creation, deletion, read, write, and truncation. SdFat supports access to subdirectories, creation, and deletion of subdirectories. The documentation and source code can be found at .

End Results

A basic form of GeoServices REST API needs to be implemented so that the data gathered by Arduino MEGA by percieving sorroundings thorugh sensors, can be accessed by a client using GeoServices GIS software. For ex : ArcGIS Explorer ( .

  • The first milestone in the long road is to implement catalog services and a basic form of MapServer offered by the GeoServices REST API. This will obviously be implemented atop a WebServer running on Arduino Mega .

Progress Report

This section contains the progress made till now and will be updated at regular intervals. Also, since there is no specific target set regarding what has to be accomplished at the end of coding session,for this reason rather than forming a complete timeline a weekly list of tasks will be formulated.

  • Local development environmet consisting of server (Arduino Mega) and client (PC Web Browser) has been set up. Rather than communicating over the world wide web, a LAN of the two is in place easing the development work.
  • Various libraries needed in due course of project mentioned in detail above were checked for their compatibilty with the current IDE and Arduino versions.
  • The root level tasks of coding a Web Server, testing the ethernet shield and SD card functionality are well in place using the libraries mentioned above. Within a span of two days, implementation of GeoService REST API should get underway.
Following section contains the weekly task to be undertaken:

Week 1 (21st May - 27th May)

(Met the targets set at the starting of week except for the problem while connecting to ArcGIS Explorer Desktop)
  1. Created the wiki page and local SVN repository.
  2. Started the implementation of GeoServices REST API. The expected output of Catalog Service(Entry Point into the server) and Map Service was sketched. The text file of the two is attached at the end of this Wiki page
  3. Established a connection from the Web Browser to the server and gained access to the Catalog service having URI
  4. (Problem) Connection from Explorer GIS software to the local server failed. After monitoring its request, it turned out that it was using POST request compared to the expected GET. After monitoring request from the Explorer to some other GIS server, it came out that even if we ask for a JSON response, Explorer demands an extra XML response. This still needs to sorted out.

Week 2 (28th May - 3rd June)

  • Following is the link to the report.

Week 3 (4th June - 10th June)

  • Following is the link to the report.

Week 4 (11th June - 16th June)

  • Following is the link to the report.

Week 5 (19th June - 25th June)


Week 6 (26th June – 1st July)


Week 8 (10th July – 16thJuly)


Week 9 (17th July – 23thJuly)


Week 10 (24th July – 30thJuly)


Week 11 (31st July – 6th August)


Week 12 (7th August – 13th August)


Final Report


Discussion and Feedback

Back to GSoC2012 Projects page.


* Topic created on: 2012-05-07 * Topic created on: 2012-05-07

Topic attachments
I Attachment Action Size Date Who Comment
Catalog_Services_Output.txttxt Catalog_Services_Output.txt manage 591 bytes 23 May 2012 - 11:32 UnknownUser Expected Output Format of Map Server
FinalReport_Sidhant.pdfpdf FinalReport_Sidhant.pdf manage 827 K 07 Sep 2012 - 12:17 UnknownUser  
Map_Service_Output.txttxt Map_Service_Output.txt manage 826 bytes 23 May 2012 - 11:32 UnknownUser Expected Output Format of Map Server
Week10report_Sidhant.pdfpdf Week10report_Sidhant.pdf manage 318 K 31 Jul 2012 - 14:43 UnknownUser  
Week11report_Sidhant.pdfpdf Week11report_Sidhant.pdf manage 438 K 07 Aug 2012 - 12:18 UnknownUser  
Week12report_Sidhant.pdfpdf Week12report_Sidhant.pdf manage 390 K 14 Aug 2012 - 04:40 UnknownUser  
Week2report2_Sidhant.pdfpdf Week2report2_Sidhant.pdf manage 617 K 06 Jun 2012 - 07:31 UnknownUser weekly Report 2
Week2report_Sidhant.pdfpdf Week2report_Sidhant.pdf manage 724 K 04 Jun 2012 - 08:30 UnknownUser Week 2 Report
Week3report2_Sidhant.pdfpdf Week3report2_Sidhant.pdf manage 554 K 14 Jun 2012 - 13:23 UnknownUser  
Week3report_Sidhant.pdfpdf Week3report_Sidhant.pdf manage 552 K 11 Jun 2012 - 15:34 UnknownUser Weekly Report 3
Week4report_Sidhant.pdfpdf Week4report_Sidhant.pdf manage 746 K 19 Jun 2012 - 02:14 UnknownUser Weekly Report 4
Week5report_Sidhant.pdfpdf Week5report_Sidhant.pdf manage 605 K 26 Jun 2012 - 06:39 UnknownUser  
Week6report_Sidhant.pdfpdf Week6report_Sidhant.pdf manage 627 K 03 Jul 2012 - 05:18 UnknownUser  
Week8report_Sidhant.pdfpdf Week8report_Sidhant.pdf manage 680 K 17 Jul 2012 - 07:57 UnknownUser  
Week9report_Sidhant.pdfpdf Week9report_Sidhant.pdf manage 420 K 24 Jul 2012 - 07:45 UnknownUser  
Topic revision: r21 - 23 Oct 2012, ArneBroering
Legal Notice | Privacy Statement

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Wiki? Send feedback