diff --git a/schema/derive.sql b/schema/derive.sql index 4be2b01..721770e 100644 --- a/schema/derive.sql +++ b/schema/derive.sql @@ -349,11 +349,13 @@ FROM ( ) AS rank FROM exits e JOIN pois p - ON p.geom && ST_Expand(e.geom, 0.012) - AND ST_DWithin(e.geom::geography, p.geom::geography, 800.0) + ON p.geom && ST_Expand(e.geom, + CASE WHEN p.category IN ('park', 'dogPark') THEN 0.024 ELSE 0.012 END) + AND ST_DWithin(e.geom::geography, p.geom::geography, + CASE WHEN p.category IN ('park', 'dogPark') THEN 1600.0 ELSE 800.0 END) WHERE p.category IS NOT NULL AND p.category <> 'restroom' - AND (p.category = 'restArea' OR LOWER(TRIM(COALESCE(NULLIF(p.display_name, ''), NULLIF(p.name, ''), 'Unknown'))) <> 'unknown') + AND (p.category IN ('restArea', 'park', 'dogPark') OR LOWER(TRIM(COALESCE(NULLIF(p.display_name, ''), NULLIF(p.name, ''), 'Unknown'))) <> 'unknown') AND NOT EXISTS ( SELECT 1 FROM exit_poi_reachability prior diff --git a/schema/osm2pgsql/openinterstate.lua b/schema/osm2pgsql/openinterstate.lua index 69f6c8d..b033370 100644 --- a/schema/osm2pgsql/openinterstate.lua +++ b/schema/osm2pgsql/openinterstate.lua @@ -49,6 +49,7 @@ local function classify_poi(tags) local tourism = tags.tourism or "" local highway = tags.highway or "" local shop = tags.shop or "" + local leisure = tags.leisure or "" if amenity == "fuel" or shop == "gas" then return "gas" @@ -68,6 +69,12 @@ local function classify_poi(tags) if amenity == "charging_station" then return "evCharging" end + if leisure == "dog_park" then + return "dogPark" + end + if leisure == "park" then + return "park" + end return nil end