select by location با استفاده از C#.NET
//C#private void SelectByShape(IGeometry searchShape, IFeatureLayer searchTarget){ //set up the spatial filtert.FeatureClass; ISpatialFilter spatialFilter = new SpatIFeatureClass featureClass = searchTarg
eialFilterClass(); spatialFilter.Geometry = searchShape;; spatialFilter.SpatialRel = esriSpatialRelEnum.esriSpatiaspatialFilter.GeometryField = featureClass.ShapeFieldNam
elRelIntersects; IFeatureSelection featureSelection = searchTarget as IFeatureSelection;esriSelectionResultEnum.esriSelectionResultNew,featureSelection.SelectFeatures(spatialFilter,
false); //Fire the selection changed event featureSelection.SelectionChanged();//Refresh the visible extent this.axMapControl1.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection,
searchTarget, this.axMapControl1.ActiveView.ScreenDisplay.DisplayTransformation.VisibleBounds); }hape, selectionEnvironmet, fals//Ex2 using IMap::SelectByShape rivate void SelectByShape(IGeometry searchShape, IMap map, ISelectionEnvironment selectionEnvironmet) { map.SelectByShape(search
Se); //Refresh the visible extent this.axMapControl1.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null,}this.axMapControl1.ActiveView.ScreenDisplay.DisplayTransformation.VisibleBounds);
+ نوشته شده در چهارشنبه بیست و سوم بهمن ۱۳۹۲ ساعت 17:36 توسط حمیدرضاحسن آبادی
|
حمیدرضاحسن آبادی هستم