Opened 3 years ago
Closed 3 years ago
#33274 closed Cleanup/optimization (wontfix)
Point coordinates should accept Decimal
Reported by: | Iulian Crudu | Owned by: | nobody |
---|---|---|---|
Component: | GIS | Version: | 3.2 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | yes | UI/UX: | no |
Description
https://github.com/django/django/blob/6bc437c0d82675ebe6aa92c8e249892205c316ef/django/contrib/gis/geos/point.py#L9
This should allow for x/y/z to be Decimal and if needed convert to float inside the init method.
Note:
See TracTickets
for help on using tickets.
Hi Iulian. Thanks for the report.
I'm going to say
wontfix
here initially. Loosening the accepted types adds complexity, and it's not clear that onlyPoint
would need to be adjusted.Rather, I'd suggest casting your data before instantiating the
Point
(as I presume you're doing).It may be worth a post on the GeoDjango category of the Forum to discuss your use-case and how best to handle/support
Decimal
instances.