Esempio n. 1
0
 public void SetupBorders_()
 {
     var lands = _lands.Where(x => x.LandNo8 == "01310002").Select(x => new PolyLand
     {
         Code = x.Boundary,
         Points = x.Points
     }).ToList();
     var merger = new Merger(_boundaries);
     var polyLand = lands.First();
     merger.SetupBorders(polyLand);
     Assert.AreEqual(2, polyLand.Borders.Count);
 }
Esempio n. 2
0
 public void SetupBorders_當邊界線位於四個角落_應該切為兩段()
 {
     var polyland = new PolyLand()
     {
         Code = "03020015",
         Points = new List<Coordinate>()
         {
             new Coordinate(275503.47799410898,2757594.7833203459),
             new Coordinate(275466.72964286612,2757591.8214018894),
             new Coordinate(275429.94121402991,2757588.9532408221),
             new Coordinate(275429.93469449208,2757545.8932697494),
             new Coordinate(275500.75199733494,2757545.8642775714),
             new Coordinate(275503.22490233264,2757555.2275553606),
             new Coordinate(275508.72536459984,2757576.5936708814),
             new Coordinate(275508.03962494305,2757584.0420535933),
             new Coordinate(275507.41859157098,2757591.4964217525),
             new Coordinate(275503.47799410898,2757594.7833203459)
         }
     };
     
     var merger = new Merger(_boundaries);
     merger.SetupBorders(polyland);
     Assert.AreEqual(2, polyland.Borders.Count);
 }