Questions tagged [geodjango]

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

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

Rendering 3D map in pgAdmin 4 to view Data? [on hold]

I found this error 3D geometrics not rendered in view data (pgAdmin 4). In GeoDjango I've updated my PointField model with dim=3. After successful migration, I cannot see my data in map. My Django ...
1
vote
2answers
57 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 ...
0
votes
1answer
32 views

GeoDjango: GDAL installation problem

I'm trying to install GDAL and I'm following the GeoDjango official site. When I run ./configure I see this message: checking for PROJ >= 6 library... checking for proj_create_from_wkt in -lproj.....
5
votes
0answers
143 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 ...
3
votes
1answer
155 views

Loading shapefile in GeoDjango and displaying it in admin section?

I am trying to load a .shp file in GeoDjango Admin. As a newbie I followed their official documentation and based on that I am trying to load my own shapefile. No errors are being shown but I can't ...
0
votes
0answers
12 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
19 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
81 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
142 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
121 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
26 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
48 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
346 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
38 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
227 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
59 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
237 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
213 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
233 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
227 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
120 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
105 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
930 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
34 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
312 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
186 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
233 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
103 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
1k 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
69 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
198 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
124 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
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'...
0
votes
1answer
192 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
284 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
139 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(...
1
vote
0answers
141 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
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
285 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
523 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
108 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
768 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
99 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
36 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
660 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
35 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
306 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
408 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
1k 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, ...