Opened 6 days ago
Last modified 26 hours ago
#24805 needinfo enhancement
Weight value lost when modifying ways — automatic recalculation needed
| Reported by: | Owned by: | ||
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Core | Version: | latest |
| Keywords: | Cc: |
Description
Summary
When a way is modified in JOSM (e.g. moved, extended, or split), custom length-based tags are either silently retained with their outdated value, or dropped entirely. We are looking for a way to automate recalculation of such tags after geometry changes.
Background
We use JOSM as the primary editing tool for a custom indoor/campus routing graph. Each way carries a weight tag encoding its traversal cost (physical length in meters), which is consumed by a shortest-path routing algorithm.
The problem: whenever a way's geometry is changed, the weight tag either keeps its previous (now incorrect) value, or disappears completely — with no indication of either in the editor. Both cases result in corrupt routing data. Over time, as more edits are made, an increasing number of ways carry stale or missing weight values, silently degrading routing quality in the downstream application.
Manual correction is not a sustainable option, as the effort scales with every edit made to the dataset.
Request
Is there an existing mechanism in JOSM to automatically recalculate a tag value (such as way length) after a geometry edit? If not, would the JOSM team be open to supporting this use case — either as a core feature, a validator rule, or by other means?
We are happy to provide sample data or further detail if useful.
Attachments (0)
Change History (2)
comment:1 by , 6 days ago
comment:2 by , 26 hours ago
| Milestone: | 26.07 |
|---|---|
| Owner: | changed from to |
| Priority: | major → normal |
| Status: | new → needinfo |
Each way carries a weight tag encoding its traversal cost (physical length in meters)
I'm not sure why it's necessary to store the length as a tag when the geometry is already present. However, if you need it, you can always ask an AI to write a script to perform the recalculation after JOSM edits.
I'm not even sure how it is added initially... hopefully not manually, one-by-one :)



First, I don't believe JOSM drops any tags without a user deciding to do so.
Second: What's the purpose of a tag which only caries the length of a way. You always can calculate that automatically, i.e. when exporting your dataset to whatever routing you use.
Third: Yes, you can write a plugin, which does what you want, i.e. as an upload hook.