#17884: Distance lookups using ST_Distance_Sphere fails with PostGis 1.5.3
-----------------------------+------------------------------------
     Reporter:  ogirardot@…  |                    Owner:  nobody
         Type:  Bug          |                   Status:  closed
    Component:  GIS          |                  Version:  master
     Severity:  Normal       |               Resolution:  invalid
     Keywords:               |             Triage Stage:  Accepted
    Has patch:  0            |      Needs documentation:  0
  Needs tests:  0            |  Patch needs improvement:  0
Easy pickings:  0            |                    UI/UX:  0
-----------------------------+------------------------------------
Changes (by jbronn):

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


Comment:

 > both installed with homebrew. (on mac os lion)

 This is probably your problem.  Develop on a VM in linux, or install
 manually by source on a Mac -- do '''NOT''' use homebrew.  It causes a
 significant amount of frustration on my part because it can use wrong
 linker flags, use incompatible libraries, and in general causes crazy
 issues such as this.

 Regardless, I tried the following query using models from !GeoDjango's
 test suite (which mimics the example you did, two models with
 `PointFields` that have `srid=4326`):
 {{{
 #!python
 >>> from django.contrib.gis.tests.geoapp.models import City
 >>> from django.contrib.gis.tests.distapp.models import AustraliaCity
 >>> qs =
 City.objects.distance(AustraliaCity.objects.get(name='Thirroul').point)
 >>> c = qs[4]
 >>> print c.name, c.distance
 Pueblo 8342.02642135
 }}}

 Thus, I cannot reproduce -- I'm using PostGIS 1.5.5.  Please provide a
 concrete test case that demonstrates this to reopen.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/17884#comment:9>
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to