Exemple #1
0
        /// <summary>
        ///
        /// </summary>
        private void BuildIndex()
        {
            tree = new Bintree();

            ICoordinate[] pts    = CoordinateArrays.RemoveRepeatedPoints(ring.Coordinates);
            IList         mcList = MonotoneChainBuilder.GetChains(pts);

            for (int i = 0; i < mcList.Count; i++)
            {
                MonotoneChain mc    = (MonotoneChain)mcList[i];
                IEnvelope     mcEnv = mc.Envelope;
                interval.Min = mcEnv.MinY;
                interval.Max = mcEnv.MaxY;
                tree.Insert(interval, mc);
            }
        }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        private void BuildIndex()
        {
            _tree = new Bintree();

            IList <Coordinate> pts = CoordinateArrays.RemoveRepeatedPoints(_ring.Coordinates);
            IList mcList           = MonotoneChainBuilder.GetChains(pts);

            for (int i = 0; i < mcList.Count; i++)
            {
                MonotoneChain mc    = (MonotoneChain)mcList[i];
                Envelope      mcEnv = mc.Envelope;
                _interval.Min = mcEnv.Minimum.Y;
                _interval.Max = mcEnv.Maximum.Y;
                _tree.Insert(_interval, mc);
            }
        }
        /// <summary>
        ///
        /// </summary>
        private void BuildIndex()
        {
            _tree = new Bintree <MonotoneChain>();

            Coordinate[]          pts    = CoordinateArrays.RemoveRepeatedPoints(_ring.Coordinates);
            IList <MonotoneChain> mcList = MonotoneChainBuilder.GetChains(pts);

            foreach (MonotoneChain mc in mcList)
            {
                var mcEnv = mc.Envelope;
                _interval.Min = mcEnv.MinY;
                _interval.Max = mcEnv.MaxY;

                /*
                 * _interval = _interval.ExpandedByInterval(
                 *  Interval.Create(mcEnv.MinY, mcEnv.MaxY));
                 */
                _tree.Insert(_interval, mc);
            }
        }
        /// <summary>
        /// 
        /// </summary>
        private void BuildIndex()
        {
            _tree = new Bintree<MonotoneChain>();

            Coordinate[] pts = CoordinateArrays.RemoveRepeatedPoints(_ring.Coordinates);
            IList<MonotoneChain> mcList = MonotoneChainBuilder.GetChains(pts);

            foreach (MonotoneChain mc in mcList)
            {
                var mcEnv = mc.Envelope;
                _interval.Min = mcEnv.MinY;
                _interval.Max = mcEnv.MaxY;
                /*
                _interval = _interval.ExpandedByInterval(
                    Interval.Create(mcEnv.MinY, mcEnv.MaxY));
                 */
                _tree.Insert(_interval, mc);
            }
        }