domlysz / BlenderGIS

Blender addons to make the bridge between Blender and geographic data
GNU General Public License v3.0
7.73k stars 1.35k forks source link

Import georef file filter does not display JP2 #808

Open RIFJo opened 1 year ago

RIFJo commented 1 year ago

Blender and OS versions

Blender 3.5, Win64 Pro, BlenderGIS-228

Describe the bug

The menu GIS->Import->Georeferenced raster indicates the option to import .JP2 (JPEG2000) files. However, the file-open dialog that opens does not show files ending with .jp2 / .JP2

I am trying to import a JP2 georaster of the moon from here: https://pgda.gsfc.nasa.gov/products/54

How to Reproduce

GIS->Import->Georeferenced raster navigate to folder with .jp2 file => file is not shown

Error message

n.a.

RIFJo commented 1 year ago

looking into the code of operators/io_import_georaster.py, i see that the jp2 extension is missing:

    # ImportHelper class properties
    filter_glob: StringProperty(
            default="*.tif;*.jpg;*.jpeg;*.png;*.bmp",
            options={'HIDDEN'},
            )

Extending the list lets me list and open the file, but then an error occurs (unable to open raster, check logs for more infos)