Can names include start_date/end_date in JOSM for OHM?

I’ve been using JOSM to contribute to OHM (OpenHistoricalMap). There are a few places in the UI where it would be incredibly helpful to include the start_date and end_date tags. For example, the four “Putumayo Commissariat” relations here are primarily distinguished by start_date/end_date:

The OHM Wiki calls for member relations in a chronology to be sorted by start_date. But that’s tedious to do when you can’t see the start_date / end_date in the relation editor.

The osm-primitives.showid setting gives me some hope that it’s possible, at least in principle, to customize the default name that JOSM displays for a relation. Is there any way to customize this to include start_date/end_date? Barring that, are there any plugins that could do this? Or, barring that, is this a feature that a plugin could provide?

1 Like

This is completely doable with name templates in the presets.

See beautified-JOSM-preset/master_preset.xml at 743642cb1422a372c0ed4527a54e8e985bdced24 · simonpoole/beautified-JOSM-preset · GitHub for an example.

The JOSM documentation is here https://josm.openstreetmap.de/wiki/TaggingPresets#name_templatedetails and isn’t very clear (I say something less flattering in my implementation GitHub - simonpoole/JosmTemplateParser: Parser for JOSM name templates · GitHub maybe I should write some sane doc for the feature).

3 Likes

@SimonPoole You are a life saver! Brilliant!

3 Likes

Awesome, I know many other mappers would find this helpful! Any chance you could share the preset file you put together so we could include it in OHM’s JOSM setup guide?

I put together something very small here:

You can add this as a second active preset by using this URL:

https://raw.githubusercontent.com/danvk/ohm/refs/heads/main/ohm-preset.xml

And then you get start_date / end_date in names, including chronologies.

I don’t really understand Tagging Presets, so feedback would be appreciated if I’m doing something crazy :slight_smile:

In the meantime, I’ll add a note about this to OpenHistoricalMap/JOSM.

4 Likes

Unabashedly tacking this on to this thread.

The name_template grammar has an obvious oversight that I want to fix for my implementation and maybe somebody here has a brilliant idea: Support display_values in JOSM name templates · GitHub (without my current fav solution).

1 Like