Exemplo n.º 1
0
        static public void ReleaseCachedFeatureCollection(ICachedFeatureCollection cachedFeatureColledion)
        {
            CachedFeatureCollection collection = cachedFeatureColledion as CachedFeatureCollection;

            if (collection != null)
            {
                collection.Released = true;
            }
        }
Exemplo n.º 2
0
        private IFeatureCursor GetFeatures(Guid guid, IQueryFilter filter)
        {
            ICachedFeatureCollection collection = FeatureCache.GetUsableFeatureCollection(guid, filter);

            if (collection != null)
            {
                return(collection.FeatureCursor(filter));
            }
            else
            {
                FeatureCache.RemoveFeatureCollection(guid);

                collection = FeatureCache.CreateCachedFeatureCollection(guid, filter);
                return(new CachingFeatureCursor(collection, this.FeatureCursor(filter)));
            }
        }
Exemplo n.º 3
0
        static public void RemoveFeatureCollection(ICachedFeatureCollection collection)
        {
            Guid guid  = new Guid();
            bool found = false;

            foreach (Guid g in _collections.Keys)
            {
                if (_collections[g] == collection)
                {
                    guid  = g;
                    found = true;
                }
            }
            if (found)
            {
                RemoveFeatureCollection(guid);
            }
        }
Exemplo n.º 4
0
        public IFeatureCursor GetSelectedFeatures(IDisplay display)
        {
            ICachedFeatureCollection collection = FeatureCache.GetCachedFeatureCollection(this._selectionGUID);

            if (collection == null)
            {
                return(null);
            }

            if (display != null)
            {
                SpatialFilter filter = new SpatialFilter();
                filter.SpatialRelation        = spatialRelation.SpatialRelationMapEnvelopeIntersects;
                filter.Geometry               = display.Envelope;
                filter.FilterSpatialReference = display.SpatialReference;

                return(collection.FeatureCursor(filter));
            }
            else
            {
                return(collection.FeatureCursor());
            }
        }
Exemplo n.º 5
0
 public CachingFeatureCursor(ICachedFeatureCollection cfCollection, IFeatureCursor cursor)
 {
     _cursor       = cursor;
     _cfCollection = cfCollection;
 }