Skip to content

Commit 513294e

Browse files
committed
Add geometry, datetime precision, timezone, GPS
Extend cross-family concept resolution with Geometry support and richer DateTime/GPS metadata. Adds MetadataConceptKind::Geometry and new roles (Crop, ActiveArea, Border, SensorGeometry); candidate fields for origin/size/rect/margins and geometry keying; and logic to extract geometry candidates from interpretation/query records. Introduces date/time precision and timezone enums plus helpers to parse/attach precision and UTC/offset/local classification. Adds GPS altitude-reference detection (EXIF/XMP), below-sea-level state, and propagates altitude reference entries into candidates. Updates Python bindings, tests, and documentation/CHANGES to expose the new fields and behaviors.
1 parent 091027e commit 513294e

15 files changed

Lines changed: 706 additions & 102 deletions

CHANGES.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,13 @@ Changes compared with `0.4.8`.
106106
resolution for orientation, date/time, color/profile, and GPS candidates
107107
across EXIF, XMP, IPTC, ICC, and PNG text where applicable, including source
108108
families, candidate source entries, preferred entries, normalized compare
109-
keys, parsed date/time fields, combined GPS date/time candidates, and
110-
same-role conflict flags.
109+
keys, parsed date/time fields, timezone/precision classification, combined
110+
GPS date/time candidates, GPS altitude-reference state, and same-role
111+
conflict flags.
112+
- Extended cross-family concept resolution with geometry candidates for crop,
113+
active area, border, and sensor-geometry records. Geometry candidates expose
114+
canonical origin, size, rect, and margin fields when the query/interpretation
115+
layer can normalize them.
111116
- Semantic crop queries now expose canonical border-margin candidates for
112117
parseable border/padding XMP text, DNG masked-area candidates, and Phase
113118
One/Leaf geometry margins.

