This project is read-only.

Converting Easting/Northing to Lat/Long

Feb 26, 2013 at 11:29 PM
Hi there, I need to qualify this question by stating that I know nothing about mapping, I'm a software engineer that has a specific task which is to:

Convert existing Easting/Northing (metres) values to Lat/Long (WGS84) the data is based on the

GDA94_MGA_zone_48 to zone_58 (GeocentricDatumofAustralia1994)

I've tried the following code but just get [Infinite, Infinite] in my array after the projection:
ProjectionInfo start = KnownCoordinateSystems.Geographic.Australia.GeocentricDatumofAustralia1994;
            ProjectionInfo end = KnownCoordinateSystems.Geographic.World.WGS1984;

            List<double> xy = new List<double>();
            List<double> z = new List<double>();

            
            xy.Add(789728.973);
            xy.Add(6562312.746);

            xy.Add(785573.94);
            xy.Add(6592369.871);

            z.Add(1);
            z.Add(1);
            
            double[] xyA = xy.ToArray();
            double[] zA = z.ToArray();

            Reproject.ReprojectPoints(xyA, zA, start, end, 0, xy.Count / 2);

            for (int i = 0; i < xy.Count; i += 2)
            {
                Debug.WriteLine(String.Format("{0},{1}", xyA[i], xyA[i + 1]));
            }
I've been round and round in circles any help would be greatly appreciated.
Feb 26, 2013 at 11:41 PM
Hi there, disaster averted it seems changing the start to:
ProjectionInfo start = ProjectionInfo.FromEpsgCode(28356);
Fortunately our existing data has the EPSG codes against it.