国外遥感平台opticks编译总结
参考:
http://blog.csdn.net/hjh2005/article/details/7013323
http://blog.csdn.net/wincemobile/article/details/3915606
http://www.oschina.net/p/opticks
http://blog.csdn.net/is2120/article/details/6761613
http://blog.csdn.net/sunnyboycao/article/details/6014107
http://qimo601.iteye.com/blog/1634781
编译工具:vs2010
源码:opticks4.9.x(https://opticks.svn.sourceforge.net/svnroot/opticks/trunk/4.9.X/)
opticks介绍:
Opticks 是一个可扩展的遥感和图像分析软件平台,国外三大开源遥感平台之一(OSSIM /OTB/OPTICKS),国内开源遥感平台为OpenRS。
主要特点:
Free and open source 支持的文件格式包括:NITF 2.0/2.1, GeoTIFF, ENVI, ASPAM/PAR, CGM, DTED, Generic RAW, ESRI Shapefile, HDF5, AVI, MPEG, JPEG, GIF, PNG, BMPZoom, pan, rotate spatially large datasets Quickly layer GIS features, annotations, results, and other information over your data to provide contextMany image display controls such as colormap, histogram, transparency, etc. Support for datasets larger than four gigabytes Analysts can quickly combine steps using graphical wizards Support for processing data in it's native interleave of BIP, BSQ or BIL编译前的准备工作:
下面主要参考的是原代码code目录下的README.windows文件的内容写的,README.windows 对于编译说明还是比较详细的。
1、在代码编译前需要安装的程序:
(1)vs2010
(2)python2.5 or later(最好不要装3.0以后,3.0后python有些大的变化,编译upBuildRevision时会有问题)
(3)java1.4.x or later(安装javase,我安装的是jdk-7u7-windows-i586.exe,安好后设置好java环境变量,具体怎么设置可以搜索一下)
(4)Subversion Command Line Client(这个要安装,否则到时编译upBuildRevision会有问题)
2、在上面的应用程序都安装好后,使用subversion或者TortoiseSVN下载好原代码。在Dependencies目录下,找到retrieve-dependencies.bat
,并双击运行,等等吧,它会帮你把依赖库都下好,并安装好。
3、设置 环境变量OPTICKSDEPENDENCIES=“原代码目录\Dependencies”,我的是“E:\opticks\Dependencies”
编译工作:
1、右键单击解决方案选择编译整个解决方案,开始编译了。
编译中遇到一些问题的解决:
(1)error C2220: warning treated as error - no 'object' file generated
(The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss)
解决方式(1)这个问题可以通过选择cpp或h的全部内容,菜单File-》advanced save options,选择编码方式为Unicode -codepage 1200
解决方式(2)属性中c/C++ -》General选项卡下,把Treat waring as errors设为NO
详细请参考:http://blog.csdn.net/is2120/article/details/6761613
(2)编译UpdateBuildRevision时,ValueError: can't have unbuffered text I/O 错误 或者 print "New Build Revision # is", version_number说有错误
解决方案(1)你使用了python3.0及以后的版本,装个2.5版本 、2.6版本、或者2.7版本
(3)can't open file BuildRevision.h
原因是你的UpdateBuildRevision没编译通过,
解决方案(1) 参考问题2把UpdateBuildRevision编译通过
解决方案(2)注释掉它,然后#define BuildVision “tt”(随意写个吧)
(4)关于newline in constant 报错
双引号漏了,把补上就行了
(5) windows error 找不到文件
没有安装svn
(6)error MSB3073: The command "python.exe "E:\opticks\Code\application\..\update-build-revision.py"
error MSB3073: :VCEnd
error MSB3073: " exited with code 1.
主要原因是python版本装了3.0及以上了,或者subversion没有安装
(7)updateBuildVision编译不通过
主要原因是python版本装了3.0及以上了,或者subversion没有安装
界面效果
(1)启动图

(2)运行时图

参考:
http://blog.csdn.net/hjh2005/article/details/7013323
http://blog.csdn.net/wincemobile/article/details/3915606
http://www.oschina.net/p/opticks
http://blog.csdn.net/is2120/article/details/6761613
http://blog.csdn.net/sunnyboycao/article/details/6014107
http://qimo601.iteye.com/blog/1634781