Questions tagged [django]

Django is a high-level Python Web framework

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

Error when installing Geonode: cannot find django-geonode-mapstore-client>=2.1.0

I am very new to programming. I am trying to install GeoNode on an AWS Windows EC2 image, according to this tutorial (which is super, by the way!) When I get to the pip install -e geonode stage, the ...
1
vote
1answer
41 views

Google Maps satellite view footprints not congruent to street map view

I am trying to draw the layout of a building and project them to a web map using Django and Leaflet. I am using a satellite image to get the correct latitude and longitude and then I send the ...
1
vote
0answers
26 views

Query to Display Polygons not Working on Geodjango-Leaftlet Web App

I am currently working on a Geodjango-Leaflet-OpenStreetMap web app. I have around 540000 polygons of property boundaries that were drawn in ArcMap; the polygons will be imported to the web app later ...
5
votes
2answers
129 views

From uploaded zipped shapefile to Geopandas DataFrame in Django Application

I'm trying to get to a point where I can quickly filter thousands of points in a shapefile. My Django application asks for a zipped shapefile to upload, where the zipped file contains at least the ....
0
votes
1answer
38 views

Search & Display Function for Geodjango-Leaflet Web Map

I am trying to add a search function into my Geodjango-Leaflet-Openstreetmap web map. I have around 540000 polygons of property boundaries that were drawn in Arcmap; the polygons will be imported to ...
0
votes
0answers
33 views

Postgis intersection behaves strangely when getting closer to poles

