using GeoAPI.CoordinateSystems;
using GeoAPI.CoordinateSystems.Transformations;
using ProjNet.CoordinateSystems;
using ProjNet.CoordinateSystems.Transformations;
public static void Main(string[] args)
IGeographicCoordinateSystem wgs84 = GeographicCoordinateSystem.WGS84;
IProjectedCoordinateSystem googleMercatorCS
= ProjectedCoordinateSystem.WebMercator;
CoordinateTransformationFactory ctFact = new CoordinateTransformationFactory();
ICoordinateTransformation transformation
= ctFact.CreateFromCoordinateSystems(wgs84, googleMercatorCS);
double[] fromPoint = new double[] { lon, lat };
double[] toPoint = transformation.MathTransform.Transform(fromPoint);
Console.WriteLine("Google Mercator X: "+ toPoint[0]);
Console.WriteLine("Google Mercator Y: "+ toPoint[1]);