Id: Accept osm ids in the relation member / membership dropdowns

Created on 8 Oct 2016  路  16Comments  路  Source: openstreetmap/iD

Currently the list of suggested relations contains only the ones which are quite near the object you are editing. It would be nice to have an ability to select a relation by id.

usability

Most helpful comment

@dhimmel If the relation is already downloaded, then you can now type the exact ID to get it to show up in the dropdown.

Screen Shot 2021-01-21 at 2 21 20 PM

All 16 comments

Thinking about this more.. We already support in the search box:

  • names of places (via nominatim)
  • lat/lng coordinates (in decimal or sexagesimal)

That box should recognize osm ids too.

It does already, if you prefix the ID with n, w, or r for the type of object.

It does already, if you prefix the ID with n, w, or r for the type of object.

Nice! I didn't know that.

Thought about it more and realized that this doesn't actually address the original issue - adding a member to a relation by typing in the relation id. Probably not impossible, but would involve tricky stuff in d3combo.

Currently the list of suggested relations contains only the ones which are quite near the object you are editing.

I'd agree, that this is insufficient.

It would be nice to have an ability to select a relation by id.

This doesn't seem to be the real user requirement, but just the request for a dirty workaround.
The real user requirement seems to be able to members to relations which are far away. I see two possible solutions:

  1. An asymmetric multiselect operation ( #2951 ) to add objects as members of a relation.
  2. A copy to member section paste control, which could either be:
  3. A paste button in the members section
  4. With a relation selected: A Ctrl-V followed by a special key aborting the placement of the copy, but adding the copied objects as members.
  5. A radial menu paste operation when at least one relation is selected.

The source of such a paste operation could just be a normal Ctrl-C copy from the map. In addition being able to copy from the members section of another relation would have some other usecases.

Currently the list of suggested relations contains only the ones which are quite near the object you are editing.

Potlatch 2 has a text field that accepts a relation ID, but it also keeps loaded relations in the list for the entire editing session, which mitigates the need for this text field: #3622.

A workaround that allows you to add a feature to a relation that is offscreen in iD:

  • find an existing or draw a temporary new way from the relation to the feature
  • mark that way as part of the relation
  • then add the feature to the relation
  • then remove the temporary way from the relation (and delete it if you added it, obviously)

See #3622 for a proposed solution.

I added the ability to filter the relation list by ID, but this still doesn't let you add to a relation that's not in the nearby list. Are we sure we want to enable that behavior? I can imagine scenarios where users type the wrong ID and accidentally connect to relations thousands of miles away.

I made it so you can specify IDs of loaded relations. This is simpler and safer than trying to fetch arbitrary relations for any ID a user types.

@quincylvania
I think you should also support entering ids of

  • any relation which was visited (selected) during the current editing session, even if it got unloaded.
  • any relation in the viewport, even if it isn't downloaded due to editing at a low zoom level.

Currently the real usecases aren't supported.

Those sound like very rare cases. The first case doesn't seem possible... unloaded? The second seems quite difficult as well, since iD can only know if something is in the viewport if it's downloaded.

@BjornRasmussen
Example usecases:

  • Assume Hawaii isn't mapped as part of the US and you want to add it to the boundary relation.
    Exclaves and enclaves are frequent for any type of boundary.
  • Assume you have surveyed a part of a route, and the and there is a far distant part already mapped.

The first case doesn't seem possible... unloaded?

iD doesn't keep all the downloaded data when panning to a different location.
Assume you have selected the incomple boundary of the US. After panning to Hawaii it isn't in the graph anymore.

The second seems quite difficult as well, since iD can only know if something is in the viewport if it's downloaded.

iD has two options here:

  • make a full relation request to the normal API, check whether it is the viewport, discard if not
  • make a request for the relation to the Overpass API using the extend of the viewport as bbox.

any relation which was visited (selected) during the current editing session, even if it got unloaded.

Entities don't get unloaded once loaded. You can easily start in California then navigate to Hawaii. California will still be loaded and available to reference as a relation.

any relation in the viewport, even if it isn't downloaded due to editing at a low zoom level.

This is essentially the same as the ability to connect to any relation in OSM, since the user could zoom all the way out so the whole world is in the viewport. This seems like an easy way to make mistakes without many added benefits.

I came to this issue via this question and https://github.com/openstreetmap/iD/issues/1906. I am trying to add a section to the Schuylkill River Trail relation. This trail is only partially complete and I am looking to add a section which is in between a big gap.

I can't get the desired relation to show up in the the add relation menu in iD. Have tried some of the methods of moving the viewport and zooming in and out to no avail. Would be really nice to be able to add by relation id, perhaps requiring some sort of extra confirmation.

I've also hit this problem while editing the Long Trail relation. Understand that it's important to avoid spurious relations, but currently it seems like there is major missing functionality in terms of way relations that are not entirely contiguous (like many long distance trails).

Update: I used the workaround to create a temporary connecting way with the desired relation that's described in https://github.com/openstreetmap/iD/issues/3487#issuecomment-356636926. This was a dirty workaround and opened up lot's of opportunity to make inadvertent edits.

See my post in #3622 for a proposed solution.

My fork of ID at www.wanderreitkarte.de would allow you to fill the gap easily. However, you would need to set the coordinates in the URL to navigate there as my map does not cover the US.

@dhimmel If the relation is already downloaded, then you can now type the exact ID to get it to show up in the dropdown.

Screen Shot 2021-01-21 at 2 21 20 PM

Was this page helpful?
0 / 5 - 0 ratings