예제 #1
0
        public void Clone_a_valid_multipolygon_should_equal_but_not_same()
        {
            var multiPolygon = new MultiPolygon(new[] { new Polygon(new[] { new LineString(new[] { new Point(30, 20), new Point(45, 40), new Point(10, 40), new Point(30, 20) }) }) });

            var copiedOne = multiPolygon.Clone();

            ReferenceEquals(multiPolygon, copiedOne).ShouldBeFalse();
            multiPolygon.Equals(copiedOne).ShouldBeTrue();
        }
예제 #2
0
 internal MultiPolygon ToLngLat(MultiPolygon prjMulgon)
 {
     if (_ProjectedSystem == ProjectedSystem.WebMercator)
     {
         return(WebMercator2lonLat(prjMulgon));
     }
     else
     {
         return(prjMulgon.Clone());
     }
 }
예제 #3
0
 internal MultiPolygon ToProjCo(MultiPolygon gemMulgon)
 {
     if (_ProjectedSystem == ProjectedSystem.WebMercator)
     {
         return(lonLat2WebMercator(gemMulgon));
     }
     else
     {
         return(gemMulgon.Clone());
     }
 }
예제 #4
0
        public void Clone_an_invalid_multipolygon_should_be_invalid()
        {
            var multiPolygon = new MultiPolygon();

            multiPolygon.Clone().IsValid.ShouldBeFalse();
        }