You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Proposal to move most attributes into relations #284
OSM’s original approach to handling evolution over time was to tag an attribute multiple times on the same element, qualifying the key with a date range as the subkey. This “datespec” syntax has long been deprecated and today is only used as a temporary shortcut. The main disadvantage is that virtually no software can handle an unbounded set of possible keys. Another problem is that the minilanguage can’t accommodate any metadata about the change. What was the source of the start date? Was there any uncertainty about it? What happened on that date? Even more fundamentally, this method assumes that an attribute is the only thing that can change over time. But we know that things can change…
Agreed that we need to write this up as a recommended approach, but first we want to make sure it will work with our infrastructure to encourage this kind of editing -- and also that it works for people doing the editing!
There are 13 unique combinations of start/end date tied to various attributes:
1871-1933
1890-1927
1927-
1932-1960
1932-1974
1933-1945
1945-1953
1953-1990
1957-1992
1960-1990
1974-
1990-
1992-
That's a lot of relations to make! But it is also really hard to imagine a client-side date-parser that could traverse all those keys and make sense of them out of vector tiles. Offloading that onto relations allows the timeslider and map style to remain simple enough to run client-side.
But it also suggests that the number of records in the database could grow a lot, and that there's going to be a lot of either duplication of tags or some TBD merging magic when, say, the surface of a road changes out of sync with its name, which are both out of sync with another change. It seems then like each unique combination of attributes might need its own relation.
Interestingly (to me anyway!) if I just parse out all the dates in those keys, then sort them and make non-overlapping ranges, I get a shorter and more comprehensible list:
1871-1890
1927-1932
1932-1933
1933-1945
1945-1953
1953-1957
1960-1974
1974-1990
1990-1992
1992-
Each relation would need to include the full set of tags that were true at that point, even if only some of them changed, but also if you want to know what the street is like in Year X, you just need the relation valid at that point, you don't have to hunt through an unknown number of keys to see which, if any might include years and if those years are in the period you're looking for.
i can see arguments either way on how date ranges and keys are distributed across relations. i do think that it's easier for an implementer to traverse a relation graph of some sort than it is to parse out the key-with-date format, and always remember that there are and will be data consumers that aren't the vector tile renderer. i'm thinking about animating using ephemeral data myself.
Further thinking on this: @rwelty1889 I hear you about other consumers than the vector tiles. And yet I'm gonna keep talking about vector tiles and the timeslider, since that's the bit I know best and also that we need to have the main map on OHM.org. But I'm glad you're here to keep us thinking about other consumers!
If we pursued this sort of tagging approach, where most attributes are in relations, I wonder if either (a) we would replace node/linear way/closed way vector tile layers with relations or (b) we'd need to combine or duplicate layers to pull in both. (a) might be an ideal scenario if we were starting from nothing, but (b) is more likely to be the need since we do have a lot of tagged nodes and ways.
This is what we want based on the proposal in this issue.
One potential infrastructure issue: In the vector tiles, we end up with 4 copies of the geometry (one for each relation and one for the way). That's fine for a small segment like this, but would that scale to more complex and more numerous items? Do we quickly start hitting the limits of what is contained in a single vector tile?
Agreed that we need to write this up as a recommended approach, but first we want to make sure it will work with our infrastructure to encourage this kind of editing -- and also that it works for people doing the editing!
There are 13 unique combinations of start/end date tied to various attributes:
1871-1933
1890-1927
1927-
1932-1960
1932-1974
1933-1945
1945-1953
1953-1990
1957-1992
1960-1990
1974-
1990-
1992-
That's a lot of relations to make! But it is also really hard to imagine a client-side date-parser that could traverse all those keys and make sense of them out of vector tiles. Offloading that onto relations allows the timeslider and map style to remain simple enough to run client-side.
But it also suggests that the number of records in the database could grow a lot, and that there's going to be a lot of either duplication of tags or some TBD merging magic when, say, the surface of a road changes out of sync with its name, which are both out of sync with another change. It seems then like each unique combination of attributes might need its own relation.
Interestingly (to me anyway!) if I just parse out all the dates in those keys, then sort them and make non-overlapping ranges, I get a shorter and more comprehensible list:
1871-1890
1927-1932
1932-1933
1933-1945
1945-1953
1953-1957
1960-1974
1974-1990
1990-1992
1992-
Each relation would need to include the full set of tags that were true at that point, even if only some of them changed, but also if you want to know what the street is like in Year X, you just need the relation valid at that point, you don't have to hunt through an unknown number of keys to see which, if any might include years and if those years are in the period you're looking for.
Using a relation every time a tag is different is the best way to make verification and modification impossible and discourage potential contributors (in addition to having a way of doing things too different from OSM), using tag:DATE-DATE=value is so far the simpliest way, of course it requires some work on the renderer but it's way more simple for contributors.
serious consideration needs to be given to the impact that dates and times embedded in keyspace will have on the speed and complexity of overpass queries, as that is one of the ways that things are going to be done, in particular, it will likely be much easier to do a date match against a start_date or end_date tag than a date match against the right side of a key
the current, dead OSM proposal for dates in key space has the problem of not supporting time format at all (and time data is coming to OHM, i've entered some already), and it is incompatible with dates either as specified on the start_date page or in EDTF/ISO 8601. so that would need to be worked through.
i think relations need much better editor support, and how we use them needs careful thought. i am currently doing the lifecycle laboratory stuff with the Erie Canal, Hudson River, and the Harmony Mill complex in Cohoes NY in an effort to see how relation based models work in practice. a combination of better relation support in ID and JOSM (lifecycle plugins) and automagic relation management tools would likely make a huge difference. i've already decided the OSM model of long linear relations to group things together breaks down badly with complex life cycles with current tools and support.
First of all, forgive me for this very late reply.
Yes, using the "TAG: DATE-DATE = VALEUR" format cannot work well with overpass queries, we can make the same remark on almost all the tools which read a database with a those tags to display a map (Leaflet, QGIS ...).
Now, I think overusing relationships is just a way of putting off the problem. The more we move away from OpenStreetMap practices, the more we frighten potential contributors, not to mention that creating a relationship for each change is complex to do and almost impossible to modify and verify.
And even admitting that this would be the simplest solution, it will only postpone the inevitable ... What will happen when the query has to analyze thousands of relations to display the map, even with only START_DATE and END_DATE tags ? I doubt that the request will work correctly, and we will end up at the starting point.
Couldn't we consider using raster tiles like Openstreetmap does or vector tiles?
On 1/11/22 8:36 AM, Arflhn wrote:
First of all, forgive me for this very late response.
Yes, using the "TAG: DATE-DATE = VALEUR" format cannot work well with
overpass queries, we can make the same remark on almost all the tools
which read a database with a those tags to display a map (Leaflet, QGIS
...).
Now, I think overusing relationships is just a way of putting off the
problem. The more we move away from OpenStreetMap practices, the more we
frighten potential contributors, not to mention that creating a
relationship for each change is complex to do and almost impossible to
modify and verify.
And even admitting that this would be the simplest solution, it will
only postpone the inevitable ... What will happen when the query has to
analyze thousands of relations to display the map, even with only
START_DATE and END_DATE tags ? I doubt that the request will work
correctly, and we will end up at the starting point.
most anyone who understands DB and Query behavior is pretty cool to
embedding dates in the key side of the kv pair. this should only be a
controversial point for folks who all about data entry and not paying
attention to data consumer issues.
but step back for a moment. i totally get the sentiment about wanting
to stay with OSM practices as best as possible, but i have been thinking
about lifecycle and thinking about the relationship between OHM and OSM
quite a lot for months now (i have a proposal for a talk at SOTM US in
april on the subject) - and OSM doesn't have much to say on the topic
that's useful for OHM because lifecycle isn't a think that OSM has to
do much with.
if we use the relationship model, then what data consumers will do is a
query that returns too much (they have to) and then do a graph
traversal. there are worse things. from a data entry point of view, i
think we need better tools for relationships. i suspect that many agree
that current relationship tools in OSM editors are on the primitive
side. we can do better.
neither approach is perfect. i think relations are better. but i also
think that alternative proposals are welcome. feel free to make one.
Couldn't we consider using raster tiles like Openstreetmap does or
vector tiles?
not sure i follow this. the current OHM rendering engine uses vector
tiles. raster tiles are problematic with the time slider.
richard
--
***@***.***
Averill Park Networking - GIS & IT Consulting
OpenStreetMap - PostgreSQL - Linux
Java - Web Applications - Search
We had a really good discussion around this topic at SOTM US. To summarize the problem we are trying to solve again: when the geometry of a feature does not change, but some attributes do, for eg. the name, it seems a bit terrible to have to re-draw the same feature with a different start_date and end_date with changed attributes. So, we need a good solution to this, and ideally a solution that works for:
people editing data, using JOSM / iD
the renderer which is creating the vector tiles and the styles to display the vector data
data consumers, who want to use Overpass or other tools to get the data in a reasonable format to process
It seems like the proposal to encode time data in the key part of the data maybe good for people editing the data, but it seems like a real nightmare for both the renderer and for any sort of data consumers. Having data encoded in the key side of a key value pair just seems like it's going to be very hard to integrate with the time slider as well as other query mechanisms. I would strongly pushback against such a proposal.
Encoding the data in Relations feels like a bit of a hack, but I also think this is the best and most practical solution we have. Relations in OSM work well for this kind of thing, and for most cases, the vector tile pipeline already supports this - so, to give a simple example: You could have a way with a geometry - and then multiple relations that have that way as part of the relation, with different tags for start_date, end_date and name for eg. to represent changes of name of a way. It seems like this should be handled well by most existing OSM tools like Overpass - we should really avoid re-inventing things if we can.
I think the strongest argument AGAINST encoding this data in Relations is that this can get awkward for editors, and hard for people to do who are not comfortable with fairly advanced OSM editing concepts (tbh, I'd probably have no idea how to do this properly in iD or JOSM) - but I feel way more comfortable with the idea of writing editor plugins and better UI to handle this in the editors, rather than making fundamental changes to the database / schema, etc.
I think the other consideration might be that we start packing too much data into the vector tiles, since this will create a new feature in the vector tiles for each of these Relations. Again, I feel like this is the correct place to handle this complexity rather than attempting crazy things in the database, or fundamentally altering the OSM data model - this maybe a problem down the line, but I also think we'd have a lot of options to alleviate this problem should it arise.
For me, next actions here would be something like:
Garner consensus on this approach - edit the wiki with examples to make it crystal clear how things should be created and tagged. Test examples heavily with the current renderer. If something does not work, make tickets and we should be able to work on fixing this. @rwelty1889 would you be able to help with this? @geohacker I'd lean on you heavily here to advise / veto if you think it's a terrible idea, but from my understanding, doing this in relations should mostly "just work", with perhaps just minor changes to the SQL queries for the vector tiles.
Outline a vision for what editor plugins to support this could be like, work out feasibility, and scope out building these plugins / modification to editors. This is probably a bit of work, but I think this would be the correct place to handle this. In my ideal world, with editor modifications, users should not even know or need to care about the details of the data structure / how relations are mapped to features in the backend -- they should just be able to annotate a geometry with separate start and end dates with tags for each, and the editor should handle creating the required relations, etc. This is definitely a bit pie-in-the-sky and I have limited experience with writing plugins for JOSM or modifying iD, but it feels like this should be a problem we can start working on incrementally? cc @Rub21 to advise on the feasibility of doing something like this in JOSM.
Thanks again to everyone for thinking through this and especially @rwelty1889 for the extremely lucid and well thought out presentations at SOTM US - it does seem like OHM is growing at a pace where the naive approach of just creating a new feature for every "change" in the lifecycle of a feature is clearly not the best data model. The approach of handling this with Relations, from a data structure and rendering point of view seems the best to me. It's totally understandable that this is not the best for current editors, and I feel like we should move discussion to how we improve editors to support this better - that feels to me like a much better place to solve the problem rather than trying to fundamentally change the backend data model.
Hope this all makes sense and we are able to move forward with this.
Thank you all for this discussion! @batpad's comment above sums up the approach and it sounds to me like the right way to handle and feels like one of the appropriate use cases for relations. Just that here the relationship is differences of a feature over time. The tile server already supports this because we import all relations regardless of the tags into the database. This was a deliberate decision early on to ensure we can somewhat be resilient to tagging approach changes but in this case is a coincidence that the map renders as expected. I'd not count on this coincidence, so we should:
Get a few test cases in the OHM test bed
See the impact of these new tests cases on the tiles and style. Particularly what is breaking
Expand our vector tile layer definition to query relation and relation_members for all possible scenarios of attribute changes and expose this into the tiles
OSM’s original approach to handling evolution over time was to tag an attribute multiple times on the same element, qualifying the key with a date range as the subkey. This “datespec” syntax has long been deprecated and today is only used as a temporary shortcut. The main disadvantage is that virtually no software can handle an unbounded set of possible keys. Another problem is that the minilanguage can’t accommodate any metadata about the change. What was the source of the start date? Was there any uncertainty about it? What happened on that date? Even more fundamentally, this method assumes that an attribute is the only thing that can change over time. But we know that things can change shape and move around too. Tags are unsuited for encoding geometry.
Instead, in OHM, the general solution of handling evolution over time is to map multiple overlapping copies of the feature. This simple method acknowledges that geometry can change over time. However, copying a feature has disadvantages such as obscuring a single change in a separate geometry and all the attributes. In both iD and JOSM, overlapping geometries can be difficult to work with, depending on whether they share nodes.
A slightly less general solution relies on the generic geometry relation types to avoid repeating geometry while still repeating all the attributes:
Primitive representation
Geometry relation representation
Prevalence
Editor support
Renderer support
Geocoder support
Multiple overlapping place points
Multiple overlapping type=multipoint relations sharing an untagged member node
This method has the advantage of general applicability, but it can be difficult for OSM-based software to properly support. In particular, routing engines are pretty unlikely to support multilinestring relations for routing purposes. This method solves variation over time at the expense of variation over space, which are just as likely. A generic geometry relation must be homogeneous: it isn’t possible for one region of a lake multipolygon to have a different start date than another region, or one segment of a multilinestring to have a different layer than another segment.
In the last couple years, the community has adopted some tagging schemes that cleave off a variable attribute as a relation type in a more object-oriented fashion:
This method recognizes that some attributes vary in both time and space independently of each other or the physical feature. This should make it feasible for routers to support, as the only impact would be to route guidance. However, we have to create a dedicated relation type for each use case. In principle, anything can have a name or number that varies over time, so we’ll always need one of the other methods anyways.
These methods layer on top of each other:
Overlapping semantic relations lessen the need for overlapping geometric relations.
Overlapping geometric relations lessen the need for overlapping geometric primitives.
Whichever method we use in a given situation, we also need to ground the different elements that represent the same real-world feature over time.
In the past, we experimented with nesting relations under superrelations of the same type. For example, if a country annexes territory or renames, map two boundary relations and bind them with together in another boundary relation. This has turned out to be not that helpful, because it essentially turns every semantic relation type into a geometry relation type. Developers can make no assumptions about what the relation means. They can’t assume it’s a concrete relation because it could be just a container for other relations. In OSM, this is unavoidable in some very specific situations, but extending it to all relation types becomes very difficult, so it’s no surprise that it never got any traction.
type=chronology relations have become established as a general solution for tying together multiple stages of a feature’s evolution. This relation type has editor support, and some renderers are starting to make use of it in heuristics: #700 (comment). As with street and route relations, chronology relations could be a useful tool for Nominatim or ohm-website to group related results, though this is still unimplemented: #640.
As far as I can tell, most of the work to support change over time is now covered by other issues. All that remains unaddressed for this issue’s scope would be:
Adopting type=multipoint as a generic geometry relation type for a point that varies in attributes over time.
Adopting more semantic relation types by use case.
I use type=restriction + restriction= for oneway , as I suggest OSM add a section role for =no_u_turn enforcement is better reserved when there's actually cameras enforcing the maxspeed
Activity
rwelty1889 commentedon Sep 7, 2021
in my view this should be the preferred approach going forward
andrewharvey commentedon Sep 7, 2021
Should be listed as one of the options at https://wiki.openstreetmap.org/wiki/Open_Historical_Map#Tagging?
If we promote this style of mapping I'd like to see it extended into a more generic relation which supports nodes, linear ways and closed ways.
danrademacher commentedon Sep 7, 2021
Agreed that we need to write this up as a recommended approach, but first we want to make sure it will work with our infrastructure to encourage this kind of editing -- and also that it works for people doing the editing!
That wiki page mentioned above #284 (comment) links through to https://wiki.openstreetmap.org/wiki/Comparison_of_life_cycle_concepts. Which I hadn't looked at in a few months. It has some useful examples, especially under the proposal for dates-in-keys. Interested to think about how many relations would be required to represent this OSM example:
There are 13 unique combinations of start/end date tied to various attributes:
That's a lot of relations to make! But it is also really hard to imagine a client-side date-parser that could traverse all those keys and make sense of them out of vector tiles. Offloading that onto relations allows the timeslider and map style to remain simple enough to run client-side.
But it also suggests that the number of records in the database could grow a lot, and that there's going to be a lot of either duplication of tags or some TBD merging magic when, say, the surface of a road changes out of sync with its name, which are both out of sync with another change. It seems then like each unique combination of attributes might need its own relation.
Interestingly (to me anyway!) if I just parse out all the dates in those keys, then sort them and make non-overlapping ranges, I get a shorter and more comprehensible list:
Each relation would need to include the full set of tags that were true at that point, even if only some of them changed, but also if you want to know what the street is like in Year X, you just need the relation valid at that point, you don't have to hunt through an unknown number of keys to see which, if any might include years and if those years are in the period you're looking for.
rwelty1889 commentedon Sep 8, 2021
i can see arguments either way on how date ranges and keys are distributed across relations. i do think that it's easier for an implementer to traverse a relation graph of some sort than it is to parse out the key-with-date format, and always remember that there are and will be data consumers that aren't the vector tile renderer. i'm thinking about animating using ephemeral data myself.
danrademacher commentedon Sep 8, 2021
Further thinking on this: @rwelty1889 I hear you about other consumers than the vector tiles. And yet I'm gonna keep talking about vector tiles and the timeslider, since that's the bit I know best and also that we need to have the main map on OHM.org. But I'm glad you're here to keep us thinking about other consumers!
If we pursued this sort of tagging approach, where most attributes are in relations, I wonder if either (a) we would replace node/linear way/closed way vector tile layers with relations or (b) we'd need to combine or duplicate layers to pull in both. (a) might be an ideal scenario if we were starting from nothing, but (b) is more likely to be the need since we do have a lot of tagged nodes and ways.
Looking at the example on staging here: https://vtiles-staging.openhistoricalmap.org/#15.11/47.754747/-121.761209, we have 4 instances of the one segment (3 relations and 1 way):

But when editing, we have one instance of the segement that is part of three relations:

https://staging.openhistoricalmap.org/way/198316714#map=17/47.75896/-121.76474&layers=OD&date=1700&daterange=1700,2021
This is what we want based on the proposal in this issue.
One potential infrastructure issue: In the vector tiles, we end up with 4 copies of the geometry (one for each relation and one for the way). That's fine for a small segment like this, but would that scale to more complex and more numerous items? Do we quickly start hitting the limits of what is contained in a single vector tile?
flha127 commentedon Nov 28, 2021
Using a relation every time a tag is different is the best way to make verification and modification impossible and discourage potential contributors (in addition to having a way of doing things too different from OSM), using tag:DATE-DATE=value is so far the simpliest way, of course it requires some work on the renderer but it's way more simple for contributors.
rwelty1889 commentedon Nov 28, 2021
two counterpoints to Dlwig's comment.
serious consideration needs to be given to the impact that dates and times embedded in keyspace will have on the speed and complexity of overpass queries, as that is one of the ways that things are going to be done, in particular, it will likely be much easier to do a date match against a start_date or end_date tag than a date match against the right side of a key
the current, dead OSM proposal for dates in key space has the problem of not supporting time format at all (and time data is coming to OHM, i've entered some already), and it is incompatible with dates either as specified on the start_date page or in EDTF/ISO 8601. so that would need to be worked through.
i think relations need much better editor support, and how we use them needs careful thought. i am currently doing the lifecycle laboratory stuff with the Erie Canal, Hudson River, and the Harmony Mill complex in Cohoes NY in an effort to see how relation based models work in practice. a combination of better relation support in ID and JOSM (lifecycle plugins) and automagic relation management tools would likely make a huge difference. i've already decided the OSM model of long linear relations to group things together breaks down badly with complex life cycles with current tools and support.
flha127 commentedon Jan 11, 2022
First of all, forgive me for this very late reply.
Yes, using the "TAG: DATE-DATE = VALEUR" format cannot work well with overpass queries, we can make the same remark on almost all the tools which read a database with a those tags to display a map (Leaflet, QGIS ...).
Now, I think overusing relationships is just a way of putting off the problem. The more we move away from OpenStreetMap practices, the more we frighten potential contributors, not to mention that creating a relationship for each change is complex to do and almost impossible to modify and verify.
And even admitting that this would be the simplest solution, it will only postpone the inevitable ... What will happen when the query has to analyze thousands of relations to display the map, even with only START_DATE and END_DATE tags ? I doubt that the request will work correctly, and we will end up at the starting point.
Couldn't we consider using raster tiles like Openstreetmap does or vector tiles?
rwelty1889 commentedon Jan 11, 2022
1 remaining item
batpad commentedon Apr 6, 2022
We had a really good discussion around this topic at SOTM US. To summarize the problem we are trying to solve again: when the geometry of a feature does not change, but some attributes do, for eg. the name, it seems a bit terrible to have to re-draw the same feature with a different
start_dateandend_datewith changed attributes. So, we need a good solution to this, and ideally a solution that works for:It seems like the proposal to encode time data in the
keypart of the data maybe good for people editing the data, but it seems like a real nightmare for both the renderer and for any sort of data consumers. Having data encoded in thekeyside of akeyvalue pair just seems like it's going to be very hard to integrate with the time slider as well as other query mechanisms. I would strongly pushback against such a proposal.Encoding the data in Relations feels like a bit of a hack, but I also think this is the best and most practical solution we have. Relations in OSM work well for this kind of thing, and for most cases, the vector tile pipeline already supports this - so, to give a simple example: You could have a
waywith a geometry - and then multiple relations that have that way as part of the relation, with different tags forstart_date,end_dateandnamefor eg. to represent changes of name of away. It seems like this should be handled well by most existing OSM tools like Overpass - we should really avoid re-inventing things if we can.I think the strongest argument AGAINST encoding this data in Relations is that this can get awkward for editors, and hard for people to do who are not comfortable with fairly advanced OSM editing concepts (tbh, I'd probably have no idea how to do this properly in iD or JOSM) - but I feel way more comfortable with the idea of writing editor plugins and better UI to handle this in the editors, rather than making fundamental changes to the database / schema, etc.
I think the other consideration might be that we start packing too much data into the vector tiles, since this will create a new feature in the vector tiles for each of these Relations. Again, I feel like this is the correct place to handle this complexity rather than attempting crazy things in the database, or fundamentally altering the OSM data model - this maybe a problem down the line, but I also think we'd have a lot of options to alleviate this problem should it arise.
For me, next actions here would be something like:
Thanks again to everyone for thinking through this and especially @rwelty1889 for the extremely lucid and well thought out presentations at SOTM US - it does seem like OHM is growing at a pace where the naive approach of just creating a new feature for every "change" in the lifecycle of a feature is clearly not the best data model. The approach of handling this with Relations, from a data structure and rendering point of view seems the best to me. It's totally understandable that this is not the best for current editors, and I feel like we should move discussion to how we improve editors to support this better - that feels to me like a much better place to solve the problem rather than trying to fundamentally change the backend data model.
Hope this all makes sense and we are able to move forward with this.
cc @rwelty1889 @jeffreyameyer @geohacker @Rub21 @danrademacher
geohacker commentedon Apr 13, 2022
Thank you all for this discussion! @batpad's comment above sums up the approach and it sounds to me like the right way to handle and feels like one of the appropriate use cases for relations. Just that here the relationship is differences of a feature over time. The tile server already supports this because we import all relations regardless of the tags into the database. This was a deliberate decision early on to ensure we can somewhat be resilient to tagging approach changes but in this case is a coincidence that the map renders as expected. I'd not count on this coincidence, so we should:
jeffreyameyer commentedon Jan 23, 2023
Adding a pointer to #488 for some additional background.
1ec5 commentedon Mar 24, 2026
OSM’s original approach to handling evolution over time was to tag an attribute multiple times on the same element, qualifying the key with a date range as the subkey. This “datespec” syntax has long been deprecated and today is only used as a temporary shortcut. The main disadvantage is that virtually no software can handle an unbounded set of possible keys. Another problem is that the minilanguage can’t accommodate any metadata about the change. What was the source of the start date? Was there any uncertainty about it? What happened on that date? Even more fundamentally, this method assumes that an attribute is the only thing that can change over time. But we know that things can change shape and move around too. Tags are unsuited for encoding geometry.
Instead, in OHM, the general solution of handling evolution over time is to map multiple overlapping copies of the feature. This simple method acknowledges that geometry can change over time. However, copying a feature has disadvantages such as obscuring a single change in a separate geometry and all the attributes. In both iD and JOSM, overlapping geometries can be difficult to work with, depending on whether they share nodes.
A slightly less general solution relies on the generic geometry relation types to avoid repeating geometry while still repeating all the attributes:
type=multipointrelations sharing an untagged member nodetype=multilinestringrelations sharing an untagged member waytype=multipolygonrelations sharing an untagged member wayThis method has the advantage of general applicability, but it can be difficult for OSM-based software to properly support. In particular, routing engines are pretty unlikely to support multilinestring relations for routing purposes. This method solves variation over time at the expense of variation over space, which are just as likely. A generic geometry relation must be homogeneous: it isn’t possible for one region of a lake multipolygon to have a different start date than another region, or one segment of a multilinestring to have a different layer than another segment.
In the last couple years, the community has adopted some tagging schemes that cleave off a variable attribute as a relation type in a more object-oriented fashion:
name=*stype=streetrelationsname=*stype=routeroute=railwayrelationsref=*stype=routerelationsmaxspeed=*stype=enforcementenforcement=maxspeedrelationsThis method recognizes that some attributes vary in both time and space independently of each other or the physical feature. This should make it feasible for routers to support, as the only impact would be to route guidance. However, we have to create a dedicated relation type for each use case. In principle, anything can have a name or number that varies over time, so we’ll always need one of the other methods anyways.
These methods layer on top of each other:
Whichever method we use in a given situation, we also need to ground the different elements that represent the same real-world feature over time.
In the past, we experimented with nesting relations under superrelations of the same type. For example, if a country annexes territory or renames, map two boundary relations and bind them with together in another boundary relation. This has turned out to be not that helpful, because it essentially turns every semantic relation type into a geometry relation type. Developers can make no assumptions about what the relation means. They can’t assume it’s a concrete relation because it could be just a container for other relations. In OSM, this is unavoidable in some very specific situations, but extending it to all relation types becomes very difficult, so it’s no surprise that it never got any traction.
type=chronologyrelations have become established as a general solution for tying together multiple stages of a feature’s evolution. This relation type has editor support, and some renderers are starting to make use of it in heuristics: #700 (comment). As with street and route relations, chronology relations could be a useful tool for Nominatim or ohm-website to group related results, though this is still unimplemented: #640.As far as I can tell, most of the work to support change over time is now covered by other issues. All that remains unaddressed for this issue’s scope would be:
type=multipointas a generic geometry relation type for a point that varies in attributes over time.Kovoschiz commentedon Mar 28, 2026
I use
type=restriction+restriction=foroneway, as I suggest OSM add asectionrole for=no_u_turnenforcementis better reserved when there's actually cameras enforcing themaxspeed