[Django] #24840: Add Warp and Transform functionality for GDALRasters

44 views
Skip to first unread message

Django

unread,
May 22, 2015, 9:21:17 AM5/22/15
to django-...@googlegroups.com
#24840: Add Warp and Transform functionality for GDALRasters
-----------------------------+-----------------------------
Reporter: yellowcap | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: 1.8
Severity: Normal | Keywords: raster gdal gis
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
-----------------------------+-----------------------------
Warping and transforming (reprojecting) are fundamental operations on
raster objects. Suporting those functions on GDALRaster objects makes the
use of the raster api much more flexible.

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

Django

unread,
May 22, 2015, 9:26:17 AM5/22/15
to django-...@googlegroups.com
#24840: Add Warp and Transform functionality for GDALRasters
---------------------------------+--------------------------------------

Reporter: yellowcap | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: 1.8
Severity: Normal | Resolution:

Keywords: raster gdal gis | Triage Stage: Unreviewed
Has patch: 1 | 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:

Created a pull request for the implementation. However, the patch still
lacks testing and documentation.

--
Ticket URL: <https://code.djangoproject.com/ticket/24840#comment:1>

Django

unread,
May 22, 2015, 9:43:36 AM5/22/15
to django-...@googlegroups.com
#24840: Add Warp and Transform functionality for GDALRasters
---------------------------------+------------------------------------

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

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

* needs_better_patch: 0 => 1
* stage: Unreviewed => Accepted
* needs_docs: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/24840#comment:2>

Django

unread,
Jun 24, 2015, 12:32:41 PM6/24/15
to django-...@googlegroups.com
#24840: Add Warp and Transform functionality for GDALRasters
---------------------------------+------------------------------------

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

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

Comment (by Claude Paroz <claude@…>):

