osmose-backend icon indicating copy to clipboard operation
osmose-backend copied to clipboard

Allow litre (l) as an explicit unit for capacity if a volume is specified (e.g. for amenity=waste_disposal or amenity=grit_bin)

Open jajajaneeneenee opened this issue 3 weeks ago • 3 comments

The value for capacity of a volume is normally specified in m³, but litre ("l") is also allowed (= documented) as an explicit specification (see https://wiki.openstreetmap.org/wiki/Map_features/Units).

The integer capacity value check now reports an error if, for example, "capacity=350 l" is specified for amenity=grit_bin ("capacity" value "350 l" is not an integer).

I think, it should not throw an error. And not with m³ either. (Other volume units: I am not sure ... see below. But at least "l" seems to be established and it is documented).

And, for example, for grit bins, the content is usually specified in liters and not in m³ on the container and is therefore probably preferred to be specified that way. I mention grit bin because I first encountered the problem with it – although there are currently only 147 cases of grit_bin + capacity (but growing ...) – but almost all of them with "l" (exact numbers see below). So this combination now has a nearly 100% Osmose error rate – I would say false positives. Therefore a special case ... But it also affects other tags (see below).

For waste disposals, there seem to be some incorrect information such as capacity=3200 (e.g. https://www.openstreetmap.org/node/10210997092), which would have to be a pretty large container... (capacity=800, etc. also occurs frequently). I think the unit "l" for litre is missing here – maybe because of incorrect validator messages people are using an integer only? Hoping someone will guess the right unit? Not a good idea in my opinion ... This is also why I am writing this issue.

I spontaneously think of these cases:

  • amenity=waste_disposal (> 10 k uses with capacity=*, zero cases with "l", 360 cases with values > 100 – probably "l" missing)
  • amenity=waste_basket (approx. 1600x used with capacity=*, 3 cases with "l" and 1335x with "litres")
  • amenity=recycling (approx. 7700x used with capacity=*, 172 cases with "l")
  • man_made=storage_tank (approx. 2000x used with capacity=*, 12 cases with "l", other cases with "gal" etc.)
  • amenity=grit_bin (147x used with capacity=*, 143x with "l", 3x "l" missing => >99% of the values in litre)
  • water=reservoir (> 100x used with capacity=*; not checked any further, but megalitres or hm3 seem to be used in some cases)
  • emergency=water_tank (not checked any further)

(Because no key "volume" exists or is documented – it is only used 336 times – , "capacity" is probably used to specify the volume. And I think, it's OK.)

Further note: I also saw cases with undocumented volume units like:

  • gal
  • gals
  • barrels
  • litres
  • megalitres
  • Ml
  • hm3
  • there may be other volume units ...

I don't know if this is covered by another osmosis test or if it should be taken into account here as well. But there seems to be no widespread agreement yet on which volume units are OK other than "m³" and "l" (see also this Wiki discussion from 2021 without result).

Note: See also (closed) issue #1733.

jajajaneeneenee avatar Jul 02 '24 01:07 jajajaneeneenee