docs/api_stability.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ different status.
2626
| EXIF/TIFF/DNG numeric value names: `exif_tag_numeric_value_name(...)` and focused helpers | `openmeta/exif_value_names.h` | Stable | Small helper contract for common enum-like TIFF/EXIF/DNG numeric values such as compression, photometric interpretation, planar configuration, exposure program, metering mode, light source, flash, color space, white balance, scene capture type, gain control, CFA layout, and DNG calibration illuminants. Unknown values return an empty string and remain lossless numeric metadata. |
2727
| Semantic metadata query: `query_metadata(...)`, `query_crop_metadata(...)`, focused query helpers, and `metadata_query_fuzzy_search_available()` | `openmeta/metadata_query.h` | Experimental | Query contract for inspection matches plus normalized candidates. Current coverage includes crop/active-area/border margins, exposure/gain, white balance, color, lens correction, orientation, and RAW/source-processing metadata across standard tags, selected DNG tags, fuzzy XMP paths, and vendor RAW-processing classification. Matches report `exact_match`, `fuzzy_match`, and `fuzzy_score` so tools can label exact results separately from RapidFuzz near-miss hits. `OPENMETA_ENABLE_RAPIDFUZZ=ON` adds optional near-miss XMP/property-path scoring. Grouped candidates include `matrix_set`, `vector_set`, and `table` shapes for related non-crop metadata, including RAW black/white levels, linearization, CFA/sensor layout, source geometry, raw-storage identifiers, and source-processing buckets. Python `Document` and `TransferSourceSnapshot` mirror this as thin dictionary-returning wrappers. |
2828
| Structured metadata interpretation records: `interpret_metadata(...)`, `interpret_metadata_query(...)` | `openmeta/metadata_interpretation.h` | Experimental | Thin structured projection over semantic query candidates. Records carry query class, semantic kind, normalized shape, confidence, source entry ids, and normalized origin/size/rect/margins/value arrays where available. Current scope covers orientation, geometry/crop/border, exposure/gain, color/white-balance, lens-correction, and RAW/source-processing records. Python `Document` and `TransferSourceSnapshot` expose matching dictionary wrappers. |
29-
| Cross-family concept resolution: `resolve_metadata_concepts(...)`, `resolve_metadata_concept(...)` | `openmeta/metadata_concepts.h` | Experimental | First bounded resolver for duplicated host-facing concepts. Current scope reports candidates, candidate source entries, source families, preferred entries, normalized numeric/text keys, normalized date/time fields, and same-role conflicts for orientation, date/time, color/profile, and GPS evidence across EXIF, XMP, IPTC, ICC, and PNG text where applicable. GPS date/time is combined from `GPSDateStamp` plus `GPSTimeStamp` when both entries exist. It is intended for inspection UI and host policy decisions; it does not rewrite metadata or hide ambiguity. Python `Document` and `TransferSourceSnapshot` expose matching dictionary wrappers. |
29+
| Cross-family concept resolution: `resolve_metadata_concepts(...)`, `resolve_metadata_concept(...)` | `openmeta/metadata_concepts.h` | Experimental | First bounded resolver for duplicated host-facing concepts. Current scope reports candidates, candidate source entries, source families, preferred entries, normalized numeric/text keys, normalized date/time fields, date/time precision, timezone kind, normalized geometry fields, and same-role conflicts for orientation, date/time, color/profile, GPS, and geometry evidence across EXIF, XMP, IPTC, ICC, PNG text, and query-backed interpretation records where applicable. Geometry candidates cover crop, active area, border, and sensor geometry with canonical origin, size, rect, and margin fields when available. GPS date/time is combined from `GPSDateStamp` plus `GPSTimeStamp` when both entries exist, and GPS altitude candidates expose altitude-reference code plus below-sea-level state when reference metadata is present. It is intended for inspection UI and host policy decisions; it does not rewrite metadata or hide ambiguity. Python `Document` and `TransferSourceSnapshot` expose matching dictionary wrappers. |
3030
| Vendor RAW-processing summaries: `vendor_raw_processing_from_store(...)`, `classify_vendor_raw_processing_field(...)` | `openmeta/vendor_raw_processing.h` | Experimental | Conservative grouped source-RAW/source-processing field summaries for decoded Sony, Canon, Nikon, Fujifilm, Pentax, Panasonic, Olympus, Kodak, Minolta, Sigma, Samsung, Ricoh, Apple, DJI, Google, FLIR, Casio, Sanyo, KyoceraRaw, Reconyx, HP, JVC, GE, Motorola, Nintendo, and Microsoft MakerNotes, including vendor-private, computational, thermal, preview, face-geometry, stitch/panorama, Apple computational capture/HDR/motion, DJI pose/thermal, Google HDR+/shot-log, and FLIR radiometric/raw-value buckets. Intended for audit/UI and rendered-transfer safety decisions, not for writing vendor RAW/source-processing values into rendered targets. |
3131
| Transfer safety audit: `transfer_safety_audit_from_store(...)` | `openmeta/metadata_transfer.h` | Experimental | Preflight summary of source entries and entries filtered or invalidated by `TransferSafetyMode`, including Sony/Canon/Nikon/Fujifilm/Pentax/Panasonic/Olympus/Kodak/Minolta/Sigma/Samsung/Ricoh/Apple/DJI/Google/FLIR/Casio/Sanyo/KyoceraRaw/Reconyx/HP/JVC/GE/Motorola/Nintendo/Microsoft RAW/source-processing buckets. Intended for diagnostics and host UI before preparing rendered-image transfers. |
3232
| Raw-carrier passthrough audit: `raw_carrier_passthrough_audit_from_snapshot(...)` | `openmeta/metadata_transfer.h` | Experimental | Diagnostic preflight for opt-in raw carriers. Reports candidate carriers and primary block reasons such as missing payload, target incompatibility, safety filtering, content-bound C2PA, explicit profile policy, missing decoded-entry links, or unsupported carrier kind. Hosts can call it directly before enabling snapshot passthrough. |

