-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enforce coordinate system singleton through interfaces
- Loading branch information
Showing
26 changed files
with
126 additions
and
228 deletions.
There are no files selected for viewing
11 changes: 5 additions & 6 deletions
11
src/NetFabric.Numerics.Geography/Geodetic2/CoordinateSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace NetFabric.Numerics.Geography; | ||
|
||
/// <summary> | ||
/// Represents a base interface for geodetic structures and types. | ||
/// </summary> | ||
/// <typeparam name="TSelf">The type of the implementing structure or type.</typeparam> | ||
/// <typeparam name="TCoordinateSystem">The type of the associated coordinate system.</typeparam> | ||
/// <typeparam name="TDatum">The type of the datum associated with the geodetic structure or type.</typeparam> | ||
public interface IGeodeticBase<TSelf, TCoordinateSystem, TDatum> | ||
: IGeometricBase<TSelf, TCoordinateSystem> | ||
where TSelf : struct, IGeodeticBase<TSelf, TCoordinateSystem, TDatum>? | ||
where TCoordinateSystem : class, IGeodeticCoordinateSystem<TCoordinateSystem, TDatum>, new() | ||
where TDatum : IDatum<TDatum> | ||
{ | ||
} |
16 changes: 13 additions & 3 deletions
16
src/NetFabric.Numerics.Geography/IGeodeticCoordinateSystem.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
namespace NetFabric.Numerics.Geography; | ||
|
||
public interface IGeodeticCoordinateSystem<TDatum> | ||
: ICoordinateSystem | ||
/// <summary> | ||
/// Represents a geodetic coordinate system, which is a specialized type of coordinate system | ||
/// used for geographic or geospatial applications. | ||
/// </summary> | ||
/// <typeparam name="TSelf">The type of the implementing class.</typeparam> | ||
/// <typeparam name="TDatum">The type of the datum associated with this coordinate system.</typeparam> | ||
public interface IGeodeticCoordinateSystem<TSelf, TDatum> | ||
: ICoordinateSystem<TSelf> | ||
where TSelf : class, IGeodeticCoordinateSystem<TSelf, TDatum>, new() | ||
where TDatum : IDatum<TDatum> | ||
{ | ||
/// <summary> | ||
/// Gets the datum associated with this geodetic coordinate system. | ||
/// </summary> | ||
Datum<TDatum> Datum { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.