--
Ticket URL: <https://code.djangoproject.com/ticket/27550>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => assigned
* owner: nobody => Sergey Fedoseev
--
Ticket URL: <https://code.djangoproject.com/ticket/27550#comment:1>
Old description:
> GEOSGeometry.normalize() normalizes geometry in-place. In some cases it
> would be more convenient to have a cloned normalized geometry for the
> code conciseness.
> We could add `clone` kwarg to this method similarly to
> [https://docs.djangoproject.com/en/1.10/ref/contrib/gis/geos/#django.contrib.gis.geos.GEOSGeometry.clone
> GEOSGeometry.clone()] or we could add the `normalized` property.
New description:
GEOSGeometry.normalize() normalizes geometry in-place. In some cases it
would be more convenient to have a cloned normalized geometry for the code
conciseness.
We could add `clone` kwarg to this method similarly to
[https://docs.djangoproject.com/en/1.10/ref/contrib/gis/geos/#django.contrib.gis.geos.GEOSGeometry.transform
GEOSGeometry.transform()] or we could add the `normalized` property.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/27550#comment:2>
Comment (by Claude Paroz):
I'm not sure. Could you audit other methods and tell us if the use case
could be applied to other methods? Then we might better recommend using
the `clone()` method before normalizing the geometry.
--
Ticket URL: <https://code.djangoproject.com/ticket/27550#comment:3>
* stage: Unreviewed => Accepted
Comment:
Accepting the problem, even if the solution is undecided.
--
Ticket URL: <https://code.djangoproject.com/ticket/27550#comment:4>
* owner: Sergey Fedoseev => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/27550#comment:5>
Comment (by Marcelo Galigniana):
Could I go for the "add `clone` kwarg to this method similarly to
[https://docs.djangoproject.com/en/1.10/ref/contrib/gis/geos/#django.contrib.gis.geos.GEOSGeometry.transform
GEOSGeometry.transform()]" approach?"
Or should I post in the developer email group to define the best solution?
--
Ticket URL: <https://code.djangoproject.com/ticket/27550#comment:6>
Comment (by Claude Paroz):
Yes, I think having a patch with the `clone` argument should be welcome.
--
Ticket URL: <https://code.djangoproject.com/ticket/27550#comment:7>
* owner: (none) => Marcelo Galigniana
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/27550#comment:8>
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/27550#comment:9>
* stage: Accepted => Ready for checkin
--
Ticket URL: <https://code.djangoproject.com/ticket/27550#comment:10>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"76af861356eda3b08bc5e15ad1973f980c7604a3" 76af8613]:
{{{
#!CommitTicketReference repository=""
revision="76af861356eda3b08bc5e15ad1973f980c7604a3"
Fixed #27550 -- Allowed GEOSGeometry.normalize() to return a normalized
clone.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/27550#comment:11>