Exemple #1
0
        public EsriPolygon(EsriPoint[][] points)
        {
            if (points == null)
            {
                throw new NotImplementedException();
            }

            this.points = points.Where(i => i.Length > 3).SelectMany(i => i).ToArray();

            if (this.points.Length == 0)
            {
                this.Srid = 0;
            }
            else
            {
                this.Srid = this.points.First().Srid;
            }

            this.parts = new int[points.Length];

            for (int i = 1; i < points.Length; i++)
            {
                parts[i] = points.Where((array, index) => index < i).Sum(array => array.Length);
            }

            var boundingBoxes = points.Select(i => BoundingBox.CalculateBoundingBox(i /*.Cast<IRI.Msh.Common.Primitives.IPoint>()*/));

            this.boundingBox = BoundingBox.GetMergedBoundingBox(boundingBoxes);

            //this.boundingBox = IRI.Msh.Common.Infrastructure.CalculateBoundingBox(this.points.Cast<IRI.Msh.Common.Primitives.IPoint>());
        }
Exemple #2
0
        public void Update(Geometry symbol, List <Point> pointCollection, bool canEdit = true, bool polyBezierMode = true)
        {
            this._symbol = symbol;

            this.Extent = BoundingBox.CalculateBoundingBox(pointCollection);

            _pointCollection = pointCollection;

            this._isPolyBezierMode = polyBezierMode;
        }
Exemple #3
0
 public BoundingBox GetBoundingBox()
 {
     return(BoundingBox.CalculateBoundingBox(GetAllPoints()));
 }