Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions schema/derive.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions schema/osm2pgsql/openinterstate.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

Expand Down
Loading