Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
7
votes
2answers
293 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
1answer
251 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
3answers
658 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
214 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
650 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
243 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 ...
6
votes
1answer
155 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.
...
6
votes
1answer
336 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 ...
5
votes
5answers
606 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
446 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 ...
5
votes
2answers
573 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 ...
4
votes
3answers
225 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
208 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
304 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
396 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
1answer
535 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
521 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
2answers
622 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
317 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
605 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
882 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
608 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 = ...
3
votes
2answers
301 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
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 ...
3
votes
1answer
96 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
1answer
150 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 ...
3
votes
2answers
299 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
1k 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,
...
3
votes
1answer
199 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
2answers
175 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
1answer
161 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
1answer
347 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
1answer
52 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
108 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
0answers
148 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 ...
2
votes
3answers
275 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
2answers
176 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 = ...
2
votes
1answer
486 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
301 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
2answers
51 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 ...
2
votes
1answer
65 views
How to configure and install psycogpg2 - beginner?
I need to install psycogpg2 for working with 'django'.
I read the instructions but I dont understand whether to run the commands in command prompt or in python command line. I am lot used to the GUI ...
2
votes
1answer
82 views
Get Lat & Lng from GeoDjango OSMGeoAdmin
Django OSMGeoAdmin with PointField uses OpenLayers and it's hard to use.
I want to add 2 new input elements which are lat and lng. Using jQuery, when values of the input elements are change, I want ...
2
votes
4answers
1k 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:
...
2
votes
1answer
357 views
How do I query for all polygons within a distance from a point?
Call me stupid, but somehow I couldn't figure out how to do the following.
I've got a testing shapefile with 18 features, which I successfully imported into GeoDjango (1.3, running on Spatialite). As ...
2
votes
2answers
832 views
Is it possible to do server-side (WMS) rendering / caching of vector data
I have to develop a webapp that will have to display a large number of polygons on a webpage, with complex filtering options. The source data never changes (I will simply reload a new version of the ...
2
votes
1answer
53 views
SpatialRefSys as foreign key
Using the working stuff reported here, I've written the following django model:
from django.contrib.gis.models import SpatialRefSys
class LandCover(models.Model):
shp_name = ...
2
votes
2answers
78 views
Why are the results different for the same point using GEOS Point.transform and Postgis ST_Transform?
I'm trying to define a default point setting for OSM layers in my application and I want users to be able to define the default latitude and longitude in EPSG:4326. What I'm doing right now is to use ...
1
vote
3answers
2k 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 ...
1
vote
2answers
406 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 = ...
1
vote
2answers
287 views
GeoDjango Order by distance for Model that is linked to User who has a location on their user profile
I need to order my query model by distance, however the point field in question is not on the model class but on the user profile and the i am getting an error when attempting the following.
g = ...


