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
Enable handling of street property changes with street relations (or something else) #94
What's your idea for a cool feature that would help you use OHM better.
I'd like to be able to handle property changes for streets (names, types of street, surface, etc.) using relations instead of geometries so we don't end up with bunches of overlapping line ways.
This could be a tricky one, if I understand this right. Is the use case that you want to create a relation with with associatedStreet to add names for more than one street segment, where each of them is a way?
We use imposm to import the OHM data into the tiler database. From the imposm documentation, it looks like the (multi)polygon relations are managed automatically but the others aren't. So this could mean that we would write a configuration to import other relation and members as necessary. For example, this ticket has some relevant info omniscale/imposm3#108
I read the imposm relation docs (tks for the link!) and it sounds like the 'relation' and 'relation_member' tables should be enough, no?
If it helps, we could also restrict the use of this relation to:
Ways only, no points
Unclosed, so no polygons
Nonoverlapping
This would seem to address the concerns laid out in the documentation.
This does bring up an interesting challenge:
If a street's name changes, then the addresses for all the buildings on that street change.
-- How do we handle that (or not), so that a Geocoder could, say, do a search for a house in the Richmond Borough of New York City (now Staten Island...)?
There was a bug in which tegola wouldn't be able to confirm the geometry type of the associated_streets layer if there are no streets returned from the db. I just fixed that and deployed to staging.
cc @geohacker, I meant to mention you above, to see if you recall when the transport_associated_streets dropped out of the map layers again. I don't see it in the commit history of ohm-deploy configs, so I wonder if it fell out on the branch at osm-seed?
@danrademacher@tsinn the query selects only type=associatedStreet. We could drop that and make the layer a bit generic transport_relations to support the need. I don't know though if that's a right convention for tags.
I've been playing some more with tagging and the timeslider. It seems to me that the timeslider works with relations as long as they are multipolygons, but not for highway relations. For roads, the date range must be included in the way itself in order to appear/disappear at the appropriate dates. Is that correct? Or is there a way to code highway relations so they come and go with the date? If not, would fixing this be appropriate for @danrademacher issue #327? Here, the lake boundaries are multipolygons with pre- and post-1916 dates. Dates on the highway relations are ignored. https://www.openhistoricalmap.org/#map=13/43.8614/-110.5570&layers=O&date=1931&daterange=1800,2022
We could drop that and make the layer a bit generic transport_relations to support the need. I don't know though if that's a right convention for tags.
This example happens to be a road that from Wyoming passes by where I grew up in Colorado. Certainly there we called it Route 287, and it certainly fits this definition:
A route is a customary or regular line of passage or travel, often predetermined and publicized. Routes consist of paths taken repeatedly by people and vehicles: a ship on the North Atlantic route, a car on a numbered road, a bus on its route or a cyclist on a national route.
So this is a case where type=route is more informative than type=associatedStreet and we wouldn't want to force the replacement of that route value with another value just for the sake of our map tiles.
Seems we should do what Sajjad suggested and just remove the value filter to make a "generic transport_relations" layer. If there are no major feasibility/performance issues to this, I think that is the best solution here.
But we have to then know which relations are in fact transport related (and not boundaries or lakes or something else).
artwork
associatedStreet
boundary
bridge
building
circuit
circut
collection
ephem:unit
group
multipolygon
network
ohm:lifecycle
path
restriction
route
route_master
site
street
superroute
water
watershed
waterway
Of those, just 8 are transport. @Rub21 can we just expand the filter on the associatedStreets layer to capture these 8 items:
associatedStreet
bridge
circuit
path
route
route_master
street
superroute
In OSM, the associatedStreet relation type is primarily designed for addressing, not identifying a whole street as a single entity. Consequently, an associated street relation would contain any building or POI whose addr:street would otherwise refer to the street (with the house role). But it wouldn’t necessarily include every roadway considered to be part of the street if parts of the street have no addresses along them.
The street relation type takes it a step further, explicitly including anything that’s “part of” the street (using the associated role), such as a street lamp, pedestrian crossing, or street tree.
Are these extra non-roadway features within scope for the associatedStreet relation type being implemented in OHM? If so, I’d imagine that there would be a proliferation of relations as houses are built along the street, trees are replaced, and signs are replaced. If not and we’re defining our own distinct relation type that happens to share a name with an OSM relation type, then why not call it highway or road to clarify the scope and distance it from the Karlsruhe schema (the addr:* schema that includes associatedStreet)?
Mapping a changing street as a series of street relations would greatly complicate any attempt at routing over the OHM road network: #695 (comment). However, for ancillary information such as numbered routes, exposing route relations in the vector tiles would be essential for rendering a road atlas style: #538.
The incorrect and unused support for associatedStreet relations was removed in #1077.
I’ve documented street relations in OHM. It turns out that the predominant use of these relations is quite analogous to route=railway relations for railway identities.
I’ve opened #1276 to more clearly track supporting street relations in the tile generator.
Activity
geohacker commentedon Jun 19, 2020
This could be a tricky one, if I understand this right. Is the use case that you want to create a relation with with associatedStreet to add names for more than one street segment, where each of them is a way?
We use imposm to import the OHM data into the tiler database. From the imposm documentation, it looks like the (multi)polygon relations are managed automatically but the others aren't. So this could mean that we would write a configuration to import other relation and members as necessary. For example, this ticket has some relevant info omniscale/imposm3#108
jeffreyameyer commentedon Jun 19, 2020
Well... I'm just trying to avoid cases where:
The example way I've set up for this use case is here (although I could probably make it a little more complex, given that parts of streets could be renamed. ; )
https://www.openhistoricalmap.org/way/198316712#map=15/47.7520/-121.7676&layers=OD
I read the imposm relation docs (tks for the link!) and it sounds like the 'relation' and 'relation_member' tables should be enough, no?
If it helps, we could also restrict the use of this relation to:
This would seem to address the concerns laid out in the documentation.
This does bring up an interesting challenge:
-- How do we handle that (or not), so that a Geocoder could, say, do a search for a house in the Richmond Borough of New York City (now Staten Island...)?
@rwelty1889
geohacker commentedon Jun 30, 2020
This is now enabled on staging. https://vtiles-staging.openhistoricalmap.org/#15.34/47.7595/-121.7652
There's a new layer in the vector tiles called
transport_associated_streets. It uses the relations to determine which members belong to the typeassociatedStreetsand fetches geometry and tags.@danrademacher @tsinn could you let me know if this is good enough for styling?
geohacker commentedon Jul 1, 2020
There was a bug in which tegola wouldn't be able to confirm the geometry type of the associated_streets layer if there are no streets returned from the db. I just fixed that and deployed to staging.
jeffreyameyer commentedon Jul 7, 2020
Assigning this back to me to follow up and help figure out what the right answer should be, based on some feedback from the community. cc: @rwelty1889
danrademacher commentedon Aug 30, 2021
We just rediscovered this issue as we're reviewing #276, where relations could be helpful in managing change in styling over time.
But we're not seeing

