**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.
* 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>
* 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>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/13082 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/31713#comment:3>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/31713#comment:4>
* needs_better_patch: 1 => 0
Comment:
Should be ready for a final review.
--
Ticket URL: <https://code.djangoproject.com/ticket/31713#comment:5>
* needs_better_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/31713#comment:6>
* needs_better_patch: 1 => 0
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/31713#comment:7>
* 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>