GeoPicTagReader
Project description
Panoramax
Panoramax is a digital resource for sharing and using 📍📷 field photos. Anyone can take photographs of places visible from the public streets and contribute them to the Panoramax database. This data is then freely accessible and reusable by all. More information available at gitlab.com/panoramax and panoramax.fr.
📷 GeoPic Tag Reader
This repository only contains the Python library to read and write standardized metadata from geolocated pictures EXIF metadata. It can be used completely apart from all Panoramax components for your own projects and needs.
Features
This tool allows you to:
- 🔍 Analyse various EXIF variables to extract standardized metadata for geolocated pictures applications (coordinates, date, orientation, altitude...)
- ✏️ Edit a picture to change its EXIF variables through a simpler command
- 💻 Either as Python code or as a command-line utility
Install
The library can be installed easily, for a quick glance:
pip install geopic_tag_reader
geopic-tag-reader --help
To know more about install and other options, see install documentation.
If at some point you're lost or need help, you can contact us through issues or by email.
Usage
This library can be used both from command-line or as Python module.
As command-line
To see all available commands:
geopic-tag-reader --help
To read metadata from a single picture:
geopic-tag-reader read --image /path/to/my_image.jpg
To edit metadata of a single picture, for example change its capture date:
geopic-tag-reader write \
--input /path/to/original_image.jpg \
--capture-time "2023-01-01T12:56:38Z" \
--output /path/to/edited_image.jpg
Full documentation is also available here.
As Python library
In your own script, for reading and writing a picture metadata, you can use:
from geopic_tag_reader import reader, writer, model
# Open image as binary file
img = open("my_picture.jpg", "rb")
imgBytes = img.read()
img.close()
# Read EXIF metadata
metadata = reader.readPictureMetadata(imgBytes)
print(metadata)
# Edit picture EXIF metadata
editedMetadata = writer.PictureMetadata(
picture_type = model.PictureType.equirectangular,
direction = writer.Direction(125)
)
editedImgBytes = writer.writePictureMetadata(imgBytes, editedMetadata)
# Save edited file
editedImg = open("my_new_picture.jpg", "wb")
editedImg.write(editedImgBytes)
editedImg.close()
Full documentation is also available here.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
More information about developing is available in documentation.
⚖️ License
Copyright (c) Panoramax team 2022-2024, released under MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file geopic_tag_reader-1.3.1.tar.gz
.
File metadata
- Download URL: geopic_tag_reader-1.3.1.tar.gz
- Upload date:
- Size: 36.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 475f8f25edadc8e293686f6ca336f2502134b335ad938ba354f6f2771b79eaba |
|
MD5 | ce35902f6f8cbd0c8ba6d25e0be9790e |
|
BLAKE2b-256 | 2c93c799a32b775239feb9eaf8c06474277d36dba40f658d6ac7c3424ba3a5bb |
File details
Details for the file geopic_tag_reader-1.3.1-py3-none-any.whl
.
File metadata
- Download URL: geopic_tag_reader-1.3.1-py3-none-any.whl
- Upload date:
- Size: 41.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9cb1ae8db83deb31be8a9223fec55c14a68e4bcdfda11c90e51aa20eb7cbb6ec |
|
MD5 | 905a97fcd8cc212246c1d00c0f5bc307 |
|
BLAKE2b-256 | 2bb5fb965d0346b3e33ddf2120197eb8d35b2548dbf93da8caa201d3388afeb4 |