In C++, using GDAL library, calculate distance in meters between two points -
i'm coding in c++, using gdal library, wgs84. how calculate distance between 2 points in meters? code snippet below returns value of 1.0000.
ogrspatialreference wgs84; ogrpoint point1, point2; assert(wgs84.setwellknowngeogcs("wgs84")==ogrerr_none); point1.assignspatialreference(&wgs84); point2.assignspatialreference(&wgs84); point1.sety(25.0000); point1.setx(75.0000); point2.sety(25.0000); point2.setx(76.0000);
Comments
Post a Comment