Пример #1
0
 /// <summary>
 /// Add a point to the polygon or polyline.
 /// </summary>
 /// <param name="coords">point to add.</param>
 public void AddPoint(GeoCoords coords) => AddPoint(coords.Latitude, coords.Longitude);
Пример #2
0
 /// <summary>
 /// Return the results assuming a tentative final test point is added; however, the data for the test point is not saved.
 /// This lets you report a running result for the perimeter and area as the user moves the mouse cursor.
 /// Ordinary floating point arithmetic is used to accumulate the data for the test point;
 /// thus the area and perimeter returned are less accurate than if
 /// <see cref="AddPoint(GeoCoords)"/> and <see cref="Compute(bool, bool)"/> are used.
 /// </summary>
 /// <param name="coords">point to test.</param>
 /// <param name="reverse">if <see langword="true"/> then clockwise (instead of counter-clockwise) traversal counts as a positive area.</param>
 /// <param name="sign">if <see langword="true"/> then return a signed result for the area if the polygon is traversed in the "wrong" direction
 /// instead of returning the area for the rest of the earth.</param>
 /// <returns>
 /// <list type="bullet">
 /// <item>
 /// <i>points</i>, the number of points.
 /// </item>
 /// <item>
 /// <i>perimeter</i>, the perimeter of the polygon or length of the polyline (meters).
 /// </item>
 /// <item>
 /// <i>area</i>, the area of the polygon (meters^2); only set if polyline is <see langword="false"/> in the constructor.
 /// </item>
 /// </list>
 /// </returns>
 public (int points, double perimeter, double area) TestPoint(GeoCoords coords, bool reverse, bool sign)
 => TestPoint(coords.Latitude, coords.Longitude, reverse, sign);
Пример #3
0
 public double Evaluate(GeoCoords coords) => Evaluate(coords.Latitude, coords.Longitude);