Error Could not create GDALDataset

158 views
Skip to first unread message

Girish Kumar

unread,
Nov 20, 2017, 7:21:53 AM11/20/17
to rsgislib...@googlegroups.com
Hi all,

         I have installed rsgislib on a virtual machine running RHEL 7 . After installing, when I have tried to run a python program to mosaic two images, it gives the following error Could not create GDALDataset(in  imageutils.resampleImage2Match function) .  Even I have run conda update -c conda-forge --all  also. Then also the same error is coming.The data is fine.

I have changed the data, now the following error is coming
/miniconda3/envs/gk/lib/python3.5/site-packages/rsgislib/imageutils/__init__.py", line 281, in resampleImage2Match
    raise Exception("Data type of the input file was not recognised or known.")
Exception: Data type of the input file was not recognised or known.

 I think it is something related to GDAL. Kindly help to resolve the issue.


I have tried to install it fresh, in virtual machine running RHEL 7, I have used the following command

conda config --add channels conda-forge
conda install rsgislib

I am able to use import rsgislib but while importing imageutis, error is coming 

>>> from rsgislib import imageutils
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/gk/miniconda3/envs/arcsi_2_2/lib/python3.6/site-packages/rsgislib/imageutils/__init__.py", line 6, in <module>
    from ._imageutils import *
ImportError: libopenblas.so.0: cannot open shared object file: No such file or directory

 
Kindly help to resolve the issue


Thanks and regards
Girish

Girish Kumar

unread,
Nov 29, 2017, 2:52:49 AM11/29/17
to RSGISLib Support
Hi all,

I was able to solve the issue by installing the latest version in a new VM running RHEL.
I want to mosaic satellite imagery. When I used the rsgislib.imageutils.createImageMosaic function , it gives the error as not all the bands are of the same resolution, even though the images are of same type. I have used GDAL utility gdal_merge.py, and I was able to run the same images without errors. Why this error is coming in rsgislib?
Also I have tried to do reprojection of image using rsgislib.imageutils.reprojectImage, it is giving error.


Thanks and Regards
Girish

Peter Bunting

unread,
Nov 29, 2017, 3:36:31 AM11/29/17
to Girish Kumar, RSGISLib Support
Hi Girish, 

Some of your input images will be at different image resolutions (i.e., pixel size). You can use gdalinfo to check - if you’re images are in degrees it maybe a rounding issue and then you can use rsgislib.imageutils.assignSpatialInfo to define all your images to exactly the same. If they are different resolutions then gdal_merge.py must be doing some resampling on the fly (which using VRTs gdal can do). We don’t do on the fly resampling as we’d like people to make a proper decision about what resampling (or projection definition if it is a rounding error) should be performed. 

Best wishes, 

Pete

****************************************************
* Dr Pete Bunting
* Reader in Remote Sensing
* Earth Observation and Ecosystem Dynamics Group
* Department of Geography and Earth Sciences
* Aberystwyth University
* Aberystwyth
* Ceredigion
* SY23 3DB
* UK

* Ph: +44 (0) 1970 622615
* Mob: +44 (0) 7917 842743
* Email: p...@aber.ac.uk
* ORCID: http://orcid.org/0000-0002-7435-0148
****************************************************
"Please consider the environment before printing this email or any documents attached”

--
You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-suppo...@googlegroups.com.
To post to this group, send email to rsgislib...@googlegroups.com.
Visit this group at https://groups.google.com/group/rsgislib-support.
For more options, visit https://groups.google.com/d/optout.

Girish Kumar

unread,
Nov 29, 2017, 5:55:55 AM11/29/17
to Peter Bunting, RSGISLib Support
Hi Peter,

       Thanks for your quick response. I will try the assignSpatialInfo before doing mosaic.



With Warm Regards
T P Girish Kumar

To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-support+unsubscribe@googlegroups.com.
To post to this group, send email to rsgislib-support@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages