diff --git a/src/analysis/connectivity/destinations/dentists.sql b/src/analysis/connectivity/destinations/dentists.sql index a0727de3..69b508ed 100644 --- a/src/analysis/connectivity/destinations/dentists.sql +++ b/src/analysis/connectivity/destinations/dentists.sql @@ -25,7 +25,8 @@ INSERT INTO generated.neighborhood_dentists ( ) SELECT ST_Multi(ST_Buffer(ST_CollectionExtract(unnest(ST_ClusterWithin(way,:cluster_tolerance)),3),0)) FROM neighborhood_osm_full_polygon -WHERE amenity = 'dentist'; +WHERE amenity = 'dentist' OR + healthcare = 'dentist'; -- set points on polygons UPDATE generated.neighborhood_dentists @@ -43,7 +44,8 @@ SELECT osm_id, name, way FROM neighborhood_osm_full_point -WHERE amenity = 'dentist' +WHERE amenity = 'dentist' OR + healthcare = 'dentist' AND NOT EXISTS ( SELECT 1 FROM neighborhood_dentists s diff --git a/src/analysis/connectivity/destinations/doctors.sql b/src/analysis/connectivity/destinations/doctors.sql index 842008bf..6aaf0139 100644 --- a/src/analysis/connectivity/destinations/doctors.sql +++ b/src/analysis/connectivity/destinations/doctors.sql @@ -25,7 +25,8 @@ INSERT INTO generated.neighborhood_doctors ( ) SELECT ST_Multi(ST_Buffer(ST_CollectionExtract(unnest(ST_ClusterWithin(way,:cluster_tolerance)),3),0)) FROM neighborhood_osm_full_polygon -WHERE amenity IN ('clinic','doctors'); +WHERE amenity IN ('clinic','doctors') OR + healthcare IN ('doctor','doctors','clinic'); -- set points on polygons UPDATE generated.neighborhood_doctors @@ -43,7 +44,8 @@ SELECT osm_id, name, way FROM neighborhood_osm_full_point -WHERE amenity IN ('clinic','doctors') +WHERE amenity IN ('clinic','doctors') OR + healthcare IN ('doctor','doctors','clinic') AND NOT EXISTS ( SELECT 1 FROM neighborhood_doctors s diff --git a/src/analysis/connectivity/destinations/hospitals.sql b/src/analysis/connectivity/destinations/hospitals.sql index 838e37ab..4c573180 100644 --- a/src/analysis/connectivity/destinations/hospitals.sql +++ b/src/analysis/connectivity/destinations/hospitals.sql @@ -25,7 +25,8 @@ INSERT INTO generated.neighborhood_hospitals ( ) SELECT ST_Multi(ST_Buffer(ST_CollectionExtract(unnest(ST_ClusterWithin(way,:cluster_tolerance)),3),0)) FROM neighborhood_osm_full_polygon -WHERE amenity IN ('hospitals','hospital'); +WHERE amenity IN ('hospitals','hospital') OR + healthcare = 'hospital'; -- set points on polygons UPDATE generated.neighborhood_hospitals @@ -43,7 +44,8 @@ SELECT osm_id, name, way FROM neighborhood_osm_full_point -WHERE amenity IN ('hospitals','hospital') +WHERE amenity IN ('hospitals','hospital') OR + healthcare = 'hospital' AND NOT EXISTS ( SELECT 1 FROM neighborhood_hospitals s diff --git a/src/analysis/connectivity/destinations/pharmacies.sql b/src/analysis/connectivity/destinations/pharmacies.sql index cc75e0a0..ccbd0c02 100644 --- a/src/analysis/connectivity/destinations/pharmacies.sql +++ b/src/analysis/connectivity/destinations/pharmacies.sql @@ -25,7 +25,8 @@ INSERT INTO generated.neighborhood_pharmacies ( ) SELECT ST_Multi(ST_Buffer(ST_CollectionExtract(unnest(ST_ClusterWithin(way,:cluster_tolerance)),3),0)) FROM neighborhood_osm_full_polygon -WHERE amenity = 'pharmacy'; +WHERE amenity = 'pharmacy' OR + shop = 'chemist'; -- set points on polygons UPDATE generated.neighborhood_pharmacies @@ -43,7 +44,8 @@ SELECT osm_id, name, way FROM neighborhood_osm_full_point -WHERE amenity = 'pharmacy' +WHERE amenity = 'pharmacy' OR + shop = 'chemist' AND NOT EXISTS ( SELECT 1 FROM neighborhood_pharmacies s diff --git a/src/analysis/connectivity/destinations/retail.sql b/src/analysis/connectivity/destinations/retail.sql index 9656b7a4..dff243c0 100644 --- a/src/analysis/connectivity/destinations/retail.sql +++ b/src/analysis/connectivity/destinations/retail.sql @@ -23,7 +23,8 @@ INSERT INTO generated.neighborhood_retail ( ) SELECT ST_Multi(ST_Buffer(ST_CollectionExtract(unnest(ST_ClusterWithin(way,:cluster_tolerance)),3),0)) FROM neighborhood_osm_full_polygon -WHERE landuse = 'retail'; +WHERE landuse = 'retail' OR + building = 'retail'; -- set points on polygons UPDATE generated.neighborhood_retail diff --git a/src/analysis/connectivity/destinations/schools.sql b/src/analysis/connectivity/destinations/schools.sql index bfcf68e7..d50c12eb 100644 --- a/src/analysis/connectivity/destinations/schools.sql +++ b/src/analysis/connectivity/destinations/schools.sql @@ -27,7 +27,7 @@ SELECT osm_id, ST_Centroid(way), way FROM neighborhood_osm_full_polygon -WHERE amenity = 'school'; +WHERE amenity IN ('school','kindergarten'); -- remove subareas that are mistakenly designated as amenity=school DELETE FROM generated.neighborhood_schools @@ -50,7 +50,7 @@ SELECT osm_id, name, way FROM neighborhood_osm_full_point -WHERE amenity = 'school' +WHERE amenity IN ('school','kindergarten') AND NOT EXISTS ( SELECT 1 FROM neighborhood_schools s diff --git a/src/analysis/import/pfb.style b/src/analysis/import/pfb.style index ca343b6f..6624b336 100644 --- a/src/analysis/import/pfb.style +++ b/src/analysis/import/pfb.style @@ -86,6 +86,7 @@ node amenity text linear way amenity text polygon node,way bicycle text linear node,way bridge text linear +node,way building text polygon node,way button_operated text linear node,way crossing text linear node,way crossing:island text linear @@ -105,6 +106,7 @@ way cycleway:both:width text linear node,way flashing_lights text linear node,way foot text linear way footway text linear +node,way healthcare text polygon node,way highway text linear node,way junction text linear way landuse text linear,polygon