#31015 closed Bug (invalid)
loss of precision of geometry coordinates on Oracle 18
Reported by: | Sergey Fedoseev | Owned by: | nobody |
---|---|---|---|
Component: | GIS | Version: | 2.2 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
This test fails on Oracle 18, but works on Oracle 12 and other backends:
def test_round_trip(self): g = City.objects.values_list(models.Value(Point(-87.650175, 41.850385), models.PointField()), flat=True)[0] self.assertEqual(g.wkt, 'POINT (-87.650175 41.850385)')
Traceback (most recent call last): File "/home/jenkins/workspace/pull-requests-oracle/database/oragis18/label/bionic-pr/python/python3.8/tests/gis_tests/geoapp/tests.py", line 228, in test_round_trip self.assertEqual(g.wkt, 'POINT (-87.650175 41.850385)') AssertionError: 'POINT (-87.65017499999999 41.850385)' != 'POINT (-87.650175 41.850385)' - POINT (-87.65017499999999 41.850385) ? ^^^^^^^^^ + POINT (-87.650175 41.850385) ? ^
I'm not sure if we should fix it, since it might be treated like Oracle bug, but it looks like it can be fixed by using WKB instead of WKT in queries on Oracle.
Change History (2)
comment:1 by , 5 years ago
Resolution: | → needsinfo |
---|---|
Status: | new → closed |
comment:2 by , 4 years ago
Resolution: | needsinfo → invalid |
---|
I confirmed the same behavior on Oracle 19c, however I think it's a bug in Oracle. Closing as invalid unless someone can prove it's Django's fault or there is anything we can improve in Django itself.
Note:
See TracTickets
for help on using tickets.
Thanks for this report. I would like to check how it looks like on Oracle 19 (but I have some issues with this db), so let's close it for now as "needsinfo".