Python Forum
Working code to build GPX from geotagged JPGs?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Working code to build GPX from geotagged JPGs?
#4
… and in case you'd rather save data in a geojson file instead of GPX:

#pip3 install geojson
from geojson import Point, Feature, FeatureCollection, dump
…
features = []
for file in glob.glob('*.jpg'):
	…
	point = Point((latitude, longitude))
	features.append(Feature(geometry=point))
	
feature_collection = FeatureCollection(features)
with open(OUTPUT, 'w') as f:
   dump(feature_collection, f)
Reply


Messages In This Thread
RE: Working code to build GPX from geotagged JPGs? - by Winfried - May-10-2020, 08:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  New to Python - Not sure why this code isn't working - Any help appreciated TheGreatNinx 4 985 Jul-22-2023, 10:21 PM
Last Post: Pedroski55
  code not working when executed from flask app ThomasDC 1 922 Jul-18-2023, 07:16 AM
Last Post: ThomasDC
  I am new to python and Could someone please explain how this below code is working? kartheekdas 2 1,038 Dec-19-2022, 05:24 PM
Last Post: kartheekdas
Exclamation My code is not working as I expected and I don't know why! Marinho 4 1,103 Oct-13-2022, 08:09 PM
Last Post: deanhystad
  My Code isn't working... End3r 4 1,956 Mar-21-2022, 10:12 AM
Last Post: End3r
  |SOLVED] Glob JPGs, read EXIF, update file timestamp? Winfried 5 2,525 Oct-21-2021, 03:29 AM
Last Post: buran
  I don't undestand why my code isn't working. RuyCab 2 2,004 Jun-17-2021, 03:06 PM
Last Post: RuyCab
  code is not working , can anybody help? RandomPerson69 4 2,941 Mar-22-2021, 04:24 PM
Last Post: deanhystad
  Short code for EventGhost not working Patricia 8 3,730 Feb-09-2021, 07:49 PM
Last Post: Patricia
  Code no longer working yk303 14 10,293 Dec-21-2020, 10:58 PM
Last Post: bowlofred

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020