GeoCrsTransform 1.0.6

dotnet add package GeoCrsTransform --version 1.0.6
                    
NuGet\Install-Package GeoCrsTransform -Version 1.0.6
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GeoCrsTransform" Version="1.0.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GeoCrsTransform" Version="1.0.6" />
                    
Directory.Packages.props
<PackageReference Include="GeoCrsTransform" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add GeoCrsTransform --version 1.0.6
                    
#r "nuget: GeoCrsTransform, 1.0.6"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package GeoCrsTransform@1.0.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=GeoCrsTransform&version=1.0.6
                    
Install as a Cake Addin
#tool nuget:?package=GeoCrsTransform&version=1.0.6
                    
Install as a Cake Tool

GeoCRS Transform

A dependency-free .NET library for converting coordinates between major Coordinate Reference Systems (CRSs):

  • Geographic CRSs (latitude/longitude, optional height)
  • Projected CRSs (eastings/northings in metres, e.g. Web Mercator, British National Grid, UTM)

The library uses WGS84 as a hub datum, Helmert 7-parameter transforms for datum shifts, and pure-managed projection code (no native/PROJ dependency).

GitHub - https://github.com/antonydoyle/GeoCrsTransform

Supported in v1

  • Geographic ↔ Geographic (datum shift via Helmert)
  • Geographic ↔ Projected (forward/inverse projection)
  • Projected ↔ Projected (via geographic hub)
  • CRSs: WGS84 (4326), ETRS89 (4258), OSGB36 (4277), Web Mercator (3857), British National Grid (27700), UTM zones 30N/31N/33N (32630, 32631, 32633), plus aliases (e.g. WGS84, BNG, UTM30N)

See docs/scope.md for full scope and limitations.

Installation

dotnet add package GeoCrsTransform

Examples

WGS84 (4326) ↔ Web Mercator (3857)

using GeoCrsTransform;

var transformer = CoordinateTransform.CreateManaged();
var wgs84 = CrsId.Parse("EPSG:4326");
var webMercator = CrsId.Parse("EPSG:3857");

var geo = new GeoCoordinate(51.5074, -0.1278, 0);
var result = transformer.Transform(geo, wgs84, webMercator);
var projected = (ProjectedCoordinate)result.Output;
Console.WriteLine($"E: {projected.EastingMeters}, N: {projected.NorthingMeters}");
Console.WriteLine($"Path: {result.TransformPath}");

WGS84 ↔ British National Grid (27700)

var transformer = CoordinateTransform.CreateManaged();
var geo = new GeoCoordinate(51.5, -2.0, 0);
var result = transformer.Transform(geo, CrsId.Parse("EPSG:4326"), CrsId.Parse("EPSG:27700"));
var bng = (ProjectedCoordinate)result.Output;
foreach (var w in result.Warnings) Console.WriteLine($"Warning: {w}");

UTM

var transformer = CoordinateTransform.CreateManaged();
var utm30n = CrsId.Parse("EPSG:32630");  // or alias "UTM30N"
var result = transformer.Transform(geo, CrsId.Parse("EPSG:4326"), utm30n);

Projected → Geographic

var bngCoord = new ProjectedCoordinate(400000, 200000, 0);
var result = transformer.Transform(bngCoord, CrsId.Parse("EPSG:27700"), CrsId.Parse("EPSG:4326"));
var backGeo = (GeoCoordinate)result.Output;

Accuracy and warnings

  • AccuracyClass on each result: High, Medium, Low, or Unknown.
  • Warnings list when parameters are approximate or when grid-based shifts (e.g. OSTN for BNG) are not applied.
  • Survey-grade transforms that require grid shifts (NTv2, etc.) are not guaranteed in v1; Helmert-only datum shifts are used. See docs/scope.md.

Extending CRS data

CRS definitions are in the embedded Data/major_crs.json. The format includes:

  • ellipsoids: id → a, invF
  • geographic: id, name, aliases, ellipsoid, toWgs84 (Helmert: tx, ty, tz, rx, ry, rz, scalePpm), accuracy, warnings
  • projected: id, name, aliases, base (geographic CRS id), projection (WebMercator or TransverseMercator), plus centralMeridian, latitudeOfOrigin, scaleFactor, falseEasting, falseNorthing

Parameter sources and notes are recorded in docs/parameter_sources.md.

Extensibility

  • CreateManaged() returns the built-in transformer (this package).
  • A future optional package may provide CreateProjBacked() for PROJ/grid-based accuracy; the ICoordinateTransformer interface is designed to stay stable.

License

MIT. See LICENSE.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.6 73 2/15/2026
1.0.5 83 2/15/2026
1.0.0 80 2/15/2026
0.1.0 79 2/15/2026