Hello, All. I'm using JOSM (Revision:18583 Build-Date:2022-11-01 14:35:40) on windows-64, and try to load selection from an external file, but with no luck. :-( Help says that there is a possibility to use urls in the search prompt for such files:
The help is very vague on the subject. I've tried this with a "file://drive/path/file.ext" url, and even run an http server and used a "http://localhost/found-outlines.xml" url. And I've tried different file formats, like "wNNNNNNN", "<way id="NNNNNN"></way>" per line. Also nothing happens if I use standard osm (xml) file. Did anyone make it working? How must the data to be formatted in the file, and how to give the url to the file correctly? Maybe it's disabled somewhere in the preferences? asked 05 Apr '23, 08:02 mechanic_ua |
Thank you, All. You helped a lot just doing nothing! ;-) While the question were itching, I decided to get my paws dirty with the JOSM source. At last. And now I can just build it, set some breakpoints, and trace whatever I cannot understand in the help system. The right answer to my question is "Nope". :-| No, there is no search string hooks in the last release of JOSM which will do something like that mentioned in the help. And yes, it just parses the url into the pair So, magic doesn't live in this code, just in the help.. Hope, that someone won't believe me, and will compile his own custom jar oneself! ;-) answered 06 Apr '23, 16:57 mechanic_ua |
Why are you trying to load an OSM file from a URL rather than just using File>Open ?
I've not spent much time manually editing OSM files but I would expect a way to require reference to nodes between the open and close tags too.
This question sounds like there is background that would be useful. What are you actually trying to do?
I'm not trying to open data with url, the data is already opened in editor. All I need is to load selection (select elements by an externally passed list of IDs). Those IDs I get from my own scripts, which fiddle with SQL queries to somehow process them. Actually I'm building a workflow to generate 3d city with as much existing data as I can collect. Some data is my-project-only-related, so there is no sense to clutter a global database with it. But I use osm objects' IDs to sync my own data among my tools. JOSM is a very handy tool to edit spatial data visually, and it's easy to generate it's format (xml) for data exchange. Multiple selection is mostly for merging layers with "merge selection" command. I know about remote control, but it would be more convenient to feed a long lists of id's directly from texts. I'd already started to invent the wheel, but someone has dropped those few lines in the help, which somehow stops me from reinventing an already existing (?) wheel :-) If it works, I need to know how, and if it doesn't, then nothing will stop me from facing a shiny brand new wheel. =)