Skip to content
Snippets Groups Projects

Resolve "Get image metadata as dict"

Merged Rémi Cresson requested to merge 49-metadata into develop
All threads resolved!

Closes #49 (closed)

The returned app.metadata returns something like:

{
    "AREA_OR_POINT": "Area",
    "DataType": 1.0,
    "DriverLongName": "GeoTIFF",
    "DriverShortName": "GTiff",
    "GeoTransform": [
        760056.0,
        6.0,
        0.0,
        6946092.0,
        0.0,
        -6.0
    ],
    "LowerLeftCorner": [
        760056.0,
        6944268.0
    ],
    "LowerRightCorner": [
        761562.0,
        6944268.0
    ],
    "ProjectionRef": "PROJCS[\"RGF93 v1 / Lambert-93\",\n...AUTHORITY[\"EPSG\",\"2154\"]]",
    "ResolutionFactor": 0,
    "SubDatasetIndex": 0,
    "TIFFTAG_SOFTWARE": "CSinG - 13 SEPTEMBRE 2012",
    "TileHintX": 251.0,
    "TileHintY": 8.0,
    "UpperLeftCorner": [
        760056.0,
        6946092.0
    ],
    "UpperRightCorner": [
        761562.0,
        6946092.0
    ]
}

Merge request reports

Merge request pipeline #13380 passed

Merge request pipeline passed for 49124271

Merged by Rémi CressonRémi Cresson 1 year ago (Jun 28, 2023 1:16pm UTC)

Loading

Pipeline #13388 passed

Pipeline passed for abdeb793 on develop

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Rémi Cresson added 1 commit

    added 1 commit

    • e03489e7 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Rémi Cresson resolved all threads

    resolved all threads

  • Vincent Delbar approved this merge request

    approved this merge request

  • Vincent Delbar unapproved this merge request

    unapproved this merge request

  • There is still a failure case ( I tried with a random image ):

    >>> img = pyotb.Input(r"C:\Users\vince\Geom\SDGSAT\KX10_GIU_20211106_E3.68_N48.11_202200120793_L4A_A_PXS.tif")
    2023-06-28 11:19:51 (INFO): Loading metadata from official product
    2023-06-28 11:19:51 (INFO): Loading metadata from official product
    >>> img.metadata
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "C:\Users\vince\Code\git\pyotb\pyotb\core.py", line 65, in metadata
        splits = val.split("=")
    AttributeError: 'int' object has no attribute 'split'
  • Rémi Cresson added 1 commit

    added 1 commit

    • bb736175 - ADD: process metadata values other that str

    Compare with previous version

  • Vincent Delbar approved this merge request

    approved this merge request

  • Rémi Cresson added 1 commit

    added 1 commit

    • 49124271 - ADD: process metadata values other that str

    Compare with previous version

  • Vincent Delbar resolved all threads

    resolved all threads

  • Rémi Cresson mentioned in commit abdeb793

    mentioned in commit abdeb793

  • merged

  • Vincent Delbar mentioned in merge request !86 (merged)

    mentioned in merge request !86 (merged)

  • Please register or sign in to reply
    Loading