arcengine ispatialfilter 怎么用
发布网友
发布时间:2022-04-30 06:47
我来回答
共1个回答
热心网友
时间:2023-10-20 05:01
ESRI.ArcGIS.Geometry.IEnvelope envelope = point.Envelope;
envelope.Expand(searchTolerance, searchTolerance, false);
ESRI.ArcGIS.Geodatabase.IFeatureClass featureClass = geoFeatureLayer.FeatureClass;
System.String shapeFieldName = featureClass.ShapeFieldName;
// Create a new spatial filter and use the new envelope as the geometry
ESRI.ArcGIS.Geodatabase.ISpatialFilter spatialFilter = new ESRI.ArcGIS.Geodatabase.SpatialFilterClass();
spatialFilter.Geometry = envelope;
spatialFilter.SpatialRel = ESRI.ArcGIS.Geodatabase.esriSpatialRelEnum.esriSpatialRelEnvelopeIntersects;
spatialFilter.set_OutputSpatialReference(shapeFieldName, map.SpatialReference);
spatialFilter.GeometryField = shapeFieldName;
// Do the search
ESRI.ArcGIS.Geodatabase.IFeatureCursor featureCursor = featureClass.Search(spatialFilter, false);
这是AE帮助上的 ,还可以设置whereclause属性进行空间和属性综合查询
热心网友
时间:2023-10-20 05:01
ESRI.ArcGIS.Geometry.IEnvelope envelope = point.Envelope;
envelope.Expand(searchTolerance, searchTolerance, false);
ESRI.ArcGIS.Geodatabase.IFeatureClass featureClass = geoFeatureLayer.FeatureClass;
System.String shapeFieldName = featureClass.ShapeFieldName;
// Create a new spatial filter and use the new envelope as the geometry
ESRI.ArcGIS.Geodatabase.ISpatialFilter spatialFilter = new ESRI.ArcGIS.Geodatabase.SpatialFilterClass();
spatialFilter.Geometry = envelope;
spatialFilter.SpatialRel = ESRI.ArcGIS.Geodatabase.esriSpatialRelEnum.esriSpatialRelEnvelopeIntersects;
spatialFilter.set_OutputSpatialReference(shapeFieldName, map.SpatialReference);
spatialFilter.GeometryField = shapeFieldName;
// Do the search
ESRI.ArcGIS.Geodatabase.IFeatureCursor featureCursor = featureClass.Search(spatialFilter, false);
这是AE帮助上的 ,还可以设置whereclause属性进行空间和属性综合查询