[Django] #31713: Adding SpatialReference to GDALRaster.transform

17 views
Skip to first unread message

Django

unread,
Jun 16, 2020, 5:55:08 AM6/16/20
to django-...@googlegroups.com
#31713: Adding SpatialReference to GDALRaster.transform
-------------------------------------+-------------------------------------
Reporter: rico-ci | Owner: nobody
Type: New | Status: new
feature |
Component: GIS | Version: 3.0
Severity: Normal | Keywords: GDALRaster; GIS;
Triage Stage: | SpatialReference
Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
**Current Limitation:**
Currently a GDALRaster object can only be transformed given an integer
target SRID value.
However, within GDALRaster.transform this value is used to construct a
SpatialReference object which is then assigned to variable **target_srs**.

**Proposed Solution:**
Allow to pass both, **integer SRID** or **SpatialReference object**, to
the GDALRaster.transform function.
This allows users to specify the target transform of the GDALRaster with
SRID, PROJ4, WKT, or EPSG rather than just an integer SRID.
This would also accommodate for custom projections which is desirable and
provides more flexibility to the user.

For respective code see:
https://github.com/django/django/blob/0d6d4e78b17d7500e1a503fd2b02fdcf822d9d3c/django/contrib/gis/gdal/raster/source.py#L428-L437

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

Django

unread,
Jun 16, 2020, 6:29:38 AM6/16/20
to django-...@googlegroups.com
#31713: Adding srs parameter to GDALRaster.transform().
-------------------------------------+-------------------------------------
Reporter: Riccardo | Owner: nobody
Type: New feature | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: GDALRaster; GIS; | Triage Stage: Accepted
SpatialReference |

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* version: 3.0 => master
* easy: 1 => 0
* stage: Unreviewed => Accepted


Comment:

Thanks for this ticket, this feature would require changes in API, i.e.
adding `srs` parameter to `transform()` and deprecating `srid`. But I
agree that it will increase flexibility. Do you want to prepare a patch?

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

Django

unread,
Jun 16, 2020, 12:22:39 PM6/16/20
to django-...@googlegroups.com
#31713: Adding srs parameter to GDALRaster.transform().
-------------------------------------+-------------------------------------
Reporter: Riccardo | Owner: Riccardo
Type: New feature | Status: assigned

Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: GDALRaster; GIS; | Triage Stage: Accepted
SpatialReference |

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Riccardo):

* owner: nobody => Riccardo
* status: new => assigned


Comment:

Yeah, will come to it in the next days.

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

Django

unread,
Jun 22, 2020, 12:40:58 AM6/22/20
to django-...@googlegroups.com
#31713: Adding srs parameter to GDALRaster.transform().
-------------------------------------+-------------------------------------
Reporter: Riccardo | Owner: Riccardo
Type: New feature | Status: assigned
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: GDALRaster; GIS; | Triage Stage: Accepted
SpatialReference |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/13082 PR]

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

Django

unread,
Jun 22, 2020, 3:02:27 AM6/22/20
to django-...@googlegroups.com
#31713: Adding srs parameter to GDALRaster.transform().
-------------------------------------+-------------------------------------
Reporter: Riccardo | Owner: Riccardo
Type: New feature | Status: assigned
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: GDALRaster; GIS; | Triage Stage: Accepted
SpatialReference |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

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

* needs_better_patch: 0 => 1


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

Django

unread,
Jun 25, 2020, 4:13:33 AM6/25/20
to django-...@googlegroups.com
#31713: Adding srs parameter to GDALRaster.transform().
-------------------------------------+-------------------------------------
Reporter: Riccardo | Owner: Riccardo
Type: New feature | Status: assigned
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: GDALRaster; GIS; | Triage Stage: Accepted
SpatialReference |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Claude Paroz):

* needs_better_patch: 1 => 0


Comment:

Should be ready for a final review.

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

Django

unread,
Jun 29, 2020, 7:29:04 AM6/29/20
to django-...@googlegroups.com
#31713: Adding srs parameter to GDALRaster.transform().
-------------------------------------+-------------------------------------
Reporter: Riccardo | Owner: Riccardo
Type: New feature | Status: assigned
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: GDALRaster; GIS; | Triage Stage: Accepted
SpatialReference |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

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

* needs_better_patch: 0 => 1


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

Django

unread,
Jul 7, 2020, 3:29:19 AM7/7/20
to django-...@googlegroups.com
#31713: Adding srs parameter to GDALRaster.transform().
-------------------------------------+-------------------------------------
Reporter: Riccardo | Owner: Riccardo
Type: New feature | Status: assigned
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: GDALRaster; GIS; | Triage Stage: Ready for
SpatialReference | checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin


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

Django

unread,
Jul 7, 2020, 4:27:10 AM7/7/20
to django-...@googlegroups.com
#31713: Adding srs parameter to GDALRaster.transform().
-------------------------------------+-------------------------------------
Reporter: Riccardo | Owner: Riccardo
Type: New feature | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: fixed

Keywords: GDALRaster; GIS; | Triage Stage: Ready for
SpatialReference | checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

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


Comment:

In [changeset:"cb0da637a69b79ab371be9ee202335190a3a506e" cb0da63]:
{{{
#!CommitTicketReference repository=""
revision="cb0da637a69b79ab371be9ee202335190a3a506e"
Fixed #31713 -- Added SpatialReference support to GDALRaster.transform().
}}}

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

Reply all
Reply to author
Forward
0 new messages