We use Postgis for Django to locate the objects inside a certain viewport. It works great at the equator, but the farther we move, the more distorted the viewport becomes. Here is the result (the red ...
0
votes
1answer
323 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
2answers
5k 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
0answers
17 views

Visualizing raster files stored in postgresql DB in Openlayers or Openstreetmap Layers [duplicate]

I am relatively new to this domain. I want to make a web app that will show raster data on openstreetmap layers or openlayers. So far I have successfuly managed to upload the files to postgresql. My ...
2
votes
1answer
865 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
1answer
651 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 ...
0
votes
0answers
41 views

Django ORM geo function ST_AsMVTGeom always returns type “bytea” not “geometry”

I want to use POSTGIS function ST_AsMVTGeom with django ORM. Therefore I create following geo function: from django.contrib.gis.db.models.functions import Transform, GeoFunc class AsMVTGeom(GeoFunc): ...
3
votes
1answer
128 views

Django map permissions

I want to build a site using Django and have a user authentication 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 ...
0
votes
1answer
435 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
1answer
34 views

Difference in area size calculation since update packages

On my mac I use brew to install PostGIS and all dependencies, including geos. Since month or so, I have a failing test in my Python code. A polygon that is entered in WGS84 (srid 4326), the converted ...
0
votes
0answers
37 views

Modifying GeoNode metadata - can't overwrite template

I am following this Developer-Workshop-Sheets to add an additional metadata field to my GeoNode. https://geonode.org/dev-workshop/#/5 (this might be lost in the future, but isn't that important to the ...
0
votes
0answers
362 views

OGR_F_GetFieldAsInteger64 error with GDAL1.10 and Django 3 in Ubuntu14.04

I am using Ubuntu 14.04 for deploying a Geodjango application. Ubuntu 14.04 has GDAL 1.10 by default and i need GDAL 2+ versions for my application. Is there any way to install GDAL2 + versions in ...
2
votes
0answers
85 views

How to get the raster values of a point using Django's ORM (equivalent to ST_Value in PostGIS)?

I am working on a Django project that uses Django ORM to export raster data into PostGIS database. Here is the Django model: from django.contrib.gis.db import models class RasterWithName(models.Model):...
0
votes
1answer
939 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 ...
1
vote
1answer
79 views

Can I create a geospatial PDF in Python without using GIS software?

I have a Django web app that produces a couple different PDFs. One just displays tabular data, but another one needs to display geometries out of a PostGIS database, along with tabular data. In my web ...
0
votes
0answers
21 views

Lealfet spin path in a Django application

I work with Django and Leaflet to create maps applications. I can display a Leaflet map and load data from a GEOJSON. While this GEOJON is loading I wan't to display a spinner. I used bower to install ...
7
votes
1answer
440 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 ...
0
votes
0answers
104 views

Undefined symbol: OGR_F_GetFieldAsInteger64

I am deploying my Django project on google cloud I have installed gdal=3.0.4 but when try to deploy I get error ERROR: (gcloud.app.deploy) Error Response: [9] Application startup error! Code: ...
0
votes
0answers
23 views

ESRI proxy for Python

I have used ESRI Proxy in multiple projects which were developed using ESRI JS API and Java backend. Now I have to use secured services in a Django project. I am searching for similar proxy but it is ...
1
vote
0answers
94 views

How to plot raster data in leaflet

I'm trying to develop gis based web application. I'm using leaflet for frontend and django for backend. My requirement is to plot raster data in leaflet. I'm using rasterio for reading raster file. ...
0
votes
0answers
24 views

Geodjango Exception when importing django.contrib.gis.gdal

I have installed python 3.7.5 64 bit. GDAL 2.4.4 and corresponding python gdal from http://www.gisinternals.com/query.html?content=filelist&file=release-1900-gdal-2-4-4-mapserver-7-4-3.zip I have ...
0
votes
0answers
21 views

Filter on distance point field and choice field

I have model shop shop class Shop(models.Model): CATEGORY = ( ('BookShop', 'Bookshop'), ('Bakery', 'Bakery'), ('Dairy', 'Dairy'), Shop_category = models.CharField(max_length=200, null=...
0
votes
1answer
1k views

Use of Leaflet to display raster layers in Django [closed]

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
23 views

Calculate distance between two point field

I have two models both having point field. How can I calculate the distance between them? model1 location=models.PointField model2 your_location=models.PointField
0
votes
0answers
183 views

Printing OpenLayers map with vector tile layers has CORS error for GeoServer vector tiles

I want to create a client side printing module for OpenLayers (v6) map. In OpenLayers web site there is a printing example with JSPDF (Export PDF example ). I used this example but there is an error: ...
4
votes
1answer
3k views

GeoDjango can't find GDAL:

I'm following this tutorial: https://docs.djangoproject.com/en/2.2/ref/contrib/gis/tutorial/, I installed every component necessary. But it seems like Django can't find the gdal module. I have gdal ...
0
votes
1answer
322 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): ...
2
votes
0answers
139 views

GeoDjango query raster pixel values in PostGIS

I am building a REST API in GeoDjango that queries pixel values on a multiband raster held in PostGIS (out of db). I have defined the following model to match the raster held on the database: from ...
0
votes
2answers
757 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
29 views

CartoView Error

I've installed CartoView on Windows 7 by default instruction. I've changed Postgres to my own DB (It was problem with default DB from install package). CartoView doesn't start with this error: I ...
1
vote
1answer
368 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
41 views

Inaccurate difference operations in GEOS

I've noticed large inaccuracies in the Django GEOS API's difference operation, see the example below. In [3]: geom1 = GEOSGeometry('{ "type": "Polygon", "coordinates": [ [ [ -19.51171875, 37....
4
votes
2answers
60 views

Running Geonode solr application

I am trying to follow these steps http://www.paolocorti.net/foss4g_2017_geonode_solr/10_customization.html but I installed geonode using the quick start tutorial http://geonode.org/#install. I am not ...
1
vote
1answer
19 views

Linux gives different result from Windows after import with osm2pgsql

I've done a blank Django project. Then shared it via git on gitlab. Then downloaded a very small region from geofabrik Then: in Windows I've imported it via: osm2pgsql -c -U xx -d yy -H localhost -W -...
1
vote
1answer
525 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
2answers
2k views

How do I use Django REST Framework GIS to query GeoJSON

I am trying to write the view that will return a GeoJSON of my model stored in the database. I would like to create an API so that I can use an AJAX request in a JavaScript file I have. I have not ...
2
votes
1answer
75 views

Exact same code gives different result in server and local host

I have a back end that uses PostGIS to filter points inside a polygon. Backend is in Django, and here is the code that does the filtering: def get_queryset(self): polystr = self.request....
2
votes
1answer
232 views

GeoDjango web mapping application can only view single point at one time?

I am very new to Geodjango and have been running into some issues with a web mapping application. Currently, I am trying to make it so I can view all the schools on a map at once, as well as view ...
1
vote
0answers
110 views

Adding new static page in CartoView / GeoNode? [closed]

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
609 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
74 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 ...
2
votes
0answers
156 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 ...
2
votes
1answer
664 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
649 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 ...
0
votes
0answers
235 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 ...