Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [django]

Django is a high-level Python Web framework

-1
votes
0answers
36 views

How to get image boundary from .tif file?

I'm developing web portal for a farmer to monitor their farm. So far I have model to train the data taken from DJI drone. I wanted to make my web portal more visualized, and I have stitched the images ...
0
votes
0answers
34 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
25 views

Using Django with Microsoft SQL Server to migrate model error spatial data?

I'm trying to migrate models which include spatial data (polygon and points) to Microsoft SQL Server 2017 Express. I'm able to successfully connect to my database using django-pyodbc-azure and ...
1
vote
0answers
12 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 extension. here ...
1
vote
0answers
22 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
0answers
11 views

geodango form with geometry field and leaflet map

i use geodjango and leaflet and i want to create a django form where including geometry field with map widget (the user must to put in leaflet map) like as django admin page . i try to follow this ...
1
vote
0answers
24 views

Add a new static page in CartoView / GeoNode

I have installed the CartoView with the Windows stable build installer. Then, I try to add a static page to the newly installed CartoView / GeoNode by modifying the urls.py file: urlpatterns = [ # ...
1
vote
2answers
86 views

Calculating distance between a Point and a MultiPolygon PostGIS object

I'm working in a layer with MultiPolygons and I'm trying to calculate the shortest distance between a MultiPolygon and a point which is contained in that MultiPolygon, using Django and PostGIS. At ...
0
votes
0answers
49 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
0answers
28 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
0answers
24 views

GeoDjango: Move a Point east by one mile

Given a Point (django.contrib.gis.geos.Point) how do I find another point 1 mile east from that Point object? (A) ---[ 1 mile ]---> (B) My failed attempts: I've considered trying to go hardcode ...
0
votes
1answer
78 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 build a simple demo. here the code : settings.py postgis ...
1
vote
1answer
116 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 ...
-2
votes
1answer
63 views

Loading LIDAR data to POSTGRES and use it with DJANGO [closed]

I have some project at the Faculty and I don't know from where to begin. I have point cloud data (LIDAR data) and I need to make the website with that data on it and with functions for some sort of ...
0
votes
2answers
262 views

Python 3.6, Django 1.11, Windows 10, Gdal 2.2.4 not working

I've been trying to find a solution to this issue, but couldn't find anything. I've installed OS4GEOW using the Django Docs But I get the following error: File "C:\Python36\lib\site-packages\...
1
vote
1answer
83 views

django-raster rendering raster url

i want to add raster functionality in django using postgis database using django-raster package and this docs. here my code : models.py from django.contrib.gis.db import models class RasterWithName(...
1
vote
1answer
30 views

How to convert the area to feets in GeoDjango?

my geom has // When I am trying to get the area of the polygon geom.area //7.27640644096346e-08 How to get these value in feets. I don't know what is the units of these value I am trying to ...
1
vote
0answers
26 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'...
0
votes
1answer
79 views

Why my contained Query doesnot 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
76 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
617 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
0answers
49 views

.transform malloc error for GEOSGeometry in geodjango

I have trouble with transformation of coordinates in geodjango. I managed to put this proof-of-concept in place. Using Django==1.11 on MacOS X (High Sierra) with http://www.kyngchaos.com/ compiled ...
1
vote
0answers
86 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 ...
0
votes
0answers
402 views

List locations ordered by distance from user location

I want to display a list of locations ordered by distance from User Point. I have my models definition: from django.contrib.gis.db import models as gis_models from django.contrib.gis import geos ...
0
votes
1answer
297 views

django leaflet custom popups

I use some django project with PostGIS for database and leaflet map. I have add simple leaflet popups like this : and here the snippet code to call popups : onEachFeature:function (feature,layer) { ...
0
votes
0answers
56 views

problem with django GDALRaster to load ascii grid rasters

I'm trying to load a raster file in format ascii grid to postgresql using postgis. My model: class elevation(models.Model): rast = models.RasterField(srid=3857) filename = models.CharField(...
0
votes
1answer
220 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
1answer
46 views

Python 2.7.12 not compatible with Django but still cannot be updated

I have installed Python 3.6.4 on my computer. I am trying to set up Django but each time I try to use the command prompt, it tells me that the Python version am using is not compatible. When I check ...
1
vote
0answers
67 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 ...
0
votes
0answers
258 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 ...
1
vote
0answers
270 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 ...
0
votes
1answer
318 views

Connecting Django to postgresql

I plan on building a web application using Geodjango. After installing PostgreSQL, PostGIS, OsGeo4W and psycopg. I changed my settings.py db to that of the PostGIS. Each time I run the commmad "python ...
1
vote
0answers
167 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 ...
0
votes
0answers
158 views

WMS response in svg+xml format

When a sent a request to mapsever I get PNG image - that's ok. Then I change format on "Format=image/svg+xml" and get "Output format 'image/svg xml' is not supported in the GetMap request". Could ...
4
votes
0answers
83 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
1answer
510 views

Unable to display geojson data on a leaflet map in a Django app

I'm developing a Django application using Django-leaflet and Postgresql / PostGIS. I retrieve the data in views.py and I convert them in GeoJSON format using Django's serializer. My views.py: from ...
1
vote
1answer
141 views

Get random point from django PolygonField [closed]

TL,DR; I want to get a random point from a polygon (potentially) using ST_GeneratePoints. Background I'm making a GeoDjango webservice and have a collection of UK Postcodes with respective ...
0
votes
0answers
122 views

Django GEOS: SRID 4326 vs SRID 32118 to calculate area

I believe that SRID:4326;geography=True is used for representing actual geography (cities, locality, etc.) but when I do polygon.area, I'm getting area of a geometry object. To find out the area in ...
2
votes
0answers
439 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 ...
1
vote
0answers
59 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 ...
0
votes
2answers
141 views

Issue with GEOS not creating buffer correctly for use in Django

Currently in my django I use the following function to take a point, buffer it by 2000 meters, and produce a circle polygon: updatequery = str("update table_events set event_geo = ST_Multi( ...
1
vote
0answers
145 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 ...
5
votes
1answer
1k views

Splitting Polygon by Linestring in GeoDjango?

In am a Django developer with limited GIS knowledge. In Django I have a polygon and a linestring as follows: I would like to split the polygon by the linestring to obtain the 4 resulting polygons (or ...
1
vote
1answer
201 views

Styling Vector layer with OpenLayers

I'm using Django and Openlayers to add some data from my PostGIS database to the map but can't seem to work out how to style the vector layer that uses the kml. var layer = new ol.layer.Vector({ ...
2
votes
2answers
710 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
167 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
183 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
109 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
335 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
458 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 ...