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

learn more… | top users | synonyms

2
votes
0answers
30 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 ...
1
vote
1answer
29 views

ImportError: cannot import name GEOSGeometry Django 1.7

I am a heroku newbie and I keep getting the said error whenever I try to sync db on heroku. I am using a hobby Dev instance which from this link shows that their is no support for PostGIS on the free ...
0
votes
1answer
25 views

how to custom geodjango admin

Here is what I do in django: class MyModel(models.Model): pass class MyModelAdmin(admin.ModelAdmin): pass admin.site.register(MyModel, MyModelAdmin) But with geodjango I have this: ...
2
votes
1answer
92 views

How to efficiently use a Postgres DB with Python

I have a Postgres DB with a lot of lines that are too long and so now I want to split those lines into smaller ones. This is why I started writing a little python script for that job. Basically it ...
1
vote
1answer
44 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
98 views

GeoDjango Setup: Python 'GDALAllRegister' Attribute Error

I am trying to setup Geodjango 1.8 in a virtualenv with Python 2.7.9 (Win32). I have installed and setup Postgres/PostGis and have my Path setup to my OSGeo4W directory. I have also installed the ...
1
vote
0answers
89 views

GeoDjango: AttributeError: function 'GDALAllRegister' not found [closed]

Im trying to get started with GeoDjango. I am using this https://docs.djangoproject.com/en/1.8/ref/contrib/gis/tutorial/ tutorial. When I run "python manage.py migrate" This error occur: ...
0
votes
0answers
99 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
0answers
101 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, ...
0
votes
1answer
23 views

What is the best strategy to add a custom constraint to a geo-django table?

What is the best strategy to add a custom constraint to a geo-django table? This is the corresponding sql-statement: ALTER TABLE my_table ADD CONSTRAINT enforce_valid_geom CHECK ...
0
votes
1answer
109 views

How to dispay my PostgGIS geometry on the GeoDjango map widget?

I'm trying to display a custom map feature on a GeoDjango map. The geometry is a multipolygon stored in a PostGIS database backend. And I have trouble to find the correct piece of documentation that ...
1
vote
1answer
143 views

Unable to create Polygon using Geodjango admin interface

I am new to GeoDjango. I have created Admin interface for my Model. It loads correctly. I am also able to draw the Polygon on map(At client side) but when I save It tells me Invalid input and throws ...
2
votes
2answers
62 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 ...
0
votes
0answers
82 views

Django with arcpy 10.3: RasterDB.dll problem

I am working on a Django application and I need to be able to work with arcpy for geoprocessing. I have installed the Anaconda python distribution to use as the python for Django, because it has conda ...
2
votes
0answers
60 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 = ...
1
vote
0answers
81 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 ...
2
votes
1answer
106 views

GeoDjango and Google Maps

I try to calculate distance between two cities and I'm in big confusion because the results are wrong. I have a model in geodjango like this: class Address(geo_models.Model): coordinates = ...
1
vote
1answer
179 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
168 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
497 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
54 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
0answers
47 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
1answer
49 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
80 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
292 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 ...
1
vote
0answers
51 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 ...
2
votes
0answers
99 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
753 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 ...
0
votes
1answer
170 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 ...
2
votes
0answers
123 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
0answers
132 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
2answers
282 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. ...
1
vote
0answers
82 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
1answer
83 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
2answers
110 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
1k 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 ...
1
vote
1answer
152 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 ...
0
votes
1answer
1k 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
143 views

GeoDjango error: 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, ...
2
votes
1answer
333 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 ...
1
vote
1answer
1k 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 ...
2
votes
2answers
334 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
1answer
54 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
0answers
123 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
52 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, ...
1
vote
0answers
178 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
241 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
1answer
1k 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
313 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 ...
1
vote
1answer
189 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 ...