Rijksdriehoek.Transform 1.0.0

dotnet add package Rijksdriehoek.Transform --version 1.0.0
                    
NuGet\Install-Package Rijksdriehoek.Transform -Version 1.0.0
                    
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="Rijksdriehoek.Transform" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rijksdriehoek.Transform" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Rijksdriehoek.Transform" />
                    
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 Rijksdriehoek.Transform --version 1.0.0
                    
#r "nuget: Rijksdriehoek.Transform, 1.0.0"
                    
#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 Rijksdriehoek.Transform@1.0.0
                    
#: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=Rijksdriehoek.Transform&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Rijksdriehoek.Transform&version=1.0.0
                    
Install as a Cake Tool

Rijksdriehoek.Transform

Pure-.NET conversion between Rijksdriehoek (RD New, EPSG:28992) and ETRS89 / WGS 84 coordinates. It implements the transformation procedure published by NSGI as RDNAPTRANS™2018 (implementation Variant 2, with NTv2 grid corrections), and validates against NSGI's published reference vectors to sub-millimetre.

Status: stable (v1.0). Horizontal (2D) only. Validated against the NSGI Z001 reference set in both directions (sub-millimetre) and cross-checked against GDAL/PROJ. See Accuracy and the trademark / disclaimer note below.

What it does

  • 2D coordinate conversion between Rijksdriehoek (RD New, EPSG:28992) and WGS 84 / ETRS89 (lat/lon).
  • Pure managed .NET. Zero runtime dependencies — no PROJ/GDAL bindings, no native runtime. Multi-targets netstandard2.0 and net8.0.
  • The official NSGI grid correction file (rdtrans2018.gsb, NTv2 format, ~1.4 MB) is embedded in the assembly and parsed at runtime.

What it does not do

  • Height / NAP / geoid transformation. 2D only.
  • Geometry-type traversal (Point, LineString, Polygon, …) — feed coordinates pair by pair.
  • Other CRS pairs (EPSG:3857, UTM, etc.).

Install

dotnet add package Rijksdriehoek.Transform

Usage

using Rijksdriehoek.Transform;

// Rijksdriehoek → WGS 84 (ETRS89)
var (lat, lon) = RdConverter.ToWgs84(155000, 463000);
Console.WriteLine($"{lat:F6}, {lon:F6}");

// WGS 84 (ETRS89) → Rijksdriehoek
var (x, y) = RdConverter.ToRd(52.155, 5.387);
Console.WriteLine($"{x:F3}, {y:F3}");

// Non-throwing form for out-of-bounds handling / hot loops:
if (RdConverter.TryToRd(52.155, 5.387, out double rx, out double ry))
{
    Console.WriteLine($"{rx:F3}, {ry:F3}");
}

Out-of-bounds inputs (outside the correction grid) throw RijksdriehoekException from ToRd / ToWgs84, or return false from TryToRd / TryToWgs84.

Accuracy

Conformance is verified by tests against the in-bounds subset (7 870) of NSGI's 10 000 published Z001 reference points, with NSGI's official tolerances:

  • ETRS89 → RD: within 0.0010 m (1 mm) — measured max Δ ≈ 0.0002 m
  • RD → ETRS89: within 0.000000010° (~1.1 mm) for lat and lon — measured max Δ ≈ 3e-9°

Independently cross-checked against GDAL/PROJ (PROJ 9.5.1, the same grid-based pipeline): agreement to ≈ 0.00006 m across all in-bounds points.

ETRS89 vs WGS 84

The procedure operates in ETRS89 (European Terrestrial Reference System 1989), not WGS 84. The two differ by approximately 0.75 m as of 2019, growing by 0.024 m per year. For most consumer use cases the difference is negligible; for surveying-grade applications it is not. This library nominally returns "WGS 84" coordinates that are in fact ETRS89 — interpret accordingly.

Validation

The correctness gate is the NSGI "Test set for self-validation" (Z001_ETRS89andRDNAP.txt) — the published ground-truth ETRS89 ↔ RDNAP pairs. Run it with:

dotnet test

The rijksdriehoek-validate console tool transforms an NSGI Validation Service file in either direction (writing * for out-of-grid points):

dotnet run --project tools/Rijksdriehoek.Transform.Validate -- \
  --direction=etrs89-to-rd --in=ETRS89-input.txt --out=RD-output.txt

Project layout

Path Purpose
src/Rijksdriehoek.Transform/ The library (packable, zero dependencies)
tests/Rijksdriehoek.Transform.Tests/ xUnit tests incl. the Z001 gate (not shipped)
tools/Rijksdriehoek.Transform.Validate/ CLI for the NSGI Validation Service (not shipped)

License

This .NET code is licensed under the MIT License. See LICENSE.

The embedded grid file rdtrans2018.gsb is part of the official NSGI RDNAPTRANS™2018 dataset, © Kadaster and Rijkswaterstaat. Per the NSGI procedure document (Appendix 2 and Appendix 4), the data files are distributed under the Creative Commons Attribution 4.0 International license (CC BY 4.0). The file is embedded byte-for-byte unchanged. See src/Rijksdriehoek.Transform/data/ATTRIBUTION.md for full provenance.

Downstream consumers redistributing a binary built on this package satisfy the CC BY 4.0 attribution requirement by preserving this README and the LICENSE file — no further action required.

Trademark / disclaimer

"RDNAPTRANS" is a registered trademark of NSGI (Nederlandse Samenwerking Geodetische Infrastructuur — Kadaster, Rijkswaterstaat, and Dienst der Hydrografie). This project is not affiliated with, certified by, or endorsed by NSGI. It deliberately does not use the RDNAPTRANS name as its product name; it refers to "RDNAPTRANS™2018" only descriptively, to identify the publicly documented transformation procedure it implements.

NSGI grants written permission to use the "RDNAPTRANS" name for software that passes their online Validation Service in both directions (procedure document Appendix 4). Because this library is horizontal-only, it is not put forward for that certification. If you need an officially named/validated transformation, see NSGI's Validation Service and https://www.nsgi.nl/rdnaptrans/.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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 was computed.  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 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.
  • net8.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.0 545 7/21/2026
0.1.0 201 7/21/2026