I have a bunch of gpx files that come from GPSLogger for Android app.
Files look like:
<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.0" creator="GPSLogger - http://gpslogger.mendhak.com/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.topografix.com/GPX/1/0"
xsi:schemaLocation="http://www.topografix.com/GPX/1/0
http://www.topografix.com/GPX/1/0/gpx.xsd" >
<time>2011-08-26T06:25:20Z</time>
<bounds></bounds>
<trk>
<trkseg>
<trkpt lat="46.94681501102746" lon="7.398453755309032" >
<ele>634.0</ele>
<speed>0.0</speed>
<src>gps</src>
<sat>6</sat>
<time>2011-08-26T06:25:20Z</time>
</trkpt>
<trkpt lat="46.94758878281887" lon="7.398622951942811" >
<ele>748.0</ele>
<speed>0.0</speed>
<src>gps</src>
<sat>5</sat>
<time>2011-08-26T06:30:56Z</time>
</trkpt>
... ... ...
</trkseg>
</trk>
</gpx>
Is it possible to traverse a directory containing these files and load them into one PostGIS table using either SQL or Python?
I've stubled upon this blog post mentioning that:
I’m not aware of anything that can convert straight from GPX to PostGIS
This post gives an example of working with SQL to do that but I can't get my head around the code :/