コード例 #1
0
ファイル: Centroid.cs プロジェクト: klosejay/Gisoft.Map
        private void AddHole(Coordinate[] pts)
        {
            bool isPositiveArea = Orientation.IsCCW(pts);

            for (int i = 0; i < pts.Length - 1; i++)
            {
                AddTriangle(_areaBasePt, pts[i], pts[i + 1], isPositiveArea);
            }
            AddLineSegments(pts);
        }
コード例 #2
0
ファイル: Centroid.cs プロジェクト: klosejay/Gisoft.Map
        private void AddShell(Coordinate[] pts)
        {
            if (pts.Length > 0)
            {
                SetAreaBasePoint(pts[0]);
            }
            bool isPositiveArea = !Orientation.IsCCW(pts);

            for (int i = 0; i < pts.Length - 1; i++)
            {
                AddTriangle(_areaBasePt, pts[i], pts[i + 1], isPositiveArea);
            }
            AddLineSegments(pts);
        }
コード例 #3
0
 public static bool IsCCW(ICoordinateSequence ring)
 {
     return(Orientation.IsCCW(ring));
 }
コード例 #4
0
 public static bool IsCCW(Coordinate[] ring)
 {
     return(Orientation.IsCCW(ring));
 }