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

learn more… | top users | synonyms

6
votes
2answers
289 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 ...
1
vote
0answers
52 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 ...
1
vote
2answers
349 views

Polygon intersection with bounding box with polygon's holes intact

I am trying to serve GeoJSON FeatureCollection tiles with each feature's geometries trimmed to the tile boundary. I am working on a Leaflet plugin to re-assemble the geometries. It works by building ...
1
vote
1answer
431 views

Getting “Points of LinearRing do not form a closed linestring”

I downloaded the data provided here as KML, exported to ESRI Shapefile format, checked it on QGIS and everything looked fine. Upon trying to use the layermapping utility of Geodjango I am getting ...
3
votes
1answer
305 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 ...
1
vote
0answers
31 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
1answer
43 views

how to convert kml to wkt using geodjango or python?

in geodjango i found that i can use WKT to insert geometry such as: pnt = GEOSGeometry('POINT(5 23)') but it doesn't show how to do it if the data is KML, as my data is in kml format, so my plan is ...
2
votes
2answers
135 views

Geodjango read raster files

I am developing a web app in geodjango (django) framework but I need to import raster files. Is it possible a geodjango app read raster files from a directory? Thanks
1
vote
0answers
28 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 ...
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 ...
1
vote
1answer
168 views

Geodjango - trying to get points within a polygon

I'm going through the Geodjango tutorial and trying to implement in my own project - I have loaded data from a shapefile into my model/database and I have a separate model that has a PointField. I am ...
2
votes
0answers
82 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 ...
0
votes
1answer
65 views

40k+ points from Shapefile, clustering them and populating on Google Maps/Webapp

