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

learn more… | top users | synonyms

4
votes
1answer
3k views

Why is PostGIS query not using 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, ...
6
votes
2answers
310 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
167 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 ...
1
vote
2answers
380 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 ...
3
votes
1answer
336 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
1answer
38 views

Draw line overlays and center map

(Apologies if this is a trivial question; I'm completely new to the GIS world.) I have a dataset with start and end points of lines. Columns in the table are unique_line_id, line_start_point_lat, ...
0
votes
1answer
48 views

Spatialite in GeoDjango - “…they do not properly define db_type…”

I've started a new project and choose GeoDjango for it. Because I already developed with Django and sqlite as a DBMS and all worked perfectly fine for me, I found it a great option to use spatialite ...
1
vote
1answer
69 views

GEOS_ERROR: TopologyException: Input geom 1 is invalid: Self-intersection at or near point

I'm using GeoDjango (but I guess this is from the geos library). I have a set of polygons that compose a city surface and I want to merge them into a single one. The code looks like this: polygons = ...
2
votes
1answer
45 views

Python Geospatial Development Error

I'm working through some examples in the Python Geospatial Development book by Erik Westra. On page 439, about setting up a tile map server, he gives the following code for calculating a bounding ...
1
vote
1answer
59 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 ...
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 ...
1
vote
0answers
34 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. ...
7
votes
3answers
1k 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 ...
1
vote
1answer
29 views

geoDjango point geom field

I can't figure out why the geom field is so long, I can't make heads or tails of the number either. Any help is appreciated
1
vote
0answers
66 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
1answer
569 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 ...
1
vote
0answers
47 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 ...
2
votes
1answer
86 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
184 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
34 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
311 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
92 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
86 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
127 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
149 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
61 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
34 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
526 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
1answer
66 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
593 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
559 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
83 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 ...
2
votes
1answer
177 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
4k 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
80 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
94 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
370 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
48 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
114 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
87 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
36 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
187 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
119 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
749 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
182 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
68 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 ...
0
votes
1answer
120 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
144 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
203 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, ...