简体   繁体   English

Windows下GTIFProj4ToLatLong

[英]GTIFProj4ToLatLong under Windows

I use libgeotiff in my project.我在我的项目中使用 libgeotiff。 I want to convert pixel coordinates to geographic coordinates (latitude and longtitude).我想将像素坐标转换为地理坐标(纬度和经度)。 But GTIFProj4ToLatLong returns false.但 GTIFProj4ToLatLong 返回 false。 Target OS - Windows.目标操作系统 - Windows。 I downloaded libraries from here .我从这里下载了库。

When I compile my project on Ubuntu using libgeotiff-dev from repository, everything works fine with the same code and the same tiff files.当我使用存储库中的 libgeotiff-dev 在 Ubuntu 上编译我的项目时,使用相同的代码和相同的 tiff 文件一切正常。

I suppose some.csv or.lla files are missing when program runs on windows.我想当程序在 windows 上运行时,缺少一些.csv 或 .lla 文件。 Should I set some environment variables?我应该设置一些环境变量吗?

Another way I see is to build libgeotiff manually with mingw and msys.我看到的另一种方法是使用 mingw 和 msys 手动构建 libgeotiff。 Can it help?能帮上忙吗? It's complicated for me.这对我来说很复杂。

Update: I compiled libgeotiff manually using msys and mingw.更新:我使用 msys 和 mingw 手动编译了 libgeotiff。 Everything works now.现在一切正常。 Files from ftp.remotesensing.org seems to be built without Proj.4 support. ftp.remotesensing.org 中的文件似乎是在没有 Proj.4 支持的情况下构建的。

To use this function, you should build libgeotiff with HAVE_LIBPROJ preprocessor flag.要使用此 function,您应该使用 HAVE_LIBPROJ 预处理器标志构建 libgeotiff。 You'll also need libproj library for it您还需要 libproj 库

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM