from django.contrib.gis.gdal import DataSource
ds = DataSource('/home/matthew/data.shp')
whilst the following code dies saying the file could not be loaded:
from osgeo import gdal
from django.contrib.gis.gdal import DataSource
ds = DataSource('/home/matthew/data.shp')
This is because the osgeo import has registered the raster drivers, but
not the data source ones, and yet Django's ensure_registered will only try
and register both if the overall count is zero.
--
Ticket URL: <https://code.djangoproject.com/ticket/27103>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* stage: Unreviewed => Accepted
* needs_tests: => 1
* needs_docs: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/27103#comment:1>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"fb951fb0c58e80dc6156a77fb0498272d5e77a66" fb951fb0]:
{{{
#!CommitTicketReference repository=""
revision="fb951fb0c58e80dc6156a77fb0498272d5e77a66"
Fixed #27103 -- Registered vcapi/rcapi GDAL prototypes based on their own
drivers.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27103#comment:2>