summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <cbaines8@gmail.com>2013-08-29 13:13:55 +0100
committerChristopher Baines <cbaines8@gmail.com>2013-08-29 13:13:55 +0100
commit5a3439f8a8026c62b04e4c74265ca79e80a13f78 (patch)
treef619ac167e2874acd497e5ab70c66a1a2d956652
parent64f1cb0c977658fd173abe3a519bbfa2589b2ef4 (diff)
downloadsum-carto-5a3439f8a8026c62b04e4c74265ca79e80a13f78.tar
sum-carto-5a3439f8a8026c62b04e4c74265ca79e80a13f78.tar.gz
Also include buildings that are not on a site
-rw-r--r--create-db.sql2
1 files changed, 1 insertions, 1 deletions
diff --git a/create-db.sql b/create-db.sql
index 0177b34..c8068c2 100644
--- a/create-db.sql
+++ b/create-db.sql
@@ -2,7 +2,7 @@ drop table uni_site;
create table uni_site as select way,name,loc_ref,uri,amenity,landuse from planet_osm_polygon where operator='University of Southampton' and building is null or osm_id=230335224;
drop table uni_building;
-create table uni_building as select way, coalesce("addr:housename", name, '') as name, coalesce(height::int, "building:levels"::int * 10, 10) as height, loc_ref, uri, case when coalesce("addr:housename", name, '')='' or "addr:housename"="addr:housenumber" then true else false end as minor from planet_osm_polygon where ST_Contains((select ST_Union(way) from uni_site), way) and building is not null order by z_order,way_area desc;
+create table uni_building as select way, coalesce("addr:housename", name, '') as name, coalesce(height::int, "building:levels"::int * 10, 10) as height, loc_ref, uri, case when coalesce("addr:housename", name, '')='' or "addr:housename"="addr:housenumber" then true else false end as minor from planet_osm_polygon where (ST_Contains((select ST_Union(way) from uni_site), way) or operator='University of Southampton') and building is not null order by z_order,way_area desc;
drop table uni_parking;
create table uni_parking as select way,name,access,capacity,"capacity:disabled",fee from planet_osm_polygon where amenity='parking' and ST_Contains((select ST_Union(way) from uni_site), way);