transport_associated_streetsanymore.Did that layer get intentionally removed at some point?
danrademacher commentedon Aug 30, 2021
cc @geohacker, I meant to mention you above, to see if you recall when the
transport_associated_streetsdropped out of the map layers again. I don't see it in the commit history ofohm-deployconfigs, so I wonder if it fell out on the branch atosm-seed?geohacker commentedon Aug 31, 2021
Um that is weird @danrademacher. I'll take a closer look. cc @Rub21
7 remaining items
danrademacher commentedon Sep 8, 2021
This changeset updated type to
path:https://staging.openhistoricalmap.org/changeset/11433#map=17/47.75896/-121.76474&layers=OD&date=1900&daterange=1800,2021
Will check here in a bit to confirm whether that carries through properly into the tiles:
https://vtiles-staging.openhistoricalmap.org/#15.11/47.754747/-121.761209
geohacker commentedon Sep 8, 2021
@danrademacher @tsinn the query selects only
type=associatedStreet. We could drop that and make the layer a bit generic transport_relations to support the need. I don't know though if that's a right convention for tags.danrademacher commentedon Sep 8, 2021
Ah, got it from here in the SQL:
WHERE r.osm_id=m.osm_id and r.type='associatedStreet'Given that, we'd actually expect my edit to simply remove one of the relations from the layer.
As described in #284, our proposal is to move most attributes into relations, so a more generic
transport_relationslayer is what that would warrant.Rub21 commentedon Sep 8, 2021
@danrademacher , this change needs to be done in production, https://staging.openhistoricalmap.org/#map=17/47.75892/-121.76567&layers=OD&date=1900&daterange=1800,2021 , since we are using data from production planet and minute replication to deploy the tiles in staging.
I have just made a change in production: https://openhistoricalmap.org/changeset/23320
danrademacher commentedon Feb 1, 2022
from OSM Slack we have this comment:
Looking in vtiles here:
https://vtiles.openhistoricalmap.org/#13/43.8886/-110.6011
I see we have nothing in the relations layer of
transport_associated_streetsBased on this code:
https://github.com/OpenHistoricalMap/ohm-deploy/blob/bc9f73be5b9768efa87a90c6275c3f25f392bb46/images/tiler-server/config/config.toml#L278-L284
Is this a tagging standard issue where relations that should be in that layer need to have a
typeofassociatedStreetset in iD or JOSM?danrademacher commentedon Feb 2, 2022
In this comment, @geohacker said:
The realworld example we have here is this one: https://www.openhistoricalmap.org/relation/2695671#map=13/43.8720/-110.5573&layers=OD&date=1966&daterange=1966,2022
That uses https://wiki.openstreetmap.org/wiki/Relation:route
This example happens to be a road that from Wyoming passes by where I grew up in Colorado. Certainly there we called it Route 287, and it certainly fits this definition:
So this is a case where
type=routeis more informative thantype=associatedStreetand we wouldn't want to force the replacement of thatroutevalue with another value just for the sake of our map tiles.Seems we should do what Sajjad suggested and just remove the value filter to make a "generic
transport_relations" layer. If there are no major feasibility/performance issues to this, I think that is the best solution here.But we have to then know which relations are in fact
transportrelated (and not boundaries or lakes or something else).Right now we don't have all that many relation types:
https://taginfo.openhistoricalmap.org/relations
Here's the full list:
Of those, just 8 are
transport. @Rub21 can we just expand the filter on theassociatedStreetslayer to capture these 8 items:1ec5 commentedon Jun 27, 2023
In OSM, the
associatedStreetrelation type is primarily designed for addressing, not identifying a whole street as a single entity. Consequently, an associated street relation would contain any building or POI whoseaddr:streetwould otherwise refer to the street (with thehouserole). But it wouldn’t necessarily include every roadway considered to be part of the street if parts of the street have no addresses along them.The
streetrelation type takes it a step further, explicitly including anything that’s “part of” the street (using theassociatedrole), such as a street lamp, pedestrian crossing, or street tree.Are these extra non-roadway features within scope for the
associatedStreetrelation type being implemented in OHM? If so, I’d imagine that there would be a proliferation of relations as houses are built along the street, trees are replaced, and signs are replaced. If not and we’re defining our own distinct relation type that happens to share a name with an OSM relation type, then why not call ithighwayorroadto clarify the scope and distance it from the Karlsruhe schema (theaddr:*schema that includesassociatedStreet)?1ec5 commentedon Feb 25, 2024
Mapping a changing street as a series of street relations would greatly complicate any attempt at routing over the OHM road network: #695 (comment). However, for ancillary information such as numbered routes, exposing route relations in the vector tiles would be essential for rendering a road atlas style: #538.
1ec5 commentedon Feb 1, 2026
The incorrect and unused support for
associatedStreetrelations was removed in #1077.I’ve documented
streetrelations in OHM. It turns out that the predominant use of these relations is quite analogous toroute=railwayrelations for railway identities.I’ve opened #1276 to more clearly track supporting
streetrelations in the tile generator.transport_lines#1276