return centroid of event in lists
This commit is contained in:
parent
a47007c7dd
commit
d966e626a3
1 changed files with 1 additions and 1 deletions
|
@ -56,7 +56,7 @@ class EventResource(object):
|
|||
if id is None:
|
||||
cur.execute("""
|
||||
SELECT format('{"type": "FeatureCollection","features": [%s]}',string_agg(feature,',')) FROM
|
||||
(SELECT '{"type":"Feature", "properties": '|| events_tags::text ||', "geometry":'|| st_asgeojson(geom) ||' }' as feature
|
||||
(SELECT '{"type":"Feature", "properties": '|| events_tags::text ||', "geometry":'|| st_asgeojson(st_centroid(geom)) ||' }' as feature
|
||||
FROM events
|
||||
JOIN geo ON (hash=events_geo)
|
||||
WHERE events_when @> format('[%s,%s]', now(), now())::tstzrange
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue