using ProjNet.CoordinateSystems;
using ProjNet.CoordinateSystems.Transformations;
using ProjNet.Converters.WellKnownText;
public static void Main()
var wgs84 = GeographicCoordinateSystem.WGS84;
PROJCS[""NZGD2000 / New Zealand Transverse Mercator 2000"",
DATUM[""New_Zealand_Geodetic_Datum_2000"",
SPHEROID[""GRS 1980"",6378137,298.257222101]],
UNIT[""degree"",0.0174532925199433]],
PROJECTION[""Transverse_Mercator""],
PARAMETER[""latitude_of_origin"",0],
PARAMETER[""central_meridian"",173],
PARAMETER[""scale_factor"",0.9996],
PARAMETER[""false_easting"",1600000],
PARAMETER[""false_northing"",10000000],
AXIS[""Northing"",NORTH]]";
var nztm2000 = (ProjectedCoordinateSystem)CoordinateSystemWktReader.Parse(nztm2000Wkt, Encoding.UTF8);
var ctFactory = new CoordinateTransformationFactory();
var wgs84ToNztm2000 = ctFactory.CreateFromCoordinateSystems(wgs84, nztm2000);
var transformedCoord = wgs84ToNztm2000.MathTransform.Transform(new double[] { 171.893029, -42.098068 });
Console.WriteLine($"NZTM2000 Easting: {transformedCoord[0]}, Northing: {transformedCoord[1]}");