[Django] #26592: Add support for GDAL 2.1

31 views
Skip to first unread message

Django

unread,
May 6, 2016, 12:41:54 PM5/6/16
to django-...@googlegroups.com
#26592: Add support for GDAL 2.1
-----------------------------+--------------------
Reporter: yellowcap | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------
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

--
Ticket URL: <https://code.djangoproject.com/ticket/26592>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 6, 2016, 12:42:42 PM5/6/16
to django-...@googlegroups.com
#26592: Add support for GDAL 2.1
-----------------------------+--------------------------------------

Reporter: yellowcap | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------------------------
Changes (by yellowcap):

* 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>

Django

unread,
May 6, 2016, 1:31:01 PM5/6/16
to django-...@googlegroups.com
#26592: Add support for GDAL 2.1
-----------------------------+------------------------------------

Reporter: yellowcap | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------
Changes (by timgraham):

* 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>

Django

unread,
May 7, 2016, 1:46:35 PM5/7/16
to django-...@googlegroups.com
#26592: Add support for GDAL 2.1
-----------------------------+------------------------------------

Reporter: yellowcap | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

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>

Django

unread,
May 7, 2016, 1:52:51 PM5/7/16
to django-...@googlegroups.com
#26592: Add support for GDAL 2.1
-----------------------------+------------------------------------

Reporter: yellowcap | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

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>

Django

unread,
May 13, 2016, 11:54:59 AM5/13/16
to django-...@googlegroups.com
#26592: Add support for GDAL 2.1
-----------------------------+------------------------------------

Reporter: yellowcap | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

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>

Django

unread,
May 14, 2016, 4:09:20 AM5/14/16
to django-...@googlegroups.com
#26592: Add support for GDAL 2.1
-----------------------------+------------------------------------

Reporter: yellowcap | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

Comment (by claudep):

I'm fine with that approach!

--
Ticket URL: <https://code.djangoproject.com/ticket/26592#comment:6>

Django

unread,
May 14, 2016, 4:17:28 AM5/14/16
to django-...@googlegroups.com
#26592: Add support for GDAL 2.1
-----------------------------+------------------------------------

Reporter: yellowcap | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

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>

Django

unread,
May 16, 2016, 7:57:07 AM5/16/16
to django-...@googlegroups.com
#26592: Add support for GDAL 2.1
-----------------------------+------------------------------------

Reporter: yellowcap | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

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>

Django

unread,
May 16, 2016, 12:43:25 PM5/16/16
to django-...@googlegroups.com
#26592: Add support for GDAL 2.1
-----------------------------+------------------------------------

Reporter: yellowcap | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------

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>

Django

unread,
May 16, 2016, 12:54:52 PM5/16/16
to django-...@googlegroups.com
#26592: Add support for GDAL 2.1
-----------------------------+------------------------------------
Reporter: yellowcap | Owner: nobody
Type: New feature | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------
Changes (by Claude Paroz <claude@…>):

* 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>

Reply all
Reply to author
Forward
0 new messages