Quantcast
Channel: DotSpatial
Viewing all articles
Browse latest Browse all 3973

New Post: Convert DMS to WGS1984

$
0
0
this is my code for reference
            double[] xy = new double[] { Longitude, latitude};
            // z values if any.  Typically this is just 0.
            double[] z = new double[] { 0 };
            // Source projection information.
            ProjectionInfo source = DotSpatial.Projections.KnownCoordinateSystems.Projected.World.WebMercator;
            // Destination projection information.
            ProjectionInfo dest = DotSpatial.Projections.KnownCoordinateSystems.Geographic.World.WGS1984;

//            Console.WriteLine("Coordinate (WGS1984) = (" + xy[0].ToString() + ", " + xy[1].ToString() + ").");
            DotSpatial.Projections.Reproject.ReprojectPoints(xy, z, dest, source, 0, 1);
//            Console.WriteLine("Coordinate (World.WebMercator) = (" + xy[0].ToString() + ", " + xy[1].ToString() + ").");
The above code written in lon, lat system but with a little modify, you do.

Viewing all articles
Browse latest Browse all 3973

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>