0

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];
}
Rohit S.
  • 11
  • 2

1 Answers1

3

Converting UTM coordinates to latitude/longitude without a zone number is not possible. This is due to the fact that UTM coordinates are measured from a reference point of origin of the given zone number.

But, given a latitude/longitude, you can determine the UTM coordinates (northing, easting, zone number)

Jan Paolo Go
  • 5,842
  • 4
  • 22
  • 50