Skip to content

Commit

Permalink
Add an index for water polygons
Browse files Browse the repository at this point in the history
  • Loading branch information
pnorman committed Aug 27, 2016
1 parent 02dcbac commit eaef4bb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions indexes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ CREATE INDEX planet_osm_line_river
CREATE INDEX planet_osm_line_name
ON planet_osm_line USING GIST (way)
WHERE name IS NOT NULL;
CREATE INDEX planet_osm_polygon_water
ON planet_osm_polygon USING GIST (way)
WHERE waterway IN ('dock', 'riverbank', 'canal')
OR landuse IN ('reservoir', 'basin')
OR "natural" IN ('water', 'glacier');
CREATE INDEX planet_osm_polygon_military
ON planet_osm_polygon USING GIST (way)
WHERE landuse = 'military';
Expand Down
6 changes: 6 additions & 0 deletions indexes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ polygon:
where: building IS NULL
military:
where: landuse = 'military'
water:
# The indentation here makes sense in the SQL output
where: |-
waterway IN ('dock', 'riverbank', 'canal')
OR landuse IN ('reservoir', 'basin')
OR "natural" IN ('water', 'glacier')
way_area_z6:
where: way_area > 59750
roads:
Expand Down

0 comments on commit eaef4bb

Please sign in to comment.