My favorites | Sign in
Project Home Wiki Issues Source
Project Information
Members
Featured
Wiki pages

GeoTree stores point geographic entities. Depending on zoom level, it returns the most important ones.

This is achieved by initially assigning points to tiles and later updating tiles at smaller zooms (parent tiles) with points from tiles at larger zooms (children tiles). Only most important points are propagated to parent tiles.

Importance is determined by a property of a point. It may be, depending on a particular application, population of a city, entity update time etc.

To get the code:

hg clone http://geotiles.googlecode.com/hg/ geotiles 

Demos

DemoCities200

DemoAddRemove

To run the demos on localhost follow instructions in 'demos/README'.

The image below is a screen of a DemoCities200 demo where 200 most populated cities are loaded into the GeoTree with maximum of 5 points per tile.

Sites using it

Places in Videos

Tweets about Places

Usage

(as of version 0.2)

from geotree.geotree import GeoTree, Point
import geotree.geohash as geohash

coord = "%s,%s" % (lat,lon)
importance = float(importance)
key_name = geohash.encode_coord_str(coord)

p = Point(key_name=key_name,coord=coord,importance=importance,name='')
p.put()

GeoTree.insert_points_list([p])
GeoTree.update_tiles(10)

gt = GeoTree.get()
info_str = 'points - %s<br/>last tiles - %s' % (gt.number_points, gt.tiles_updated)

GeoTree.remove_point_by_key_name(key_name)

Related Approaches

geodatastore

geomodel

mutiny

geobox

geobox-lite

Powered by Google Project Hosting