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

Dropping subpixel accuracy for areas #2874

Merged
merged 1 commit into from
May 17, 2018
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
11 changes: 7 additions & 4 deletions indexes.sql
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,21 @@ CREATE INDEX planet_osm_polygon_water
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';
CREATE INDEX planet_osm_polygon_nobuilding
ON planet_osm_polygon USING GIST (way)
WHERE building IS NULL;
CREATE INDEX planet_osm_polygon_name
ON planet_osm_polygon USING GIST (way)
WHERE name IS NOT NULL;
CREATE INDEX planet_osm_polygon_way_area_z10
ON planet_osm_polygon USING GIST (way)
WHERE way_area > 23300;
CREATE INDEX planet_osm_polygon_military
ON planet_osm_polygon USING GIST (way)
WHERE landuse = 'military';
CREATE INDEX planet_osm_polygon_way_area_z6
ON planet_osm_polygon USING GIST (way)
WHERE way_area > 59750;
WHERE way_area > 5980000;
CREATE INDEX planet_osm_point_place
ON planet_osm_point USING GIST (way)
WHERE place IS NOT NULL AND name IS NOT NULL;
4 changes: 3 additions & 1 deletion indexes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ polygon:
OR landuse IN ('reservoir', 'basin')
OR "natural" IN ('water', 'glacier')
way_area_z6:
where: way_area > 59750
where: way_area > 5980000
way_area_z10:
where: way_area > 23300
roads:
# The roads table only has a subset of data, so it's just got some low-zoom
# indexes and some fairly selective ones for high zoom
Expand Down
12 changes: 6 additions & 6 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Layer:
FROM planet_osm_polygon
WHERE (landuse IN ('forest', 'military', 'farmland', 'residential', 'commercial', 'retail', 'industrial', 'meadow')
OR "natural" IN ('wood', 'wetland', 'mud', 'sand', 'scree', 'shingle', 'bare_rock', 'heath', 'grassland'))
AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real
AND way_area > 1*!pixel_width!::real*!pixel_height!::real
AND building IS NULL
ORDER BY way_area DESC
) AS features
Expand Down Expand Up @@ -152,7 +152,7 @@ Layer:
OR tourism IN ('camp_site', 'caravan_site', 'picnic_site')
OR highway IN ('services', 'rest_area')
OR railway = 'station')
AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real
AND way_area > 1*!pixel_width!::real*!pixel_height!::real
ORDER BY way_area DESC
) AS landcover
) AS features
Expand Down Expand Up @@ -265,7 +265,7 @@ Layer:
FROM planet_osm_polygon
WHERE ("natural" IN ('marsh', 'mud', 'wetland', 'wood', 'beach', 'shoal', 'reef', 'scrub', 'sand') OR landuse = 'forest')
AND building IS NULL
AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real
AND way_area > 1*!pixel_width!::real*!pixel_height!::real
ORDER BY COALESCE(layer,0), way_area DESC
) AS landcover_area_symbols
properties:
Expand Down Expand Up @@ -434,7 +434,7 @@ Layer:
AND building != 'train_station'
AND (aerialway IS NULL OR aerialway != 'station')
AND ((tags->'public_transport') IS NULL OR tags->'public_transport' != 'station')
AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real
AND way_area > 1*!pixel_width!::real*!pixel_height!::real
ORDER BY COALESCE(layer,0), way_area DESC
) AS buildings
properties:
Expand All @@ -460,7 +460,7 @@ Layer:
OR building = 'train_station'
OR aerialway = 'station'
OR tags->'public_transport' = 'station')
AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real
AND way_area > 1*!pixel_width!::real*!pixel_height!::real
ORDER BY COALESCE(layer,0), way_area DESC)
AS buildings_major
properties:
Expand Down Expand Up @@ -1371,7 +1371,7 @@ Layer:
FROM planet_osm_polygon
WHERE (boundary = 'national_park' OR leisure = 'nature_reserve')
AND building IS NULL
AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real
AND way_area > 1*!pixel_width!::real*!pixel_height!::real
) AS national_park_boundaries
properties:
minzoom: 8
Expand Down