This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IP > IPrimeMeridian Interface > IPrimeMeridian.Longitude Property (ArcObjects .NET 10.4 SDK) |
The longitude value of this prime meridian.
[Visual Basic .NET] Public ReadOnly Property Longitude As Double
[C#] public double Longitude {get;}
[C++]
HRESULT get_Longitude(
double* Longitude
);
[C++]
Parameters Longitude [out, retval] Longitude is a parameter of type double
Returns the longitude value of a prime meridian. The longitude value is defined in degrees relative to Greenwich.
private void GetLongitude()
{
// use activator class with SpatialReferenceEnvironment singleton
Type factoryType=Type.GetTypeFromProgID("esriGeometry.SpatialReferenceEnvironment");
System.Object obj=Activator.CreateInstance(factoryType);
ISpatialReferenceFactory3 spatialReferenceFactory=obj as ISpatialReferenceFactory3;
IPrimeMeridian primeMeridian=spatialReferenceFactory.CreatePrimeMeridian((int)esriSRPrimeMType.esriSRPrimeM_Greenwich);
System.Windows.Forms.MessageBox.Show(primeMeridian.Longitude.ToString());
}