geodjango

Installation error while trying to install a gis application using geodjango?

空扰寡人 提交于 2019-12-22 12:25:03
问题 django.core.exceptions.ImproperlyConfigured: Cannot determine PostGIS version for database "geodatabase". GeoDjango requires at least PostGIS version 1.3. Was the database created from a spatial database template? This is the error I got when I followed this tutorial http://invisibleroads.com/tutorials/geodjango-googlemaps-build.html 回答1: I got this error when I didn't properly use the POSTGIS template to create my database (exactly like the error suggests). So did you properly install

GeoDjango and Spatialite on Mac: issue with C extension Loading

大兔子大兔子 提交于 2019-12-22 09:42:36
问题 I'm following the GeoDjango Tutorial to set up a dev spatial DB for my project on my home machine, a Mac Mini running OSX 10.8.2. I installed the KyngChaos packages (UnixImageIO, PROJ, GEOS, SQLite3 and GDAL) and spatialite as detailed in the OSX section of the tutorial.. I created the database via spatialite, but when I try python manage.py sqlall world to check the model I get the following error: django.core.exceptions.ImproperlyConfigured: The pysqlite library does not support C extension

Convert between coordinate systems with GeoDjango

丶灬走出姿态 提交于 2019-12-22 08:15:23
问题 I'm trying to add coordinate information to my database, adding django.contrib.gis support to my app. I'm writing a south data migration that takes the addresses from the database, and asks Google for the coordinates (so far I think my best bet is to use geopy for this). Next I need to convert the returned coordinates from WGS84:4326 , Google's coordinate system, to WGS84:22186 , my coordinate system. I'm lost among the GeoDjango docs trying to find a way to do this. This far, I gather I need

Does google app engine with mysql (Cloud SQL) support GIS?

不问归期 提交于 2019-12-21 17:33:03
问题 I have tried to find some documentation on this on the app engine and cloud sql sites, but can't find anything referring to it either way. I know that you can perform GIS queries on their custom sql option, and I know mysql supports GIS out of the box, but I also know it requires some C libraries which there is limited support for. More particularly I am interested to know if geo-django using mysql supports gis using an app engine/cloud sql combination. (Or maybe if their custom offering

GeoDjango - GDAL library giving error

只谈情不闲聊 提交于 2019-12-21 07:03:16
问题 I am trying to get GeoDjango running on ubuntu and have hit a problem with GDAL. I have downloaded and installed GDAL without problem. I had to add the following line to my project settings: GDAL_LIBRARY_PATH = '/usr/local/lib/libgdal.so.1.15.1' When I check in the shell all is good: In [1]: from django.contrib.gis import gdal In [2]: gdal.HAS_GDAL Out[2]: True However when I try and run ogrinfo as in the official tutorial I get the following error: $ ogrinfo world/data/TM_WORLD_BORDERS-0.3

How can I query all my data within a distance of 5 meters?

时光怂恿深爱的人放手 提交于 2019-12-21 02:48:31
问题 I am using GeoDjango with PostGIS. Then I am into trouble on how to query my postgres db table to get all data within a distance of 5 meters. UPDATES1 I am using GeoDjango 1.2.7 I found something from this url https://docs.djangoproject.com/en/dev/ref/contrib/gis/geoquerysets/#std:fieldlookup-distance_lte Zipcode.objects.filter( poly__distance_lte =( geom , D (* m *=5))) But don't know on how to prepare the parameter and variables. what is poly_distance_lte ? is a function? what is geom ? is

Postgis / Geodjango: Cannot determine PostGIS version for database

陌路散爱 提交于 2019-12-20 09:33:50
问题 I'm attempting to launch a GeoDjango app. I've installed Postgres & PostGIS using brew on Lion. I created a database using template_postgis: createdb -T template_postgis test . When I run python manage.py syncdb , I get the following error: django.core.exceptions.ImproperlyConfigured: Cannot determine PostGIS version for database "test". GeoDjango requires at least PostGIS version 1.3. Was the database created from a spatial database template? How can I track down the source of the error? I

AttributeError: /usr/lib/ogdi/libgdal.so: undefined symbol: GDALVersionInfo

こ雲淡風輕ζ 提交于 2019-12-20 05:59:23
问题 I have setup the database using geodjango documentation and when I am doing python manage.py sqlall world I am getting this error: OSError: /home/nishant-un/local/lib/libgdal.so: cannot open shared object file: No such file or directory And when I locate libgdal.so I found it in: /usr/lib/ogdi/libgdal.so So I changed the GeoDjango Settings: GDAL_LIBRARY_PATH = '/home/nishant-un/local/lib/libgdal.so' to GDAL_LIBRARY_PATH = '/usr/lib/ogdi/libgdal.so' Then When I do python manage.py sqlall world

GeoDjango & MySQL: points can't be NULL, what other “empty” value should I use?

蹲街弑〆低调 提交于 2019-12-19 18:23:29
问题 I have this Django model: from django.contrib.gis.db import models class Event(models.Model): address = models.TextField() point = models.PointField('coordinates', null=True, blank=True) When I sync this model using MySQL, this error message is printed while creating indexes: Failed to install index for events.Event model: (1252, 'All parts of a SPATIAL index must be NOT NULL') so, not being able to use null=True (given that I want to have that index), what other possibilities do I have? I

GeoDjango & MySQL: points can't be NULL, what other “empty” value should I use?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-19 18:23:12
问题 I have this Django model: from django.contrib.gis.db import models class Event(models.Model): address = models.TextField() point = models.PointField('coordinates', null=True, blank=True) When I sync this model using MySQL, this error message is printed while creating indexes: Failed to install index for events.Event model: (1252, 'All parts of a SPATIAL index must be NOT NULL') so, not being able to use null=True (given that I want to have that index), what other possibilities do I have? I