Hi Rob,
Thanks for the response, i figured out you need to enter use the ORM
to save data to the field. (I was doing it via normal Python / SQL) .
So the data is actually being saved right now , i also removed the
SRID (so now its back to the default) and it seems to correctly save
the data.
Distance queries however do not produce the 'correct' results, or
results that shouldnt really be returned. For example the following
query:
q = Place.objects.filter(location__distance_lt=(Point(28.099497,
-26.094479), D(m=1)))
returns +-2000 objects, even thou the radius is being set as 1m. Some
of the objects returned i know are not within the radius... actually
the result of this query should be no records.
Anyone know why this would happen or how to fix it? Could it have to
do with how the db was created? I have followed the ffg steps for the
db creation & populating the data
- manage.py syncdb (create tables)
- spataialite dbname < init.sql (spatialite init sql)
- load csv
- script to update location field based on the Lon & Lat
I have tried running the init.sql first however if i get an error when
trying to load the data (geographic constraint error from spatialite)
Regards,
Ismail
> --
>
> You received this message because you are subscribed to the Google Groups "geodjango" group.
> To post to this group, send email to
geod...@googlegroups.com.
> To unsubscribe from this group, send email to
geodjango+...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/geodjango?hl=.
>
>
>