Skip to main content
1 of 2
rikb
  • 133
  • 4

postgis via geodjango: function st_distancesphere(geometry, geometry) does not exist

I've been using postgis via geodjango (django v3.0.7), happily until just now. i have a query (django .filter()) that looks like this:

.filter(point__distance_lte=(dlPt, D(m=CloseRadius)))

when it invokes the postgres query i get this error:

django.db.utils.ProgrammingError: function st_distancesphere(geometry, geometry) does not exist

dlPt is indeed a Point, <class 'django.contrib.gis.geos.point.Point'>, and so are the point attributes in the objects being searched.

any ideas what the issue might be?

rikb
  • 133
  • 4