Questions tagged [geodjango]

GeoDjango intends to be a world-class geographic Web framework. Its goal is to make it as easy as possible to build GIS Web applications and harness the power of spatially enabled data.

GeoDjango intends to be a world-class geographic Web framework. Its goal is to make it as easy as possible to build GIS Web applications and harness the power of spatially enabled data.

http://geodjango.org/

1020 questions
13
votes
3 answers

Django: Could not find the GDAL library (OSX)

After my old macbook died I am transferring across a Django Webapp I'd been building to my new machine (which is a MacBook Pro M1 2021). I am currently in the process of reinstalling the correct packages and extensions for the app. However I am…
deadant88
  • 920
  • 9
  • 24
13
votes
3 answers

How to connect to multiple PostgreSQL schemas from Django?

In my GeoDjango project I want to connect to a legacy PostgreSQL/PostGIS database. It contains the following schemas: data // contains all the geospatial data django // empty, created by me public // system tables such as spatial_ref_sys I want…
JJD
  • 50,076
  • 60
  • 203
  • 339
13
votes
1 answer

Geo Django get cities from latitude and longitude

I'm learning how to use Geo Django. When a user registers I save the latitude and longitude information as seen below: from django.contrib.gis.db import models from django.contrib.gis.geos import Point class GeoModel(models.Model): """ …
Prometheus
  • 32,405
  • 54
  • 166
  • 302
13
votes
1 answer

GeoDjango, what SRID to use for PointField interfacing with Google Maps V3 API?

I am a bit confused, what should I set my SRID value to in my GeoDjango PointField to stay accurate in the context of addresses being geocoded via google maps api into coordinates and distances being queried via django-postgis? Im getting mixed…
13
votes
5 answers

GeoDjango LayerMapping & Foreign Key

I am trying to import my KML file into a model using GeoDjango's LayerMapping functionality. I've run tests and had no issues when doing regular imports. However, I recently added a foreign key to my model. My model is called PlaceMark and it now…
13
votes
6 answers

Latitude/longitude widget for pointfield?

Is there a widget for PointField as separate latitude/longitude inputs? Like SplitDateTimeWidget for DateTimeField.
ArturM
  • 683
  • 1
  • 5
  • 15
13
votes
3 answers

Does anyone know of any good open source Geodjango apps to dig through?

I'm looking to build a small GIS in my spare time and have been digging into Geodjango. I've been trying to find examples of open source Geodjango projects to look through, but I have had little luck, so here I am. I've been through most of the…
Carter
  • 2,850
  • 9
  • 44
  • 57
12
votes
3 answers

GeoDjango can't find gdal on docker python alpine based image

I am creating a geodjango container (based on Python alpine official image) with gdal. When starting the container, I get the following error: >>> from django.contrib.gis import gdal Traceback (most recent call last): File "", line 1, in…
lpofredc
  • 151
  • 1
  • 7
12
votes
5 answers

How to display data using openlayers with OpenStreetMap in geodjango?

I've got geodjango running using openlayers and OpenStreetMaps with the admin app. Now I want to write some views to display the data. Basically, I just want to add a list of points (seen in the admin) to the map. Geodjango appears to use a special…
monkut
  • 42,176
  • 24
  • 124
  • 155
12
votes
2 answers

Create a separate app for my REST API or place it inside my working app?

I'm building simple gis system on geodjango. The app displays a set of maps and I'm also attempting to provide a RESTFUL API for these maps. I'm facing a decision whether to create a separate app for the API or to work inside my existing app. The…
12
votes
4 answers

Postgis isn't an available database backend

I'm facing this error when setting up geodjango in a working django 1.9 app. My app is living inside a amazon EC2 instance plus a RDS postgres instance. The error is: django.core.exceptions.ImproperlyConfigured:…
klautern
  • 129
  • 3
  • 7
  • 26
11
votes
3 answers

Parsing fields in django-import-export before importing

I am using django-import-export package to expect a csv file containing a location's name and its longitude and latitude. I want to parse the longitude and latitude field from the csv to convert them into django.contrib.gis.geos.Point object so that…
Nikko
  • 1,410
  • 1
  • 22
  • 49
11
votes
3 answers

My PostGIS database looks fine but GeoDjango thinks otherwise... why?

I'm trying to set up a GeoDjango app to test an earlier problem I was having. I've set up a postgresql database, created a new Django project and app, but when I try ./manage.py syncdb I get this: django.core.exceptions.ImproperlyConfigured: Cannot…
Phil Gyford
  • 13,432
  • 14
  • 81
  • 143
10
votes
1 answer

Django fails to model legacy database with inspectdb

I have a currently empty Geodjango app set up - I am connected to my Postgis database in which I have a table named aadf that I am attempting to create a model from. I am using inspectdb to do this. I get the following error message: from…
Jamie
  • 277
  • 4
  • 19
10
votes
4 answers

How to add GDAL in docker

I am trying to setup Docker and geodjagno. Upon docker-compose up I have this following error: django.core.exceptions.ImproperlyConfigured: Could not find the GDAL library (tried "gdal", "GDAL", "gdal2.2.0", "gdal2.1.0", "gdal2.0.0", "gdal1.11.0",…
Papouche Guinslyzinho
  • 5,277
  • 14
  • 58
  • 101
1 2
3
67 68