Stack Exchange Network

Stack Exchange network consists of 175 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
7 views

After installing geodjango my app wont migrate

raise ValueError('String input unrecognized as WKT EWKT, and HEXEWKB.') ValueError: String input unrecognized as WKT EWKT, and HEXEWKB.
0
votes
0answers
22 views

GeoDjango : Python function call on a server

I'm trying to create a web interface with GeoDjango. The purpose of this application is to extract NDVI values over a period, depending on the location of points that are configured. For this, I have ...
0
votes
0answers
15 views

In Leaflet is uGeoJSONLayer the correct approach to get smaller amounts of Point data from GeoDjango?

I have a GeoDjango model containing a PointField. There are about 200,000 records spread over a large area. We view these records with Leaflet. The data only has relevance at a small scale (zoom level ...
2
votes
1answer
63 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 ...
0
votes
1answer
80 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
81 views

GDAL install path issues on Mac OSX High Sierra

trying to run Django (django==1.11.9) in a Python 3.6.3 virtualenv with PostGIS. I've installed postgres, postgis, and gdal2 via homebrew. when I run make, the build signals: CPLUS_INCLUDE_PATH=/...
0
votes
0answers
23 views

GeoDjango vs SQL query gives different results when filtering points in the polygon

I have a Django model with the following field: class PropertyPost(models.Model): ... location=models.PointField(null=True,blank=True) ... I am filtering the objects.locations in PgAdmin against ...
1
vote
1answer
42 views

Filtering points against polygon

I am able to run the following polygon filter against my points and it will correctly filter out my points in POSTGIS="2.4.4 r16526" select propertypost_propertypost.* From propertypost_propertypost ...
0
votes
1answer
199 views

Load multipolygons from GeoJSON into GeoDjango model

I have a simple model: from django.contrib.gis.db import models class CountryShapes(models.Model): geonameid = models.PositiveIntegerField(primary_key=True) geom = models.MultiPolygonField() ...
0
votes
0answers
31 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 ...
3
votes
1answer
154 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 ...
1
vote
0answers
51 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
163 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
168 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
199 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
207 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
111 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
91 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
777 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
33 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
287 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
163 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
217 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
93 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
914 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
66 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
165 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
91 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
29 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
153 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
234 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
125 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
98 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
76 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
123 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
1k 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
234 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
1answer
476 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
99 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
691 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
85 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
2k 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
33 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
596 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 ...
1
vote
1answer
30 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
299 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
393 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
960 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, ...
1
vote
1answer
957 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
82 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 ...