summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <cb15g11@soton.ac.uk>2014-09-08 12:36:01 +0100
committerChristopher Baines <cb15g11@soton.ac.uk>2014-09-08 12:36:01 +0100
commit2be0a8015327fe4d76aef6217cbaa7fd9f656cf5 (patch)
tree8b14caf12614ce1d54fa94950944567a60bc23d6
parent903dbcd6c4c4343355008aabe0b98afa52159313 (diff)
downloadleaflet-soton-2be0a8015327fe4d76aef6217cbaa7fd9f656cf5.tar
leaflet-soton-2be0a8015327fe4d76aef6217cbaa7fd9f656cf5.tar.gz
Add centers to sites
-rwxr-xr-xcreate-data.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/create-data.js b/create-data.js
index d0e8202..60947d2 100755
--- a/create-data.js
+++ b/create-data.js
@@ -216,7 +216,9 @@ function createCollections(callback) {
parking: 'select ST_AsGeoJSON(ST_Transform(way, 4326), 10) as polygon,\
name,access,capacity,"capacity:disabled",fee from uni_parking',
bicycleParking: 'select ST_AsGeoJSON(ST_Transform(way, 4326), 10) as polygon,capacity,bicycle_parking,covered from uni_bicycle_parking',
- sites: 'select ST_AsGeoJSON(ST_Transform(way, 4326), 10) as polygon,name,loc_ref,uri from uni_site',
+ sites: 'select ST_AsGeoJSON(ST_Transform(way, 4326), 10) as polygon,\
+ ST_AsText(ST_Transform(ST_Centroid(way), 4326)) as center,\
+ name,loc_ref,uri from uni_site',
pointsOfService: "select ST_AsGeoJSON(ST_Transform(way, 4326), 10) as polygon,ST_AsText(ST_Transform(ST_Centroid(way), 4326)) as center,name,shop,amenity,uri from planet_osm_polygon where (amenity in ('cafe', 'bar', 'restaurant') or shop in ('kiosk', 'convenience')) and ST_Contains((select ST_Union(way) from uni_site), way);"
};