Skip to content

Commit

Permalink
Merge pull request #4280 from pnorman/waterway
Browse files Browse the repository at this point in the history
Create a partial index for waterways
  • Loading branch information
pnorman authored Jan 11, 2021
2 parents 8fba163 + 633775f commit 37f4aaf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions indexes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ CREATE INDEX planet_osm_line_name
CREATE INDEX planet_osm_line_river
ON planet_osm_line USING GIST (way)
WHERE waterway = 'river';
CREATE INDEX planet_osm_line_waterway
ON planet_osm_line USING GIST (way)
WHERE waterway IN ('river', 'canal', 'stream', 'drain', 'ditch');
CREATE INDEX planet_osm_point_place
ON planet_osm_point USING GIST (way)
WHERE place IS NOT NULL AND name IS NOT NULL;
Expand Down
2 changes: 2 additions & 0 deletions indexes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ line:
where: route = 'ferry' AND osm_id > 0
river:
where: waterway = 'river'
waterway:
where: waterway IN ('river', 'canal', 'stream', 'drain', 'ditch')
polygon:
# The polygon table is by far the largest, and generally the slowest
name:
Expand Down

0 comments on commit 37f4aaf

Please sign in to comment.