How to update tag values automatically?

I have customized osm maps that contain only roads for cars, basically a tags filter for highway=primary, secondary and so on.
So far so good, but I have noticed that some streets have typos in their max speed values, for example:

I would like to detect ways with maxspeed<=9 and increase the values to 10. I am using osmium to filter maps but I think I can’t use osmium to update tag values, right?

How would you go about solving this problem?

Maybe you can use osmfilter for that?

I presume you don’t plan to upload modified data to the OSM database.

If something’s obviously wrong in OSM I’d contact the person who originally mapped it or someone who has edited it subsequently and ask them what the correct value.

If you want to “get rid of obviously invalid data” in your local database, just remove the maxspeed from that way (via SQL?).

Please don’t update maxspeed values without survey.

…but i think you can add tags “todo=check maxspeed value” or “fixme=check maxspeed value” to warn that the speed may be wrong. Or add a OSM note for each way.

Ok, sure I will notify the OSM community about the wrong tags. It looks like typos.

just remove the maxspeed from that way (via SQL?).

I am not working with a local database. I am just working with osm files.

Maybe you can use osmfilter for that? … dification

looks very interseting, thank you. I will check it out.

For OSRM & osm2pgsql there is the possibility of using LUA to alter values before processing them in an application. Mkgmap also allows such rules in making Garmin files from OSM data.

Also in Osmosis there is tag-transform, but it might not work with a range of values or regexp.