str() removed around mogrify
This commit is contained in:
parent
bdb1a9d3dc
commit
10b92cb555
1 changed files with 2 additions and 2 deletions
|
@ -59,10 +59,10 @@ class EventResource(object):
|
|||
|
||||
if 'bbox' in req.params:
|
||||
# limit search with bbox (E,S,W,N)
|
||||
event_bbox = str(cur.mogrify(" AND geom && ST_SetSRID(ST_MakeBox2D(ST_Point(%s,%s),ST_Point(%s,%s)),4326) ",tuple(req.params['bbox']))).decode("utf-8")
|
||||
event_bbox = cur.mogrify(" AND geom && ST_SetSRID(ST_MakeBox2D(ST_Point(%s,%s),ST_Point(%s,%s)),4326) ",tuple(req.params['bbox'])).decode("utf-8")
|
||||
elif 'near' in req.params:
|
||||
# limit search with location+distance (long, lat, distance in meters)
|
||||
event_bbox = str(cur.mogrify(" AND geom && st_expand(st_buffer(st_setsrid(st_makepoint(%s,%s),4326)::geography,%s)::geometry,0) ",tuple(req.params['near']))).decode("utf-8")
|
||||
event_bbox = cur.mogrify(" AND geom && st_expand(st_buffer(st_setsrid(st_makepoint(%s,%s),4326)::geography,%s)::geometry,0) ",tuple(req.params['near'])).decode("utf-8")
|
||||
else:
|
||||
event_bbox = ""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue