コード例 #1
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);
コード例 #2
0
 /// <inheritdoc/>
 public override string ToString() => SpatialFormatter.EncodePolygon(this);
コード例 #3
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);