Beispiel #1
0
        /// <summary>
        /// Returns the features that intersects with 'geom'
        /// </summary>
        /// <param name="geom">Geometry</param>
        /// <returns>FeatureDataTable</returns>
        public FeatureDataTable ExecuteIntersectionQuery(Geometry geom)
        {
            var fds = new FeatureDataSet();

            ExecuteIntersectionQuery(geom, fds);
            return(fds.Tables[0]);
        }
Beispiel #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="other"></param>
 /// <param name="tolerance"></param>
 /// <returns></returns>
 public override bool EqualsExact(Gisoft.GeoAPI.Geometries.IGeometry other, double tolerance)
 {
     if (!IsEquivalentClass(other))
     {
         return(false);
     }
     return(base.EqualsExact(other, tolerance));
 }
Beispiel #3
0
        /// <summary>
        /// Returns the data associated with all the geometries that are intersected by 'geom'
        /// </summary>
        /// <param name="geometry">Geometry to intersect with</param>
        /// <param name="ds">FeatureDataSet to fill data into</param>
        public void ExecuteIntersectionQuery(IGeometry geometry, FeatureDataSet ds)
        {
            geometry = ToSource(geometry);

            lock (_dataSource)
            {
                _dataSource.Open();
                _dataSource.ExecuteIntersectionQuery(geometry, ds);
                _dataSource.Close();
            }
        }
Beispiel #4
0
 /// <summary>
 /// Returns the data associated with all the geometries that are intersected by 'geom'
 /// </summary>
 /// <param name="geom">Geometry to intersect with</param>
 /// <param name="ds">FeatureDataSet to fill data into</param>
 protected override void OnExecuteIntersectionQuery(Geometry geom, FeatureDataSet ds)
 {
     using (var ogrGeometry = OgrGeometry.CreateFromWkb(GeometryToWKB.Write(geom)))
     {
         OgrDataSource ogrDataSource;
         using (var ogrLayer = GetLayer(_layerIndex, out ogrDataSource))
         {
             ogrLayer.SetSpatialFilter(ogrGeometry);
             ExecuteIntersectionQuery(ds, ogrLayer);
             ogrDataSource.Dispose();
         }
     }
 }
Beispiel #5
0
 public FeatureDataTable QueryFeatures(Geometry geom, double distance)
 {
     throw new NotSupportedException();
 }