geometry_bboverlaps -> geometry__bboverlaps
This commit is contained in:
parent
262a795d50
commit
8671238bab
|
@ -20,7 +20,7 @@ class FeatureSearchManager(models.GeoManager):
|
||||||
def overlaps(self, (minx, miny, maxx, maxy), text=None, srid=4326):
|
def overlaps(self, (minx, miny, maxx, maxy), text=None, srid=4326):
|
||||||
bbox = Polygon(((minx,miny),(minx,maxy),(maxx,maxy),(maxx,miny),(minx,miny)),srid=srid)
|
bbox = Polygon(((minx,miny),(minx,maxy),(maxx,maxy),(maxx,miny),(minx,miny)),srid=srid)
|
||||||
if srid != 4326: bbox.transform(4326) # convert to lon/lat
|
if srid != 4326: bbox.transform(4326) # convert to lon/lat
|
||||||
qset = super(FeatureSearchManager, self).get_query_set().filter(geometry_bboverlaps=bbox)
|
qset = super(FeatureSearchManager, self).get_query_set().filter(geometry__bboverlaps=bbox)
|
||||||
if text:
|
if text:
|
||||||
text = text.replace("'", "''") # escape the '
|
text = text.replace("'", "''") # escape the '
|
||||||
# use the pg_trgm index
|
# use the pg_trgm index
|
||||||
|
|
Loading…
Reference in New Issue
Block a user