GeographicCoordinateSystem Class

A geographic coordinate reference system: longitudes and latitudes on the ellipsoid of a datum, such as WGS 84, ETRS89 or NTF.

public sealed class GeographicCoordinateSystem : CoordinateReferenceSystem
Inheritance
CoordinateReferenceSystem GeographicCoordinateSystem

Constructors

NameDescription
GeographicCoordinateSystem(string, Ellipsoid)Initializes a new instance of the GeographicCoordinateSystem class.

GeographicCoordinateSystem(string, Ellipsoid)

GeographicCoordinateSystem.cs

Initializes a new instance of the GeographicCoordinateSystem class.

public GeographicCoordinateSystem(string name, Ellipsoid ellipsoid)

Parameters

name string
The name of the coordinate reference system.
ellipsoid Ellipsoid
The ellipsoid of the datum.

Properties

NameDescription
AngularUnitGets the angular unit of the coordinates, in radians, such as π / 200 for grads. The default is a degree, π / 180.
EllipsoidGets the ellipsoid of the datum.
IsGeographicGets a value that indicates whether the coordinates are a longitude and a latitude, rather than an easting and a northing.
PrimeMeridianGets the longitude of the prime meridian east of Greenwich, in degrees, such as 2.33722917 for the meridian of Paris. The default is 0.
ToWgs84TransformationGets the transformation from the datum to WGS 84, or null when the longitudes and the latitudes of the datum are taken as those of WGS 84, as for ETRS89, RGF93 or NAD83, which differ by less than two meters. The default is null.

Gets the angular unit of the coordinates, in radians, such as π / 200 for grads. The default is a degree, π / 180.

public double AngularUnit { get; init; }

Property value

double

Gets the ellipsoid of the datum.

public Ellipsoid Ellipsoid { get; }

Property value

Ellipsoid

Gets a value that indicates whether the coordinates are a longitude and a latitude, rather than an easting and a northing.

public override bool IsGeographic { get; }

Property value

bool

Gets the longitude of the prime meridian east of Greenwich, in degrees, such as 2.33722917 for the meridian of Paris. The default is 0.

public double PrimeMeridian { get; init; }

Property value

double

ToWgs84Transformation

GeographicCoordinateSystem.cs

Gets the transformation from the datum to WGS 84, or null when the longitudes and the latitudes of the datum are taken as those of WGS 84, as for ETRS89, RGF93 or NAD83, which differ by less than two meters. The default is null.

public HelmertTransformation? ToWgs84Transformation { get; init; }

Methods

NameDescription
FromWgs84(GeoPosition)Converts a longitude and a latitude of WGS 84 to a position of this coordinate reference system.
ToWgs84(GeoPosition)Converts a position of this coordinate reference system to a longitude and a latitude of WGS 84.

FromWgs84(GeoPosition)

GeographicCoordinateSystem.cs

Converts a longitude and a latitude of WGS 84 to a position of this coordinate reference system.

public override GeoPosition FromWgs84(GeoPosition position)

Parameters

position GeoPosition
The longitude and the latitude on WGS 84, in degrees.

Returns

GeoPosition The position, in this coordinate reference system.

ToWgs84(GeoPosition)

GeographicCoordinateSystem.cs

Converts a position of this coordinate reference system to a longitude and a latitude of WGS 84.

public override GeoPosition ToWgs84(GeoPosition position)

Parameters

position GeoPosition
The position, in this coordinate reference system.

Returns

GeoPosition The longitude and the latitude on WGS 84, in degrees, the longitude from -180 to 180.