Openstreetmap, convert track to gpx file, how to?

Talk about whatever

3 posts • Page 1 of 1
100. If you're mapping wireless networks, you might consider mapping your routes and posting them to [Openstreetmap]. The best way (in my opinion --KH): convert the track to a gpx file, and import that file in 'josm', the java openstreetmap editor. Reconstruct the roads and other objects you visited from your tracks and/or upload them to the OSM projectpage.
Ref.: https://wigle.net/wiki/index.cgi?Cardin ... riving_FAQ

I've got gpsbabel and a cornucopia of other gps, gpx, and openstreetmap related programs available on Debian Linux, but haven't yet, cough, stumbled onto a correct way of converting WigleWifi...csv files from the android client, into gpx files, using gpsbabel. Failures include:


$ gpsbabel -i csv -f WigleWifi_20171231160828-excerpt.csv -o gpx -F WigleWifi_20171231160828-excerpt.gpx

Invalid longitude 981.533 in waypoint ""

$ gpsbabel -t -i csv -f WigleWifi_20171231160828-excerpt.csv -o gpx -F WigleWifi_20171231160828-excerpt.gpx

XCSV attempt to read WigleWifi_20171231160828-excerpt.csv as a track or route, but this format only supports waypoints on read. Reading as waypoints instead.

Invalid longitude 981.533 in waypoint ""

$ gpsbabel -T -i csv -f WigleWifi_20171231160828-excerpt.csv -o gpx -F WigleWifi_20171231160828-excerpt.gpx

Realtime tracking (-T) is not suppored by this input type.

$ gpsbabel -r -i csv -f WigleWifi_20171231160828-excerpt.csv -o gpx -F WigleWifi_20171231160828-excerpt.gpx

XCSV attempt to read WigleWifi_20171231160828-excerpt.csv as a track or route, but this format only supports waypoints on read. Reading as waypoints instead.

Invalid longitude 981.533 in waypoint ""


It's apparently getting the 981.533 invalid longitude from numbers 98132 appended at the end of one of the SSIDs in the file (my guess).

Any help is appreciated. Happy New Year!
Image
So I stumbled (cough) around to a solution, and here are some details for anyone else who bumps into this.

First, extract the gps trace-related fields from the Wigle csv file; altitude is probably not necessary, but included anyway:

$ cut -d, -f4,7-9 WigleWifi_2017...csv | tee WigleWifi_2017...-cut01x.csv

Edit the first lines to remove the first line of phone description, etc., change dashes to slashes in dates (which may or not really be needed), and add comma between date and time, to get:

$ head WigleWifi_2017...-cut01x.csv
date,time,lat,lon,alt
2017/12/31,13:07:19,35.298610000000004,-80.6547,198
2017/12/31,13:07:25,35.298613333333336,-80.65470166666667,199.1
2017/12/31,13:07:34,35.298613333333336,-80.65470166666667,199.2
2017/12/31,13:07:40,35.29861166666667,-80.6547,199.2
2017/12/31,13:07:40,35.29861166666667,-80.6547,199.2
...


Then convert to gpx track (or is it trace...) with gpsbabel:

$ gpsbabel -i unicsv -f WigleWifi_2017...-cut01x.csv -x transform,trk=wpt -o gpx -F WigleWifi_2017...-cut01x.gpx

Finally, upload of this gpx file was accepted into openstreetmap trace uploads. :)
Image
Awesome!

We encourage everyone to contribute to OSM - it's a fantastic project.

3 posts • Page 1 of 1

Return to “General Grabbag”

Who is online

Users browsing this forum: No registered users and 1 guest