osm-tags-transform is a way of processing an OSM file to remove things or change tags. It allows you to define a series of lua functions that are called for each node, way or relation in an input file. I use it when creating mkgmap maps for Garmin devices; see for example this snippet of code here.
One thing that would be useful is to detect closed ways in order to treat certain objects as areas (even if they don’t have area=yes set). There is support for some geometry processing, but that doesn’t look like what I’m looking for.
Is there a way, within the ott.process_way function, of detecting whether a way is closed or not?
Searching the pyosmium documentation for "closed way" finds only https://docs.osmcode.org/pyosmium/latest/cookbooks/Adding-Route-Info-To-Ways/ - is there something more relevant?
– SomeoneElseA way in pyosmium contains a sequence of node references. Just check whether the first node and the last node are the same.
– Jochen_Topf