Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#26509 closed Cleanup/optimization (fixed)

Deprecate the precision_wkt() contrib.gis function

Reported by: Tim Graham Owned by: nobody
Component: GIS Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

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.

Change History (8)

comment:1 by krisys, 8 years ago

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.

comment:2 by Claude Paroz, 8 years ago

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.

comment:3 by krisys, 8 years ago

@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?

comment:4 by Claude Paroz, 8 years ago

Summary: Test and document the precision_wkt() contrib.gis functionDeprecate the precision_wkt() contrib.gis function

comment:5 by krisys, 8 years ago

I have submitted a Pull Request for the same.

comment:6 by Tim Graham, 8 years ago

Has patch: set

comment:7 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: newclosed

In e494b9ff:

Fixed #26509 -- Deprecated the contrib.gis.utils.precision_wkt() function.

comment:8 by Tim Graham <timograham@…>, 7 years ago

In 16917826:

Refs #26509 -- Removed contrib.gis.utils.precision_wkt() per deprecation timeline.

Note: See TracTickets for help on using tickets.
Back to Top