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

38 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
170 views

Loading multiple shapefiles in GeoDjango?

I have 3 three shapefiles and would like to upload all of them and project the result in GeoDjango admin. a) state.shp (for the shape of a state) b) boundary.shp (to identify a specific portion in ...
4
votes
0answers
101 views

Raster calculator using django

I want to create a web application that takes in 5 images does some calculation and shows the result on a basemap. all these images would be on geotif format single band and with values on pixels, I ...
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. ...
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 ...
2
votes
0answers
183 views

How to get points within boundaries which overlaps the anti meridian

Within my application I have a map and I'm showing markers on the map which represent objects that I get from the database. The objects have latitude and longitude. The objects are selected only if ...
2
votes
0answers
591 views

Uncaught TypeError: a.addEventListener is not a function When using React OpenLayers Wrapper

I am trying to create a web app using a Django back end with React for the front end. I am using a React OpenLayers wrapper on the OpenLayers site and keep getting the Type Error. Can someone please ...
2
votes
0answers
235 views

How to use pgRouting together with Django?

I am using pgRouting together with QGIS. Now I want to convert everything into a web-solution. I decided to use Django for that. Creating the data-model and receiving geographical data from the ...
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,...
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
0answers
57 views

Rendering polygon from GeoJSON using GeoDjango

I can't render a single polygon from a GeoJSON. I use this model: class AddGeometryBase(models.Model): name = models.CharField(max_length=100) def __str__(self): return self.name ...
1
vote
0answers
74 views

Upload large raster file GeoDjango

I created a GeoDjango model using RasterField(). I have been trying to upload the raster using postgis. Here is how I load the raster raster = GDALRaster('rasters/data/my_image.tif', write = True) r ...
1
vote
0answers
322 views

GeoDjango application using SpatiaLite database

I want to create a simple GeoDjango app with SpatiaLite database but I have this error at migrate: django.core.exceptions.ImproperlyConfigured: Unable to load the SpatiaLite library extensio`. ...
1
vote
0answers
299 views

Leaflet ImageOverlay Image does not appear

I'm trying to stitch the picture taken from my drone onto the map, and I'm using Django 1.11.14 and latest version leaflet 1.3.4. I tried to use ImageOverlay, there is no error but the image does not ...
1
vote
1answer
283 views

How to find the area of polygon in geodjango?

I need to calculate the area of the Building (which the coordinates represents). I used transform() to calculate the area, but the calculated area is not accurate. Please help me calculating the area ...
1
vote
0answers
30 views

Language requesting GeoDjango technical documentation

I am working with a project team that hired a contractor to build a custom GeoDjango webmap application. The application is mature now and the team would like to host it on our network "in-house". I'...
1
vote
0answers
183 views

Tilecache and python (TMS)

I'm working on a Django tile solution to serve thousands of images. So far I have been able to set a Mapscript server with tilecache. Everything seems ok but when loading into Leaflet I got some kind ...
1
vote
0answers
321 views

Geodjango PostgreSQL/PostGIS database question

I have a simple django app using sqlite3. My app is simple I have django user authentication system where the user can be upload spatial raster images and can see that images in user personal HTML ...
1
vote
0answers
226 views

NetworkX read_shp works on Python 2.7 but not on Python 3?

I was trying to implement the same code in Python 2.7 and Python 3.0 opening the same file from the same directory using NetworkX's read_shp function. One, using Python 2.7 IDE and the other is ...
1
vote
0answers
85 views

Django map permissions

I want to build a site using Django and have a user system. In that site I want to serve maps and other data, but not to all users. What I am interested in is : can I give the maps some viewing ...
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 (...
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....
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....
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
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=...
0
votes
1answer
256 views

Django demands to set default. ValueError: String input unrecognized as WKT EWKT, and HEXEWKB

when I try to makemigrate models with Geometry fields to postgres DB I face with next message: You are trying to change the nullable field 'geom' on allotment to non-nullable without a default; we ...
0
votes
0answers
70 views

TopoJSON from PostgreSQL database

I already finish input and run all the GeoDjango code, it worked. But time after time my data got bigger and result in big size of GeoJSON. I used this code to read database from PostgreSQL (PostGIS) ...
0
votes
2answers
133 views

Integrate JSON file inputs (specifically latlng) in Leaflet with JS

It's my first time using Leaflet and I wanted to simply put two markers based from my inputs. I managed to connect my JSON file with the JavaScript and the only problem I have is how to dynamically ...
0
votes
0answers
42 views

Django raster, not add raster to BD Postgis

I am new in this world, and I am trying to make Django Raster work, I have already followed all the instructions of: https://django-raster.readthedocs.io/en/stable/installation.html But at the moment ...
0
votes
0answers
218 views

Seeking equivalent of Google Maps API 'title' for polygons?

I am using Django, GoogleMaps API, and GeoJSON to draw polygons from the spatial database to map. I wanted to add a title so that when you hover over/click on (don't care which) the name or ID of the ...
0
votes
0answers
135 views

Display and manage (CRUD) point cloud in (Geo)Django 2

I would like to use GeoDjango to Geolocate the place I will scan. Would start to 3D scans with a DIY lidar based on Arduino/Rpi. So far no worries. Then, The Goal is to save x,y,z as input in ...
0
votes
1answer
135 views

How exactly do I use the GeoDjango Union function?

I have two models in my application: class Organization(models.Model): consortium = models.ForeignKey('Consortium') org_map = models.MultiPolygonField() class Consortium(models.Model): ...
0
votes
1answer
209 views

GeoDjango raster field display on Leaflet

In the new Django version support raster field and I follow this manual for GeoDjango raster field and this question for add raster I have built a simple demo. here the code : settings.py postgis ...
0
votes
1answer
238 views

Contained Query does not work in spatial coordinates in GeoDjango?

These are my Models. I imported the shapefiles to this Models class Parcel(models.Model): objectid = models.BigIntegerField() apn = models.CharField(max_length = 80) lot_size = models....
0
votes
0answers
154 views

Does Turf.js work with geodjango?

I am trying to do a simple buffer around a geojson I created with a model. The buffer does not show up. Here is my code. lyrStores2 = L.geoJSON.ajax("{% url 'stores' %}", { }).addTo(...
0
votes
0answers
2k views

WinError 193 %1 is not a valid win32 application. Django 2.05 python 3.6.2

I will post the error below. I did the main django tuturoials on the website without a problem. But something happens when I change my ENGINE in settings.py to the postgis version. This is the ...
0
votes
1answer
482 views

Use of leaflet to display raster layers in django

I'm using django to create a webserver that can gather user inputs, produce simulations and output the results with leaflet. So far I can produce simulations in Farsite using prepared inputs, however ...
0
votes
0answers
395 views

Django app can't upload multi-band-image

I try to upload a TIFF raster image with 5 bands in Django app and I get error message in form : Upload a valid image. The file you uploaded was either not an image or a corrupted image. I am sure ...