#17736: django.contrib.gis.geos.polygon from_bbox loss of floating-point 
accuracy
-------------------------------+--------------------
     Reporter:  tdihp@…        |      Owner:  nobody
         Type:  Bug            |     Status:  new
    Component:  Uncategorized  |    Version:  1.3
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 from_bbox use a string formatting to generate a geom instance, this will
 loose accuracy, when it matters

 for example:


 {{{
 >>> import math
 >>> from django.contrib.gis.geos import Polygon
 >>> l,t,r,b = 0.0,0.0,math.pi,math.pi
 >>> Polygon.from_bbox((l,t,r,b)).coords
 (((0.0, 0.0), (0.0, 3.14159265359), (3.14159265359, 3.14159265359),
 (3.14159265359, 0.0), (0.0, 0.0)),)
 >>> Polygon(((l,t),(r,t),(r,b),(l,b),(l,t))).coords
 (((0.0, 0.0), (3.141592653589793, 0.0), (3.141592653589793,
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17736>
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to