In [15]: print GEOSGeometry(pnt.ewkt, srid=1)
SRID=4326;POINT (1.0000000000000000 1.0000000000000000)
In [16]: print GEOSGeometry(pnt.ewkb, srid=1)
SRID=1;POINT (1.0000000000000000 1.0000000000000000)
}}}
It's not clear from documentation what is the correct behavior, in my
opinion `srid` parameter should be used as default SRID i.e. only if input
geometry input does not include SRID.
--
Ticket URL: <https://code.djangoproject.com/ticket/25873>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => sir-sigurd
* needs_docs: => 0
* status: new => assigned
* needs_tests: => 0
* needs_better_patch: => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/25873#comment:1>
Comment (by jtiai):
I think it's really ambiguous to let same thing to be defined in two
places, specially when explicit SRID is given. If that value would be
implicit then using as a default would be fine.
One may think that resulting geometry does have SRID set to srid parameter
(and possibly transformation has taken place).
I think raisin error would be proper action here if SRIDs don't match
since programmer must know at this point that geometry is in some specific
format. It would give at least surprise to everybody.
--
Ticket URL: <https://code.djangoproject.com/ticket/25873#comment:2>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/25873#comment:3>
* has_patch: 0 => 1
Comment:
[https://github.com/django/django/pull/8263 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/25873#comment:4>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"6ecccad711b52f9273b1acb07a57d3f806e93928" 6ecccad]:
{{{
#!CommitTicketReference repository=""
revision="6ecccad711b52f9273b1acb07a57d3f806e93928"
Fixed #25873 -- Made GEOSGeometry handle the srid parameter more
predictably.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25873#comment:5>