Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pycqa/isort
rev: 5.13.2
rev: 7.0.0
hooks:
- id: isort
args: ["--profile", "black"]
Expand Down
26 changes: 6 additions & 20 deletions imgparse/xmp_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

class XMPTags:
"""
Generic tags defaulting to an empty string.
Generic tags defaulting to an empty string or a common default.

If a sensor isn't supported for a given tag, the empty string will cause a KeyError
If a sensor isn't supported for a given tag, the empty string or common default will cause a KeyError
to be thrown, the same as if a valid tag wasn't found.
"""

Expand All @@ -14,12 +14,12 @@ class XMPTags:
PITCH: str = ""
YAW: str = ""
FOCAL_LEN: str = ""
WAVELENGTH_CENTRAL: str = ""
WAVELENGTH_FWHM: str = ""
BANDNAME: str = ""
WAVELENGTH_CENTRAL: str = "Camera:CentralWavelength"
WAVELENGTH_FWHM: str = "Camera:WavelengthFWHM"
BANDNAME: str = "Camera:BandName"
LRF_ALT: str = ""
LRF_ALT2: str = "" # See SenteraTags below
ILS: str = ""
ILS: str = "Camera:SunSensor"
HOMEPOINT_LAT: str = ""
HOMEPOINT_LON: str = ""
PRINCIPAL_POINT: str = ""
Expand All @@ -39,12 +39,8 @@ class SenteraTags(XMPTags):
PITCH = "Camera:Pitch"
YAW = "Camera:Yaw"
FOCAL_LEN = "Camera:PerspectiveFocalLength"
WAVELENGTH_CENTRAL = "Camera:CentralWavelength"
WAVELENGTH_FWHM = "Camera:WavelengthFWHM"
BANDNAME = "Camera:BandName"
LRF_ALT = "Sentera:AltimeterCalculatedAGL"
LRF_ALT2 = "Sentera:AltimeterCalcuatedAGL" # l was left out in Quad v1.0.0
ILS = "Camera:SunSensor"
HOMEPOINT_LAT = "SENTERA:HomePointLatitude"
HOMEPOINT_LON = "SENTERA:HomePointLongitude"
PRINCIPAL_POINT = "Camera:PrincipalPoint"
Expand All @@ -61,11 +57,7 @@ class DJITags(XMPTags):
PITCH = "drone-dji:GimbalPitchDegree"
YAW = "drone-dji:GimbalYawDegree"
FOCAL_LEN = "drone-dji:CalibratedFocalLength"
WAVELENGTH_CENTRAL = "Camera:CentralWavelength"
WAVELENGTH_FWHM = "Camera:WavelengthFWHM"
BANDNAME = "Camera:BandName"
SELF_DATA = "drone-dji:SelfData"
ILS = "Camera:SunSensor"
IRRADIANCE = "Camera:Irradiance"
CAPTURE_UUID = "drone-dji:CaptureUUID"
DEWARP_FLAG = "drone-dji:DewarpFlag"
Expand All @@ -75,17 +67,11 @@ class DJITags(XMPTags):
class MicaSenseTags(XMPTags):
"""MicaSense XMP Tags."""

WAVELENGTH_CENTRAL = "Camera:CentralWavelength"
WAVELENGTH_FWHM = "Camera:WavelengthFWHM"
BANDNAME = "Camera:BandName"
CAPTURE_UUID = "MicaSense:CaptureId"
IRRADIANCE = "Camera:Irradiance"


class ParrotTags(XMPTags):
"""Parrot XMP Tags."""

WAVELENGTH_CENTRAL = "Camera:CentralWavelength"
WAVELENGTH_FWHM = "Camera:WavelengthFWHM"
BANDNAME = "Camera:BandName"
CAPTURE_UUID = "Camera:CaptureUUID"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "imgparse"
version = "2.0.7"
version = "2.0.8"
description = "Python image-metadata-parser utilities"
authors = []
include = [
Expand Down