Knowhere
A zgeo.* demo application using Grok
The paleolithic geographer isn't concerned about fancy geographic information systems. He wants a know-where-things-are system; hence the name of this demo app: Knowhere (pronounced "Oog"). Knowhere annotates resources with geographic location metadata and publishes them using GeoRSS (Atom, specifically) or KML so that a even a caveman can visualize them in the context of other geographic information on the Web.
Example
See also http://zcologia.com/kw/demo/@@kml-document (KML document, in Google Maps) and http://zcologia.com/kw/demo/@@atom-search-feed (Atom feed with GeoRSS and some OpenSearch? extensions).
Getting Started
Building and launching Knowhere is a 5 step process that requires Python 2.4, gmake, gcc, etc. Within 15 minutes you can be publishing geo-referenced content.
Start by getting the code from its public Mercurial repository, http://zcologia.com/sgillies/hg/knowhere:
$ hg clone http://zcologia.com/sgillies/hg/knowhere my-knowhere
or by downloading and extracting the archive attached to this page: knowhere-0.4.2.tar.gz
Change into that new directory, make it a virtual environment, get Cython, bootstrap the project, and build it out:
$ cd my-knowhere $ virtualenv . $ source bin/activate (my-knowhere)$ ./bin/easy_install Cython (my-knowhere)$ ./bin/python bootstrap.py (my-knowhere)$ ./bin/buildout
This downloads and builds 2 C/C++ libraries (GEOS and spatialindex), and fetches a heap of eggs. It will take a few minutes.
When the build out is complete, edit 2 configuration files. In parts/zopectl/zope.conf, set the port number to an open value. In parts/app/site.zcml, change the management password from "admin" to one less obvious. That done, start up the application:
$ ./setenv $ ./bin/zopectl fg
Browse to http://localhost:8080 (let's presume that's where it's at), authenticate, and you should see a Grok management page like this:
Add a new application named "cities" as shown. Afterwards, the first thing to do is to add a spatial catalog to the cities application by using the http://localhost:8080/cities/@@create-spatialcatalog view. Then return to http://localhost:8080/cities and add a new placemark using the form at the bottom. Try field values like these
- name: fort-collins
- title: Fort Collins
- description: Fort Collins, Colorado, USA
- text: The little geospatial hothouse on the prairie
- geometry type: Point
- coordinates: [-105.08, 40.59]
using a GeoJSON coordinate representation, and submit.
The Map
The more fun way to create new placemarks is through the http://localhost:8080/cities/map view. Select the 3rd tool from the left (pencil) in the toolbar, and click in the map to create a placemark geometry in the map buffer. Should display then in green. Next, fill out the fields on the right and submit.
AtomPub?
You can also post Atom entries (content-type: application/atom+xml;type=entry) to http://http://localhost:8080/cities/atompub-collection. The Ajax map uses this API.
KML for Google Maps/Earth
The zgeo.kml package provides KML representations of containers of georeferenceable objects. Browse to http://localhost:8080/cities/@@kml-document for an example.
The zgeo.atom package provides Atom entry and feed document views with GeoRSS. For examples, browse to http://localhost:8080/cities/fort-collins/atom-entry and http://localhost:8080/cities/atompub-collection.
Links
[Tickets]
Related
Credits
Sean Gillies (for Pleiades)
OSX testing: Howard Butler, Kai Lautaportti
Pleiades is an international research network and associated web portal and content management system devoted to the study of ancient geography.
See http://icon.stoa.org/trac/pleiades/wiki.
Funding for the creation of this software was provided by a grant from the U.S. National Endowment for the Humanities (http://www.neh.gov).
Attachments
- knowhere-apps.jpg (44.4 kB) - added by seang on 12/17/07 11:53:01.
- knowhere-0.3.tar.gz (64.1 kB) -
Knowhere, version 0.3
, added by seang on 02/20/08 10:24:39. - knowhere-0.3.1.tar.gz (64.9 kB) - added by seang on 03/06/08 14:37:16.
- knowhere-0.4.tar.gz (20.8 kB) - added by seang on 03/14/08 10:16:14.
- knowhere-0.4.1.tar.gz (20.8 kB) - added by seang on 03/23/08 19:36:35.
- knowhere-0.4.2.tar.gz (20.8 kB) - added by seang on 03/24/08 10:13:31.

