GeoModel and Django

37 views
Skip to first unread message

Ellie Frost

unread,
Aug 22, 2011, 11:05:27 PM8/22/11
to Google App Engine
I'm looking to move my application to Django. It seems to be a pretty
easy move, but I've gotten a bit stuck with GeoModel. I can't find a
direct equivalent for Django. I thought just changing the superclass
of GeoModel could do the trick, but there's no Django version of the
GeoPt property. Would rolling my own Field be sufficient?

I'm not married to the GeoModel either. If there's some easier way of
doing efficient proximity queries (I just need to be able to find the
things an arbitrary radius from a central point) then it wouldn't be
much work to move to that. I looked into GeoDjango, but it appears as
though it requires some non-Python libraries.

Any suggestions would be greatly appreciated.

Ellie

Kyle Finley

unread,
Aug 23, 2011, 12:17:11 AM8/23/11
to google-a...@googlegroups.com
Hi Ellie,

I'm assuming you talking about native Django models. I began a port of GeoModel to Django-norel some time ago, but never completed it. Here's the repo django-geomodel. I found that for my dataset, without async support in Django, the queries were extremely slow. If you weren't using the async version with db models, or your doing bounding box queries, it might work for you, though.

For the GeoPt Property I used the ListField from djangotoolbox

If you don't mind me asking, why the move? I've actually moved from django-nonrel to webapp2 for greater efficiency, so I'm curious.


- Kyle

Ellie Frost

unread,
Aug 26, 2011, 8:57:27 PM8/26/11
to Google App Engine
I'm a bit more familiar with Django than I am with App engine, and I
think that Django would make my application more readily portable. The
main reason, though, was that I felt that WebApp wasn't quite able to
handle any non-trivial applications. It sounds like there are some
alternatives, so I'll look in to those.

Ellie

On Aug 23, 12:17 am, Kyle Finley <kylefin...@gmail.com> wrote:
> Hi Ellie,
>
> I'm assuming you talking about native Django models. I began a port of
> GeoModel to Django-norel some time ago, but never completed it. Here's the
> repo django-geomodel <https://bitbucket.org/scotch/django-geomodel>. I found
> that for my dataset, without async support in Django, the queries were
> extremely slow. If you weren't using the async version with db models, or
> your doing bounding box queries, it might work for you, though.
>
> For the GeoPt Property I used the ListField from djangotoolbox<https://bitbucket.org/wkornewald/djangotoolbox>
> .
>
> If you don't mind me asking, why the move? I've actually moved from
> django-nonrel to webapp2 <http://code.google.com/p/webapp-improved/> for
Reply all
Reply to author
Forward
0 new messages