#31015: loss of precision of geometry coordinates on Oracle 18
-------------------------------------------+------------------------
               Reporter:  Sergey Fedoseev  |          Owner:  nobody
                   Type:  Bug              |         Status:  new
              Component:  GIS              |        Version:  2.2
               Severity:  Normal           |       Keywords:
           Triage Stage:  Unreviewed       |      Has patch:  0
    Needs documentation:  0                |    Needs tests:  0
Patch needs improvement:  0                |  Easy pickings:  0
                  UI/UX:  0                |
-------------------------------------------+------------------------
 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.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/053.3d205c1b3b5da2b1b672e275a3fa336d%40djangoproject.com.

Reply via email to