How to convert UTM Coordinate in C to Latitude/Longitude using WGS84 Datum?
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.
精彩评论