Archive

Posts Tagged ‘FrontlineSMS’

Our work with AGCommons.org

June 30th, 2010 admin No comments

Today SpatialDev wrapped up its work with the AGCommons program. For those who aren’t familiar with the program it is an initiative to accelerate farmer productivity in sub-Saharan Africa by delivering more locationally relevant, accurate and timely information to small holder farmers. Essentially delivering location based agricultural information to some of the hardest to reach people on the planet.

Several members of our team has been working on this in conjunction with the CGIAR for over two years. From helping to forming the original concept with the Gates Foundation and ITC to delivering GIS and mapping technology to sub-Saharan Africa. The program direction ended as something completely different from what we started with but our team was still able to deliver a hybrid GeoServer & ArcGIS Server both sitting on PostGIS and hosted in the Amazon cloud. Along the way used Maps-On-A-Stick from the DevelopmentSeed, a GeoNetwork portal and DotGo & FrontlineSMS to build SMS interfaces to the spatial data.  We we’re also able to directly meet hundreds of stakeholders including farmers, agricultural extension agents, NGOs and researchers across both East and West Africa.  We hosted the first ever WhereCamp outside of the United States and had a great time.

The team decided mid way through the project that hosting and running everything from the United States and Europe made little sense and was ultimately not sustainable. Eventually we decided to set up a Kenyan based company to maintain the technology and build the program going forward. I’m happy to say that company is now in place and open for business in Africa as AGCommons.org.

FrontlineSMS Geo -Part 1

April 16th, 2010 admin 1 comment

Over the past few weeks the team has been experimenting with extending the popular FrontlineSMS platform with location intelligence. For those who are not familiar with FrontlineSMS it is a platform that enables users to send and receive text messages to groups of people through mobile phones. While it is heavily used by NGOs working in developing countries, it works just as well in Seattle as it does in Kampala. The goal of adding location smarts to SMS messages is to match the location of user requests with other layers of geographic information. This might include market prices at the closest market, local soil types, weather or other nearby projects.

To do this we are need to overcome several challenges

a) we want something that works completely off-line

b) the solution has to be lightweight, simple, and work on multiple operating systems

c) no license costs for re-distribution

Also, right now FrontlineSMS has no notion of user sessions. That is, each message is sent independently in what amounts to a stateless environment. We want to locate someone first and then tell them something about their local environment in 160 characters or less.

The technical components for this include the FrontlineSMS External Command capability, php and the spatial extensions to SQLite known as spatialite. For our location database we are using geonames. We configured the external commands to launch our own php script based on an incoming keyword. In this case when the user texts the keyword FIND followed by a place name, FrontlineSMS is able to launch our custom script. If we are able to locate the person the script echos back several options.

The achiellies heel of this approach is the accuracy and completeness of the geonames database. Geonames does not get the location right in every single case, but its right alot. There is not a lot we can do about this in the short term but in the long term it is possible to include additional points of interest (POI) data from both Open Street Map and Google Map Maker. Also, anyone does have the ability to update the geonames database, either locally or on the server and we are tracking unsuccessful geocodes attempts along with the successful ones so at some point it may be possible to go back and update the missing locations.

For Part 2 I will be describing the technical detail along with steps to create the database locally and enable the FrontlineSMS access. For Part 3 I will be detailing how do actually do the spatial queries with spatialite return something meaningful to the users. We will also be releasing the php code once we have everything working properly land have removed any embarrassing flaws.