Efficient way to jump to coordinates in JOSM

I know that CTRL+J opens a dialog that allows me to put in coordinates. It works but is inefficient:

  1. Latitude and Longtitude are separate. However, I usually paste the coordinates from another program as paste text, so I have something like “-71.44939,-44.15408”. I need to manually split it, which takes time.
  2. Unhelpfully on Linux, when either of the two fields gets focus, there is a prefilled value, which gets selected, causing it to get to X clipboard (the one accessed by selecting text, not pressing CTRL+C), erasing the value I just wanted to paste.

Is there another tool in JOSM that would accept coordinates of both longtitude and latitude together? The cureent dialog is handy but not really optimal in terms of usability, I think.

1 Like

I use the Add Node command (Shift-D) which allows lat/lon to be pasted in several different formats, then I promptly delete the new node.

It’s a workaround, though. Maybe make a feature request to have Jump to Position accept the same input as Add Node?

Have been using that panel to jump quickly from a location I’m web browsing, copying the url and than switch to JOSM. The remote control function somehow already has inserted the url in the appropriate box so Ctrl+J and immediately enter to jump to the center location of what was being viewed in the web browser. Found it does work for more than the OSM web site, when there’s coordinates in the URL.

Example: This is viewed in the browser, and copied the address


Open the jump box in JOSM and as you can see the address is already filled in (trust me ;o)


I wrote this JOSM script to jump to the lat, long that is on the clipboard:

@tekim That sounds like the best solution for now, however with -71.44939,-44.15408 in my clipboard, the script says

AttributeError: 'NoneType' object has no attribute 'mapView' in <script> at line number 15

I am on current JOSM, on Ubuntu 22.04, just installed Java 17 as the scripting engine asked me to.

@Kai_Johnson Ok, I opened a ticket for it: #23680 (Make jump to coordinates accept unsplit coordinates) – JOSM

I am using QGIS with a “reference layer” to update OpenStreetMap and by installing the QuickOSM plugin you get a JOSM Remote button that will open JOSM for the exact same location and zoom of QGIS. The works through the standard JOSM remote control.

Not sure where your coordinates come from but you could write a script that takes the coordinate and has Josm zoom to and download that location.

I am guessing the issue is that there was no data layer in JOSM. I can modify the script so that it works even if there is no data layer. I just tested and if there is a data layer it does work (and it fails if there isn’t)

@tekim: that was it! I just fired JOSM to test it and it did not occur to me some data need to be there. By the way can one bind a keyboard shortcut to the script?

@emvee yeah, tekim’s solutino si basically like that.

Glad to hear that it is working for you! As far as I know, there is no way to bind a keyboard shortcut to a specific script. The best you can do is to bind a shortcut to the “scripting run” function. It seems to remember the last script run, so conceivably this gets the operation down to now keystroke and a mouse click. If I turn it into a plugin then we can assign a shortcut to it.