Deriving `recycling:*` keys from colour of recycling container. Part 2

Posted by fghj753 on 6 July 2026 in English. Last updated on 11 July 2026.

Last September I wrote about a concept where instead of hand-listing 15–30 recycling:* tags on every packaging container, the user could just pick the container’s colour and let the editor auto-add the right tags. Well, now the concept has become a working prototype.

Estonia’s container colours try to follow the Danish standard: paper blue, glass green, metal/plastic packaging yellow. Other countries and regions use different colours, but across EU paper, glass and packaging have surprisingly consistent colouring.

Colours used for waste bins across the EU, 2023 survey Source: European Commission, “Harmonising waste-sorting labels across the EU” (2023).

The closest fit in the iD schema (which Every Door uses) is semiCombo and manyCombo, but both are too limited: each is designed so a single interaction affects only one tag. semiCombo maps multiple values onto one tag (e.g. sport=soccer;tennis), and manyCombo toggles several keys that share a common value (e.g. foot=yes;bicycle=yes). On top of that, I wanted to support multiple colour values on a single node, for the case where a whole group of containers is mapped as single node.

The problem always seemed solvable in theory, but probably only in some inconvenient way, because of limitations the editors themselves impose. I thought of it as similar to how crossing tagging works in iD. iD has several crossing presets with different priorities, and somehow the editor can suggest changes from multiple presets to the same element at once. However mobile editors don’t allow single element draw fields from multiple presets. Using sub-presets also doesn’t scale globally as we’d then need N+1 presets for every region with unique container colouring rules where N is number of colour schemas in region. Then in April I stumbled on Mateusz’s issue on iD’s schema-builder, where he states that the current iD schema doesn’t support dropdowns that alter multiple tags.

This week I finally got fed up with a different Every Door bug. I needed the editor to flag benches missing an armrest without tapping through every bench I walk past. The ED docs claim this works, but I’d been banging my head against it for nearly a year. AI assured the fix would be a one-liner. Twelve lines of code and twelve hours of debugging later, it was fixed and since I’d somehow got app compiling and running on my phone, decided to tackle the recycling containers next.

So I invented a new field type, bundleCombo, where a single option can set multiple tags at once. It still has one limitation that might become a problem later - all options must share at least one common key. Since introducing a new field type into the iD schema could have wide-reaching consequences, I won’t file a formal pull request for this, but if anyone’s interested, the code is at github.

Here’s the actual Every Door plugin I ended up with (pasted here because the plugin isn’t on GitHub):

id: recycling-ee
name: "EE Recycling (bundleCombo)"
version: 0.1
description: |
  Test plugin for the fork's bundleCombo field. A single recycling-container
  preset where tapping container-colour options stamps the matching
  recycling:* tags automatically.
  NB! This plugin relies on experimental custom field in order to be usable.
icon: U+267B 

presets:
  amenity/recycling:
    name: "Packaging container"
    icon: U+267B  # Unicode for ♻
    terms: [pakend, pakendikonteiner, recycling container, konteiner]
    tags:
      amenity: recycling
    fields:
      - "@amenity/recycling"
      - ee_recycling
    moreFields:
      - "@amenity/recycling"
 
fields:
  ee_recycling:
    label: "Containers present"
    type: bundleCombo
    key: colour
    options:
      - value: yellow
        label: "🟨 Mixed"
        tags:
          "recycling:plastic": "yes"
          "recycling:plastic_packaging": "yes"
          "recycling:plastic_bottles": "yes"
          "recycling:cans": "yes"
          "recycling:metal_packaging": "yes"
          "recycling:beverage_cartons": "yes"
          "recycling:cartons": "yes"
          "recycling:plastic_bags": "yes"
      - value: green
        label: "🟩 Glass"
        tags:
          "recycling:glass_bottles": "yes"
          "recycling:glass_jars": "yes"
      - value: blue
        label: "🟦 Paper"
        tags:
          "recycling:paper": "yes"
          "recycling:cardboard": "yes"
          "recycling:paper_packaging": "yes"
          "recycling:newspaper": "yes"
          "recycling:magazines": "yes"
      - value: brown
        label: "🟫 Bio"
        tags:
          "recycling:organic": "yes"
          "recycling:green_waste": "yes"
      - value: white
        label: " Clothes"
        tags:
          "recycling:clothes": "yes"
          "recycling:textiles": "yes"
          "recycling:shoes": "yes"

The tags were picked from the most popular recycling:* keys on Taginfo. Node 7147202892 is one of the first containers edited this way. There are two potential drawbacks worth addressing one day. Labels with coloured emoji along with waste type makes the options list too long and even picking “🟦 Paper” chip via ED’s UI was bit tedious. I could use icons as workaround one day.
Second trouble involves clothes container. Officially recyclable clothes are supposed to be collected in light-green container, my local container is white and I assumed rest of city has also white containers. I even encountered blue clothes container today. Luckily it was mapped separately from others so i was able to simply change colour manually.

If you want to see how it’s built, it’s essentially two files: field definition and function call in UI builder.

Updated 2026-07-11: I’ve been using the plugin for a 4 days now and it works fine. Found even rare occasion which had biowaste in addition to usual 3 (node/9796962578)

Switched to use official recycling pictograms recently and now i can fit 3 most common symbols into portrait window. However this mandated slight app modification in order to support icons as option labels like other Every Door presets/fields normally allow. Minimal change for plugin was to add image files and replace existing label with unquoted filename. I did convert original icons to indexed PNGs in order to make them ~20x smaller and replaced clothing container colour value to lime to reflect official colour container is supposed to be

ED's screenshot

Location: Pääsküla, Nõmme linnaosa, Tallinn, Harju County, Estonia

Discussion

Comment from Dimitar155 on 12 July 2026 at 21:24

Thanks for the article! That is certainly one way to handle it.

Funnily enough, we had a garbage collection problem in Sofia around October 2025. So it looks like we have been working on similar problems in parallel :)

Our mess is a little bigger since colours here don’t have the same meaning. Some operators use 3 colours system (green + yellow + blue as in Estonia) while others use 2 colours system (green + yellow, paper goes in the yellow).

We needed counts of different containers. The mixed waste containers got count=[number] but the colourful recycling ones were a bit harder. So I came up with count=[total count] + count:yellow=[number] + count:green=[number] + count:blue=[number].

Based on this schema I made a plugin for ED (https://plugins.every-door.app/sofia_waste_recycling_plugin, requires version 8.0+). Essentially it gives you a field for operator, one for total count and one for each colour. The count information is displayed in a separate overview (see https://community.openstreetmap.org/t/topic/136856/5).

The last part was applying the recycling:* tags. My goal was to automate this process since it was very annoying. Thankfully with some LLM support I managed to build a bot which handles everything - https://community.openstreetmap.org/t/topic/136856/19.

I’m not saying it is the best approach but it is the one which worked here. It would be interesting to see if anyone else has had the same problem and came up with another solution :)

Leave a comment

Log in to leave a comment