[Django] #26509: Test and document the precision_wkt() contrib.gis function

33 views
Skip to first unread message

Django

unread,
Apr 15, 2016, 12:30:36 PM4/15/16
to django-...@googlegroups.com
#26509: Test and document the precision_wkt() contrib.gis function
------------------------------------------------+------------------------
Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------------+------------------------
The `precision_wkt()` function in `django/contrib/gis/utils/wkt.py` is
untested, unused, undocumented and came in with the original GIS branch in
2008 and has been untouched since. Claude says it's worth testing and
documenting.

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

Django

unread,
Apr 16, 2016, 12:09:50 AM4/16/16
to django-...@googlegroups.com
#26509: Test and document the precision_wkt() contrib.gis function
--------------------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by krisys):

I see that there is a `WKTWriter` in `django.contrib.gis.geos` which has
pretty much the same functionality as that of `precision_wkt()` (strings
are not accepted for precision in WKTWriter). I noticed this after I wrote
some tests and I started looking for an appropriate page to include
documentation. If this is indeed needed, I will go ahead and send a pull
request with documentation shortly. Also, we can consider enhancing the
`WKTWriter` to accept string precision.

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

Django

unread,
Apr 16, 2016, 4:31:49 AM4/16/16
to django-...@googlegroups.com
#26509: Test and document the precision_wkt() contrib.gis function
--------------------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by claudep):

Oh yes, we added `trim` and `precision` capabilities to WKTWriter in
[c984e2bc15aa41de]. This mostly obsoletes the `precision_wkt` utility. I
don't think that the precision string capability is so much useful. I'd
vote now to drop `precision_wkt`.

While re-reading the code, I think it would be nice to allow dimension,
trimming and precision parameters to be provided to the WKTWriter
constructor: #26510.

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

Django

unread,
Apr 16, 2016, 5:44:55 AM4/16/16
to django-...@googlegroups.com
#26509: Test and document the precision_wkt() contrib.gis function
--------------------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by krisys):

@claudep, Great. Thanks for confirming. Shall I create another ticket to
mark `precision_wkt` for deprecation or will this ticket suffice to take
the discussion forward?

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

Django

unread,
Apr 16, 2016, 11:44:14 AM4/16/16
to django-...@googlegroups.com
#26509: Deprecate the precision_wkt() contrib.gis function
--------------------------------------+------------------------------------

Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

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

Django

unread,
Apr 16, 2016, 2:59:00 PM4/16/16
to django-...@googlegroups.com
#26509: Deprecate the precision_wkt() contrib.gis function
--------------------------------------+------------------------------------
Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by krisys):

I have submitted a
[https://github.com/django/django/pull/6467/commits/08f498fc6047e64abff5f0dc464a10777f4285a7
Pull Request] for the same.

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

Django

unread,
Apr 16, 2016, 4:27:53 PM4/16/16
to django-...@googlegroups.com
#26509: Deprecate the precision_wkt() contrib.gis function
--------------------------------------+------------------------------------
Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

* has_patch: 0 => 1


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

Django

unread,
Apr 16, 2016, 4:47:43 PM4/16/16
to django-...@googlegroups.com
#26509: Deprecate the precision_wkt() contrib.gis function
--------------------------------------+------------------------------------
Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Tim Graham <timograham@…>):

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


Comment:

In [changeset:"e494b9ffb60215bb303e81049bd67e8aa36a504d" e494b9ff]:
{{{
#!CommitTicketReference repository=""
revision="e494b9ffb60215bb303e81049bd67e8aa36a504d"
Fixed #26509 -- Deprecated the contrib.gis.utils.precision_wkt() function.
}}}

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

Django

unread,
Jan 17, 2017, 10:09:53 PM1/17/17
to django-...@googlegroups.com
#26509: Deprecate the precision_wkt() contrib.gis function
--------------------------------------+------------------------------------
Reporter: Tim Graham | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: GIS | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"169178265249949300df8288d8ebd048613f2205" 16917826]:
{{{
#!CommitTicketReference repository=""
revision="169178265249949300df8288d8ebd048613f2205"
Refs #26509 -- Removed contrib.gis.utils.precision_wkt() per deprecation
timeline.
}}}

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

Reply all
Reply to author
Forward
0 new messages