In [changeset:"c078021555dcda6b12363b5b0646eac5332a0d86" c078021]:
{{{
#!CommitTicketReference repository=""
revision="c078021555dcda6b12363b5b0646eac5332a0d86"
Refs #24840 -- Added GDALRaster Warp and transform methods

Thanks to Tim Graham for the review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24840#comment:3>

Django

unread,
Jun 24, 2015, 12:34:53 PM6/24/15
to django-...@googlegroups.com
#24840: Add Warp and Transform functionality for GDALRasters
---------------------------------+------------------------------------
Reporter: yellowcap | Owner: nobody
Type: New feature | Status: closed
Component: GIS | Version: 1.8
Severity: Normal | Resolution: fixed

Keywords: raster gdal gis | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1

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

* status: new => closed
* resolution: => fixed


--
Ticket URL: <https://code.djangoproject.com/ticket/24840#comment:4>

Django

unread,
Jun 24, 2015, 7:52:42 PM6/24/15
to django-...@googlegroups.com
#24840: Add Warp and Transform functionality for GDALRasters
---------------------------------+------------------------------------

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

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

* status: closed => new
* needs_docs: 1 => 0
* has_patch: 1 => 0
* resolution: fixed =>
* needs_better_patch: 1 => 0


Comment:

Error on Oracle for the new
`gis_tests.gdal_tests.test_raster.GDALRasterTests.test_raster_transform`
[http://djangoci.com/job/pull-requests-
oracle/36/database=oracle11,python=python3.4/testReport/junit/gis_tests.gdal_tests.test_raster/GDALRasterTests/test_raster_transform/
test]:

{{{
Traceback (most recent call last):
File "/mnt/jenkinsdata/workspace/pull-requests-
oracle/database/oracle11/python/python3.4/tests/gis_tests/gdal_tests/test_raster.py",
line 266, in test_raster_transform
ndv, ndv, 20, ndv, ndv, ndv, ndv,
AssertionError: Lists differ: [99, [118 chars]23, 99, 99, 99, 15, 21, 22,
99, 99, 99, 99, 20, 99, 99, 99, 64] != [99, [118 chars]23, 99, 99, 99, 15,
21, 22, 99, 99, 99, 99, 20, 99, 99, 99, 99]

First differing element 48:
64
99

[99,
99,
99,
99,
4,
99,
99,
99,
99,
2,
3,
9,
99,
99,
99,
1,
2,
8,
13,
19,
99,
0,
6,
6,
12,
18,
18,
24,
99,
10,
11,
16,
22,
23,
99,
99,
99,
15,
21,
22,
99,
99,
99,
99,
20,
99,
99,
99,
- 64]
+ 99]
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24840#comment:5>

Django

unread,
Jun 25, 2015, 2:13:27 AM6/25/15
to django-...@googlegroups.com
#24840: Add Warp and Transform functionality for GDALRasters
---------------------------------+------------------------------------

Reporter: yellowcap | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: 1.8
Severity: Normal | Resolution:
Keywords: raster gdal gis | 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):

Apparently, this error can also occur with SQLite or Postgres, so it does
not seem to be related to the database engine. I wasn't able to reproduce
locally, though.

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

Django

unread,
Jun 25, 2015, 3:35:02 AM6/25/15
to django-...@googlegroups.com
#24840: Add Warp and Transform functionality for GDALRasters
---------------------------------+------------------------------------

Reporter: yellowcap | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: 1.8
Severity: Normal | Resolution:
Keywords: raster gdal gis | 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):

Yes, this test uses the GDAL api only, so the failure is not related to
the database. Maybe the gdal version? Where can I see the exact
specification of the build environment?

--
Ticket URL: <https://code.djangoproject.com/ticket/24840#comment:7>

Django

unread,
Jun 25, 2015, 10:29:27 AM6/25/15
to django-...@googlegroups.com
#24840: Add Warp and Transform functionality for GDALRasters
---------------------------------+------------------------------------

Reporter: yellowcap | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: 1.8
Severity: Normal | Resolution:
Keywords: raster gdal gis | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------

Comment (by timgraham):

The [wiki:Jenkins] wiki page has details about installed versions.

--
Ticket URL: <https://code.djangoproject.com/ticket/24840#comment:8>

Django

unread,
Jun 25, 2015, 11:11:05 AM6/25/15
to django-...@googlegroups.com
#24840: Add Warp and Transform functionality for GDALRasters
---------------------------------+------------------------------------

Reporter: yellowcap | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: 1.8
Severity: Normal | Resolution:
Keywords: raster gdal gis | 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 was able to reproduce the same error on a fresh `ubuntu trusty` where I
installed the default gdal-bin, which turned out to be `GDAL 1.7.3`. So I
guess the transform parameters or the sampling algorithm behave different
for older gdal versions.

What is the best way to adapt to this? Add a flag to the test to check for
the gdal version or find a test that works for both?

--
Ticket URL: <https://code.djangoproject.com/ticket/24840#comment:9>

Django

unread,
Jun 25, 2015, 11:18:00 AM6/25/15
to django-...@googlegroups.com
#24840: Add Warp and Transform functionality for GDALRasters
---------------------------------+------------------------------------

Reporter: yellowcap | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: 1.8
Severity: Normal | Resolution:
Keywords: raster gdal gis | 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):

Let's skip the test for older GDAL versions...

--
Ticket URL: <https://code.djangoproject.com/ticket/24840#comment:10>

Django

unread,
Jun 26, 2015, 6:38:22 AM6/26/15
to django-...@googlegroups.com
#24840: Add Warp and Transform functionality for GDALRasters
---------------------------------+------------------------------------

Reporter: yellowcap | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: 1.8
Severity: Normal | Resolution:
Keywords: raster gdal gis | 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):

Ok I narrowed down the gdal version, the test works from 1.8.1 forward
(tested versions using
[https://gist.github.com/yellowcap/1836a10bf0e04ea3e5c2 this]). Here is a
patch for the version checker

https://github.com/geodesign/django/commit/effdc27c60d670a5d393127e0d0be572fe5ec8ae

--
Ticket URL: <https://code.djangoproject.com/ticket/24840#comment:11>

Django

unread,
Jun 26, 2015, 8:31:20 AM6/26/15
to django-...@googlegroups.com
#24840: Add Warp and Transform functionality for GDALRasters
---------------------------------+------------------------------------

Reporter: yellowcap | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: 1.8
Severity: Normal | Resolution:
Keywords: raster gdal gis | 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:"b647ccfa673890d4ee30a29bb759a19e4f1a67dc" b647ccfa]:
{{{
#!CommitTicketReference repository=""
revision="b647ccfa673890d4ee30a29bb759a19e4f1a67dc"
Refs #24840 -- Added skip flag to raster transform test for GDAL<1.8.1.

Thanks to Simon Charette for the report.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24840#comment:12>

Django

unread,
Jun 26, 2015, 8:36:16 AM6/26/15
to django-...@googlegroups.com
#24840: Add Warp and Transform functionality for GDALRasters
---------------------------------+------------------------------------
Reporter: yellowcap | Owner: nobody
Type: New feature | Status: closed
Component: GIS | Version: 1.8
Severity: Normal | Resolution: fixed

Keywords: raster gdal gis | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Changes (by claudep):

* status: new => closed
* resolution: => fixed


--
Ticket URL: <https://code.djangoproject.com/ticket/24840#comment:13>

Reply all
Reply to author
Forward
0 new messages