Windows 7的Gdal(x32) [英] Gdal for windows 7(x32)

查看:95
本文介绍了Windows 7的Gdal(x32)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何连接到日蚀.我尝试了所有不起作用的方法.

How do I connect to the gdal eclipse. I tried all the ways it does not work.

我如何连接到日蚀.我尝试了所有不起作用的方法. 一直有问题 java.lang.UnsatisfiedLinkError:D:\ Document \ JAVA \ Gdal \ gdalLibrary \ gdaljni.dll:找不到依赖的库

How do I connect to the gdal eclipse. I tried all the ways it does not work. All the time issue java.lang.UnsatisfiedLinkError: D: \ Document \ JAVA \ Gdal \ gdalLibrary \ gdaljni.dll: Can't find dependent libraries

推荐答案

我也遇到了这个问题,只是找到了解决方案.我正在使用WIN8,并下载了release-1600-gdal-1-8-0-mapserver-5-6-6.zip.与自述文件txt中一样,我运行SDKShell.bat来设置环境.然后,将jar和java文件夹中的四个jni dll包含到我的测试Java项目中.总是存在类似gdaljni.dll的错误:找不到依赖的库.然后我发现蝙蝠中的设置可能未成功完成.我用编辑器打开了蝙蝠,找到了所有必要的环境设置,并一一进行.然后,java项目毫无问题地工作了.所需的设置如下:

I also have this problem and just found a solution. I am working with WIN8, and downloaded release-1600-gdal-1-8-0-mapserver-5-6-6.zip. As in the readme txt, I run the SDKShell.bat to set the environment. Then I include the jar and the four jni dlls in the java folder into my testing java project. There was always error like gdaljni.dll: Can't find dependent libraries. Then I figured out the settings in the bat may not been successfully done. I opened up the bat with an editor and found all the necessary enviroment settings and did it one by one. Then the java project worked with no problem. The settings needed are as follows:

SET PATH=%CD%\bin;%CD%\bin\proj\apps;%CD%\bin\gdal\apps;%CD%\bin\ms\apps;%PATH%
SET GDAL_DATA=%CD%\bin\gdal-data
SET GDAL_DRIVER_PATH=%CD%\bin\gdal\plugins
SET PROJ_LIB=%CD%\bin\proj\SHARE

对于PATH,您只需在资源管理器中右键单击计算机属性"-高级系统设置"-更改环境变量"即可.添加绝对路径(%CD%表示bat文件的当前文件夹,在我的情况下为C:\ GDAL,因此路径%CD%\ bin"应更改为"C:\ GDAL \ bin")将设置路径行"设置为您的路径.对于其他三行设置,只需为每个添加三个系统变量,然后将包含%CD%的路径更改为绝对路径.然后,一切都会好的.注意,我在bat文件中省略了一些我的Java绑定不需要的路径.如果要与其他语言一起使用gdal,也可以将它们添加到PATH.我猜最常见的错误是忘记添加GDAL_DRIVER_PATH和PROJ_LIB.希望对其他遇到此问题的人可能会有帮助.

For the PATH you can just in explorer right click on computer-properties-advanced system settings-Change enviroment variables. Add the absolute paths(%CD% means the current folder of the bat file, in my case is C:\GDAL, so path "%CD%\bin" should be changed into "C:\GDAL\bin") of "SET PATH line" to your PATH. For the other three lines of settings, just add three system variable for each and aslo change the path containing %CD% into abousolute paths. Then, everything should be ok. Note I omitted some paths in the bat file which I do not need for my java bindings. You can also add them to PATH if you want to do use gdal with other languages. I guess the most common mistake is forgetting to add the GDAL_DRIVER_PATH and PROJ_LIB.Hope it may be helpful for the others who have such issue.

这篇关于Windows 7的Gdal(x32)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