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

learn more… | top users | synonyms

2
votes
2answers
52 views

PostGIS Address model/schema industry standard?

Is there an industry standard or best practices for a database of Addresses? I've searched for examples of Address models, and all I've found are very barbaric models that have something like address ...
2
votes
2answers
117 views

Can you rename the Django GeoManager object instance?

Is it possible to change the name of the GeoManager object from "objects" to something like "geo_objects"? The way I've done it in the code below is supposed to be the default way to configure your ...
1
vote
2answers
88 views

geojson data not getting displayed on map (Openlayers) in Geodjango

I have the following code models.py class PFT(models.Model): species=models.CharField(max_length=50) geom = models.PointField(srid=4326) objects=models.GeoManager() def ...
3
votes
1answer
645 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 ...
2
votes
1answer
18 views

How to polygonize using GeoDjango and PostGIS?

The code of GeoDjango-1.9.2 contains reference to the function ST_Polygonize at: https://github.com/django/django/blob/master/django/contrib/gis/db/backends/postgis/operations.py#L132 But is it seems ...
2
votes
1answer
39 views

GeoDjango -How to store measurement data

Assume I have recorded the following values during a bike trip. One such dataset has been recorded every 5 seconds: timestamp, longitute, latitude, pulse rate, pedal frequency What is the best way ...
2
votes
1answer
111 views

GeoDjango, distance filter based on database column

I have a geodjango model with fields coverage = 10 * 1609.344 reference_point = Point(-72,45) #or some other lat lng class ServiceArea (geo_models.Model): center = ...
1
vote
1answer
59 views

GeoDjango - save two Point fields, one for geography and one for geometry

Most of the explanations I've read for geography and geometry seem to suggest that one must only use either geometry or geography, and that the only way to use both is to cast/convert between one and ...
1
vote
1answer
120 views

Display WFS (GeoJSON) from GeoServer with OpenLayers on Django

I want to display point data from PostGis to my Django application. I created WFS service from GeoServer and want to display using OpenLayers. I went through many posts but none of them worked My ...
1
vote
1answer
40 views

Using geomanager to query

I'm doing a project using the combination of GeoDjango & PostGIS & Openlayer so far, I've imported OSM data with osm2pqsql, done settings and I knew the data is constructed by ...
1
vote
1answer
109 views

Django Postgis Distance from point

I have a point where the objcet is and another point for mylocation. I want to calculate the distance >> object_location <Point object at 0x7f9ceaac7be0> >> mylocation <Point ...
1
vote
1answer
153 views

Creating geodjango model with geometry field that can accept different projections

I am working on web application with GeoDjango and within the model (db table) RoadAxis I have geometry field or more precisely LineStringField where I need to store different polylines (road axis) ...
1
vote
1answer
63 views

GeoDjango Scale/Layers issue?

