🚧 Content in progress — We're publishing this page now to give you a sneak peek. Even better very soon!
I have 20k photos from a trip around the world. Each photo contains GPS coordinates. I would like to find an application that would allow me to import photos and recreate the route of my trip using GPS coordinates. In the event that this type of application does not exist I would be prepared to write the script in Golang to achieve this. I would also like to use the text associated with each photo.
Great project — 20k photos with GPS, it’s perfect for reconstructing a rich and navigable route. I’ll first summarize the ready-to-use solutions that you can test right away, then I’ll give you a technical plan + a starting Go script (functional extract) to extract EXIF, sort by date, deduplicate and export to GPX/GeoJSON/CSV ready to import into My Maps / Mapbox / Leaflet.
#1) Existing solutions to test (quick)
- PhotoPrism (self-hosted) — indexes large libraries, provides a Places (map) view, and can estimate missing locations. Ideal if you want a complete photo application (face detection, search, map). ([docs.photoprism.app][1])
- HoudahGeo (Mac) — designed to geotag and view photos; can export KML/GPX and rewrite metadata. Practical when cleaning and correcting coordinates. ([houdah.com][2])
- Adobe Lightroom Classic — Map module — internal map, possibility of auto-tagging via GPX and viewing photos on map. Useful if you already use Lightroom for cataloging. (Adobe Help Center)
- Google My Maps / Google MyMaps import — you can import CSV / KML / GPX with lat/long and link photos (or URLs to photos); easy to share/embed on a site. Good for simple web publishing. (Google Help)
- TravelMap / TravelTracker / Photo Map apps (iOS/Android, web) — quick solutions to transform a selection of albums into an interactive map and story map useful for public/family sharing. (TravelMap)
Practical conclusion: if you just want to view / share quickly → try PhotoPrism (if self-host) or My Maps (CSV/KML). If you want full control over the route (chronological order, simplification, image hosting), I recommend exporting first a GPX/GeoJSON file from a script then importing it into Mapbox/Leaflet/MyMaps. ([docs.photoprism.app][1])
#2) Scenario if you want to code (Go) — recommended workflow
Objective: from 20k files (with EXIF GPS + timestamp + associated text), produce:
- a GPX file / GeoJSON representing the chronological route (route),
- a CSV/KML of points (latitude, longitude, timestamp, photo filename, text / caption),
- a simplified version (simplified polyline) for web display,
- and popups with thumbnails/text (you can host thumbnails on CDN/Nextcloud/Drive).
Steps:
- Scan the folder recursively to list files (jpg, heic, png, mp4)
- Read EXIF: GPSLatitude, GPSLongitude, DateTimeOriginal (or CreateDate). If GPS missing → ignore or estimate.
- Extract the associated text: if you have a linked text file (eg same-name.txt) link; otherwise apply OCR (Tesseract) or cloud OCR to extract text from the image.
- Normalize timestamps (UTC) and sort by timestamp.
- Deduplicate / cluster: merge photos taken at the same position/interval to keep a readable flow (group photos taken in a few minutes at the same point).
- Generate GPX/GeoJSON/CSV; option: polyline simplification (Ramer–Douglas–Peucker) to reduce points.
- Hosting thumbnails and producing a
photo_url column for popups.
- Import into My Maps, Mapbox, Leaflet or PhotoPrism as needed.
#3) Important technical points for 20k images
- Memory & performance: process in streaming / batch; don’t remember everything. Use goroutines but limit parallelism (worker pool) to read EXIF.
- HEIC / MOV formats: choose libs that read EXIF ​​on HEIC/MP4; otherwise convert.
- Timezones: check that DateTimeOriginal is correct (some cameras leave it local) — you must harmonize to UTC.
- Host photos: for web popups, put thumbnails on a bucket (S3 / Cloudflare R2) or Nextcloud and write the URL in the CSV.
- OCR / associated text: local Tesseract or Google Vision / Azure OCR if you want quality. For 20k images, cloud can cost—plan budget.
#4) Starter Go script (functional, reasonably complete)
This script: browses a folder, reads EXIF GPS+timestamp, sorts, deduplicates close neighbors, and writes a route.geojson + points.csv.
Dependencies:
github.com/rwcarlsen/goexif/exif for EXIF
github.com/tkrajina/gpxgo/gpx (optional) for GPX (here we do GeoJSON manually)
- standard library
Install: go get github.com/rwcarlsen/goexif/exif github.com/tkrajina/gpxgo/gpx
photo2route_with_heic_videos_gpx_thumbs.go
Notes:
- This script ignores images without GPS (option: PhotoPrism can estimate).
- For HEIC/MP4,
goexif may not always decode: you will have to test and add native libs if necessary (or convert).
- Add a thumbnail upload if you want to generate
thumb_url for popups (e.g. s3://bucket/thumbs/...).
- For OCR, use
tesseract in CLI and view the results, or call Google Vision if you want better quality.
#5) What to do next (integration/display)
- Import
route.geojson into Mapbox GL JS or Leaflet to display the polyline and points; use photo_url for popups.
- Import
points.csv into Google My Maps (or Google Drive) if you want quick sharing. (Google Help)
- Optimize / simplify the server-side polyline (Ramer–Douglas–Peucker) to simplify display on the web.
- Story map: add temporal sections (e.g. timeline) or cluster by country/city for navigation.
#6) Immediate practical recommendation
If you want to quickly test without coding: install PhotoPrism and index a subset (e.g. 1k photos) to see the map and the UI. ([docs.photoprism.app][1])
If you want to publish a shared web map: generate route.geojson via the script above and import into Mapbox/Leaflet/My Maps. (Google Help)
If you want me to step up now: I can
- adapt the Go script to handle HEIC/videos and write GPX too,
- add export of thumbnails (example command
ffmpeg/sips on macOS) and generate thumb_url CSV,
- add simple OCR step (Tesseract) and upload option to a bucket.
Tell me which option you want (test PhotoPrism, I want the full ready-to-run Go script with HEIC+GPX+OCR, or a Mapbox/Leaflet guide to display route.geojson) — I can provide you with the exact code/commands right away.
[1]: https://docs.photoprism.app/user-guide/organize/places/?utm_source=chatgpt.com “Places”
[2]: https://www.houdah.com/houdahGeo/?lang=en&utm_source=chatgpt.com “HoudahGeo 7–Photo & Video Geotagging for Mac”