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
1
vote
1answer
11 views

OpenLayers: map with popup and marker cluster

I'm trying to create a map with marker cluster and popup using Openlayers 5. I'm be able to show a popup on click as you can see below but when I try to use marker cluster the contents are no longer ...
2
votes
0answers
22 views

JSON file fails to open

I have a file that has no extension. This file resides on an internal web server and it's called by a web map application based on django python. It looks like : > {"crs": {"properties": {"name": ...
0
votes
1answer
23 views

Labeling a GeoJSON with OpenLayers 5

I'm trying to put a label over a polygons. My polygons cames from a GeoJSON serialized by GeoDjango. I'm be able to categorize this polygons using the attribute "type" but I wanto to see the height as ...
0
votes
0answers
6 views

Invalid pointer returned from “GDALOpen”

I've create a model for upload a raster into my GeoDjango project. models.py from django.contrib.gis.db import models as geomodels from django.db import models class RasterMap(models.Model): ...
1
vote
0answers
51 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
1answer
44 views

OpenLayers 5: To display the label for a point

In my project there are two GeoJSON point layer, both has the same attribute 'name'. I would like to use this attribute for labeling all points. I've found this similar question but it is for ...
1
vote
1answer
74 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 ...
1
vote
1answer
37 views

Reproject GeoJSON with OpenLayers 5

I'm using GeoDjango to render many points on a map based on OpenLayers 5. My points have EPSG 4326 and the map has EPSG 3857, I need to reproject the points. On the OpenLayers API I've founded two ...
1
vote
1answer
48 views

Assign the SRID to a serialized GeoJSON

I've created a simple model like this: class AddPoint(models.Model): name = models.CharField(max_length=100) geom = geomodels.PointField(srid=3857) def __str__(self): return self....
2
votes
1answer
28 views

Form returns 'IntegrityError'

I'm trying to create a simple form useful for put a point on a map. models.py from django.contrib.gis.db import models as geomodels from django.db import models class AddPoint(models.Model): ...
0
votes
1answer
42 views

Uncaught ReferenceError: MapWidget is not defined

I'm trying to create a form usefull to add only one single point on a map, I'm doing this for the first time. I use GeoDjango from Django 2.2 and OpenLayers 5. I've created a simple model with only ...
1
vote
1answer
92 views

Putting content of popup into modal using OpenLayers?

I'm trying to put the content of a OpenLayers 5 popup into a Boostrap's modal but I cannot make it. Here the code with popup; it work fine: . . . <div id="popup" class="ol-popup"> <a ...
0
votes
1answer
39 views

OpenLayers 5: this.source.loadFeatures is not a function with Cluster

I'm trying to change the example of the Clustered Feature using my points from geojson layer but there is something wrong. var random_points = new ol.layer.Vector({ title: 'Random Points', source:...
1
vote
1answer
35 views

OpenLayers 5: change the color of the highlighted feature

I've made a little script to highlight a feature on hover the mouse My inspiration comes from here. Now I would like to change the color of the highlighted feature. I can do this using style function ...
1
vote
0answers
53 views

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

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
119 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 ...
5
votes
0answers
163 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
197 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
16 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
20 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
92 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
227 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
135 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
28 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
53 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
487 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
40 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
295 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
71 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
299 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
243 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
284 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
275 views

External GPS feed for HTML5 geolocation API in 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
128 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
124 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
1k 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
1answer
200 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
266 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
112 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
73 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
236 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
161 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
220 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
313 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
150 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
157 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
321 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/...