docs/development.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,13 @@ into records with query class, semantic kind, normalized shape, confidence,
6464
source entries, and normalized geometry/value arrays where available.
6565

6666
For cross-family duplicated concepts, use `openmeta/metadata_concepts.h`.
67-
It currently resolves orientation, date/time, color/profile, and GPS into
68-
candidate lists with candidate source entries, source families, preferred
69-
entries, normalized compare keys, parsed date/time fields, and same-role
70-
conflict flags. This is deliberately an inspection/policy surface; host code
71-
still decides whether a conflict should be shown, ignored, or corrected during
72-
editing/transfer.
67+
It currently resolves orientation, date/time, color/profile, GPS, and geometry
68+
into candidate lists with candidate source entries, source families, preferred
69+
entries, normalized compare keys, parsed date/time fields, date/time precision,
70+
timezone kind, GPS altitude-reference state, canonical geometry
71+
origin/size/rect/margins, and same-role conflict flags. This is deliberately an
72+
inspection/policy surface; host code still decides whether a conflict should be
73+
shown, ignored, or corrected during editing/transfer.
7374

7475
## Build Prerequisites
7576

docs/host_integration.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,14 @@ confidence, and normalized geometry/value arrays.
5050

5151
For host code that needs to reconcile duplicated concepts across metadata
5252
families, use `metadata_concepts.h`. It reports orientation, date/time,
53-
color/profile, and GPS candidates with source families, preferred entries, and
54-
same-role conflict flags. Date/time candidates include parsed date/time fields
55-
when the source value is recognizable, and GPS timestamps combine
56-
`GPSDateStamp` with `GPSTimeStamp` when both are present. Treat this as an
53+
color/profile, GPS, and geometry candidates with source families, preferred
54+
entries, and same-role conflict flags. Geometry candidates expose crop,
55+
active-area, border, and sensor-geometry roles with canonical origin, size,
56+
rect, and margin fields when available. Date/time candidates include parsed
57+
date/time fields when the source value is recognizable, plus precision and
58+
timezone-kind fields. GPS timestamps combine `GPSDateStamp` with
59+
`GPSTimeStamp` when both are present, and GPS altitude candidates report
60+
whether `GPSAltitudeRef` marked the height as below sea level. Treat this as an
5761
inspection and policy input rather than an automatic metadata rewrite decision.
5862

5963
## Adapter Classes
@@ -79,7 +83,7 @@ OpenMeta splits host integration surfaces deliberately:
7983
`metadata_interpretation.h` for query-backed semantic records
8084
- concept-resolution utility:
8185
`metadata_concepts.h` for cross-family orientation, date/time, color/profile,
82-
and GPS conflict inspection
86+
GPS, and geometry conflict inspection
8387

8488
## 1. Read Into `MetaStore`
8589

docs/interpretation_status.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ explicit outcome:
4040
| Vendor MakerNotes | Broad MakerNote naming and source-processing classification exists for common vendors and several live computational/thermal vendors. Unknown entries remain lossless and source-private subgroups distinguish preview, face geometry, computational, thermal, and stitch/panorama data. | Medium-high, about 75-85%. | ExifTool-style long-tail print conversions, encrypted/custom settings, and per-model private tables. |
4141
| BMFF item graph, HEIF/AVIF/CR3, JUMBF, and C2PA | BMFF derived fields, item-info rows, bounded relations, primary-linked roles, aux semantics, and draft C2PA/JUMBF structural fields are exposed. | Medium, about 60-70%. | Full BMFF scene modeling and full C2PA manifest/policy semantics. |
4242
| Photoshop IRB | Raw resources are preserved and a bounded interpreted subset is decoded for fixed-layout resources. | Medium, about 60-70%. | Broader resource-specific interpretation. |
43-
| Semantic query/search and records | Query helpers expose raw matches, confidence, provenance, value shapes, normalized candidates, canonical crop/active-area rectangles, border margins, source-processing buckets, optional RapidFuzz near-miss matching, structured interpretation records, and first bounded cross-family concept resolution for orientation, date/time, color/profile, and GPS with parsed date/time fields and combined GPS timestamps. | Medium, about 52-60%. | More canonical shapes, deeper GPS/date normalization, and richer per-record host policy hints. |
43+
| Semantic query/search and records | Query helpers expose raw matches, confidence, provenance, value shapes, normalized candidates, canonical crop/active-area rectangles, border margins, source-processing buckets, optional RapidFuzz near-miss matching, structured interpretation records, and first bounded cross-family concept resolution for orientation, date/time, color/profile, GPS, and geometry with parsed date/time fields, timezone/precision classification, combined GPS timestamps, GPS altitude-reference state, and canonical geometry origin/size/rect/margins. | Medium, about 58-65%. | More canonical shapes for color/lens/RAW-processing records, richer GPS coordinate/reference policy, and richer per-record host policy hints. |
4444
| Transfer-safety classification | Compatible-file versus rendered-image safety policies classify source-specific image geometry, color/profile, RAW-processing, MakerNote, JUMBF/C2PA, and vendor-private data. | High, about 85-90%. | More user-facing diagnostics and additional per-family policy tests. |
4545

