0

I've been trying to establish a method whereby I can automatically convert a shapefile to a GPX file using python, but having terrible luck in doing so.

Currently the only method that i've come across is using ogr2ogr (GDAL library) and then parsing that through os.system.

os.system(('ogr2ogr -f GPX %s %s') % ((os.path.join(toDirectory,nameOfGPX +".gpx"), inputLineShpfile)))

Though the end goal is to get a product of how the DNR Garmin spits out a GPX (see below).

As you see below it doesn't look good with multipart polygons looking like a mess.

ogr2ogr using GDAL: Using ogr2ogr

End goal (using a manual process of DNR Garmin to convert)

Using DNR Garmin[2]

Has anyone found a successful way to convert to gpx? I've got access to a basic version of ArcGIS and open to any open source or python libraries to assist.

Slevy
  • 339
  • 2
  • 14

0 Answers0