-1

How do you convert a GeoJSON file to GPX?

ThomasG77
  • 30,725
  • 1
  • 53
  • 93
  • 2
    Welcome to Geographic Information Systems! Welcome to GIS SE! We're a little different from other sites; this isn't a discussion forum but a Q&A site. Your questions should as much as possible describe not just what you want to do, but precisely what you have tried and where you are stuck trying that. Please check out our short [tour] for more about how the site works – Ian Turton Nov 02 '21 at 15:57

1 Answers1

1

Here's a method using GeoPandas:

import geopandas as gpd
gdf = gpd.read_file('<filename>.geojson')
gdf.to_file('<filename>.gpx', 'GPX')
Encomium
  • 3,133
  • 2
  • 14
  • 41
  • Thanks a lot! I only get this error now: SchemaError: Field of name 'Key' is not supported in GPX schema. Use GPX_USE_EXTENSIONS creation option to allow use of the element – Damiaan van Harteveld Nov 02 '21 at 19:05
  • 1
    @DamiaanvanHarteveld there's a GIS SE question about this exact issue. Top hit when you Google your error. https://gis.stackexchange.com/questions/40731/converting-shp-into-gpx-using-qgis. – Encomium Nov 02 '21 at 21:55