private void buildAndSaveIndex(MapAround.Mapping.FeatureType featureType, BoundingRectangle b, IndexSettings settings, IEnumerable <Feature> features) { ISpatialIndex index = null; if (b.IsEmpty()) { b = new BoundingRectangle(0, 0, 0, 0); } if (settings.IndexType == "QuadTree") { index = new QuadTree(b); } if (index == null) { index = new KDTree(b); } index.MaxDepth = settings.MaxDepth; index.BoxSquareThreshold = settings.BoxSquareThreshold; index.MinObjectCount = settings.MinFeatureCount; index.Build(features); _cacheAccessor.SaveFeaturesIndex(index, featureType); }
/// <summary> /// Создает и сохраняет индекс /// </summary> /// <param name="featureType"></param> /// <param name="b"></param> /// <param name="settings"></param> /// <param name="features"></param> private void buildAndSaveIndex(MapAround.Mapping.FeatureType featureType, BoundingRectangle b, IndexSettings settings, IEnumerable <Feature> features) { throw new NotImplementedException(); // ISpatialIndex index = null; // if (b.IsEmpty()) // b = new BoundingRectangle(0, 0, 0, 0); // if (settings.IndexType == "QuadTree") // index = new QuadTree(b); // if (index == null) // index = new KDTree(b); // index.MaxDepth = settings.MaxDepth; // index.BoxSquareThreshold = settings.BoxSquareThreshold; // index.MinObjectCount = settings.MinFeatureCount; // index.Build(features); // _cacheAccessor.SaveFeaturesIndex(index, featureType); }