geodjango

How can I query for the total area for a selection of polygons in Geodjango?

I need to convert my Postgresql/Postgis query below to a query in Geodjango? I'm confused by the Geoqueryset aggregates. Select Sum(Area(geom))/4046.856 as Acres from annualreport_landstatus where status=2; Thanks. ...

Unreadable data in Mysql from a GeoDjango PointField

Hi, I'm using GeoDjango with MySQL. I use a models.PointField(srid=4326) object, all works fine, the data is correctly saved and retrieved from the database, but when I do a "select * from table" from MySQL command line, data of PointField field shows unreadable characters, instead of a "POINT(x,y)" form, as I expected. Is it a normal b...

How do I supply a British National Grid reference as WKT to GeoDjango?

I'm trying to insert some National Grid references into a Django PointField defined as follows: oscode = models.PointField(srid=27700, null=True, blank=True) However, I don't know how to format them correctly in WKT. This is what I get if I try simply using a basic National Grid reference, TR3241: INSERT INTO places (placeid, struct...

Need performance on postGIS with GeoDjango

This is the first time I'm using GeoDjango with postGIS. After installation and some tests with everything running fine I am concerned about query performance when table rows will grow. I'm saving in a geometry point longitudes and latitudes that I get from Google geocoding (WGS84, or SRID 4326). My problem is that distance operations a...

geodjango syncdb errors. From geodjango tutorial.

I have followed the geodjango installation(windows XP) and tutorial to perfection I am running django 1.2 When I get to syncdb and run I receive the following. raise ImproperlyConfigured(error_msg) django.core.exceptions.ImproperlyConfigured:'django.db.backends.postgis' isn an available database backend. Try using django.db.backend...

Geography mode distancies in GeoDjango - PostGIS 1.5

I store a PointField field named "coordinates" in a model. Then, I consult nearest instances from a given one, in the command interpreter, and print its name and the distance in km. [(p.name, p.distance.m) for p in Model_Name.objects.filter(coordinates__distance_lte=(pnt, 1000000)).distance(pnt)] The thing is, when the field "coordin...

libgeos_c-1.dll can't be loaded by Python

I'm building my first GeoDjango project but I'm kinda desperate. I'v installed PostgreSQL 9 and PostGis 1.5 through one-click installer on Windows. So everthing is there. I set GEOS_LIBRARY_PATH to the full path of libgeos_c-1.dll in settings.py. But when I run manage.py syncdb, I encounter the following errors: File "C:\Python25\lib...

Geodjango with Geonames

I would like to implement a location based search, based on the geonames zip code dump. For that, I want to use geodjango, but I have no idea how to implement the geonames data for lookup. I don't want to use an external webservice. Maybe someone already has realized that and has some inspirations for me? ...

geodjango access violation on vista 32 bit

Am having a real problem with the geodjango saving an entry. It produces a "Error: Access Violation reading 0x???????" The error does not indicate which file or folder it's trying to gain read/write access to. Upon researching i found other non-django programs that also have this issue, some were fixed by turning off Vista's DEP control...

What sites using geodjango?

I look in http://www.djangosites.org/tag/geodjango/ but i wish know about more sites using geodjango. ...