예제 #1
0
        public override void ExecuteIntersectionQuery(BoundingBox box, FeatureDataSet ds)
        {
            var table = CreateTable();
            table.BeginLoadData();

            foreach (var kvp in Matrix)
            {
                var id = kvp.Key;
                if (box.Intersects(kvp.Value.EnvelopeInternal))
                {
                    var val = Matrix[kvp.Key, MatrixVector];
                    if (!Valid(val))
                        continue;

                    var row =
                        (FeatureDataRow)
                        table.LoadDataRow(new object[] { id, val }, LoadOption.Upsert);

                    var sval = Scale(val);
                    row.Geometry = CreateCircle(kvp.Value, sval);
                }
            }
            table.EndLoadData();

            ds.Tables.Add(table);
        }
예제 #2
0
        public override void ExecuteIntersectionQuery(BoundingBox box, FeatureDataSet ds)
        {
            var table = CreateTable();

            table.BeginLoadData();

            foreach (var kvp in Matrix)
            {
                var id = kvp.Key;
                if (box.Intersects(kvp.Value.EnvelopeInternal))
                {
                    var val = Matrix[kvp.Key, MatrixVector];
                    if (!Valid(val))
                    {
                        continue;
                    }

                    var row =
                        (FeatureDataRow)
                        table.LoadDataRow(new object[] { id, val }, LoadOption.Upsert);

                    var sval = Scale(val);
                    row.Geometry = CreateCircle(kvp.Value, sval);
                }
            }
            table.EndLoadData();

            ds.Tables.Add(table);
        }
예제 #3
0
 public override Collection<uint> GetObjectIDsInView(BoundingBox bbox)
 {
     var res = new Collection<uint>();
     foreach (var kvp in Matrix)
     {
         if (bbox.Intersects(kvp.Value.EnvelopeInternal))
             res.Add(kvp.Key);
     }
     return res;
 }
예제 #4
0
        public override Collection <uint> GetObjectIDsInView(BoundingBox bbox)
        {
            var res = new Collection <uint>();

            foreach (var kvp in Matrix)
            {
                if (bbox.Intersects(kvp.Value.EnvelopeInternal))
                {
                    res.Add(kvp.Key);
                }
            }
            return(res);
        }
예제 #5
0
        /// <summary>
        /// Returns features within the specified bounding box.
        /// </summary>
        /// <param name="envelope"></param>
        /// <returns></returns>
        public override Collection <Geometry> GetGeometriesInView(BoundingBox envelope)
        {
            // Identifies all the features within the given BoundingBox
            var geoms = new Collection <Geometry>();

            foreach (var feature in _features)
            {
                if (envelope.Intersects(feature.Geometry.EnvelopeInternal))
                {
                    geoms.Add(feature.Geometry);
                }
            }
            return(geoms);
        }
예제 #6
0
        public override Collection<Geometry> GetGeometriesInView(BoundingBox bbox)
        {
            var res = new Collection<Geometry>();
            foreach (var origin in Matrix)
            {
                if (!bbox.Intersects(origin.Value.EnvelopeInternal))
                    continue;

                var val = Matrix[origin.Key, MatrixVector];
                if (!Valid(val))
                    continue;
                var sval = Scale(val);
                res.Add(CreateCircle(origin.Value, sval));
            }
            return res;
        }
예제 #7
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="envelope"></param>
        /// <param name="ds"></param>
        public override void ExecuteIntersectionQuery(BoundingBox envelope, FeatureDataSet ds)
        {
            // Identifies all the features within the given BoundingBox
            var dataTable = CreateFeatureDataTable();

            dataTable.BeginLoadData();
            foreach (Feature feature in _features)
            {
                if (envelope.Intersects(feature.Geometry.EnvelopeInternal))
                {
                    CreateNewRow(dataTable, feature);
                }
            }
            dataTable.EndLoadData();

            ds.Tables.Add(dataTable);
        }
예제 #8
0
        public override Collection <Geometry> GetGeometriesInView(BoundingBox bbox)
        {
            var res = new Collection <Geometry>();

            foreach (var origin in Matrix)
            {
                if (!bbox.Intersects(origin.Value.EnvelopeInternal))
                {
                    continue;
                }

                var val = Matrix[origin.Key, MatrixVector];
                if (!Valid(val))
                {
                    continue;
                }
                var sval = Scale(val);
                res.Add(CreateCircle(origin.Value, sval));
            }
            return(res);
        }
예제 #9
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="envelope"></param>
        /// <param name="ds"></param>
        public override void ExecuteIntersectionQuery(BoundingBox envelope, IFeatureCollectionSet ds, CancellationToken? ct = null)
        {
            // Identifies all the features within the given BoundingBox
            var dataTable = CreateFeatureDataTable();
            dataTable.BeginLoadData();
            foreach (Feature feature in _features)
            {
                if (envelope.Intersects(feature.Geometry.EnvelopeInternal))
                    CreateNewRow(dataTable, feature);
            }
            dataTable.EndLoadData();

            ds.Add(dataTable);
        }
예제 #10
0
 /// <summary>
 /// Returns features within the specified bounding box.
 /// </summary>
 /// <param name="envelope"></param>
 /// <returns></returns>
 public override IEnumerable<Geometry> GetGeometriesInView(BoundingBox envelope, CancellationToken? ct=null)
 {
     // Identifies all the features within the given BoundingBox
     var geoms = new Collection<Geometry>();
     foreach (var feature in _features)
         if (envelope.Intersects(feature.Geometry.EnvelopeInternal))
             geoms.Add(feature.Geometry);
     return geoms;
 }