Modify

Opened 6 days ago

Last modified 26 hours ago

#24805 needinfo enhancement

Weight value lost when modifying ways — automatic recalculation needed

Reported by: marius.karch@… Owned by: marius.karch@…
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 stoecker, 6 days ago

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.

comment:2 by gaben, 26 hours ago

Milestone: 26.07
Owner: changed from team to marius.karch@…
Priority: majornormal
Status: newneedinfo

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 :)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as needinfo The owner will remain marius.karch@….
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from marius.karch@… to the specified user. Next status will be 'new'.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from marius.karch@… to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.