Esempio n. 1
0
        protected override void DrawCore(GeoCanvas canvas, Collection <SimpleCandidate> labelsInAllLayers)
        {
            Collection <string> ids = rTreeIndex.GetFeatureIdsIntersectingBoundingBox(canvas.CurrentWorldExtent);

            var layers = rasterLayers.Where(a => ids.Contains(a.PathFilename));

            foreach (var layer in layers)
            {
                layer.Open();
                layer.Draw(canvas, labelsInAllLayers);
            }
        }
        protected override Collection <Feature> GetFeaturesInsideBoundingBoxCore(RectangleShape boundingBox, IEnumerable <string> returningColumnNames)
        {
            if (!RequireIndex)
            {
                return(base.GetFeaturesInsideBoundingBoxCore(boundingBox, returningColumnNames));
            }

            Collection <Feature> results = new Collection <Feature>();

            string[] ids = rTreeIndex.GetFeatureIdsIntersectingBoundingBox(boundingBox).ToArray();

            if (ids.Length > 0)
            {
                results = GetFeaturesByIdsCore(ids, returningColumnNames);
            }

            return(results);
        }
        protected override Collection <Feature> GetFeaturesInsideBoundingBoxCore(RectangleShape boundingBox, IEnumerable <string> returningColumnNames)
        {
            //Validators.CheckFeatureSourceIsOpen(IsOpen);
            //Validators.CheckParameterIsNotNull(boundingBox, "boungingBox");
            //Validators.CheckShapeIsValidForOperation(boundingBox);

            Collection <Feature> returnValues = new Collection <Feature>();

            //if (rTreeIndex.HasIdx)
            if (rTreeIndex != null)
            {
                Collection <string> ids = rTreeIndex.GetFeatureIdsIntersectingBoundingBox(boundingBox);
                returnValues = GetFeaturesByIdsCore(ids, returningColumnNames);
            }
            else
            {
                returnValues = base.GetFeaturesInsideBoundingBoxCore(boundingBox, returningColumnNames);
            }
            return(returnValues);
        }