SonicScholar.Trans4d
0.0.5-alpha
dotnet add package SonicScholar.Trans4d --version 0.0.5-alpha
NuGet\Install-Package SonicScholar.Trans4d -Version 0.0.5-alpha
<PackageReference Include="SonicScholar.Trans4d" Version="0.0.5-alpha" />
<PackageVersion Include="SonicScholar.Trans4d" Version="0.0.5-alpha" />
<PackageReference Include="SonicScholar.Trans4d" />
paket add SonicScholar.Trans4d --version 0.0.5-alpha
#r "nuget: SonicScholar.Trans4d, 0.0.5-alpha"
#:package SonicScholar.Trans4d@0.0.5-alpha
#addin nuget:?package=SonicScholar.Trans4d&version=0.0.5-alpha&prerelease
#tool nuget:?package=SonicScholar.Trans4d&version=0.0.5-alpha&prerelease
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 | Versions 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. |
-
.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 |