Forum: General Topics
Forums / General Topics / open track in josm using url
Subject: | open track in josm using url | |
jose1711 10:54 Location: Phone Model: | hello stephen, i made one of my tracks public, then copied link to gpx to josm's open location dialog window. here's what i am getting: Cannot open URL '...' because no suitable download task is available. could you please check what josm dislikes about the url? thank you, jose | |
Stephen 13:43 Location: Phone Model: | Hi Jose, I'm not sure this is what the Open Location function in JOSM is for, is it? According to the Help on that dialog it appears to be designed for downloading OSM/XML objects (eg from the OSM API). So maybe GPX files aren't supported - have you been able to open other web-based GPX files in this way? If you download the GPX to your PC first it can then be opened via the JOSM Open... menu. Incidentally, one thing that might affect the general opening of GPX files over the web is that the download URL by default will include an HTTP header to force the browser to show the Save As window (by use of a "Content-Disposition: attachment" HTTP header). You can prevent this header by adding &download=n to the original exportgpx.php URL query string. Cheers, Stephen | |
jose1711 13:50 Location: Phone Model: | hi stephen, i am able to open this gpx track from osm: http://www.openstreetmap.org/trace/1119288/data so it should work. adding &download=no did not solve the issue for me. | |
Stephen 14:26 Location: Phone Model: | Mmm, interesting... Looks like that file is GPX v1.0 whereas TMJ exports as GPX v1.1. I'll look into it... | |
Stephen 17:28 Location: Phone Model: | I've had a good look at the GPX exporter, but am pretty stumped to be honest. Looks like its nothing to do with the file contents but rather the webserver or HTTP headers. I wonder if perhaps JOSM is only tuned to download from the OSM server - do you have any other downloadable examples from non-openstreetmap.org URLs? I tried downloading that trace that you mentioned, and then uploading it, as is, to the TMJ server. This then still doesn't load in JOSM (http://www.trackmyjourney.co.uk/1119288.gpx). There are a few differences in the HTTP headers, but I'm surprised if JOSM is so fussy that it rejects the file on these grounds - it must have trouble with lots of other servers if so. I do get a slightly difference message to you... "Error during download: No data found in this area" along with a whole load of "Undefined element" errors in the JOSM command prompt window, each one corresponding to each <tag> in the GPX file. Which, now I think about it, suggests that it is correctly reading the file from the server to some extent...!!?? Confused...!! | |
jose1711 9:03 Location: Phone Model: | hi stephen, look at this: $ >host www.openstreetmap.org www.openstreetmap.org has address 193.63.75.99 www.openstreetmap.org has address 193.63.75.103 www.openstreetmap.org has address 193.63.75.100 $ >grep 193.63.75.99 /etc/hosts 193.63.75.99 random.server $ >wget -qO- http://www.openstreetmap.org/trace/1207599/data | md5sum - b3ab925fd8787f7b1d3a02a086abf94b - $ >wget -qO- http://random.server/trace/1207599/data | md5sum - b3ab925fd8787f7b1d3a02a086abf94b - and guess what.. you get an error when using the latter url in josm :-( i will create a ticket for josm and ask what is the reason behind only allowing download from osm server. jose | |
Stephen 17:43 Location: Phone Model: | Thats a clever hack to test the JOSM URL loading - took me a while to figure out what you were doing! Cheers, Stephen | |
jose1711 22:27 Location: Phone Model: | i was also kinda lucky. if they were using virtualserver in their apache (or whatever they're using) configuration - it would not be working. | |
(You must be logged in to post a reply to this thread)