OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#1 2018-08-05 14:02:33

Shohreh
Member
Registered: 2012-12-15
Posts: 140

[SOLVED] [JOSM] Merging thousands of GPX files?

Hello,

The following OverpassTurbo query to OSM returns thousands of tiny tracks:

[out:json][timeout:25]; 

//Sicily: 39152 
rel(39152);map_to_area -> .searchArea; 

( 
  node["railway"="rail"](area.searchArea); 
  way["railway"="rail"](area.searchArea); 
); 

out body; 
>; 
out skel qt; 

Apparently, JOSM supports merging multiple tracks into a single track, but… how should I do this when thousands of tracks are involved?

Or should I run the query directly from JOSM and have it merge the output somehow?

Thank you.

Last edited by Shohreh (2018-08-08 12:55:44)

Offline

#2 2018-08-08 12:55:28

Shohreh
Member
Registered: 2012-12-15
Posts: 140

Re: [SOLVED] [JOSM] Merging thousands of GPX files?

For others' benefit: I solved the problem by opening the 2.4MB file in a layer in JOSM, adding a new layer, and drawing each route manually. The few GPX files I ended up with weigh a grand total of… 15KB.

The experts might know of a smarter way, but it only took a few minutes anyway.

30_A1606_F-66_D0-419_E-99_C3-96799_A916_AFC.png

Offline

#3 2018-08-09 11:56:50

Shohreh
Member
Registered: 2012-12-15
Posts: 140

Re: [SOLVED] [JOSM] Merging thousands of GPX files?

For QGIS experts, it appears there are two ways to simplify tracks significantly:

  • Convert the gpx data into a spatial dataset, and dissolve geometries through eg. a train line operator

  • Use the "Join Multiple Lines" plug-in

Offline

Board footer

Powered by FluxBB