Skip to content

Commit

Permalink
Comment out the post office operator->brand switchover code
Browse files Browse the repository at this point in the history
(re: #5613)
  • Loading branch information
bhousel committed Oct 31, 2021
1 parent 610ba04 commit effa41e
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions scripts/build_index.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,20 +386,20 @@ function mergeItems() {
if (t === 'brands') {
name = tags.brand || tags.name;

// Seed missing brand tags (for a file that we copied over from the 'operator' tree)
if (/^amenity\/post/.test(kv)) { // post_office, post_box, post_depot only!
Object.keys(tags).forEach(osmkey => {
if (/operator/.test(osmkey)) {
if (osmkey === 'operator:type') return;
const operatorkey = osmkey;
const brandkey = operatorkey.replace('operator', 'brand'); // `operator`->`brand`, `operator:ru`->`brand:ru`, etc.
if (!tags[brandkey]) {
tags[brandkey] = tags[operatorkey];
delete tags[operatorkey]; // remove the redundancy
}
}
});
}
// // Seed missing brand tags (for a file that we copied over from the 'operator' tree)
// if (/^amenity\/post/.test(kv)) { // post_office, post_box, post_depot only!
// Object.keys(tags).forEach(osmkey => {
// if (/operator/.test(osmkey)) {
// if (osmkey === 'operator:type') return;
// const operatorkey = osmkey;
// const brandkey = operatorkey.replace('operator', 'brand'); // `operator`->`brand`, `operator:ru`->`brand:ru`, etc.
// if (!tags[brandkey]) {
// tags[brandkey] = tags[operatorkey];
// delete tags[operatorkey]; // remove the redundancy
// }
// }
// });
// }

} else if (t === 'flags') {
name = tags['flag:name'];
Expand Down

0 comments on commit effa41e

Please sign in to comment.