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 [geodjango]

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

0
votes
0answers
8 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
1answer
32 views

Get exterior ring of a multipolygon using GEOSGeometry or PostGIS

I am trying to get the exterior ring of the multipolygon in the image below using GEOSGeometry (through GeoDjango) or Postgis, but I have not found an easy solution. This is an example of a ...
0
votes
0answers
25 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
38 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
1answer
56 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 ...
2
votes
1answer
130 views

GeoJSON to Leaflet map using Django template

I have a view that returns this GeoJSON data {"type": "FeatureCollection", "features": [{"type": "Feature", "geometry": {"type": "Polygon", "coordinates": [[[-74.6739518440393, 40.7747050657312], [-...
0
votes
1answer
153 views

How external GPS can feed HTML5 geolocation API for django-leaflet

My goal is the following: I'm developing a Django project. The goal is to locate places with a form. I'm using a CreateView generic view (maybe I should create it manually for more customization. 3 ...
0
votes
0answers
75 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
17 views

geodjango ogrinspect on geojson layer returns all field lengths to zero

I have a geojson layer which I am running python3 manage.py ogrinspect reporter/data/parcels.geojson parcels --srid=4326 --mapping --multi which returns from django.contrib.gis.db import models ...
0
votes
1answer
47 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
1answer
531 views

leaflet search control not showing up in geodjango app

I have a very basic geodjango app and I am trying to enable search control on it. I have found this question Adding a search box to a Leaflet.js example and the link brought me to what it seems like ...
0
votes
0answers
26 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
0answers
184 views

Uncaught TypeError: L.GeoJSON.AJAX is not a constructor - Error in geodjango

I am following Wanjo Hikibui's excellent guide to GeoDjango At the end of part 5, I am getting the same error, but I don't know how to fix it, as the solution in the video was not sufficient, and it ...
0
votes
1answer
120 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 ...
1
vote
1answer
150 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
72 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
552 views

Error building GEOS on Ubuntu 18.04

Following the directions to install geodjango on linux ubuntu 18.04, so far here are my commands: sudo apt-get install binutils libproj-dev gdal-bin wget http://download.osgeo.org/geos/geos-3.4.2....
3
votes
0answers
57 views

How to dynamically determine a pixel size for raster creation?

I have a GeoDjango web service that allows a user to upload a las file (v1.2). I can derive the extent of the point cloud coverage from the file using laspy: from django.contrib.gis.geos import ...
1
vote
1answer
115 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
38 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
102 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....
1
vote
1answer
115 views

Converting GeometryField to MultiPolygon using GeoDjango?

I am trying to add a bunch of school boundary files into the database. The boundary files are inconsistent. They are processed by DataSource as either Polygon, MultiPolygon, or GeometryCollection. ...
0
votes
0answers
99 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
56 views

Adding a KML file into a GeoDjango field

I'm trying to add a KML file to a field in GeoDjango. Link to KML file. I tried to follow the answer on this question but it's mostly wrong. My model: class School(models.Model): boundaries = ...
0
votes
0answers
52 views

GeoDjango LayerMapping convert OFTInteger64 to OFTString to add into database

I am trying to add a shapefile to my GeoDjango PostGIS database with LayerMapping. lm = LayerMapping(School, 'geo/schools/Education.shp', {..., 'school_type': 'TYPE'}) One of the fields in the ...
1
vote
0answers
77 views

How can i add placemarkers (points) from click-event or database to openlayers3 map using geodjango

How can i plot place-markers in Geodjango using the methods: a user click-event from the user on openlayers map preferably in reactjs or alternatively from geodjango database that has PointField() ...
0
votes
0answers
795 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
162 views

When to use GeometryField?

I'm trying to understand what is the point of GeometryField. The GeoDjango docs don't say much and neither do questions on Stack. What is special about it? When would you use it over PolygonField/...
0
votes
0answers
52 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 ...
0
votes
0answers
490 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
361 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) { ...
1
vote
0answers
82 views

django “GeometryField” widget type to accept coordinates in floating point format

I'm trying to make a django form for user to specify the coordinates on a map and i did this by including small map widget where it's possible to choose geometry type as well as put it on map. But i'm ...
5
votes
2answers
518 views

Add a GeoDjango PolygonField to a Leaflet map

Is it possible to add a GeoDjango PolygonField to a Leaflet map? I've tried to do that by adding the js code below to my template, but I get a TypeError: t is null instead: <script type="text/...
1
vote
1answer
66 views

Make a relationship based on points and fences

I have two models on geodjango, one for tracks and one for fencing, I am trying to match both of them but I couldnt get it working as I spected. My target is check each point if it is inside a fence. ...
2
votes
0answers
1k views

ogrinfo: symbol lookup error: /usr/lib/libgdal.so.20: undefined symbol: sqlite3_column_table_name [closed]

On trying to execute ogrinfo i got this error: ogrinfo: symbol lookup error: /usr/lib/libgdal.so.20: undefined symbol: sqlite3_column_table_name I got this on one of my PCs, though on the others it ...
2
votes
0answers
31 views

Getting house neighbors using GeoDjango?

i have a house model with these properties centerpoint = PointField(srid=0, null=True, blank=True) front_left = PointField(srid=0, null=True, blank=True) front_right = PointField(srid=0, null=True, ...
1
vote
1answer
462 views

How to share accurate location with Geodjango

I am new to GIS and have been working on a webapp for location sharing. I want to be able to have my users be able to "Pin" their location in a map. For this I installed Geodjango/PostgreSQL/Postgis ...
0
votes
1answer
24 views

Structure shared raster data across GeoDjango apps?

I currently have a project that consists of multiple webmaps that are written as different apps in a GeoDjango project. The structure of the project is as such: -project - manage.py - project ...
1
vote
0answers
288 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
352 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
2answers
733 views

How do I use Django to execute PostGIS query to get polygons within four points?

Here's a sample PostGIS query I use to get geometries within four points: SELECT * FROM myTable WHERE ST_MakeEnvelope(-97.82381347656252, 30.250444940663296, -97.65901855468752, 30.29595835209862, ...
0
votes
0answers
144 views

GeoDjango model migration lead to undefined symbol: sqlite3_column_table_name error

Trying to migrate models on Django (GeoDjango) using GeoDjango tutorial leads to following error: django.db.utils.OperationalError: could not load library "/usr/lib/postgresql/9.3/lib/rtpostgis-2.1....
1
vote
1answer
653 views

Display GeoJSON on Leaflet web map with GeoDjango

I have to display my geometry data in my Leaflet based web map and I use GeoDjango to display it, I have loaded GeoJSON data and front map but I can't put my geometry data on my web map. How can we ...
1
vote
0answers
67 views

How to replicate ST_Length using python without saving to DB?

I'l like to be able to calculate the length in meters of a LineString, in python. I came across this question: Get LineString length in meters (Python, GEODjango) but the recommended method seems to ...
3
votes
1answer
450 views

OpenLayers 4 Displaying GeoJSON Point Data

I'm struggling to properly display my GeoJSON data which is being serialized from a GeoDjango model, though hopefully that isn't relevant to the issue at hand. I copy and pasted a GeoJSON example ...
1
vote
0answers
59 views

Importing OGRGeometry Django 1.9?

I have installed all the relevant packages and libraries to run a GEODjango application, when I migrate the django_warp application, I get the following error: Traceback (most recent call last): ...
3
votes
1answer
245 views

Reading Point object under different environnement

The problem I create a GIS model which works fine on my dev environnement. When I push my app to my production environnement I get an GEOS_ERROR GEOS_ERROR: ParseException: Invalid HEX char. here ...
2
votes
2answers
76 views

How do apps like zillow serve up data?

I'm a total newbie to GIS, but attempting to build an app similar to zillows that quickly serves up data based on user input. Currently, i'm collecting the data via shp files which are being store ...
3
votes
1answer
599 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 ...