Skip to content

Enable handling of street property changes with street relations (or something else) #94

Closed as duplicate

Description

@jeffreyameyer

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.

It appears that this isn't currently supported, as the relation information for relation type=street or type=associatedStreet isn't making it through to vtiles.ohm. See: the two bottom ways at https://vtiles.openhistoricalmap.org/#15.23/47.7634/-121.7628/0/6

Of note, this is working for type=multipolygon, which is awesome, but not appropriate for streets. See: the circular area at: https://vtiles.openhistoricalmap.org/#16.73/51.52765/-0.15442

Current workarounds

The only workaround I can figure out is to make a bunch of overlapping ways, which is a bit of a mess and headache for editing.

Additional info

None right now.

Activity

  1. geohacker commented on Jun 19, 2020

    @geohacker

    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

  2. jeffreyameyer commented on Jun 19, 2020

    @jeffreyameyer
    MemberAuthor

    Well... I'm just trying to avoid cases where:

    • Streets change names & someone needs to change street name on tons of segments
    • Overlapping geometries turn into spaghetti for editing

    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:

    • 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...)?

    @rwelty1889

  3. geohacker commented on Jun 30, 2020

    @geohacker

    image

    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 type associatedStreets and fetches geometry and tags.

    @danrademacher @tsinn could you let me know if this is good enough for styling?

  4. geohacker commented on Jul 1, 2020

    @geohacker

    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.

  5. jeffreyameyer commented on Jul 7, 2020

    @jeffreyameyer
    MemberAuthor

    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

  6. danrademacher commented on Aug 30, 2021

    @danrademacher

    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_streets anymore.
    image

    Did that layer get intentionally removed at some point?

  7. danrademacher commented on Aug 30, 2021

    @danrademacher

    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?

  8. geohacker commented on Aug 31, 2021

    @geohacker

    Um that is weird @danrademacher. I'll take a closer look. cc @Rub21

  9. 7 remaining items

  10. geohacker commented on Sep 8, 2021

    @geohacker

    @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.

  11. danrademacher commented on Sep 8, 2021

    @danrademacher

    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_relations layer is what that would warrant.

  12. Rub21 commented on Sep 8, 2021

    @Rub21
    Member
  13. danrademacher commented on Feb 1, 2022

    @danrademacher

    from OSM Slack we have this comment:

    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

    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_streets

    Based 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 type of associatedStreet set in iD or JOSM?

  14. danrademacher commented on Feb 2, 2022

    @danrademacher

    In this comment, @geohacker said:

    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.

    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:

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

    Right now we don't have all that many relation types:
    https://taginfo.openhistoricalmap.org/relations

    Here's the full list:

    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
    
  15. 1ec5 commented on Jun 27, 2023

    @1ec5
    Member

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

  16. 1ec5 commented on Feb 25, 2024

    @1ec5
    Member

    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.

  17. added theissue type on Mar 16, 2025
  18. 1ec5 commented on Feb 1, 2026

    @1ec5
    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions