Skip to main content

Coordinates label photos

The problem we are trying to solve: On the one hand, we have a photos with unlabeled GPS data, but only a timestamp. In the other hand, we have a GPS track, with coordinates and timestamp. This situation is originally caused by the fact that pictures are taken underwater but we can position a GPS above the water. Our purpose is to interpolate the GPS position from the track, with the photo timestamp and insert the information in the EXIF photo metadata.

Installation

pip install coordinates-label-photos

Run

To label all images from /path/to/images-directory/* with the GPX track points from path/to/your.gpx or LLH (Reach RS 2) format:

coordinates-label-photos --coords=/path/to/your.gpx --images=/path/to/images-directory

Try coordinates-label-photos --help to see how to save image locations in a separate file, output reports, set accuracy and more.

Other Utils

A few side tools may come handy in some situations

Removing GPS information from pictures

coordinates-clear-photos --images=/path/to/images-directory

Selecting the closest images to a point list

During acquisition, excessive number of pictures can be taken (when strolling outside of the perimeter or moving not fast enough). If we provide a list of positions where the images should have been taken, we can select only the closest images to each of those position.

select-closest-photos \
     --coords=/path/to/perfect-positions.csv  \
     --images=/source/image/directory \
     --dest=/selected/image/directory \
     --report=/path/to/report.png

Comparing GPX tracks

Compare various coords tracks, from .gpx, .llh, .pos (useful to plot the same track from different GPS):

plot-coords-tracks --gpx="gps A:/path/to/a.gpx"  --gpx="gps B:/path/to/b.gpx" --output=/path/to/plot.jpeg

Extracting photos coordinates to a GPX file

From a directory containing images (with GPS locations), create a GPX file:

images-to-gpx --output=/path/to/a.gpx  --images=/path/to/images-directory

License

MIT

Development

Setup

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Testing

pytest

PIPy deployment

Increase the version in setup.cfg.

Github release.

Juste create a new release on github and let the action flow.

dev laptop release

rm dist/*
python3.11 -m build
python3.11 -m twine upload dist/*

Metadata

Release files for coordinates-label-photos 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for coordinates-label-photos 1.0.7
File Size Uploaded
coordinates-label-photos-1.0.7.tar.gz 17.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for coordinates-label-photos 1.0.7
File Interpreter ABI Platform
coordinates_label_photos-1.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 40.8 kB

Release files / coordinates-label-photos-1.0.7.tar.gz

Download URL coordinates-label-photos-1.0.7.tar.gz
Size 17.1 kB
Tags Source
SHA-256 checksum
How to use checksums
56bc8684407666147896b262c8b13dd245cc02ad41e172a03a81b4ec3ec1a105
BLAKE2b-256 checksum
How to use checksums
1f713a89c7f767db46250702a2517513ede64a5f9f620d6225535786d19d2be8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / coordinates_label_photos-1.0.7-py3-none-any.whl

Download URL coordinates_label_photos-1.0.7-py3-none-any.whl
Size 23.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
76df7fd737953b3c0b8ffa54e31987d65d2d9d5cef1ab146750efacb3f1df43f
BLAKE2b-256 checksum
How to use checksums
568dcaa6f9dfbd3cfc98ba38a59b058ba0943f8ecce24bf343d047dea214d8eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.0

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page