Class Coordinates2D
Represents a 2D geographical coordinate consisting of longitude and latitude
Inheritance
Object
Coordinates2D
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: MongoDB.Entities
Assembly: MongoDB.Entities.dll
Syntax
public class Coordinates2D
Constructors
Coordinates2D()
Instantiate a new Coordinates2D instance with default values
Declaration
public Coordinates2D()
Coordinates2D(Double, Double)
Instantiate a new Coordinates2D instance with the supplied longtitude and latitude
Declaration
public Coordinates2D(double longitude, double latitude)
Parameters
Type | Name | Description |
---|---|---|
Double | longitude | |
Double | latitude |
Properties
Coordinates
Declaration
[BsonElement("coordinates")]
public double[] Coordinates { get; set; }
Property Value
Type | Description |
---|---|
Double[] |
Type
Declaration
[BsonElement("type")]
public string Type { get; set; }
Property Value
Type | Description |
---|---|
String |
Methods
GeoJsonPoint(Double, Double)
Create a GeoJsonPoint of GeoJson2DGeographicCoordinates with supplied longitude and latitude
Declaration
public static GeoJsonPoint<GeoJson2DGeographicCoordinates> GeoJsonPoint(double longitude, double latitude)
Parameters
Type | Name | Description |
---|---|---|
Double | longitude | |
Double | latitude |
Returns
Type | Description |
---|---|
GeoJsonPoint<GeoJson2DGeographicCoordinates> |
ToGeoJsonPoint()
Converts a Coordinates2D instance to a GeoJsonPoint of GeoJson2DGeographicCoordinates
Declaration
public GeoJsonPoint<GeoJson2DGeographicCoordinates> ToGeoJsonPoint()
Returns
Type | Description |
---|---|
GeoJsonPoint<GeoJson2DGeographicCoordinates> |