Skip to content

Commit

Permalink
Merge pull request #6352 from tordans/filder-for-building-part-and-in…
Browse files Browse the repository at this point in the history
…door

Add filter building:part and indoor
  • Loading branch information
quincylvania authored May 22, 2019
2 parents 5bf1c47 + 35a2301 commit 76b98f1
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 86 deletions.
2 changes: 1 addition & 1 deletion API.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ of iD (e.g. `http://preview.ideditor.com/release/`), the following parameters ar
_Example:_ `comment=CAR%20crisis%2C%20refugee%20areas%20in%20Cameroon`
* __`disable_features`__ - Disables features in the list.<br/>
_Example:_ `disable_features=water,service_roads,points,paths,boundaries`<br/>
_Available features:_ `points` `traffic_roads` `service_roads` `paths` `buildings` `landuse`
_Available features:_ `points` `traffic_roads` `service_roads` `paths` `buildings` `building_parts` `indoor` `landuse`
`boundaries` `water` `rail` `power` `past_future` `others`
* __`gpx`__ - A custom URL for loading a gpx track. Specifying a `gpx` parameter will
automatically enable the gpx layer for display.<br/>
Expand Down
6 changes: 6 additions & 0 deletions data/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,12 @@ en:
buildings:
description: Buildings
tooltip: "Buildings, Shelters, Garages, etc."
building_parts:
description: Building Parts
tooltip: "building:part=*"
indoor:
description: Indoor
tooltip: "indoor=*"
landuse:
description: Landuse Features
tooltip: "Forests, Farmland, Parks, Residential, Commercial, etc."
Expand Down
98 changes: 14 additions & 84 deletions dist/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,14 @@
"description": "Buildings",
"tooltip": "Buildings, Shelters, Garages, etc."
},
"building_parts": {
"description": "Building Parts",
"tooltip": "building:part=*"
},
"indoor": {
"description": "Indoor",
"tooltip": "indoor=*"
},
"landuse": {
"description": "Landuse Features",
"tooltip": "Forests, Farmland, Parks, Residential, Commercial, etc."
Expand Down Expand Up @@ -9141,20 +9149,6 @@
"description": "Imagery boundaries and capture dates. Labels appear at zoom level 13 and higher.",
"name": "DigitalGlobe Standard Imagery Vintage"
},
"DigitalGlobe-Vivid": {
"attribution": {
"text": "Terms & Feedback"
},
"description": "DigitalGlobe-Vivid is a mosaic with optimal aesthetics and currency for any area on the globe, 50cm resolution or better, and image currency <20 month average globally.",
"name": "DigitalGlobe Vivid Imagery"
},
"EOXAT2018CLOUDLESS": {
"attribution": {
"text": "Sentinel-2 cloudless - https://s2maps.eu by EOX IT Services GmbH (Contains modified Copernicus Sentinel data 2017 & 2018)"
},
"description": "Post-processed Sentinel Satellite imagery.",
"name": "eox.at 2018 cloudless"
},
"EsriWorldImagery": {
"attribution": {
"text": "Terms & Feedback"
Expand Down Expand Up @@ -9231,6 +9225,9 @@
"SPW_PICC": {
"name": "SPW(allonie) PICC numerical imagery"
},
"US-TIGER-Roads-2012": {
"name": "TIGER Roads 2012"
},
"US-TIGER-Roads-2014": {
"description": "At zoom level 16+, public domain map data from the US Census. At lower zooms, only changes since 2006 minus changes already incorporated into OpenStreetMap",
"name": "TIGER Roads 2014"
Expand All @@ -9239,10 +9236,6 @@
"description": "Yellow = Public domain map data from the US Census. Red = Data not found in OpenStreetMap",
"name": "TIGER Roads 2017"
},
"US-TIGER-Roads-2018": {
"description": "Yellow = Public domain map data from the US Census. Red = Data not found in OpenStreetMap",
"name": "TIGER Roads 2018"
},
"US_Forest_Service_roads_overlay": {
"description": "Highway: Green casing = unclassified. Brown casing = track. Surface: gravel = light brown fill, Asphalt = black, paved = gray, ground =white, concrete = blue, grass = green. Seasonal = white bars",
"name": "U.S. Forest Roads Overlay"
Expand All @@ -9259,12 +9252,6 @@
},
"name": "UrbIS-Ortho 2017"
},
"UrbISOrtho2018": {
"attribution": {
"text": "Realized by means of Brussels UrbIS®© - Distribution & Copyright CIRB"
},
"name": "UrbIS-Ortho 2018"
},
"UrbisAdmFR": {
"attribution": {
"text": "Realized by means of Brussels UrbIS®© - Distribution & Copyright CIRB"
Expand Down Expand Up @@ -9342,54 +9329,18 @@
"description": "Japan GSI ortho Imagery. Usually better than bing, but a bit older.",
"name": "Japan GSI ortho Imagery"
},
"gsi.go.jp_airphoto": {
"attribution": {
"text": "GSI Japan"
},
"description": "Japan GSI airphoto Imagery. Not fully orthorectified, but a bit newer and/or differently covered than GSI ortho Imagery.",
"name": "Japan GSI airphoto Imagery"
},
"gsi.go.jp_seamlessphoto": {
"attribution": {
"text": "GSI Japan seamless photo"
},
"description": "Japan GSI seamlessphoto Imagery. The collection of latest imageries of GSI ortho, airphoto, post disaster and others.",
"name": "Japan GSI seamlessphoto Imagery"
},
"gsi.go.jp_std_map": {
"attribution": {
"text": "GSI Japan"
},
"description": "Japan GSI Standard Map. Widely covered.",
"name": "Japan GSI Standard Map"
},
"helsingborg-orto": {
"attribution": {
"text": "© Helsingborg municipality"
},
"description": "Orthophotos from the municipality of Helsingborg 2016, public domain",
"name": "Helsingborg Orthophoto"
},
"kalmar-orto-2014": {
"hike_n_bike": {
"attribution": {
"text": "© Kalmar municipality"
},
"description": "Orthophotos for the north coast of the municipality of Kalmar 2014",
"name": "Kalmar North Orthophoto 2014"
},
"kalmar-orto-2016": {
"attribution": {
"text": "© Kalmar municipality"
},
"description": "Orthophotos for the south coast of the municipality of Kalmar 2016",
"name": "Kalmar South Orthophoto 2016"
},
"kalmar-orto-2018": {
"attribution": {
"text": "© Kalmar municipality"
"text": "© OpenStreetMap contributors"
},
"description": "Orthophotos for urban areas of the municipality of Kalmar 2018",
"name": "Kalmar Urban Orthophoto 2018"
"name": "Hike & Bike"
},
"kelkkareitit": {
"attribution": {
Expand All @@ -9412,20 +9363,6 @@
"description": "Mosaic of Swedish orthophotos from the period 1970–1980. Is under construction.",
"name": "Lantmäteriet Historic Orthophoto 1975"
},
"lantmateriet-topowebb": {
"attribution": {
"text": "© Lantmäteriet, CC0"
},
"description": "Topographic map of Sweden 1:50 000",
"name": "Lantmäteriet Topographic Map"
},
"linkoping-orto": {
"attribution": {
"text": "© Linköping municipality"
},
"description": "Orthophotos from the municipality of Linköping 2010, open data",
"name": "Linköping Orthophoto"
},
"mapbox_locator_overlay": {
"attribution": {
"text": "Terms & Feedback"
Expand Down Expand Up @@ -9490,13 +9427,6 @@
},
"name": "Stamen Terrain"
},
"stockholm-orto": {
"attribution": {
"text": "© Stockholm municipality, CC0"
},
"description": "Orthophotos from the municipality of Stockholm 2016, CC0 license",
"name": "Stockholm Orthophoto"
},
"tf-cycle": {
"attribution": {
"text": "Maps © Thunderforest, Data © OpenStreetMap contributors"
Expand Down
9 changes: 8 additions & 1 deletion modules/renderer/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ export function rendererFeatures(context) {

defineRule('buildings', function isBuilding(tags) {
return (
!!tags['building:part'] ||
(!!tags.building && tags.building !== 'no') ||
tags.parking === 'multi-storey' ||
tags.parking === 'sheds' ||
Expand All @@ -129,6 +128,14 @@ export function rendererFeatures(context) {
);
}, 250);

defineRule('building_parts', function isBuildingPart(tags) {
return tags['building:part'];
});

defineRule('indoor', function isIndoor(tags) {
return tags.indoor;
});

defineRule('landuse', function isLanduse(tags, geometry) {
return geometry === 'area' &&
!_rules.buildings.filter(tags) &&
Expand Down

0 comments on commit 76b98f1

Please sign in to comment.