"Image Not Found"

80 views
Skip to first unread message

Amanda Rumsey

unread,
Aug 14, 2016, 2:24:11 PM8/14/16
to RSGISLib Support

Hello,

I am trying to compute surface reflectance for a LS8 scene but I am receiving errors when running the arcsi.py code. 

I am running the following code:

arcsi.py -s ls8 -f KEA --stats -p RAD TOA SREF --aeropro Maritime --atmospro MidlatitudeSummer --aot 0.25 --surfacealtitude 0.4 -o /Users/amandarumsey/Desktop/images/Inputs/LC80160352014345LGN00/output -i /Users/amandarumsey/Desktop/images/Inputs/LC80160352014345LGN00/LC80160352014345LGN00_MTL.txt 


and am getting the following errors:

Traceback (most recent call last):

  File "/Users/amandarumsey/anaconda/bin/arcsi.py", line 52, in <module>

    from arcsilib.arcsiutils import ARCSIUtils

  File "/Users/amandarumsey/anaconda/lib/python2.7/site-packages/arcsilib/arcsiutils.py", line 42, in <module>

    import osgeo.gdal as gdal

  File "/Users/amandarumsey/anaconda/lib/python2.7/site-packages/osgeo/__init__.py", line 21, in <module>

    _gdal = swig_import_helper()

  File "/Users/amandarumsey/anaconda/lib/python2.7/site-packages/osgeo/__init__.py", line 17, in swig_import_helper

    _mod = imp.load_module('_gdal', fp, pathname, description)

ImportError: dlopen(/Users/amandarumsey/anaconda/lib/python2.7/site-packages/osgeo/_gdal.so, 2): Library not loaded: @rpath/./libproj.0.dylib

  Referenced from: /Users/amandarumsey/anaconda/lib/libgdal.1.dylib

  Reason: image not found


Is this an installation issue with new versions of python? I am using python 2.7.12? 


Daniel Clewley

unread,
Aug 14, 2016, 2:48:56 PM8/14/16
to Amanda Rumsey, RSGISLib Support
Hi Amanda,

From the path I’m guessing you are running on OS X. 

You need to use Python 3 rather than 2.7. We have built binaries for Python 2.7 but the main builds are for Python 3.

You can create a new environment with the Python 3 build using the following steps:

conda update conda
conda clean --tar --packages --yes
conda create -n arcsi_env -c osgeo rsgislib arcsi tuiview python=3.5
source activate arcsi_env
export GDAL_DRIVER_PATH=/Users/danclewley/Applications/anaconda/envs/arcsi_env/lib/gdalplugins

I’ve just tested on my Mac and these steps work for me.

Note we have started to use the conda-forge (https://conda-forge.github.io/) channel rather for a lot of the RSGISLib prerequisites rather than building everything ourselves but we haven’t got all the packages build for OS X yet. If you were running Linux you should install using:

conda create -n arcsi_env -c conda-forge -c osgeo rsgislib arcsi tuiview python=3.5

Thanks,

Dan

--
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.

Amanda Rumsey

unread,
Aug 14, 2016, 3:50:11 PM8/14/16
to RSGISLib Support, aru...@bu.edu
Hey Dan, 

Thank you for your quick response. I really appreciate it. By creating the new environment with the python 3 builds, do I still need to install anaconda/python 3? I haven't downloaded python 3 yet, but I created the new environment and I am now getting the following error:

Reading header file

Extracting Header Values

ERROR 4: Unable to open EPSG support file gcs.csv.

Try setting the GDAL_DATA environment variable to point to the

directory containing EPSG csv files.

ERROR 4: Unable to open EPSG support file gcs.csv.

Try setting the GDAL_DATA environment variable to point to the

directory containing EPSG csv files.

ERROR 6: No translation for an empty SRS to PROJ.4 format is known.


Image Base Name: LS8_20141211_lat39895500lon6573000_r35p16


Converting to Radiance

Opening: /Users/amandarumsey/Desktop/images/Inputs/LC80160352014345LGN00/LC80160352014345LGN00_B1.TIF

Opening: /Users/amandarumsey/Desktop/images/Inputs/LC80160352014345LGN00/LC80160352014345LGN00_B2.TIF

Opening: /Users/amandarumsey/Desktop/images/Inputs/LC80160352014345LGN00/LC80160352014345LGN00_B3.TIF

Opening: /Users/amandarumsey/Desktop/images/Inputs/LC80160352014345LGN00/LC80160352014345LGN00_B4.TIF

Opening: /Users/amandarumsey/Desktop/images/Inputs/LC80160352014345LGN00/LC80160352014345LGN00_B5.TIF

Opening: /Users/amandarumsey/Desktop/images/Inputs/LC80160352014345LGN00/LC80160352014345LGN00_B6.TIF

Opening: /Users/amandarumsey/Desktop/images/Inputs/LC80160352014345LGN00/LC80160352014345LGN00_B7.TIF

Error: Requested GDAL driver does not exists.



By building the new environment, did that modify GDAL>

Thanks,
Amanda

Daniel Clewley

unread,
Aug 14, 2016, 4:19:36 PM8/14/16
to Amanda Rumsey, RSGISLib Support
Hi Amanda,

You don’t need to install the Python 2.7 version of anaconda, conda allows you to have different versions of Python installed in different environments and switch between them.

Sorry, I forgot you also need to set the path to GDAL_DATA, try:

export GDAL_DATA=~/anaconda/envs/arcsi_env/share/gdal

Also if you didn’t already figure it out from the commands in the previous email you need to change the path for ‘GDAL_DRIVER_PATH’ for your username and where you have anaconda installed. The command below should work for you:

export GDAL_DRIVER_PATH=~/anaconda/envs/arcsi_env/lib/gdalplugins

Note, you will need to set these every time you open a new terminal window or you can add them to your .bash_profile. For example using the following commands:

echo export GDAL_DRIVER_PATH=~/anaconda/envs/arcsi_env/share/gdal >> ~/.bash_profile
echo export GDAL_DATA=~/anaconda/envs/arcsi_env/share/gdal >> ~/.bash_profile

Thanks,

Dan

Daniel Clewley

unread,
Aug 27, 2016, 4:30:15 PM8/27/16
to Amanda Rumsey, RSGISLib Support
Hi Amanda,

This is bug with generating stats and overviews for GeoTiffs. It has been fixed in the latest version but we haven't updated binaries for Mac yet. 

For the version you have you can either set the output format as KEA instead of GTiff or leave our the '--stats' flag.

In future can you email or cc rsgislib...@googlegroups.com rather than just emailing me, this way others will see your question and be able to respond. 

Thanks,

Dan

On 27 Aug 2016, at 21:19, Amanda Rumsey <aru...@bu.edu> wrote:

Hey Dan,

Thank you for your help. I am running the following code and it looks like its not completely running surface reflectance. Maybe you can clarify the output.

I ran the following code:

arcsi.py -s ls8 -f GTiff --stats -p RAD SREF --aeropro Continental --atmospro MidlatitudeSummer --aot 0.25  -o /Users/amandarumsey/Desktop/images/Inputs/LC80150352013207LGN00/output -i /Users/amandarumsey/Desktop/images/Inputs/LC80150352013207LGN00/LC80150352013207LGN00_MTL.txt 

I get the following message:

Converting to Radiance

Opening: /Users/amandarumsey/Desktop/images/Inputs/LC80150352013207LGN00/LC80150352013207LGN00_B1.TIF

Opening: /Users/amandarumsey/Desktop/images/Inputs/LC80150352013207LGN00/LC80150352013207LGN00_B2.TIF

Opening: /Users/amandarumsey/Desktop/images/Inputs/LC80150352013207LGN00/LC80150352013207LGN00_B3.TIF

Opening: /Users/amandarumsey/Desktop/images/Inputs/LC80150352013207LGN00/LC80150352013207LGN00_B4.TIF

Opening: /Users/amandarumsey/Desktop/images/Inputs/LC80150352013207LGN00/LC80150352013207LGN00_B5.TIF

Opening: /Users/amandarumsey/Desktop/images/Inputs/LC80150352013207LGN00/LC80150352013207LGN00_B6.TIF

Opening: /Users/amandarumsey/Desktop/images/Inputs/LC80150352013207LGN00/LC80150352013207LGN00_B7.TIF

New image width = 7841 height = 7981 bands = 7

Started .0..10..20..30..40..50..60..70..80..90..100. Complete.

Setting Band Names...

Calculating Statistics...

Processing band 1 of 7

Segmentation fault: 11



It is outputting the RAD image but not surface reflectance. How do I fix this.

Thanks,
Amanda 

To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-support+unsub...@googlegroups.com.
To post to this group, send email to rsgislib-support@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "RSGISLib Support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rsgislib-support/Q-ITH-j4MGE/unsubscribe.
To unsubscribe from this group and all its topics, 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