Python scripts for the textbook
M. J. Canty (2014): Image Analysis, Classification and Change Detection in Remote Sensing, with Algorithms for ENVI/IDL and Python (Third Revised Edition), Taylor and Francis CRC Press
Image Analysis, Classification and Change Detection in Remote Sensing
I successfully installed auxil,but after running the command
import auxil.auxil as auxil
I get an error that libprov_means.so not found.So I copied the file into /usr/lib path.But still it gives error
OSError: libprov_means.so: wrong ELF class: ELFCLASS64
I copied the linux32 bit: libprov_means.so file from your github directory and placed it in /usr/lib.
I am using ubuntu 16.04 32 bit system and spyder Anaconda.
I've been trying to run classify.py . However, it gives me the following error:
Traceback (most recent call last):
File "classify.py", line 302, in
main()
File "classify.py", line 95, in main
classid = feature.GetField('CLASS_ID')
File "/home/fay/anaconda2/lib/python2.7/site-packages/osgeo/ogr.py", line 3282, in GetField
raise ValueError("Illegal field requested in GetField()")
ValueError: Illegal field requested in GetField()
could you please help me fix this?
Thank you
When I try to run iMad.py or radcal.py on a Mac (specifically, a mid 2015 Retina MacBook Pro running OS X 10.11.6 "El Capitan"), a Finder window opens, I select a directory that contains two 8-bit three-channel (RGB) geotiffs, and I get the following error.
2016-09-26 13:35:40.466 python[33582:5516586] An uncaught exception was raised
2016-09-26 13:35:40.466 python[33582:5516586] File types array cannot be empty
2016-09-26 13:35:40.466 python[33582:5516586] (
0 CoreFoundation 0x00007fff8ab1a4f2 __exceptionPreprocess + 178
1 libobjc.A.dylib 0x00007fff918cbf7e objc_exception_throw + 48
2 CoreFoundation 0x00007fff8ab814bd +[NSException raise:format:] + 205
3 AppKit 0x00007fff93f81408 -[NSSavePanel setAllowedFileTypes:] + 294
4 libtk8.5.dylib 0x000000010a6f69e5 Tk_GetOpenFileObjCmd + 1400
5 libtcl8.5.dylib 0x000000010a55883c TclEvalObjvInternal + 1160
6 libtcl8.5.dylib 0x000000010a558ab7 Tcl_EvalObjv + 57
7 _tkinter.so 0x000000010a53b069 Tkapp_Call + 601
8 libpython2.7.dylib 0x00000001000b59c5 PyEval_EvalFrameEx + 32645
9 libpython2.7.dylib 0x00000001000ad732 PyEval_EvalCodeEx + 1538
10 libpython2.7.dylib 0x00000001000b9eb5 fast_function + 117
11 libpython2.7.dylib 0x00000001000b4da4 PyEval_EvalFrameEx + 29540
12 libpython2.7.dylib 0x00000001000ad732 PyEval_EvalCodeEx + 1538
13 libpython2.7.dylib 0x00000001000b9eb5 fast_function + 117
14 libpython2.7.dylib 0x00000001000b4da4 PyEval_EvalFrameEx + 29540
15 libpython2.7.dylib 0x00000001000b9f52 fast_function + 274
16 libpython2.7.dylib 0x00000001000b4da4 PyEval_EvalFrameEx + 29540
17 libpython2.7.dylib 0x00000001000ad732 PyEval_EvalCodeEx + 1538
18 libpython2.7.dylib 0x00000001000ad126 PyEval_EvalCode + 54
19 libpython2.7.dylib 0x00000001000dbf04 PyRun_FileExFlags + 164
20 libpython2.7.dylib 0x00000001000dba81 PyRun_SimpleFileExFlags + 769
21 libpython2.7.dylib 0x00000001000f15c8 Py_Main + 3096
22 python 0x0000000100001f24 start + 52
)
2016-09-26 13:35:40.467 python[33582:5516586] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'File types array cannot be empty'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff8ab1a4f2 __exceptionPreprocess + 178
1 libobjc.A.dylib 0x00007fff918cbf7e objc_exception_throw + 48
2 CoreFoundation 0x00007fff8ab814bd +[NSException raise:format:] + 205
3 AppKit 0x00007fff93f81408 -[NSSavePanel setAllowedFileTypes:] + 294
4 libtk8.5.dylib 0x000000010a6f69e5 Tk_GetOpenFileObjCmd + 1400
5 libtcl8.5.dylib 0x000000010a55883c TclEvalObjvInternal + 1160
6 libtcl8.5.dylib 0x000000010a558ab7 Tcl_EvalObjv + 57
7 _tkinter.so 0x000000010a53b069 Tkapp_Call + 601
8 libpython2.7.dylib 0x00000001000b59c5 PyEval_EvalFrameEx + 32645
9 libpython2.7.dylib 0x00000001000ad732 PyEval_EvalCodeEx + 1538
10 libpython2.7.dylib 0x00000001000b9eb5 fast_function + 117
11 libpython2.7.dylib 0x00000001000b4da4 PyEval_EvalFrameEx + 29540
12 libpython2.7.dylib 0x00000001000ad732 PyEval_EvalCodeEx + 1538
13 libpython2.7.dylib 0x00000001000b9eb5 fast_function + 117
14 libpython2.7.dylib 0x00000001000b4da4 PyEval_EvalFrameEx + 29540
15 libpython2.7.dylib 0x00000001000b9f52 fast_function + 274
16 libpython2.7.dylib 0x00000001000b4da4 PyEval_EvalFrameEx + 29540
17 libpython2.7.dylib 0x00000001000ad732 PyEval_EvalCodeEx + 1538
18 libpython2.7.dylib 0x00000001000ad126 PyEval_EvalCode + 54
19 libpython2.7.dylib 0x00000001000dbf04 PyRun_FileExFlags + 164
20 libpython2.7.dylib 0x00000001000dba81 PyRun_SimpleFileExFlags + 769
21 libpython2.7.dylib 0x00000001000f15c8 Py_Main + 3096
22 python 0x0000000100001f24 start + 52
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6
Any suggestions?
I would like to run iMad.py on a Mac (more specifically, a Mid 2015 MacBook Pro running OS X El Capitan 10.11.6). I started by adding the following lines to auxil.py:
elif platform.system() == 'Darwin': lib = ctypes.cdll.LoadLibrary('libprov_means.so')
I then tried moving libprov_means.so from provmeans/linux 64bit into my path, but I got the following error when I ran iMad.py:
OSError: dlopen(libprov_means.so, 6): no suitable image found. Did find: /Users/ggandenberger/lib/libprov_means.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
I then compiled prov_means.c by running gcc -c -o libprov_means.so prov_means.c
and moved the output file into my path, but I got the following error when I ran iMad.py:
OSError: dlopen(libprov_means.so, 6): no suitable image found. Did find: /Users/ggandenberger/lib/libprov_means.so: file too short
I suspect that someone with C experience would know how to address this issue, but I do not. What would you recommend?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.