NOTE: 2016-06-23
52°North is migrating this TWiki to foswiki which will become availabe via the well known domain wiki.52north.org soon.
Hence, this wiki is switched to read-only mode starting Monday - 27.06.2016 - until the end of the migration. Hence, save your changes beforehand.

The 52°North IT-Team.

GIS Link to the Web of Things

Back to GSoC2012 Projects page.

Name: Sidhant Hasija [sidhant.hasija@ieee.org]

Mentor: Arne Bröring

SVN Repository : https://svn.52north.org/svn/swe/incubation/sensebox/


Overview

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 http://www.esri.com/industries/landing-pages/geoservices/geoservices.html . 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.

Architecture

  • 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 http://arduiniana.org/libraries/flash/ .
  • 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 http://arduiniana.org/libraries/tinygps/ .
  • 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 http://code.google.com/p/sdfatlib/ .

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 (http://www.esri.com/software/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 http://192.168.1.177/arcgis/rest/services?f=pjson.
  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.
Week2report2_Sidhant.pdf

Week 3 (4th June - 10th June)

  • Following is the link to the report.
Week3report2_Sidhant.pdf

Week 4 (11th June - 16th June)

  • Following is the link to the report.
Week4report_Sidhant.pdf

Week 5 (19th June - 25th June)

Week5report_Sidhant.pdf


Week 6 (26th June – 1st July)

Week6report_Sidhant.pdf

Week 8 (10th July – 16thJuly)

Week8report_Sidhant.pdf

Week 9 (17th July – 23thJuly)

Week9report_Sidhant.pdf

Week 10 (24th July – 30thJuly)

Week10report_Sidhant.pdf

Week 11 (31st July – 6th August)

Week11report_Sidhant.pdf

Week 12 (7th August – 13th August)

Week12report_Sidhant.pdf

Final Report

FinalReport_Sidhant.pdf

Discussion and Feedback


Back to GSoC2012 Projects page.

Metadata

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

Topic attachments
I Attachment Action Size Date Who Comment
Texttxt Catalog_Services_Output.txt manage 0.6 K 2012-05-23 - 11:32 UnknownUser Expected Output Format of Map Server
PDFpdf FinalReport_Sidhant.pdf manage 827.9 K 2012-09-07 - 12:17 UnknownUser  
Texttxt Map_Service_Output.txt manage 0.8 K 2012-05-23 - 11:32 UnknownUser Expected Output Format of Map Server
PDFpdf Week10report_Sidhant.pdf manage 318.8 K 2012-07-31 - 14:43 UnknownUser  
PDFpdf Week11report_Sidhant.pdf manage 438.7 K 2012-08-07 - 12:18 UnknownUser  
PDFpdf Week12report_Sidhant.pdf manage 390.2 K 2012-08-14 - 04:40 UnknownUser  
PDFpdf Week2report2_Sidhant.pdf manage 617.3 K 2012-06-06 - 07:31 UnknownUser weekly Report 2
PDFpdf Week2report_Sidhant.pdf manage 724.2 K 2012-06-04 - 08:30 UnknownUser Week 2 Report
PDFpdf Week3report2_Sidhant.pdf manage 554.6 K 2012-06-14 - 13:23 UnknownUser  
PDFpdf Week3report_Sidhant.pdf manage 552.9 K 2012-06-11 - 15:34 UnknownUser Weekly Report 3
PDFpdf Week4report_Sidhant.pdf manage 746.6 K 2012-06-19 - 02:14 UnknownUser Weekly Report 4
PDFpdf Week5report_Sidhant.pdf manage 605.1 K 2012-06-26 - 06:39 UnknownUser  
PDFpdf Week6report_Sidhant.pdf manage 627.6 K 2012-07-03 - 05:18 UnknownUser  
PDFpdf Week8report_Sidhant.pdf manage 680.7 K 2012-07-17 - 07:57 UnknownUser  
PDFpdf Week9report_Sidhant.pdf manage 420.5 K 2012-07-24 - 07:45 UnknownUser  
Tags:
create new tag
, view all tags
Topic revision: r21 - 2012-10-23 - 07:58:11 - ArneBroering

 
  • Search: 
This site is powered by the TWiki collaboration platform Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback