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

learn more… | top users | synonyms

9
votes
4answers
508 views

How to use PostGIS to handle complex geoprocessing workflows?

Our organization is considering moving our geoprocessing workflow to PostGIS. We are currently using ArcGIS, with a plethora of custom Python tools used in ModelBuilder. We're moving most of our data ...
7
votes
2answers
522 views

Usage of GeoDjango

We are creating a website that displays geographic data on map (currently using Google Maps js API). We are currently using postgres + postGIS + php. It has been recommended that I look into usage ...
7
votes
3answers
969 views

Use Esri Geoservices REST as backend for Python web framework (Django?)

I would like to know if it's feasible to use an existing Python web framework such as Django/GeoDjango as a frontend to work with Esri's Geoservices REST API? I envision developing a database engine ...
7
votes
1answer
524 views

How to set up GeoDjango with PostGIS 2.0?

I would like to run GeoDjango (Django 1.4) with Postgis 2.0. Whenever I try to run syncdb I get the following error for geographic fields: Failed to install index for stores.Store model: operator ...
7
votes
1answer
338 views

What are some good resources related to Geodjango?

I am trying to learn Geodjango. Has anyone used it in their own project? The documentation on the official site is sparse. Can someone point out the best resources helpful in learning it other than ...
7
votes
1answer
196 views

Optimize GEOSGeometry's spatial operations by avoiding thread-safety checks

A ranking algorithm I'm developing for a Django webapp requires performing spatial operations (within, intersections, sym_difference, etc.) using a query against large number of geometry objects. ...
7
votes
1answer
1k views

Pros and cons of using Ruby/Rails/RGeo or Python/GeoDjango for a web based GIS

We're at the investigation phase of creating a web based GIS. We're assessing options for an ORM to use in all of our backend import/export and processing routines. From my research, GeoDjango appears ...
6
votes
3answers
1k views

Can Polygons be generalized to MultiPolygons in GeoDjango?

I set up a model with models.PolygonField in geodjango, using postgres as database. I try to import shp into postgres. The problem is, shp (compiled with QGIS) mixes polygon and multipolygon, hence it ...
6
votes
1answer
581 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 ...
6
votes
2answers
827 views

Generating GeoJSON tiles from GeoDjango - basic overview?

I'm working with the glorious PolyMaps and I want to build a map similar to the population example. I understand that this needs GeoJSON tiles. I have a GeoDjango database, with a bunch of County ...
6
votes
1answer
381 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 ...
6
votes
2answers
275 views

How to handle updates to pgRouting network in webmapping environment?

I'm building an application for a client of mine that will need to create routes in a PostgreSQL database. So far so good, but I need to support edits and changes to my network and I need to support ...
5
votes
5answers
719 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 ...
5
votes
1answer
81 views

What are lazy geometries

What are "Lazy Geometries"? How are they different from other types of geometries? I'm an experienced Python/Django developer but am very new to the world of GIS, and understand that this is a ...
5
votes
2answers
2k views

Using OpenLayers (with OpenStreetMaps) and PostGis for rendering data acquired from GPS tracking device?

I'm researching and planing to acquire data from GPS device and store them in postGIS database, then use geodjango to process/work them out and finally chart them on a map with OpenLayers. Will these ...
5
votes
2answers
973 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
3answers
283 views

How to import an Access database to GeoDjango?

I'm a I've just inherited a pile of institutional geodata that's stored in an MS Access database. I need to pull that data out into a format that I can work with in GeoDjango--so I'm OK with ...
4
votes
4answers
370 views

How to compute geodesic area in GeoDjango?

I have some polygons which can be anywhere in the world. I would like to compute their areas. The GeoDjango docs for GEOSGeometry.area don't specify whether it is geometric or geodesic area, but ...
4
votes
1answer
327 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
635 views

Wrap GEOS functionality into python

I've been looking on how to get GEOSExtractLine available in python. I looked into Shapely source to if it was available for it, but it's not. I'm trying to wrap this funcionality into Django, much ...
4
votes
4answers
2k views

Geodjango- get the distance between 2 points

Sorry to be asking yet another geodjango newbie question. What I want to do is quite simple, I have 2 locations defined by gps coords, lat / long like returned by google maps: ...
4
votes
1answer
735 views

Geodjango distance between two points appears incorrect

I want to show you something. I am using django+postgis and I am experiencing wrong distance values between two points. This is my model: class Location(models.Model): name = ...
4
votes
1answer
2k views

Why is my PostGIS query not using a spatial index?

I am having an issue with a spatial query that is not making use of indexes. My schema is: CREATE TABLE geoplanet_place ( woeid integer NOT NULL, "name" character varying(300) NOT NULL, ...
4
votes
1answer
645 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
428 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: ...
4
votes
1answer
243 views

geodjango slowness and debugging

I'm using geodjango + postgres to display polygons from tigerline on a map. Pretty simple stuff so far. My issue is that when I use the GPolygon object: django.contrib.gis.maps.google.GPolygon there ...
4
votes
1answer
1k views

How to design model in Django using GeoDjango?

I am using Postgresql 9.0 and PostGIS 2.0. I am using Django 1.3 and GeoDjango.I have model with id,latitude,longitude and placename. All the places are in USA. My requirement is following - User ...
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, ...
4
votes
1answer
832 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
2answers
242 views

Shapefile postgis database to be queried by GeoDjango

I would like to create a Postgres database (postgreslq-9.1 and postgis-2.0.2) storing several shapefiles but I am uncertain on how to implement it so I'm searching for some advices. I have already ...
3
votes
2answers
152 views

Distance between Paris and San Francisco with PostGis (out of range coordinates?)

SELECT ST_Distance(gg1, gg2) As spheroid_dist, ST_Distance(gg1, gg2, false) As sphere_dist FROM (SELECT ST_GeographyFromText('SRID=4326;POINT(37 -122)') As gg1, ...
3
votes
2answers
1k views

General GeoDjango Opinion

I'm forced to crawl out of my intranet and create a public GIS site with quite an extensive dataset. All of my data is contained within PostGIS. I started dabbling with Geoserver/Postgis/OpenLayers ...
3
votes
2answers
430 views

How to fix this spatial query in GeoDjango?

I am new to Geodjango. and I am following the steps given in https://docs.djangoproject.com/en/dev/ref/contrib/gis/tutorial/# and the steps i followed before ...
3
votes
1answer
80 views

Should states/provinces be stored as geographic or geometric data types?

While reading the GeoDjango documentation, they advise using geometric rather than the geographic data type when storing values that are on a continental scale. The Canadian province of Ontario, for ...
3
votes
1answer
310 views

GeoDjango admin: how to use a WMS background other than the default OSM or VMAP0

The standard GeoDjango admin has a basic VMAP0 background. OsmGeoAdmin adds an OSM background. How do I replace the background map with another WMS? In the source code of the admin OpenLayers ...
3
votes
2answers
308 views

Invoke PostGIS functions outside of the database? Need to force 3D in GeoDjango

I'm looking to ensure that all geometries saved to the database are three-dimensional. It's easy enough to do with a call to the database, select ST_Force_3D( ST_GeomFromText( blah blah ) ) ...but ...
3
votes
2answers
461 views

Checking if a point is in a circle

I'm using shapely to check if a point is in a polygon, but I also need to check if a point is in a circle. Checking the docs, I don't see how do that... Maybe I could create a circle? circle = ...
3
votes
1answer
515 views

GeoDjango Changing My Coordinates

I'm running into a problem when saving a coordinate into one of my models in (Geo)Django. My point field is setup as: location = PointField(blank=True, null = True) So while running some tests in ...
3
votes
1answer
256 views

How to mix coordinate systems in GeoDjango?

This is a beginner question about working with different coordinate systems in GeoDjango. I've got a GeoDjango object with a polygon field, stored as OSGB coordinates: class Region(models.Model): ...
3
votes
2answers
508 views

PostGIS + pgRouting: Adding dummy links to a road network and performing routing analysis

I'm a beginner when it comes to postgis and pgrouting development. For a project I'm working on and a bit of the algorithm: I have a polygon layer that represents zones I have a line layer that ...
3
votes
2answers
146 views

Unit testing with postgis 1.5 and django

I'm trying to get some unit tests working in Django/PostGis. When the test database is formed, it doesn't have the postgis and postgis_topology extensions installed. Is there a way to issue commands ...
3
votes
1answer
269 views

How to configure tilecache on nginx

I am running a geodjango application with mapnik and tilecache. Currently tilecache is run on another server to decrease the load on the application server. The application server has nginx as the ...
3
votes
0answers
197 views

Is there a Python WMS client (thin client analogue of OpenLayers)?

I'm making a geoportal based on (Geo)Django 1.5, PostgreSQL 9.1 + PostGIS 2.0, QGIS MapServer and OpenStreet Map or Google Maps WMS services for the base layer. It seems like there is no problem, but ...
2
votes
2answers
926 views

DatabaseError: Coordinate values are out of range [-180 -90, 180 90] for GEOGRAHY type

I am using Django 1.3, PostGIS 2.0 , Postgresql 9.0 and GeoDjango. I had a database with a table for places. This table had latitude and longitude for places in the US. I enabled this database with ...
2
votes
4answers
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 ...
2
votes
3answers
362 views

which map projection should I use to calculate distance in Poland

I'm using/learning geodjango + postgis, and I'm trying to calculate distance between 2 cities in Poland. First using WGS84/4326 I define 2 points, and then after transforming this points into ...
2
votes
1answer
752 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 ...
2
votes
3answers
314 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 ...
2
votes
1answer
135 views

Cache geodjango query with bounding box filter

Im using geodjango (postgis) to retrieve points contained inside a bounding box (made by leafletjs), it works so nice, but now I want to cache this query. A tipical query is one like this: ...
2
votes
2answers
111 views

Spatialite as a DBMS-server with GeoDjango?

I would like to add a spatial component to my Django application. I turned out to GeoDjango immediatly. I am wondering now if spatialite could be used as DBMS-server for an application in Prod. Grosso ...