I've been having issues visualising data from a shapefile in GeoDjango using OpenStreetMaps. I believe it's some sort of a scale issue because of how it appears(as you can see in the screenshot of the ...
0
votes
1answer
19 views

How to set coordinate dimensions in Django GDAL API?

The Django GDAL documentation for coord_dim says: coord_dim Returns or sets the coordinate dimension of this geometry. For example, the value would be 2 for two-dimensional geometries. But how do ...
0
votes
1answer
43 views

Create a GEOSGeometry from a FeatureCollection in GeoDango

Is it possible create a GEOSGeometry from a FeatureCollection(GeoJSON)? For instance: GEOSGeometry(json.dumps(fc)) where: fc = { "type": "FeatureCollection", "features": [ { "type": "Feature", ...
0
votes
1answer
353 views

GeoDjango: Find all points within radius?

I am working in GeoDjango (with a Django 1.7 and PostGIS 2.1.4 backend). I have a model with a PointField in my database and I am trying to find all items within 10km radius of a point. Here is my ...
0
votes
1answer
91 views

geodjango + OL bbox strategy

I managed to learn the fundamentals of Django, GeoDjango and know OpenLayers for a while. Now I realize a project with a lot of objects with point geometries. To make the user map fast and responsive, ...
4
votes
0answers
130 views

Display GeoJSON data on map using django-leaflet?

I want to display GeoJSON data on map in geodjango. When I use the below code only GeoJSON data like: { "type": "FeatureCollection", "features": [{ "type": "Feature", ...
3
votes
0answers
383 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
0answers
66 views

GeoDjango and bug with bounding box query

Just some context first, I have a postgres database with PostGIS extension, running under a GeoDjango wrapper. I have a weird bug that hopefully someone can shed some light on. I'm running a query ...
2
votes
0answers
134 views

geodjango difficulties with srid

I'm trying to make geodjango app. I'm using SQLite and SpatialLite. I want to add shops, and be able to sort them from closest to furthest from my location. When in my model I have: location = ...
2
votes
0answers
147 views

Adding marker on a leaflet map

I'm very new to GIS and for learning I started with building a simple web app with GeoDjango. I am using dango-leaflet. Since I have a very limited knowledge I am facing many challenges. I'm trying to ...
2
votes
0answers
176 views

GeoDjango order_by('distance') not working as expected?

Using GeoDjango, I am trying to sort a list of users based on the distance from a point. It does generate a list, but its not ordered by distance, though I specify that in my query. This is the query ...
2
votes
0answers
312 views

GeoDjango with MongoDB

Has anyone had experience successfully deploying GeoDjango with MongoDB? Is it possible? If so, how is it as simple as as installing the non-relational fork of Django and setting MongoDB as the ...
2
votes
0answers
99 views

GeoDjango and Spatial Indexes

I have three questions about spatial indexes management in GeoDjango, and I cant find the answers in the doc. First, I know GeoDjango creates a spatial_index for a geometry field by default when a ...
1
vote
0answers
84 views

Django/PostGIS: How to insert coordinates in PointField in EPSG:27700, and return EPSG:4236?

I am using Django 1.9 with PostGIS. I have input data that consists of British National Grid eastings and northings, and a table that looks like this: class Org(models.Model): name = ...
1
vote
0answers
31 views

cross domain problem in geodjango for openlayers in django development server

I want to display geojson data on map in geodjango. Below is my code template/map.html (javascript code). only the map is loading but not the geojson data. Whwn I used debugger the url is gettin ...
1
vote
0answers
65 views

show polygon from database in browser in geodjango

I tried to retrieve the polygon which I saved into postgis database. (all polygons) Here is my code: models.py from django.contrib.gis.db import models class MyMap(models.Model): name = ...
1
vote
0answers
22 views

Error in Load module in Geodjango

I am following this tutorial https://docs.djangoproject.com/en/1.8/ref/contrib/gis/tutorial/ and did layer mapping. And going along with documentation, I tried the below code from world import load ...
1
vote
0answers
350 views

Import KML file into GeoDjango

I'm trying to import a KML file into an existing GeoDjango app (using a Postgres 9.3 database). This is my Django model: class PCT(models.Model): code = models.CharField(max_length=3, ...
1
vote
0answers
136 views

Create polygons enclosing same number of points on PostGIS

I have a geodatabase on Postgis with points representing customers, what i need is give a number of customers, lets say 100 and it need to generate polygons enclosing 100 clients each one. I only ...
1
vote
0answers
59 views

Read and Write data with Open Layers3

I'am currently using postGIS/geoDjango/OL3 I need the capability for a user to drop a point on the map, and store that in my database. When any user returns, that point will be shown on the map. ...
1
vote
0answers
122 views

Clustering the WGS84 point features (projection transformation aspects)

My question is quite trivial and was discussed many times before (like here) but in our case it has the confounding extra requirements... The list of sparsely distributed 2d point features is stored ...
1
vote
0answers
64 views

GeoDjango WebMapping Application Update

According to the below GIS.SE questions, GeoDjango was the preferred framework for creating simple and quick webmap applications. But these questions are now all 2-3 years old. Can we verify whether ...
1
vote
0answers
137 views

Geodjango transform introduces large errors

Apologies for the possibly naive question. I'm trying to understand how Geodjango (running on PostGIS) deals with coordinate transformations, and am experiencing some unusual behaviour. Let's say I ...
1
vote
0answers
285 views

django---error in displaying data and displaying it on the map

. i am trying to display a feature queried from postgis. . i also designed a user input field to enter the id of the desired feature to be displayed. . i have already queried the attributes first ...
1
vote
0answers
51 views

Most efficient way of passing values from OGRGeometry to ModelField in geodjango

I am writing a custom parser that maps shapefile data to a geodjango model in a Django 1.6 project. To read the shapefile I use the DataSource object from django.contrib.gis.gdal, which provides ...
1
vote
0answers
36 views

Mapserver mapscript map inset

What is the recommended way to produce a map similar to the one in http://www.nexusenergy.com.au/6468050/nexus-energy-oil-gas-exploration-and-productio.htm I would like to dynamically create the ...
1
vote
0answers
142 views

django floppy forms geospatial widgets error

I'm trying to define a view that lets the user edit the data in the database, I'm using floppyforms, because of its geodjango widgets which is part of the form that i would want the user to use for ...
1
vote
0answers
297 views

Problems combining (union) Multipolygons in geodjango

I'm using geodjango and postgis (1.x), What is the best way to combine (union) a list of multipolygons. in what i assume is rather inefficient i'm looping trough like this combined = multipolygon ...
1
vote
0answers
505 views

Get the distance between 2 WGS84 GEOSGeometries

I currently want to check if 2 given GEOSGeometry objects of type Point are within 100m of each other. (length flexible) Looking at previous asked questions on this topic, most of the answers were ...
1
vote
0answers
260 views

How to Modify Polygons in GeoDjango?

Just getting acquainted with GeoDjango. Have Basic Tutorial app created with sample world data. In trying out the admin, I appreciate seeing the polygon on the map and a couple basic tools for adding ...
0
votes
0answers
62 views

GeoDjango: Insert geography coordinates and filter the nearest points, step by step

I would like to: Save pairs of srid 4326 (latitude, longitude) points in a PostGIS Geodjango 1.8 Database. (Maximum distance between the edge points: 2.000km) Given a srid 4326 (latitude, longitude) ...
0
votes
0answers
206 views

Failed to load resource: the server responded with a status of 404 (Not Found) Django while displaying geojson data on map

I'm getting the following error when I try to diplay geojson data on map. http://localhost:8000/geojson/%7B%22type%22:%22Point%22,%22coordinates%22:[76.996944,31.58]%7D Failed to load resource: the ...
0
votes
0answers
178 views

How do I set up a PostgreSQL database for use with PostGIS and GeoDjango?

The Django docs say to use createdb -T template_postgis geodjango but I already have a database set up. While trying to find out what this actually does and a way to apply it to an existing ...
0
votes
0answers
14 views

Trouble Changing Paths for geospatial libraries

I am currently using Python 2.7, Django 1.8 and Windows 7. I am trying to set the Windows environment variables, as per the instructions here . When I try to do this using the Powershell, I get the ...
0
votes
0answers
258 views

GDAL Installation help in windows

I'm trying to build a GIS application in Django Framework. I completed the GeoDjango installtion (postresql, spatial libraries). I installed OSgeo4W in my C drive. I also setup environment ...
0
votes
0answers
177 views

Adding GIS feature into an existing postgis table using django 1.6

i am using Django 1.6 on my web map. the problem i got is that i cannot import shapefile with features about 200. . the console has given me this traceback. . Saved: 162-05-0001-005-31 Saved: ...
0
votes
0answers
327 views

mapnik error - fatal flex scanner internal error--end of buffer missed

I am using Mapnik 2.0.1rc0 on a Windows 7 with python 2.7 32bits inside a GeoDjango App. I often got this error: fatal flex scanner internal error--end of buffer missed that makes python to crash ...
0
votes
0answers
149 views

Missing tiles when django application is hosted on an apache server

I'm building a GIS application using Django as my web framework and OpenLayers to implement a slippy map interface. I was initially using the django runserver for development and everything was ...