Bug 295302 - Opening map in JOSM doesn't work
Summary: Opening map in JOSM doesn't work
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: 1.3 (KDE 4.8)
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-04 14:27 UTC by Rolf Eike Beer
Modified: 2012-05-20 16:40 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: KDE-4.8.4


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rolf Eike Beer 2012-03-04 14:27:30 UTC
Opening the displayed area in JOSM doesn't work e.g. in Germany. The Arguments passed to JOSM may be something like this (shortened):

--download=51.539,9.960,51.538,9.964

This isn't a legal value for the OSM API, the minimum coordinates must always be smaller than the maximum ones. If I manually exchange the coordinates on the command line I get the proper area opened.

Simply exchanging the arguments in the command template in src/ControlView.cpp will not work if you go to the southern hemispere. So there needs to be a really special case for marble and not mixing this with merkaartor (if that one doesn't suffer from this problem, have not tried). The other solution would be to call JOSM with the same arguments as Potlach, i.e. lat/lon/zoom (see josm --help).
Comment 1 Dennis Nienhüser 2012-05-20 12:57:55 UTC
Git commit b30bb5c5e9dc2ceacc2b4ab2e91a5bcc2045342f by Dennis Nienhüser.
Committed on 20/05/2012 at 14:48.
Pushed by nienhueser into branch 'master'.

Fix josm arguments.

M  +2    -2    src/ControlView.cpp

http://commits.kde.org/marble/b30bb5c5e9dc2ceacc2b4ab2e91a5bcc2045342f
Comment 2 Dennis Nienhüser 2012-05-20 12:58:07 UTC
Git commit c2b477db0a65695820e4766a5319a9bc0928f7da by Dennis Nienhüser.
Committed on 20/05/2012 at 14:48.
Pushed by nienhueser into branch 'KDE/4.8'.

Fix josm arguments.
FIXED-IN: KDE-4.8.4
(cherry picked from commit b30bb5c5e9dc2ceacc2b4ab2e91a5bcc2045342f)

M  +2    -2    src/ControlView.cpp

http://commits.kde.org/marble/c2b477db0a65695820e4766a5319a9bc0928f7da
Comment 3 Rolf Eike Beer 2012-05-20 15:33:51 UTC
I doubt this fix will help, for 2 reasons:

-if you now changed north and south now the other 2 quadrants of the earth (i.e. norther hemisphere west and southern hemisphere east) will likely break
-I now tried editing something in Dublin and Capetown. There I get a different error message that /home/eike/<coordinates> does not exist (so the error descripbed here seems not to trigger)

Have you verified that things now work? I have josm 5210.
Comment 4 Dennis Nienhüser 2012-05-20 16:40:46 UTC
(In reply to comment #3)
> -if you now changed north and south now the other 2 quadrants of the earth
> (i.e. norther hemisphere west and southern hemisphere east) will likely break

Longitude ranges from -180 to +180, latitude from -90 to 90. Irrespective of the quadrant south<north and west<east holds for those, so no special casing is needed (except for the IDL, which is however not handled by josm anyway and has no real practical relevance in this case). You can even rotate the viewport such that visually south is on top of north and it still works due to the usage of the LatLonAltBox in Marble.

(In reply to comment #3)
> -I now tried editing something in Dublin and Capetown. There I get a
> different error message that /home/eike/<coordinates> does not exist (so the
> error descripbed here seems not to trigger)
>
> Have you verified that things now work? I have josm 5210.

I tested with version 4878, the one shipped with Kubuntu 12.04, which works fine.

Now I also tested version 5120, which has a bug in command line handling: If any of the provided coordinates is negative, it tries to open it as a file, leading to the error message you get. This error is fixed in josm 5240, see http://josm.openstreetmap.de/ticket/7687
http://josm.openstreetmap.de/josm-latest.jar is currently 5241 and works fine again.