diff --git a/integration-test/1732-restore-building-scale-rank.py b/integration-test/1732-restore-building-scale-rank.py index 7f5d872df..b61bc31f8 100644 --- a/integration-test/1732-restore-building-scale-rank.py +++ b/integration-test/1732-restore-building-scale-rank.py @@ -143,18 +143,3 @@ def test_tiny_shed_z17(self): 'kind': 'building', 'min_zoom': 17, }, 1) - - def test_slightly_larger_outbuilding_z16(self): - # check that a small building (or large shed), assigned zoom 16 in the - # buildings.yaml, doesn't get re-assigned a lower zoom. it should stay - # at z16. - z, x, y = (16, 0, 0) - - # make one 4x4m building. - self._setup_row(z, x, y, 4, 4, 1) - - self.assert_n_matching_features( - z, x, y, 'buildings', { - 'kind': 'building', - 'min_zoom': 16, - }, 1) diff --git a/integration-test/2032-building-address-points-missing-min-zooms.py b/integration-test/2032-building-address-points-missing-min-zooms.py index 99e5ea74a..b42a69422 100644 --- a/integration-test/2032-building-address-points-missing-min-zooms.py +++ b/integration-test/2032-building-address-points-missing-min-zooms.py @@ -9,7 +9,7 @@ class BuildingAddressPointsMissingMinZooms(FixtureTest): def test_address_point_gen_has_min_zoom_17(self): import dsl - z, x, y = (16, 19299, 24630) + z, x, y = (17, 19299, 24630) self.generate_fixtures( # https://www.openstreetmap.org/way/265302092 @@ -74,7 +74,7 @@ def test_no_address_points_generated_below_zoom_16(self): def test_address_point_falls_back_to_name(self): import dsl - z, x, y = (16, 19299, 24630) + z, x, y = (17, 19299, 24630) self.generate_fixtures( # https://www.openstreetmap.org/way/265302092 diff --git a/queries.yaml b/queries.yaml index 5a4344220..155fbe441 100644 --- a/queries.yaml +++ b/queries.yaml @@ -1712,15 +1712,15 @@ post_process: # drop small inners in buildings before we do the merge. - fn: vectordatasource.transform.drop_small_inners params: - end_zoom: 15 + end_zoom: 17 source_layers: [buildings] - pixel_area: 0.25 + pixel_area: 10.0 - fn: vectordatasource.transform.quantize_height params: source_layer: buildings start_zoom: 13 - end_zoom: 16 + end_zoom: 17 quantize: 13: vectordatasource.transform.quantize_height_round_nearest_20_meters 14: vectordatasource.transform.quantize_height_round_nearest_10_meters @@ -1740,6 +1740,56 @@ post_process: source_layer: buildings target_value_type: int + - fn: vectordatasource.transform.drop_properties + params: + source_layer: buildings + start_zoom: 0 + end_zoom: 16 + properties: + - landuse_kind + where: >- + landuse_kind not in ['aerodrome', 'airfield', 'cemetery', 'college', 'conservation', 'forest', 'garden', 'golf_course', 'hospital', 'national_park', 'nature_reserve', 'park', 'protected_area', 'retail', 'runway', 'school', 'station', 'taxiway', 'university'] + + - fn: vectordatasource.transform.drop_properties + params: + source_layer: buildings + start_zoom: 0 + end_zoom: 16 + properties: + - kind_detail + where: >- + kind_detail not in ['airport', 'civic', 'church', 'college', 'commercial', 'fire_station', 'industrial', 'military', 'hospital', 'office', 'public', 'prison', 'retail', 'school', 'sports_centre', 'stadium', 'station', 'synagogue', 'train_station', 'university', 'warehouse'] + + - fn: vectordatasource.transform.drop_properties + params: + source_layer: buildings + start_zoom: 0 + end_zoom: 16 + properties: + - building_material + - osm_relation + - roof_color + - roof_height + - roof_material + - roof_orientation + - roof_shape + - root_id + - volume + + - fn: vectordatasource.transform.drop_properties + params: + source_layer: buildings + start_zoom: 0 + end_zoom: 17 + # short-hand for "name" property in the list below means all name-like + # properties. + all_name_variants: true + properties: + - name + - old_name + - addr_housenumber + - addr_street + # fit min zoom onto the scale rank, as we'll be using the scale rank rather # than the min zoom to calculate whether a building should make it into a # tile. having them split separately means we can't merge them together. @@ -1779,9 +1829,9 @@ post_process: # process may also have created small inners. - fn: vectordatasource.transform.drop_small_inners params: - end_zoom: 15 + end_zoom: 17 source_layers: [buildings] - pixel_area: 0.25 + pixel_area: 10.0 - fn: vectordatasource.transform.numeric_min_filter params: diff --git a/yaml/buildings.yaml b/yaml/buildings.yaml index 0aac2238e..2ee6311be 100644 --- a/yaml/buildings.yaml +++ b/yaml/buildings.yaml @@ -62,9 +62,13 @@ globals: way_area: { min: 500 } volume: { min: 50000 } - &z15_area_volume - way_area: { min: 20 } + any: + way_area: { min: 50 } + volume: { min: 20000 } - &z16_area_volume - way_area: { min: 10 } + any: + way_area: { min: 30 } + volume: { min: 8000 } # synthetic columns are values available to filters and output, but which are # generated in the SQL function and not passed in from the tables. in this case, # we generate the volume from the building height and way_area, where available.