Exemplo n.º 1
0
 /// <summary>
 /// 
 /// </summary>
 private void ClosePts()
 {
     if (ptList.Count < 1) return;
     ICoordinate startPt = new Coordinate((ICoordinate) ptList[0]);
     var lastPt  = (ICoordinate) ptList[ptList.Count - 1];
     ICoordinate last2Pt = null;
     if (ptList.Count >= 2)
         last2Pt = (ICoordinate) ptList[ptList.Count - 2];
     if (startPt.Equals(lastPt))
         return;
     ptList.Add(startPt);
 }
Exemplo n.º 2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="pt"></param>
 private void AddPt(ICoordinate pt)
 {
     ICoordinate bufPt = new Coordinate(pt);
     precisionModel.MakePrecise( bufPt);
     // don't add duplicate points
     ICoordinate lastPt = null;
     if (ptList.Count >= 1)
         lastPt = (ICoordinate) ptList[ptList.Count - 1];
     if (lastPt != null && bufPt.Equals(lastPt)) return;            
     ptList.Add(bufPt);
 }