domlysz / BlenderGIS

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

Import georeferenced jp2 #684

Open plutext opened 2 years ago

plutext commented 2 years ago

Blender and OS versions

Blender 3.1.2 on Windows

Describe the bug

Can't import a jp2 file; error is Unable to read georef infos from worldfile or geotiff tags

The georef info is in the jp2 file. Could BlenderGIS instead read it from a worldfile?

How to Reproduce

Error message

INFO:BlenderGIS-225:92:###### Starting new Blender session : 2022-05-22 19:29:02 DEBUG:BlenderGIS-225.core.checkdeps:9:GDAL Python binding unavailable DEBUG:BlenderGIS-225.core.checkdeps:20:PyProj unavailable DEBUG:BlenderGIS-225.core.checkdeps:31:Pillow unavailable DEBUG:BlenderGIS-225.core.checkdeps:46:ImageIO Freeimage plugin available ERROR:BlenderGIS-225.operators.io_import_georaster:259:Unable to open raster Traceback (most recent call last): File "C:\Users\jharr\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\BlenderGIS-225\operators\io_import_georaster.py", line 257, in execute rast = bpyGeoRaster(filePath) File "C:\Users\jharr\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\BlenderGIS-225\operators\utils\georaster_utils.py", line 223, in init GeoRaster.init(self, path, subBoxGeo=subBoxGeo, useGDAL=useGDAL) File "C:\Users\jharr\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\BlenderGIS-225\core\georaster\georaster.py", line 90, in init raise IOError("Unable to read georef infos from worldfile or geotiff tags") OSError: Unable to read georef infos from worldfile or geotiff tags

domlysz commented 1 year ago

yes for the momeent the addon can't read georef infos form a jpeg2000 file header, but it should if there is a worldfile. You have to generate it.