SonicScholar.Trans4d 0.0.5-alpha

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

trans4d-csharp

Overview

trans4d-csharp is a modern, object-oriented C# port and refactor of the legacy TRANS4D/HTDP geodetic transformation software originally developed by the US National Geodetic Survey. It enables precise transformation of geodetic coordinates (latitude, longitude, height) between reference frames (datums) and epochs, including time-dependent effects like crustal motion. This is essential for converting GNSS (GPS) positions (typically referenced in ITRF at the date of collection) into North American datums like NAD83(2011).

How to Use

The main entry point for transformations is Trans4d.TransformPosition. For example, to convert a GNSS coordinate collected on June 1, 2025 (ITRF2014, epoch 2025-06-01) to NAD83(2011) (epoch 2010-01-01): var source = new GeodeticCoordinates(/* latitude, longitude, height */); var sourceDatumEpoch = new DatumEpoch(Datum.ITRF2014, new DateTime(2025, 6, 1)); var targetDatumEpoch = new DatumEpoch(Datum.Nad83_2011_or_CORS96, new DateTime(2010, 1, 1)); var result = Trans4d.TransformPosition(source, sourceDatumEpoch, targetDatumEpoch);

Main Components & Data Structures

  • Trans4d.TransformPosition: Main method for transforming coordinates between datums/epochs.
  • Ellipsoid, CoordinateTransformer: Convert between geodetic and cartesian coordinates.
  • DatumEpoch: Represents a datum at a specific epoch.
  • XYZ: Cartesian coordinates.
  • VelocityInfo: Velocity components for time-dependent transformations.
  • GeodeticCoordinates: Latitude, longitude, height.
  • Datum (enum): Supported datums for transformation.

Velocity models are implemented using polymorphic classes for grid-based and plate motion approaches.

Future Work & Enhancements

  • Lots of code cleanup and refactoring.
  • Add doc generation for public API.
  • Add more test coordinates from all regions and validate against the Fortran version.
  • Implement earthquake and post-seismic displacement modeling.
  • Support for new NSRS 2025 terrestrial reference frames (NATREF, CATREF, MATREF, PATREF).
  • Add geodetic utilities (Vincenty Direct/Inverse for geodesic lengths).
  • Orthometric height calculations using geoid models (may be a separate repo).

Feedback & Support

  • Open a project issue on GitHub.
  • Email: collin@sonicscholar.com
  • Support SonicScholar: PayPal link

Behind the Scenes

This project began as a line-by-line port of Dr. Richard Snay's TRANS4D Fortran program into C++, then evolved into a C# refactor for modularity, testability, and future portability. The object-oriented approach makes the code easier to read, maintain, and port to other languages, and enables AI-assisted refactoring. Many classes are simple data structures to encapsulate related properties, improving clarity over legacy code. TRANS4D is essentially a derivative of HTDP (Horizontal Time-Dependent Positioning), originally developed by the National Geodetic Survey (NGS), a division of the National Oceanic and Atmospheric Administration (NOAA) of the United States. This project builds on the foundational work and algorithms provided by those organizations.

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 was computed.  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.

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
0.0.5-alpha 240 8/6/2025
0.0.4-alpha 207 8/5/2025
0.0.3-alpha 74 8/3/2025
0.0.2-alpha 51 8/1/2025
0.0.1-alpha 57 8/1/2025