[OSM-talk] gpx batch upload in java

Christof Dallermassl cdaller.hw at gmx.at
Wed Jul 25 21:43:55 BST 2007


I just added a java class that allows to upload one or more gpx files in
  batch mode. Check out at

It is only one java class (needs compiling) and it allows to pass all
uploaded files to other command line apps (using xargs).

I use the application to upload gpx files and move them to another
directory after they were uploaded.

Feedback is welcome

java GpxUpload <description> <tags> <files*>
Osm username and password can be defined as system properties
by -Dusername=<username> and -Dpassword=<password> or if not given,
josm's preference file is read.
Any messages are printed to stderror, only the filename that was sent
successfully is printed to stdout, so you may use the output of this
program in a pipe for other calls.

java GpxUpload "taking a ride in Graz, Austria" "graz austria" gpxfile.gpx

java GpxUpload "taking a ride in Graz, Austria" "graz austria"
gpxfiles*.gpx | xargs -i mv '{}' /home/cdaller/targetdir

Christof Dallermassl
cdaller dot hw at gmx dot at

More information about the talk mailing list