Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplified interface to download and search by object ID #2641

Open
H--W opened this issue Aug 2, 2024 · 9 comments
Open

Simplified interface to download and search by object ID #2641

H--W opened this issue Aug 2, 2024 · 9 comments

Comments

@H--W
Copy link

H--W commented Aug 2, 2024

It would be very useful to be able to download and search for nodes, ways and relations by their object ID number without editing an Overpass Query. This facility could reuse the existing "Search for objects" UI where the ID is pasted from the clipboard or typed in. The existing "Search for objects" popup would require the addition of a Download button.

Search/Download strings should have the form:

node:<number>
way:<number>
relation:<number>

Whitespace and punctuation should be ignored.

Where <number> is a string of decimal digits that is the Openstreetmap Object ID. A 0x followed by hexadecimal digits, and a 0 followed by octal digits might also be useful.

Being able to paste an Object ID from the clipboard and search for that object would provide a generic mechanism to transfer Objects IDs from other applications.

Since these patterns have to be entered on a touchscreen device it would be useful if the following shortcut patterns could also be used to minimize typing:

n<number>
w<number>
r<number>

To prevent interfering with the existing search, the above exact patterns would be tried first and if they didn't match then the current search would proceed. (Or after if the current search fails.)

Whitespace and punctuation characters (including the colon) should be optional and ignored. This will simplify cut and paste and editing on touchscreen devices.

If only a number is entered it would be convenient if a popup dialog with node, way, and relation check boxes and Download, Search and Cancel buttons appeared to facilitate the download or search.

Providing an Object ID search function would provide a quick and easy mechanism to specify objects identified by URL and QA tools which have a mechanism to get the Object ID into the clipboard.

Using search and the clipboard would also provide an easy to use workaround to locate and edit relation members without the need to provide a recursive edit function.

If the search is for a node, a successful search should return with the map centered on the node and the node selected.

If the search is for a way, a successful search should return with the way selected and a median node of the way centered and the way highlighted on the map.

If the search is for a relation that can be resolved into a collection of nodes and or ways, a successful search should return with the relation selected, and the first node of the first way of the object; or the median node of the median way; or if more appropriate for the type of relation, the node that best represents the relation, is centered on the map.

@simonpoole
Copy link
Collaborator

simonpoole commented Aug 2, 2024

While it still involves an overpass query, simply using
type:node id:1
in the object search and generating an overpass query from that doesn't seem to be overly complicated.

Yes there is an issue currently that the results of the query wont be automatically selected and you need to run the query locally again to do that.

@H--W
Copy link
Author

H--W commented Aug 2, 2024

Yes, and using a negative node number allows the user to locate objects created during the current session. I've found the current facility enormously valuable and It's extremely appreciated. And I'm well aware of the effort it takes to add a new capability. But after editing overpass queries a couple of hundred times I resolved to write up this issue. Partly because editing Overpass Queries on a touchscreen is beyond tedious; partly because editing Overpass is too scary for the average user to even try; but mostly because Issues #2640 and #2641 together would make the editor far more useful for QA (which I do a lot of), and to allow me to work with large relations (currently this is very difficult and slow, but with a small additional enhancement to the Members tab would be much quicker and easier). I've made thousands of edits with the editor, so I have a good idea of what would make editing easier for me, but most of all you have my thanks!

@simonpoole
Copy link
Collaborator

simonpoole commented Aug 2, 2024

My point was that you don't need to edit the generated overpass query if you just want to retrieve individual object, which is at least a good workaround.

@H--W
Copy link
Author

H--W commented Aug 2, 2024

Yes, thank you for the idea! I'll write a script in Termux which can add the boilerplate. This will definitely reduce the amount of typing. But my other points remain. Please consider working #2640 and #2641 into some future version. I know they would help me and I'm hopeful that they would eventually help others who can't or won't or don't have access to other more powerful tools like JOSM. Best Rgds, -H-

@simonpoole
Copy link
Collaborator

But the boiler plate is all there, just

  • click on the object search menu item
  • enter type:node id:1
  • click query overpass
  • click run

@H--W
Copy link
Author

H--W commented Aug 2, 2024

Yes, and then I search for id:1. I've done this many, many, many times. :)

Perhaps this process would be useful for intermediate users? I suspect many are unfamiliar with Overpass, but the process doesn't require understanding Overpass. Perhaps it should be easier to discover? Maybe it should be documented in the FAQ? It's currently the only mechanism to go from a URL or QA tool (eg OSM Inspector) to editor. -H-

@H--W
Copy link
Author

H--W commented Sep 10, 2024

Nominatim Lookup is an excellent tool. It solves many problems but not this issue. Perhaps a usage scenario would be useful?

I'm sitting somewhere with time to kill. Fixing OSM QA issues is my hobby. I have a reasonable smartphone with an Internet connection. My phone has a touchscreen but no keyboard.

Entering text and numbers, especially long difficult to remember numbers such as object IDs is slow, error prone, and requires a mechanism to remember them.

Since Vespucci doesn't copy relation member IDs to the clipboard (and some other QA tools won't either), I have to write the object ID down on a piece of paper. I then have type that number back into Vespucci as follows:

I open the "Search for objects" widget, I type in "id:nnnnnnnnn" (n is a decimal digit) press "QUERY OVERPASS" which presents me with an Overpass query ... which is absolutely WONDERFUL! Now all I have to do is remove the node line, and or the way line and or the relation line, leaving just one, and press "RUN".

Then I close the Overpass console, then reopen the "Search for object" widget, this time searching for "id:nnnnnnnnn". Vespucci then downloads the object and presents it on the screen.

This is a WONDERFUL capability! I have done this hundreds of times. It lets me jump directly to a QA problem.

But typing and editing on a touchscreen is slow and difficult.

Editing overpass queries is obscure at best and scary at worst for novice and even moderately technically adept users.

And it isn't necessary. With just a little bit syntactic sugar, a single dialog, and a bit more cut and paste through the clipboard, overpass can be hidden and an immensely powerful capability can be exposed to non-expert users.

And I (and hopefully many others) can get more work done quickly and less painfully.

@afgb1977
Copy link

You can export OverPass queries to a txt file that can be uploaded back to Vespucci, there is no need to write the query every time you use it. You can also create them in a text editor from your mobile or PC with the txt extension.
For frequent OverPass queries this is how I use them.

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

No branches or pull requests

3 participants