本文介绍了如何在Windows上构建Gdal JNI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用ogr2ogr.java,它需要GDAL jni才能工作.我已尝试按照此处提到的说明进行操作在Java(Windows)中为GDAL/OGR构建指令但是,我仍然无法构建它.我正在使用Windows 7 64位操作系统.如果有人成功构建了它,请告诉我您是如何做到的.
I want to use ogr2ogr.java and it need the GDAL jni to work. I have tried following the instruction mentioned here Build Instructions for GDAL/OGR In Java (Windows) but, still I am not able to build it. I am using windows 7 64 bit operating system.If somebody has build it successfully let me know how you did it.
推荐答案
因此,在遇到很多麻烦之后,我发现不需要从源代码构建gdal jni.
So, after lot of trouble I found out that that there is no need to build gdal jni from source.
- 您可以从此处 Tamas Szekeres'下载已编译的jni dll文件.Windows每日构建.确保你下载稳定版本.拉链包release-1600-x64-gdal-1-8-0-mapserver-5-6-6为我工作.你可以除非您想要一个非常特定的版本,否则也可以尝试.
- 一旦gdaljni.dll文件到位,我就得到了ogr2ogr.java文件从这里所有Java示例程序
- 确保您检查此帖子以设置环境变量正确
- You can download the compiled jni dll file from here Tamas Szekeres'Windows daily builds. Make sure youdownload a stable release. zip packagerelease-1600-x64-gdal-1-8-0-mapserver-5-6-6 worked for me. you cancan try it too unless you want a very specific version.
- Once the gdaljni.dll file was in place I got the ogr2ogr.java filefrom here All Java sampleprograms
- Make sure you check this post to set the environment variablescorrectly
这篇关于如何在Windows上构建Gdal JNI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!