4646
## Competitor Position
@@ -58,10 +58,11 @@ outputs.
5858
## Next Interpretation Priorities
5959

6060
1. Expand cross-family concept resolution beyond the current orientation,
61-
date/time, color/profile, and GPS pass, especially richer timezone, GPS
62-
altitude/reference, and host policy hints.
63-
2. Add more canonical record shapes for vendor geometry, color, lens
64-
correction, and RAW-processing groups.
61+
date/time, color/profile, GPS, and geometry pass, especially richer GPS
62+
coordinate validation, altitude unit/reference policy, and host policy
63+
hints.
64+
2. Add more canonical record shapes for vendor color, lens correction, and
65+
RAW-processing groups.
6566
3. Expand MakerNote meaning depth in vendor order: Nikon, Canon, Sony,
6667
Fujifilm, Phase One/Leaf, then remaining active vendors.
6768
4. Deepen BMFF/CR3/HEIF/AVIF item graph semantics only where hosts can use the

docs/quick_start.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,11 @@ rect/margin/value arrays where available.
163163

164164
For duplicated concepts that may appear in multiple metadata families, use
165165
`openmeta/metadata_concepts.h`. The first experimental resolver covers
166-
orientation, date/time, color/profile, and GPS. It returns candidate source
167-
entries, source families, preferred entries, normalized date/time fields where
168-
available, and same-role conflict flags so host UI can show ambiguity instead
169-
of guessing silently.
166+
orientation, date/time, color/profile, GPS, and geometry. It returns candidate
167+
source entries, source families, preferred entries, normalized date/time fields
168+
where available, date/time precision, timezone kind, GPS altitude-reference
169+
state, canonical geometry origin/size/rect/margins, and same-role conflict
170+
flags so host UI can show ambiguity instead of guessing silently.
170171

171172
For user-facing orientation display, use `openmeta/orientation.h` instead of
172173
showing only the numeric EXIF/TIFF index. `interpret_exif_orientation(...)`

