1

I want to access a couple of GPX files online to extract the tracks and waypoints for some feature classes. When I download the files, ogrinfo (version 2.4.1 on a Mac)works fine.

ogrinfo /Users/ianhorn/Downloads/KAT_Motorcycle.gpx 
INFO: Open of `/Users/ianhorn/Downloads/KAT_Motorcycle.gpx'
      using driver `GPX' successful.
1: waypoints (Point)
2: routes (Line String)
3: tracks (Multi Line String)
4: route_points (Point)
5: track_points (Point)

However, I would prefer to just grab the URL and process that way using vsicurl, but ogr spits out an error saying it cannot open the datasource with the driver.

ogrinfo /vsicurl/http://annessky.net/kat/gpx/KAT_Motorcycle.gpx  
FAILURE:
Unable to open datasource `/vsicurl/http://annessky.net/kat/gpx/KAT_Motorcycle.gpx' with the following drivers.

Is it not possible to do this?

Update. Solution provided by @Maptastik using python, https://repl.it/@maptastik/katmotorcyclegpxdownload

  • what version of gdal? related gis.stackexchange.com/questions/195992/gdal-vsicurl-not-working – Mapperz Dec 4 '19 at 17:11
  • version 2.4.1 on a Mac. – Ian Horn Dec 6 '19 at 18:48
  • Thank you for the link. I was looking for that link and couldn't remember where. I saw it. – Ian Horn Dec 6 '19 at 18:49
  • Turns out, files were the issue, not vsicurl. @maptastick came up with a solution using python to open a browser session to read the file, the write it locally. – Ian Horn Mar 14 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.