I just started a new Python/Django webapp job related to GIS (and i'm totally new to GIS). Here is my task and what i have found so far, and i am stuck as to finding out what's the best way or the ...
0
votes
2answers
97 views

Python library or algorithm to generate arc geometry from three coordinate pairs?

I'm trying to write code to generate fixtures for a django/geodjango project. I need to generate geometry for arcs (line string) given three lat/long pairs; start of arc, end of arc and centre of arc. ...
0
votes
1answer
135 views

Geodjango render_to_kml Multipolygons - Can be fast or faster as WMS?

I am learning now geodjango. I made basic web app with postgis database. With openlayers iam displaying basic wms map and I want to add other layers from my postgis database. I use render_to_kml ...
0
votes
0answers
40 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 ...
1
vote
0answers
32 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 ...
0
votes
3answers
482 views

OpenLayers + GeoJSON from a django server does not display features

I'm having trouble with the vector layer for my little project, here's the snippet of the javascript block var map; function init(){ map = new OpenLayers.Map('map', { ...
1
vote
0answers
37 views

Data interoperability json refresh

I am using ArcGIS 10.2.2 with the data interoperability extension. I am also building a web app using python, django and django-rest-framework. I'm building a json api that i can add to arcmap using ...
1
vote
1answer
53 views

Can't get SRS from PostGIS using Proj4 text

I'm having a problem transforming a point from the Australian MGA UTM datum (eg MGA Zone 51 http://spatialreference.org/ref/epsg/28351/) to WGS84 using GeoDjango. I've narrowed that down to a problem ...
2
votes
1answer
350 views

GeoDjango Admin: Adding PointField latitude and longitude to other fields

I've been redesigning my application to allow users to set markers more easily. One thing I need to include for backwards compatibility purposes is that the new model must have a latitude and ...
0
votes
1answer
385 views

How to use Google Maps projection with GeoDjango/PostGIS

I am building a web service with GeoDjango which involves user submitted events including a location. I created a model field for my location using django.contrib.gis.db: location = ...
1
vote
1answer
65 views

Nokia HERE maps SRID

I'm just beginning with GeoDjango and just came across with term SRID. What I've understood so far is that I'd need to know a little something about the map projection to for example calculate ...
1
vote
1answer
128 views

GeoDjango: transform() not working?

I have a point: pnt = GEOSGeometry('POINT({0} {1})'.format(lon, lat)), and tried pnt.transform(900913), and it gives error: GEOSException: Calling transform() with no SRID set is not supported Then ...
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 ...
0
votes
1answer
59 views

GeoDjango: Only numeric values of degree units are allowed on geographic DWithin queries

I'm trying to get N points within 5000 meters of a certain point. My database is Postgres(PostGis). I have a model like this: class Theatre(models.Model): geom = models.PointField(srid=4326, ...
0
votes
1answer
93 views

Error on rendering linestring

I am using Mapnik 2.0.1rc0 on a Windows 7 with python 2.7 32bits inside a GeoDjango App using xml. The datasource come from spatialite 4.0. My tiling script can render polygon and point features ...
0
votes
1answer
295 views

Geodjango: Using Lat / Lon to Buffer from Point

I want to have a radius based distance search. To do this, I want to create a buffer around a point object so that I can filter objects that are inside this buffer, a method that I learned based on a ...
1
vote
1answer
43 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 ...
2
votes
1answer
112 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 = ...
0
votes
0answers
75 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
1answer
34 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, ...
2
votes
1answer
167 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: ...
1
vote
0answers
101 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 ...
2
votes
1answer
538 views

Transform projection from EPSG:4326 into EPSG:900913

. i've got this problem about projection. .i just wanted to know what am i missing. . i already displayed map base layer using openlayers through base_layer = new OpenLayers.Layer.WMS( "OpenLayers ...
0
votes
1answer
146 views

overlay my shapefiles stored in database to the web/browser [duplicate]

I am very much strrugling on how to display my shapefiles stored in postgis database to the browser or to the web.. is there anyone there knows how to do it.? I am using geodjango framework in ...
2
votes
0answers
65 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
votes
1answer
105 views

retrieving polygon shapes from postgis in geodjango [closed]

Can anyone explain how to extract polygon shapes that are stored in a PostGIS database and display it in the browser? I am using geodjango framework in python. I would like a step by step guide on ...
1
vote
1answer
131 views

Retrieving polygon shapes from postgis database and display it to the browser

I have a codes that will convert polygon shapes that is stored in the database into kml format and count all the rows in it and display it to the browser. models.py #my model in creating fields in my ...
3
votes
2answers
178 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, ...
0
votes
3answers
1k views

OpenLayers dynamic map width inside Bootstrap tabs

I have the following layout, produced with Django and Bootsrap frameworks: some tabs with inside each one of them other 3 sub-tabs. In every first sub-tab I have an OpenLayers-2.13 map. This is what ...
0
votes
0answers
197 views

Progress-bar not appearing on Leaflet-MarkerCluster

I am having problems with the progress-bar of leaflet markercluster. I am using it in a geodjango application which uses the django-leaflet app to handle the leaflet requirements. Everything works but ...
2
votes
1answer
156 views

GeoDjango: read geometry column in geography field

I have a Django application that needs to work with an existent PostGIS database, apart from its own database. I've configured multidatabase support, created a database router, created models for the ...
2
votes
1answer
179 views

GeoDjango - return SRID of geometry in GeoQuerySet

I'm wondering if there is a function in GeoDjango which would allow me to determine the SRID of a geometry column in a GeoQuerySet. I know I could do it with a raw SQL query (I'm using PostGIS) but I ...
1
vote
1answer
89 views

Hot could I generate a CRS field inside the GeoJSON object created by Leaflet layer.toGeoJSON?

I'm using Leaflet to transform some drawn polygons to GeoJSON and send them to a backend. But the GeoJSON objects generated by layer.toGeoJSON are like this: { "type":"Feature", "properties":{}, ...
1
vote
0answers
35 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 ...
3
votes
2answers
159 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 ...
0
votes
0answers
52 views

Exclude any geometry contained within another in geodjango queryset

I am trying to get a set of non-intersecting model objects my a GeoDjango project. I have a model with a polygon geometry field, and it represents a collection of buffers. The model definition is as ...
3
votes
2answers
524 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 ...
2
votes
3answers
143 views

How should I implement a many-to-many relationship in a web mapping application?

Scenario: I am given a layer of point locations called "problems." These will be displayed on a web map. Users will then use the web map interface to create and populate field information for a point ...