示例#1
0
        override internal bool AddFeature(long n, int l, FeatureEnvelope featEnv)
        {
            n = _searchTree.InsertSINode(featEnv.Envelope);

            List <FeatureEnvelope> list;

            if (!_nodes.TryGetValue(n, out list))
            {
                list = new List <FeatureEnvelope>();
                _nodes.Add(n, list);
            }
            list.Add(featEnv);

            return(true);
        }
示例#2
0
            public void AddFeature(IFeature feature)
            {
                if (feature == null)
                {
                    return;
                }

                long NID = (feature.Shape != null && _tree != null) ?
                           _tree.InsertSINode(feature.Shape.Envelope) : 0;

                if (_tree != null)
                {
                    _tree.AddNodeNumber(NID);
                }

                List <IFeature> features;

                if (!_features.TryGetValue(NID, out features))
                {
                    features = new List <IFeature>();
                    _features.Add(NID, features);
                }
                features.Add(feature);
            }