Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GDAL CLI tools no longer supports Pleiades DIM .XML files. #10928

Closed
fnands opened this issue Oct 4, 2024 · 3 comments · Fixed by #10931
Closed

GDAL CLI tools no longer supports Pleiades DIM .XML files. #10928

fnands opened this issue Oct 4, 2024 · 3 comments · Fixed by #10931
Assignees

Comments

@fnands
Copy link

fnands commented Oct 4, 2024

What is the bug?

A pretty common use case for is is to merge Pleiades images (which often come split into sections) into a single raster using gdal_translate on the DIM file (essentially a virtual raster).
e.g.

gdal_translate DIM_PHR1A_MS_202401270518194_SEN_7037462101-2.XML merged_391.tif

This stopped working with GDAL 3.9.1 and now gives: ERROR 4: 'DIM_PHR1A_MS_202401270518194_SEN_7037462101-2.XML' not recognized as being in a supported file format.

It still works for 3.9.0, so the regression must have happened in between.

The same goes for gdalinfo.

Steps to reproduce the issue

Run gdal_translate or gdalinfo on any Pleiades DIM file.

Sample can be downloaded here: https://intelligence.airbus.com/imagery/sample-imagery/pleiades-bundle-primary-basic-colombo-sri-lanka/

Versions and provenance

Failing versions:

GDAL 3.9.1, released 2024/06/22

Installed via conda-forge:

    package                    |            build
    ---------------------------|-----------------
    gdal-3.9.1                 | py312h7eda2e2_13         1.6 MB  conda-forge
    libgdal-core-3.9.1         |      hba09cee_13         9.8 MB  conda-forge
    ------------------------------------------------------------

3.9.2 also fails.

Ubuntu 22.04.4 LTS

Additional context

I can't find anything in the changelog for 3.9.1 that seems like a smoking gun.

I'd be happy to help debug further if someone can point me at where to start.

@jratike80
Copy link
Collaborator

Works with OSGeo4W on Windows (also with GDAL 3.9.1, released 2024/06/22).

gdalinfo --version
GDAL 3.10.0dev-fc49ca7ce9, released 2024/07/31

C:\data\pleiades\7037462101>gdalinfo VOL_PHR.XML
Driver: DIMAP/SPOT DIMAP
Files: VOL_PHR.XML
       IMG_PHR1A_P_001\IMG_PHR1A_P_202401270518194_SEN_7037462101-1_R1C1.JP2
Size is 21261, 21456
Coordinate System is:
GEOGCRS["WGS 84",
    ENSEMBLE["World Geodetic System 1984 ensemble",
        MEMBER["World Geodetic System 1984 (Transit)"],
        MEMBER["World Geodetic System 1984 (G730)"],
...

@rouault
Copy link
Member

rouault commented Oct 4, 2024

@fnands I could reproduce. This is due to GDAL >= 3.9.1 conda-forge builds being more modular, and in particularly JPEG2000 support being available in a separate package. conda install -c conda-forge libgdal-jp2openjpeg==3.9.1 will fix your issue

I've also queued a enhancement/fix in #10931 so you can get an error message that will indicate you what to do. With it:

$ gdalinfo 7037462101/IMG_PHR1A_MS_002/DIM_PHR1A_MS_202401270518194_SEN_7037462101-2.XML
ERROR 4: `7037462101/IMG_PHR1A_MS_002/IMG_PHR1A_MS_202401270518194_SEN_7037462101-2_R1C1.JP2' not recognized as being in a supported file format. It could have been recognized by driver JP2OpenJPEG, but plugin gdal_JP2OpenJPEG.so is not available in your installation. You may install it with 'conda install -c conda-forge libgdal-jp2openjpeg'
gdalinfo failed - unable to open '7037462101/IMG_PHR1A_MS_002/DIM_PHR1A_MS_202401270518194_SEN_7037462101-2.XML'.

@rouault rouault self-assigned this Oct 4, 2024
@fnands
Copy link
Author

fnands commented Oct 4, 2024

@rouault , great, thanks for the quick response!

The verbose error message is helpful.
Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants