Skip to content

Commit

Permalink
Rename planet_osm_line_name index to planet_osm_line_label and includ…
Browse files Browse the repository at this point in the history
…e rows where ref IS NOT NULL

Update text-line layer query to take advantage of the updated index
  • Loading branch information
jgruca committed Sep 2, 2021
1 parent 75e5322 commit 337b742
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions indexes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
CREATE INDEX planet_osm_line_ferry
ON planet_osm_line USING GIST (way)
WHERE route = 'ferry' AND osm_id > 0;
CREATE INDEX planet_osm_line_name
CREATE INDEX planet_osm_line_label
ON planet_osm_line USING GIST (way)
WHERE name IS NOT NULL;
WHERE name IS NOT NULL OR ref IS NOT NULL;
CREATE INDEX planet_osm_line_river
ON planet_osm_line USING GIST (way)
WHERE waterway = 'river';
Expand Down
4 changes: 2 additions & 2 deletions indexes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ point:
place:
where: place IS NOT NULL AND name IS NOT NULL
line:
name:
where: name IS NOT NULL
label:
where: name IS NOT NULL OR ref IS NOT NULL
ferry:
where: route = 'ferry' AND osm_id > 0
river:
Expand Down
2 changes: 1 addition & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -2042,7 +2042,7 @@ Layer:
OR waterway IN ('dam', 'weir')
OR "natural" IN ('arete', 'cliff', 'ridge'))
AND name IS NOT NULL)
OR tags @> 'golf=>hole'
OR (tags @> 'golf=>hole' AND ref IS NOT NULL)
) AS text_line
properties:
minzoom: 10
Expand Down

0 comments on commit 337b742

Please sign in to comment.