Geodjango Tutorial 2 : Spatial data and Geo-databases

preview_player
Показать описание
This is the second tutorial in this series that introduces the user on how to develop models to accommodate spatial data and configuration of spatial databases for a Geodjango project.
Unlike other fields within a Django model, GIS models are different in terms of type and design. Explore more options on GIS models in this video.

Next Video
Configure Leaflet in Django Admin
Рекомендации по теме
Комментарии
Автор

raise ImproperlyConfigured(
Could not find the GDAL library (tried "gdal204", "gdal203", "gdal202", "gdal201", "gdal20"). Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH in your settings.


please provide the process to solve

subhajitbera
Автор

wish to see how it's done on Windows. Using osgeo4w, any tutorial on the same?

maritimk.vincent
Автор

Hello Wanjohi, i am getting this error "Error encountered checking Geometry returned from GEOS C function "GEOSWKBReader_read_r". ", when i try opening incidences page after steps to configure the spatial specifications in model.py .. kindly assist

tonymaina
Автор

i have this error: raise ImproperlyConfigured(
Could not find the GDAL library (tried "gdal204", "gdal203", "gdal202", "gdal201", "gdal20"). Is GDAL installed? If it is, try setting GDAL_LIBRARY_PATH in your settings. i need to install GDAL first ?, So, how i configure GDAL PATH on the settings file ?

ezequielcanseco
Автор

Hi Wanjohi thanks for the great tutorial series! I'm at the end of tutorial 2 / beginning of tutorial 3 and am trying to modify leaflet. I'm able to see the leaflet map in my admin (the leaflet watermark in lower righthand corner says 'Leaflet | Open StreetMap Contributors. However no matter where I set my center value like you do at beginning of tutorial 3 my center always remains the same. What could the issue be?

dantecostabile
Автор

If you get a 'TemplateDoesNotExist' after the changes related to Leaflet around 25:00, try to change the order of the import-Statements in admin.py.

For me, it only worked, when the order was like:

from leaflet.admin import LeafletGeoAdmin
from django.contrib import admin
from .models import Incidences

qualehdialmedillu
Автор

I have already installed postgres in my pc but i couldnot connet postgres from my django environment as in video, 10:19.
I am using windows.
what should I do??
similar case in postgis section as well

anishchhetri
Автор

Thanks for the tutorial. I started from previous tutorial, all worked well. But now I stucked at models of the GeoManager(). When I tried to migrate, return this error: AttributeError: module has no attribute 'GeoManager'. Then when I added 'from django.db.models import Manager as GeoManager' in models.py then I got another error : AttributeError: module 'django.db.models' has no attribute 'PointField'. I have google about this and result is GeoManager has been removed from the latest version of Django. Would you kindly recommend me how to continue practising on your tutorial. Maybe using an earlier version of python and django and which version are they? or what should I use instead of GeoManager(). I am very new in Python and Django. Thanks in advance!

amandayu
Автор

hey, I have followed your tutorial but the map being displayed is showing the vegetation and not the administrative boundaries.Why?

agneswambui
Автор

hello i'm new to geodjango..i'm stuck here what i'm i not doing..i've tried to install gdal but still i get this error Could not find the GDAL library (tried "gdal202", "gdal201", "gdal20", "gdal111", "gdal110", "gdal19"). Is GDAL installed? If it is, try
setting GDAL_LIBRARY_PATH in your settings.'..even after specifying the library path it does not work

kennedymutua
Автор

Can you tell me after models.Pointfield how are you getting the srid from? its at 17:41 minutes thank you very much awaiting reply

anushreedhar
Автор

Hey there! I'm on windows and I'm having problems setting up the postgis on django. I installed postgres with postgis ext and have GDAL throgh OSGeo4W. kindly help?

boneyahassan
Автор

When I try to save an incident I get this new error: GDALException at
OGR failure. Please if you can help to resolve this error

javiersalinascardona
Автор

thank you for the detailed tutorial. I would like to ask how to seek your help regarding the following:
1) how to use spatialite database instead of postgres.
2) while following this tutorial -2 for postrgesql configuration, I am unable todo migration due to the error relevant to spatial data types. Please facilitate in that section too.
Thank you.

aroojahmed
Автор

Getting error
AttributeError: module has no attribute 'GeoManager'

mitchdigitalnetwork
Автор

can you please help me?
I have PointField in djangoRestFramework models, I want to take multiple inputs of points(longitude, latitude) in a single PointField .How will i, can you please help me with this

ayushsolanki
Автор

hello I use windows. and I have problem to configure database . that command doesnt work for me :
sudo apt-get install post... please help me. thank u

teaching_me
Автор

after installation of psycopg2, postgres and postgis
I tried to run the server and I am getting an error: "FATAL: password authentication failed for user aaq". it is the super user I defined for Django admin.
what to do? as it was working fine previously.

aroojahmed
Автор

First, thank you for your tutorial. but when I use django-leaflet and add an incidence I have an error, " type object got multiple values for keyword argument 'module' " ...

bjcore
Автор

I am getting this error once it try to migrate changes :
could not load library 2.so: /usr/lib/liblwgeom-2.2.so.5 : undefined symbol: GEOSClipByRect

aroojahmed
welcome to shbcf.ru