Modify

Opened 4 days ago

Last modified 4 days ago

#24269 new enhancement

Remote control "Open remote files" should allow opening remote GeoJSON, GPX etc.

Reported by: NeatNit Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc:

Description

I want to instruct JOSM to load a geojson or GPX file from a remote URL. For an example use-case, PTNA ( https://wiki.openstreetmap.org/wiki/Public_Transport_Network_Analysis ) could load a bus trip's GPX file into JOSM in an instant. Right now this has to be downloaded and loaded manually with the "GPX-Download" button, as can be seen at: https://ptna.openstreetmap.de/gtfs/DE/single-trip.php?feed=DE-BW-bodo&release_date=&trip_id=ddb-90-M70-1-1-32-H-24-Special%23892-44-28

In another instance, I would like to load GeoJSON data from an ArcGIS query directly into JOSM. The query URL is in the format: https://gisn.example.com/arcgis/rest/services/IView2/MapServer/577/query?where=1%3D1&outFields=*&f=geojson - right now I can only do it by saving the result to a local file using a web browser and loading the file manually in JOSM.

The remote control preferences have a permission for "Open remote files", but it only seems to allow geotagged images and nothing else: https://github.com/search?q=repo%3AJOSM%2Fjosm%20ALLOW_WEB_RESOURCES&type=code

It would be amazing if this same functionality was extended to allow loading of other file/data types supported by JOSM.

Also, even this functionality is not documented - the API description of /open_file makes no mention of its ability to load URLs, and only mentions local files:

/open_file — opens a local file in JOSM
mandatory parameters: filename
examples:
/open_file?filename=/tmp/test.osm

However this seems to work: http://127.0.0.1:8111/open_file?filename=https://upload.wikimedia.org/wikipedia/commons/c/cd/London%2C_London_Eye_--_2016_--_4801.jpg (found by galen on Discord)

So this is a feature request to allow remote loading of more data file types, and also to more fully document the API endpoint. Thanks!

Attachments (0)

Change History (2)

comment:1 by galen8183, 4 days ago

load GeoJSON data from an ArcGIS query directly into JOSM

This is usually possible with the Open Location dialogue, however in this case the request URL uses f=geojson rather than format=geojson -- modifying the regex to accept f(?:ormat)?=geojson instead of strictly format=geojson should be sufficient for this issue

comment:2 by NeatNit, 4 days ago

Opened a separate ticket for the issue raised by galen: #24270 as these are two separate issues (one is about remote control, the other is about open location)

Last edited 4 days ago by NeatNit (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to NeatNit.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.