The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [django]

Django is a high-level Python Web framework

Filter by
Sorted by
Tagged with
3
votes
2answers
1k views

Getting list of all countries using Overpass API?

I'm a developer that's trying to build a django application and trying to incorporate the Overpass API to it. I'm new to the API and OpenStreetMap (and GIS in general), so I thought I would start off ...
1
vote
0answers
226 views

How to display geojson data on browser from mongodb using mongoengine and django rest api

I have stored my geojson data on mongodb. which contains properties and polygon of a area. { "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "Year": 2015,...
1
vote
0answers
258 views

GeoDjango: GDAL library is not available to transform() geometry

I am trying to take points and buffer them to create polygons in my django project. I queried for points and tried to take the geometry of the first point and transform it to a meters based system (...
0
votes
2answers
163 views

I wish to find sites within a distance of a route, using django GEOS filters, by converting a route to a polygon to test model instances within

Python 2.7.12 (default, Jul 1 2016, 15:12:24) [GCC 5.4.0 20160609] Django (1, 7, 11, 'final', 0) Postgres [u'PostgreSQL 9.5.5 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16....
1
vote
1answer
519 views

Creating a lineString from another model that has pointField

I'm a beginner in GIS developing and this might be a simple question. I'm using Python Django equipped with GeoDjango. Where I use Django-leaflet and database PostGreSQL with PostGIS. I already have ...
0
votes
1answer
693 views

GeoDjango - faster way to use polygon.crosses?

I have a polygon and a line segment. I want to know if the line segment is both inside and outsize the polygon. Using "prepared" has helped but it's still no where near fast enough. how can i speed ...
0
votes
1answer
206 views

Geonode custom development

There is not much information in the form of documentation on http://geonode.org/ development. I need to do some custom "App" development for geonode so that my users can have more functionality ...
3
votes
0answers
412 views

Django and Osgeo (closed)

I want to use osgeo tools in a virtualenv with Django. I already followed the directions in the Django manual succesfully on different linux systems. But this time I got stuck while intalling GDAL. ...
1
vote
0answers
1k 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 = models....
3
votes
1answer
2k 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 = geo_models.PointField(default=...
2
votes
1answer
814 views

How to display shape files stored in a database into a web page

I'm pretty new to geodjango and python in general. But I would like to display my shapefiles stored in my database into a web pages and present them in layers and retrieve certain information if a ...
14
votes
2answers
19k views

How to calculate the bounding box of a geojson object using python or javascript?

I have django app with leaflet on the frontend and I need to calculate the bbox of a geojson object so that I can pass the coordinates to map.fitBounds() I have tried some libs as well as trying the ...
1
vote
1answer
124 views

Is there a way to use raw html with the markdown used in odyssey.js?

I use odyssey.js in part of my Django site. The map part of it is all working fine but I need to add some <i-frame> elements. I'm not sure what flavour of markdown it is and can't figure out how ...
1
vote
0answers
392 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 = models....
2
votes
0answers
974 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 database,...
1
vote
0answers
58 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
1answer
1k 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 ...
2
votes
1answer
760 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
0answers
326 views

How to customize and add additional features in GeoNode [closed]

I need some advice on how to start customizing my GeoNode installation. I tried reading up on GeoNode documentations on how to do it but it always boils down to customizing or adding to the Django ...
1
vote
0answers
1k 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, primary_key=...
1
vote
1answer
2k 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
1answer
4k views

Is MongoDB more suitable than PostGIS as backend for geo-enabled Django website? [closed]

I am trying to select a backend for a geo enabled website written in Django. Is MongoDB an easy possibility or stick with PostGIS? What are the key considerations to choose one or the other if ...
0
votes
2answers
3k 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. ...
4
votes
1answer
8k 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
2answers
761 views

Data structure: mongoengine to GeoJson

I recently posted my first question on StackOverflow, but I think the question was quite extensive and full of potential errors. So I'd begin again, step-by-step, with a much shorter and simplier ...
3
votes
2answers
1k 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, ST_GeographyFromText('SRID=4326;...
2
votes
0answers
509 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
1answer
755 views

Load partial shapefile into Postgis / GeoDjango project

I have a shapefile with Canadian postal codes, but am only looking to load a small subset of the data. I can load the entire data file and use SQL or Django queries to prune the data, but the load ...
3
votes
0answers
323 views

What is a good way to retrieve geographic data along with images and mp3 files?

I'm working in the Django backend of an audio guide for tourism with mobile devices. Basically, the client (Phonegap app for Android and iOS) can follow a route over a map (Leaflet client) and see ...
3
votes
2answers
2k views

How to debug third party JavaScript libraries such as openlayers?

I am able to work with web development tools like firebug and dev tools and solve bugs in my javascript files. But when it comes to bugs that produce errors such as "typeError: e is null" which ...