[Django] #25873: GEOSGEometry handles srid parameter differently for EWKB and EWKT input

7 views
Skip to first unread message

Django

unread,
Dec 7, 2015, 1:33:26 AM12/7/15
to django-...@googlegroups.com
#25873: GEOSGEometry handles srid parameter differently for EWKB and EWKT input
----------------------------+--------------------
Reporter: sir-sigurd | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: 1.9
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------
{{{
In [14]: pnt = Point(1, 1, srid=4326)

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.

Django

unread,
Dec 7, 2015, 1:33:33 AM12/7/15
to django-...@googlegroups.com
#25873: GEOSGEometry handles srid parameter differently for EWKB and EWKT input
----------------------------+--------------------------------------
Reporter: sir-sigurd | Owner: sir-sigurd
Type: Bug | Status: assigned
Component: GIS | Version: 1.9
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 sir-sigurd):

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

Django

unread,
Dec 8, 2015, 2:06:50 AM12/8/15
to django-...@googlegroups.com
#25873: GEOSGEometry handles srid parameter differently for EWKB and EWKT input
----------------------------+--------------------------------------
Reporter: sir-sigurd | Owner: sir-sigurd
Type: Bug | Status: assigned
Component: GIS | Version: 1.9
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
----------------------------+--------------------------------------

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>

Django

unread,
Dec 10, 2015, 5:08:22 PM12/10/15
to django-...@googlegroups.com
#25873: GEOSGEometry handles srid parameter differently for EWKB and EWKT input
----------------------------+--------------------------------------
Reporter: sir-sigurd | Owner: sir-sigurd
Type: Bug | Status: assigned
Component: GIS | Version: 1.9
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


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

Django

unread,
Mar 29, 2017, 1:39:32 AM3/29/17
to django-...@googlegroups.com
#25873: GEOSGEometry handles srid parameter differently for EWKB and EWKT input
-------------------------------------+-------------------------------------
Reporter: Sergey Fedoseev | Owner: Sergey
| Fedoseev
Type: Bug | Status: assigned
Component: GIS | Version: 1.9

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

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

* has_patch: 0 => 1


Comment:

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

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

Django

unread,
Mar 30, 2017, 9:38:40 AM3/30/17
to django-...@googlegroups.com
#25873: GEOSGEometry handles srid parameter differently for EWKB and EWKT input
-------------------------------------+-------------------------------------
Reporter: Sergey Fedoseev | Owner: Sergey
| Fedoseev
Type: Bug | Status: closed
Component: GIS | Version: 1.9
Severity: Normal | Resolution: fixed

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

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

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

Reply all
Reply to author
Forward
0 new messages