Dm-appengine-geomodel is a project mainly written in Ruby, based on the Apache-2.0 license.
Implementation of the geomodel library for dm-appengine
Implementation of the geomodel library for dm-appengine.
This is still a pretty early sketch, not even suited for testing... If you really want to try it:
require 'geomodel'
class Thing include DataMapper::Resource #Or include DataMapper::AppEngineResource is :geomodel
property :stuff, String property :location, GeoPt #You have to define a location property for
end #to define it as required or optional.
example = Thing.new example.location = AppEngine::Datastore::GeoPt.new(12.3, 45.9) example.save
southwest = AppEngine::Datastore::GeoPt.new(10, 45) northeast = AppEngine::Datastore::GeoPt.new(11, 46)
Thing.all(:location.gt => southwest, :location.lt => northeast)
Thing.all(:location.gt => "10.23,45.01", :location.lt => "11.03,46.34")