Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an index for names at low zoom #4617

Merged
merged 1 commit into from
Sep 2, 2022
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
3 changes: 3 additions & 0 deletions indexes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ CREATE INDEX planet_osm_polygon_military
CREATE INDEX planet_osm_polygon_name
ON planet_osm_polygon USING GIST (ST_PointOnSurface(way))
WHERE name IS NOT NULL;
CREATE INDEX planet_osm_polygon_name_z6
ON planet_osm_polygon USING GIST (ST_PointOnSurface(way))
WHERE name IS NOT NULL AND way_area > 5980000;
CREATE INDEX planet_osm_polygon_nobuilding
ON planet_osm_polygon USING GIST (way)
WHERE building IS NULL;
Expand Down
3 changes: 3 additions & 0 deletions indexes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ polygon:
name:
function: ST_PointOnSurface(way)
where: name IS NOT NULL
name_z6:
function: ST_PointOnSurface(way)
where: name IS NOT NULL AND way_area > 5980000
admin:
function: ST_PointOnSurface(way)
where: name IS NOT NULL AND boundary = 'administrative' AND admin_level IN ('0', '1', '2', '3', '4')
Expand Down