GetFullExtent() публичный Метод

Get full extent of featureClass
public GetFullExtent ( string featureClassName ) : IEnvelope
featureClassName string FeatureClass name
Результат IEnvelope
Пример #1
0
        public void TestMethod1()
        {
            int percent = 0;

            var repository = new SdeRepository("srvprodist", "5151", "bdgd", "bdgd", "sde.DEFAULT");
            var cache = new InMemoryCache(repository, repository.GetFullExtent("admgid.Switch_PT"), "admgid.Switch_PT");

            cache.OnProgress += delegate(int i)
                {
                    percent = i;
                };

            cache.BuildAllCache();

            IList<IGeometry> list = new List<IGeometry>();

            var envelop = new Envelope(325017, 320003, 7392018, 7391712);
            IEnvelope affected = null;

            var inicio = DateTime.Now;
            var result = cache.RetriveData(envelop, ref list, ref affected);
            var tempo1 = (DateTime.Now - inicio).TotalMilliseconds;

            inicio = DateTime.Now;
            var fromSde = repository.GetByEnvelope("admgid.Switch_PT", envelop);
            var tempo2 = (DateTime.Now - inicio).TotalMilliseconds;

            Assert.AreEqual(list.Count, fromSde.Count());
            Assert.IsTrue(tempo1 < tempo2);
            Assert.AreEqual(percent, 100);
        }
Пример #2
0
        public CacheManager()
        {
            var sde = new SdeRepository("srvprodist", "5151", "bdgd", "bdgd", "sde.DEFAULT");
            var mongo = new MongoRepository();

            var cache1 = new InMemoryCache(mongo, sde.GetFullExtent(FeatureName), FeatureName);
            var cache2 = new NoSqlCache(sde, mongo, FeatureName);
            var cache3 = new SdeCache(sde, FeatureName);

            this.Caches = new List<ICache> { cache1, cache2, cache3 };
        }