Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
 }