Reputation: 12920
I have locations coordinates in the form of latitude, longitude such as: 23⁰ 39' 24.8" N
& 58⁰ 11' 36.5" E
, see the pic below. But in my work place I use ArcGIS
and it seems that doesn't support degree (latitude, longitude) form coordinates. I am planning now to write a C++ code to convert degree form to UTM notation, for example 23⁰ 39' 24.8" N
& 58⁰ 11' 36.5E"
to 2616726 N
& 621702 E
. I would like to know how can do such conversion?'
PS: E = East, N= North.
Upvotes: 1
Views: 14906
Reputation: 57
Adding to rve's answer, you can implement the lat/long -> UTM conversion by following the equations on Wikipedia.
Alternatively, you could download and install an open-source geodesy package such as GeographicLib to do the conversion for you.
A third option is to borrow code directly from GeographicLib or another open-source package, such as this navsat_conversions file. Be sure to give credit to the original author(s) if you do this.
Upvotes: 0