Skip to main content

GeoPicTagReader

Project description

Panoramax 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 is 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 independently from other 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 simple command
  • 💻 Use it as either 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 from both the command-line or as a 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 the metadata of a single picture, for example to 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geopic_tag_reader-1.10.0.tar.gz (114.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geopic_tag_reader-1.10.0-py3-none-any.whl (152.3 kB view details)

Uploaded Python 3

File details

Details for the file geopic_tag_reader-1.10.0.tar.gz.

File metadata

  • Download URL: geopic_tag_reader-1.10.0.tar.gz
  • Upload date:
  • Size: 114.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.5

File hashes

Hashes for geopic_tag_reader-1.10.0.tar.gz
Algorithm Hash digest
SHA256 3d6f48fa0b1a00edb0cef19fc5d807c0fddad5ec0f6b43f8af60f956769b7e48
MD5 64e6c16ac243cfd01edaee52879557f2
BLAKE2b-256 d8b4d7bd47280d8e96b9e0247a40a8bd16bf2b887b08c03f32a029121635d815

See more details on using hashes here.

File details

Details for the file geopic_tag_reader-1.10.0-py3-none-any.whl.

File metadata

File hashes

Hashes for geopic_tag_reader-1.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c2b222f5377cb803bacebb7a243c169b4e02810a7cf17537dc9fe31b7110af1e
MD5 68bfcc57c089ab48b64ecf1474d7973b
BLAKE2b-256 20c356b706e0f9272c2af02ee4ecd3b29f854c612f9e097fccef71c03bb831ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page