Parameters
- multipart
- The polygon or polyline whose orientation will be reversed.
Return Value
A geometry whose directionality has been reversed.
Exception | Description |
---|---|
System.ArgumentNullException | Multipart is null or empty. |
List<Coordinate2D> list2D = new List<Coordinate2D>(); list2D.Add(new Coordinate2D(1.0, 1.0)); list2D.Add(new Coordinate2D(1.0, 2.0)); list2D.Add(new Coordinate2D(2.0, 2.0)); list2D.Add(new Coordinate2D(2.0, 1.0)); Polygon polygon = PolygonBuilder.CreatePolygon(list2D); Geometry g = GeometryEngine.Instance.ReverseOrientation(polygon); Polygon gPolygon = g as Polygon; // gPolygon.Points[0] = 1.0, 1.0 // gPolygon.Points[1] = 2.0, 1.0 // gPolygon.Points[2] = 2.0, 2.0 // gPolygon.Points[3] = 1.0, 2.0 // gPolygon.Points[4] = 1.0, 1.0 // gPolygon.Area = -1 * polygon.Area
Target Platforms: Windows 10, Windows 8.1, Windows 7