Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

learn more… | top users | synonyms

2
votes
1answer
663 views

Area units for GEOS area property?

I'm working with GeoDjango and have a polygon in the WGS84 projection. I need to find its area in square meters. When I call polygon.area, I get some float out and I have no idea what the units of ...
1
vote
2answers
588 views

PostGIS - certain MultiPolygons cause “BOOM! Could not generate outside point!”

I've just posted this at StackOverflow and someone suggested I try here. Original: http://stackoverflow.com/q/5863859/246265 I'm trying to represent a rectangular area which crosses 180 degrees ...
6
votes
1answer
370 views

Is there a GeoDjango tutorial for GeoRSSFeeds?

I'm going through GeoDjango basics right now. Ideally, I'd like to publish a GeoRSS from a set of data I have that is already in Django's database. I know how to get a regular Feed working, but when I ...
4
votes
1answer
739 views

Best GeoDjango MySQL workaround for distance queries

I'm using mysql 5.1.50, so the distance QuerySet method is not available to me. Here is my model: class Location(models.Model): name = models.CharField(max_length='100') point = ...
4
votes
1answer
616 views

GeoDjango: Order by distance for model that has a ForeignKey relation to another model that has a PointField

Model A has a ForeignKey relation to Model B. Model B has a PointField. Is there a way to order Model A objects by distance from a POINT?
4
votes
1answer
326 views

Monster Spatial database server suggestions

I'm going to setup a open Mapserver w/ Openlayers, Geojango, Postgis using Postgresql. And I need some suggestions from people that have been shopping for what I need longer than I have. What would ...
4
votes
1answer
1k views

GeoDjango: order PointField by distance?

I've got a GeoDjango model as follows: class City(models.Model): id = models.IntegerField(primary_key=True) county = models.ForeignKey(County) location = models.PointField(null=True, ...
5
votes
2answers
820 views

Django PolygonField: how to display on map?

Extremely beginner question. I have a GeoDjango model with a MultiPolygonField. How do I retrieve the value of this field and display it as a polygon on a map? class county(models.Model): cd = ...
4
votes
1answer
390 views

Geodjango insert statement: psycopg2.IntegrityError: violates check constraint

Why is the following INSERT statement throwing this error? INSERT INTO domes_place (placeid, structidx, oscode) VALUES ('10', '1', 'POINT(51.121282945772 1.3138398501222)'); psycopg2.IntegrityError: ...
1
vote
2answers
782 views

Error adding data to Geodjango database: parse error… within geometry

I'm trying to insert some values into a Geodjango database, but getting errors. This is the table: class Place(models.Model): placeid = models.IntegerField(primary_key=True) structidx = ...
2
votes
3answers
310 views

UK National Grid references and GeoDjango

Newbie question. I'm trying to insert some UK National Grid references into a Django PointField defined as follows: oscode = models.PointField(srid=27700, null=True, blank=True) My question is ...
6
votes
1answer
526 views

Help simplifying multipolygons in geodjango

I have a few multipolygons that have several hundred points in them. I'm looking to create less complex "thumbnails" polygons. Naturally I'm attempting to use the simplify method, which is supposed ...
2
votes
3answers
3k views

struggling with GeoDjango install: ERROR: could not access file “$libdir/postgis-1.5”: No such file

I'm installing GeoDjango on Mac OSX. I've followed the official Mac install instructions, which all went smoothly, and am now creating a spatial database template for PostGIS. However, when I try to ...
5
votes
5answers
691 views

Getting a square mile bounding box anchored by coordinates?

Let's say I have a lat/lng coordinate pair. I want to determine the coordinates that would create a square mile box. The existing coordintae pair would be the top left of the box, and the coordinate ...