I am trying to convert the UTM coordinates ( 552123.07 4182282.11 ) into Latitude and Longitude so That i can plot it on a Map provider like google or leaflet.
Can anybody please help me in determining how to convert UTM coordinates to Latitude/Longitude? Your help will be highly appreciated!
I have the following code snippet which does this but it needs a zone number for every UTM coordinate.
public static void UTMToLatLongDSP(double X, double Y, out double latitude, out double longitude)
{
double[] XY = new double[2];
XY[0] = X;
XY[1] = Y;
double[] Z = new double[1];
Z[0] = 1;
string utmStr = "+proj=utm +zone=30 +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";
}
ProjectionInfo projIn = ProjectionInfo.FromProj4String(utmStr);
ProjectionInfo projOut = KnownCoordinateSystems.Geographic.World.WGS1984;
Reproject.ReprojectPoints(XY, Z, projIn, projOut, 0, 1);
longitude = XY[0];
latitude = XY[1];
}