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(); }
internal MultiPolygon ToLngLat(MultiPolygon prjMulgon) { if (_ProjectedSystem == ProjectedSystem.WebMercator) { return(WebMercator2lonLat(prjMulgon)); } else { return(prjMulgon.Clone()); } }
internal MultiPolygon ToProjCo(MultiPolygon gemMulgon) { if (_ProjectedSystem == ProjectedSystem.WebMercator) { return(lonLat2WebMercator(gemMulgon)); } else { return(gemMulgon.Clone()); } }
public void Clone_an_invalid_multipolygon_should_be_invalid() { var multiPolygon = new MultiPolygon(); multiPolygon.Clone().IsValid.ShouldBeFalse(); }