/// <inheritdoc/>
 public override string ToString() => SpatialFormatter.EncodePolygon(this);
Пример #2
0
 /// <summary>
 /// Convert a <see cref="GeoLine"/> forming a polygon to an OData
 /// value.  A GeoLine must have at least four
 /// <see cref="GeoLine.Positions"/> and the first and last must
 /// match to form a searchable polygon.
 /// </summary>
 /// <param name="line">The line forming a polygon.</param>
 /// <returns>The OData representation of the line.</returns>
 private static string EncodeGeography(GeoLine line) =>
 SpatialFormatter.EncodePolygon(line);
Пример #3
0
 /// <summary>
 /// Convert a <see cref="GeoPolygon"/> to an OData value.  A
 /// GeoPolygon must have exactly one <see cref="GeoPolygon.Rings"/>
 /// to form a searchable polygon.
 /// </summary>
 /// <param name="polygon">The polygon.</param>
 /// <returns>The OData representation of the polygon.</returns>
 private static string EncodeGeography(GeoPolygon polygon) =>
 SpatialFormatter.EncodePolygon(polygon);
Пример #4
0
 /// <summary>
 /// Convert a <see cref="GeoPosition"/> to an OData value.
 /// </summary>
 /// <param name="position">The position.</param>
 /// <returns>The OData representation of the position.</returns>
 private static string EncodeGeography(GeoPosition position) =>
 SpatialFormatter.EncodePoint(position.Longitude, position.Latitude);