docs/sphinx/api_stability.rst

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,19 @@ Host-facing API map
129129
- First bounded resolver for duplicated host-facing concepts. Current
130130
scope reports candidates, candidate source entries, source families,
131131
preferred entries, normalized numeric/text keys, normalized date/time
132-
fields, and same-role conflicts for orientation, date/time,
133-
color/profile, and GPS evidence across EXIF, XMP, IPTC, ICC, and PNG
134-
text where applicable. GPS date/time is combined from ``GPSDateStamp``
135-
plus ``GPSTimeStamp`` when both entries exist. It is intended for
136-
inspection UI and host policy decisions; it does not rewrite metadata or
137-
hide ambiguity. Python ``Document`` and ``TransferSourceSnapshot``
138-
expose matching dictionary wrappers.
132+
fields, date/time precision, timezone kind, normalized geometry fields,
133+
and same-role conflicts for orientation, date/time, color/profile, GPS,
134+
and geometry evidence across EXIF, XMP, IPTC, ICC, PNG text, and
135+
query-backed interpretation records where applicable. Geometry
136+
candidates cover crop, active area, border, and sensor geometry with
137+
canonical origin, size, rect, and margin fields when available. GPS
138+
date/time is combined from ``GPSDateStamp`` plus ``GPSTimeStamp`` when
139+
both entries exist, and GPS altitude candidates expose
140+
altitude-reference code plus below-sea-level state when reference
141+
metadata is present. It is intended for inspection UI and host policy
142+
decisions; it does not rewrite metadata or hide ambiguity. Python
143+
``Document`` and
144+
``TransferSourceSnapshot`` expose matching dictionary wrappers.
139145
* - Vendor RAW-processing summaries:
140146
``vendor_raw_processing_from_store(...)``,
141147
``classify_vendor_raw_processing_field(...)``

docs/sphinx/development.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,13 @@ confidence, source entries, and normalized geometry/value arrays where
106106
available.
107107

108108
For cross-family duplicated concepts, use ``openmeta/metadata_concepts.h``.
109-
It currently resolves orientation, date/time, color/profile, and GPS into
110-
candidate lists with candidate source entries, source families, preferred
111-
entries, normalized compare keys, parsed date/time fields, and same-role
112-
conflict flags. This is deliberately an inspection/policy surface; host code
113-
still decides whether a conflict should be shown, ignored, or corrected during
114-
editing/transfer.
109+
It currently resolves orientation, date/time, color/profile, GPS, and geometry
110+
into candidate lists with candidate source entries, source families, preferred
111+
entries, normalized compare keys, parsed date/time fields, date/time precision,
112+
timezone kind, GPS altitude-reference state, canonical geometry
113+
origin/size/rect/margins, and same-role conflict flags. This is deliberately an
114+
inspection/policy surface; host code still decides whether a conflict should be
115+
shown, ignored, or corrected during editing/transfer.
115116

116117
Read-path coverage snapshot
117118
---------------------------

docs/sphinx/host_integration.rst

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,16 @@ entries, confidence, and normalized geometry/value arrays.
5656

5757
For host code that needs to reconcile duplicated concepts across metadata
5858
families, use ``metadata_concepts.h``. It reports orientation, date/time,
59-
color/profile, and GPS candidates with source families, preferred entries, and
60-
same-role conflict flags. Date/time candidates include parsed date/time fields
61-
when the source value is recognizable, and GPS timestamps combine
62-
``GPSDateStamp`` with ``GPSTimeStamp`` when both are present. Treat this as an
63-
inspection and policy input rather than an automatic metadata rewrite decision.
59+
color/profile, GPS, and geometry candidates with source families, preferred
60+
entries, and same-role conflict flags. Geometry candidates expose crop,
61+
active-area, border, and sensor-geometry roles with canonical origin, size,
62+
rect, and margin fields when available. Date/time candidates include parsed
63+
date/time fields when the source value is recognizable, plus precision and
64+
timezone-kind fields. GPS timestamps combine ``GPSDateStamp`` with
65+
``GPSTimeStamp`` when both are present, and GPS altitude candidates report
66+
whether ``GPSAltitudeRef`` marked the height as below sea level. Treat this as
67+
an inspection and policy input rather than an automatic metadata rewrite
68+
decision.
6469

6570
Adapter classes
6671
---------------
@@ -87,7 +92,7 @@ OpenMeta splits host integration surfaces deliberately:
8792
``metadata_interpretation.h`` for query-backed semantic records
8893
- concept-resolution utility:
8994
``metadata_concepts.h`` for cross-family orientation, date/time,
90-
color/profile, and GPS conflict inspection
95+
color/profile, GPS, and geometry conflict inspection
9196

9297
Read and query
9398
--------------

0 commit comments

Comments
 (0)