How to design model in Django using GeoDjango?

المشرف العام

Administrator
طاقم الإدارة
I am using Postgresql 9.0 and PostGIS 2.0. I am using Django 1.3 and GeoDjango. I have a model with id, latitude, longitude and placename. All the places are in the USA.

My requirement is following:

  • User will give his address. We use his address to get latitude and longitude, and then find places within 'x' miles.
So, should I use PointField in the model? Also, how do I convert users latitude\longitude into geometry object to use dwithin?



أكثر...
 
أعلى