Handling of spaces in population tags — implications for Overpass and editor validation

Hi all,

I’ve noticed an inconsistency in how population tags are handled in OpenStreetMap and its ecosystem. Specifically:

  1. Some population values contain spaces (e.g., 251 405), which breaks numeric parsing in tools like Overpass.
  2. Overpass API doesn’t currently strip whitespace before applying numeric filters like (if: t["population"] > 10000000), causing incorrect results.
  3. OSM editors like iD and JOSM currently allow these values without warnings, even though they break downstream use.

:bulb: Suggested actions:

  • Overpass API: Should ideally ignore spaces or normalize numbers before comparison.
  • Tagging standards: Recommend storing population as a plain integer without formatting (e.g., no spaces or commas).
  • Editor validation: iD and JOSM could flag population tags that are not purely numeric.

Would it make sense to propose a community-wide cleanup and validator rules for this? And could Overpass consider supporting whitespace-tolerant numeric comparisons?

Thanks!
Johan

2 Likes

I am all in favor of validation rules for known numeric only tags. Thats the first thing which needs to be done so that the steady stream of issues gets reduced.

Flo

7 Likes