https://trac.osgeo.org/gdal/wiki/Release/2.1.0-News
The "delete-nodata" feature on `GDALBand` objects depends on this, see
https://code.djangoproject.com/ticket/26415
https://github.com/django/django/pull/6350#issuecomment-202610506
--
Ticket URL: <https://code.djangoproject.com/ticket/26592>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
I am happy to work on this, but I am not sure what the process is.
--
Ticket URL: <https://code.djangoproject.com/ticket/26592#comment:1>
* stage: Unreviewed => Accepted
Old description:
> GDAL 2.1 has been released a few days ago.
>
> https://trac.osgeo.org/gdal/wiki/Release/2.1.0-News
>
> The "delete-nodata" feature on `GDALBand` objects depends on this, see
>
> https://code.djangoproject.com/ticket/26415
>
> https://github.com/django/django/pull/6350#issuecomment-202610506
New description:
GDAL 2.1 has been released a few days ago.
https://trac.osgeo.org/gdal/wiki/Release/2.1.0-News
The "delete-nodata" feature on `GDALBand` objects depends on this, see
#26415.
https://github.com/django/django/pull/6350#issuecomment-202610506
--
Comment:
Here's a sample commit from GDAL 1.10 support
3cea917e3e8a26b5b701c160f4f6e03b1b85cf84. If you have any other questions,
please be more specific.
--
Ticket URL: <https://code.djangoproject.com/ticket/26592#comment:2>
Comment (by Claude Paroz <claude@…>):
In [changeset:"72ff70fba5c457a3db6ebc30aea22e95f47436a9" 72ff70f]:
{{{
#!CommitTicketReference repository=""
revision="72ff70fba5c457a3db6ebc30aea22e95f47436a9"
Made GDAL proj test less fragile
The WGS84 proj string can differ depending on installed libs.
Refs #26592.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26592#comment:3>
Comment (by claudep):
Here's the failing test I'm getting with GDAL 2.1:
{{{
FAIL: test_band_statistics_empty_band
(gis_tests.gdal_tests.test_raster.GDALBandTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/claude/checkouts/django-
git/tests/gis_tests/gdal_tests/test_raster.py", line 479, in
test_band_statistics_empty_band
self.assertEqual(rsmem.bands[0].statistics(), (None, None, None,
None))
AssertionError: Tuples differ: (0.0, 0.0, 0.0, 0.0) != (None, None, None,
None)
First differing element 0:
0.0
None
- (0.0, 0.0, 0.0, 0.0)
+ (None, None, None, None)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26592#comment:4>
Comment (by yellowcap):
For empty bands, the statistics computation raises a GDALError. Before
GDAL 2.1, the function returned null values. In 2.1 the input c_double
values remain unchanged, so there is not way to know if the values are
true values when the default is returned. Therefore try/except might be
necessary. This is what is implemented in the current pull request.
An alternative would be to write a custom error-checking function in the
gdal errcheck module for this case.
https://github.com/django/django/blob/master/django/contrib/gis/gdal/prototypes/errcheck.py
Please advise on what makes more sense architecture-wise.
--
Ticket URL: <https://code.djangoproject.com/ticket/26592#comment:5>
Comment (by claudep):
I'm fine with that approach!
--
Ticket URL: <https://code.djangoproject.com/ticket/26592#comment:6>
Comment (by claudep):
I've tested this, and I'm unfortunately still getting the test failure. It
seems that no GDALException is raised with the empty band.
--
Ticket URL: <https://code.djangoproject.com/ticket/26592#comment:7>
Comment (by yellowcap):
I had forgotten to re-activate error checking on the get_band_statistics
function, it was only active on the compute_band_statistics. I changed
that, seems ok now on jenkins.
--
Ticket URL: <https://code.djangoproject.com/ticket/26592#comment:8>
Comment (by Claude Paroz <claude@…>):
In [changeset:"078eb876261fdf8793b201c4d17e67f515bd4de9" 078eb876]:
{{{
#!CommitTicketReference repository=""
revision="078eb876261fdf8793b201c4d17e67f515bd4de9"
Refs #26592 -- Fixed band statistics for empty bands and GDAL 2.1
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26592#comment:9>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"ebaa2fef27644430e2b9dfa912f02e39582bfc05" ebaa2fef]:
{{{
#!CommitTicketReference repository=""
revision="ebaa2fef27644430e2b9dfa912f02e39582bfc05"
Fixed #26592 -- Confirmed support for GDAL 2.1
Thanks Daniel Wiesmann for the report and the appropriate fixes.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26592#comment:10>