开发者

How to convert UTM Coordinate in C to Latitude/Longitude using WGS84 Datum?

开发者 https://www.devze.com 2023-01-05 05:56 出处:网络
Does anyone know where I can find open source 开发者_C百科code (in c++) that converts a UTM point to Geo (WGS 84)?

Does anyone know where I can find open source 开发者_C百科code (in c++) that converts a UTM point to Geo (WGS 84)?

Thanks, Liran


Take a look at GDAL.

Specifically the code used here.

There is also a Warp API tutorial here which outlines the basic use of the Warp API.

Alternatively, you can use the more lightweight PROJ.4 library (GDAL uses this internally).


While not C++ per se, I have written it in Objective-C and could more or less be copied and pasted into C or C++ with a few minor alterations.

UTMConverter example for iOS

The part you want is a file called UTMConverter.m. It has methods for converting from lat/long to UTM and vice-versa.

0

精彩评论

暂无评论...
验证码 换一张
取 消