Introducing Gargoyle POI Server
April 22, 2008
Version 0.2 of the Gargoyle POI Server (GPS) is now ready.
The latest source code tarball is here: Gargoyle POI Server v0.2. (Warning, almost no documentation and only basic comments) Requirements: python, web.py, CouchDB, couchdb-python
But, what is it?
A POI is a Point of Interest. That is, it is an atomic element of geospatial information. The Gargoyle POI Server is the backend server to the Gargoyle Personal Agent (previously introduced under the name Gargoyle alone).
GPS is written in Python using web.py as the frontend, and CouchDB for data storage. Web.py was chosen because it is small, fast, and output format agnostic. CouchDB provides schema-flexible storage and potential scalability. It will also support robust access from many Gargoyle Personal Agents (GPAs) as well multiple Gargoyle Extraction Agent Service (GEAS) instances.
At the moment, the system can output the POIs either in KML or in rudimentary HTML. The interface chosen is a simple RESTful interface. At the moment, only GET
is supported. POST
will be implemented soon.
Here is the syntax for using the server once running (to start a server at port 8080 just run python locator.py
:
To view the POIs for userid
in the square created by 45.000000,47.000000
and 45.000999,47.000999
(format is latitude, longitude
)
http://server:8080/l/userid/45.000/47.000
If you want it in KML use this:
http://server:8080/l/userid/45.000/47.000?kml
To add a POI to userid
with an expiration date on May 1st:
http://server:8080/a/userid/45.000123/47.000456/1.3/POIname/POI Description/2008-05-01
The third number is the Altitude. Optional elements are in italics, and include the altitude, the description, and the expiration date (default is 3 days). The userid
can really be anything. Ideally, it’s just a long-ish hash that can’t be easily gussed. This simplifies access, and offers a measure of privacy. For now, if you want your POIs secret, you can encrypt their contents in whatever way you wish. Access control is planned, and will be implemented in a future version.
Coming really soon: GeoRSS output for easy Google Maps mashups.
For planned development, look at the upcoming Roadmap post.