#13430: GeoDjango query 'contains' returns incorrect results
---------------------------------+------------------------------------------
          Reporter:  tubaman     |         Owner:  nobody
            Status:  closed      |     Milestone:        
         Component:  GIS         |       Version:  SVN   
        Resolution:  invalid     |      Keywords:        
             Stage:  Unreviewed  |     Has_patch:  0     
        Needs_docs:  0           |   Needs_tests:  0     
Needs_better_patch:  0           |  
---------------------------------+------------------------------------------
Changes (by jbronn):

  * status:  new => closed
  * resolution:  => invalid

Comment:

 Replying to [comment:1 Alex]:
 > I'm pretty sure that's because MySQL only does bounding box queries and
 therefore it tends to be... wrong.  I'll wait for justin to chime in.
 Yup.  This is exactly the problem -- MySQL only supports MBR (minimum
 bounding rectangle, aka bounding box) queries.  This is
 [http://docs.djangoproject.com/en/dev/ref/contrib/gis/db-api/#id11 noted
 in the GeoDjango db-api], and the
 [http://docs.djangoproject.com/en/dev/ref/contrib/gis/geoquerysets/#contains
 contains lookup docs] (`MBRContains` is the function used).

 The [http://dev.mysql.com/doc/refman/5.1/en/functions-that-test-spatial-
 relationships-between-geometries.html MySQL spatial extension docs] also
 mention this limitation: "MySQL does not implement these functions
 according to the specification. Those that are implemented return the same
 result as the corresponding MBR-based functions."

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13430#comment:2>
Django <http://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-upda...@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