Select to view content in your preferred language

Select cells from raster layer

653
0
09-08-2010 01:01 AM
PriyankaMehta
Deactivated User
Hi all,
    I have a raster grid and I wanted to select cells based on its attribute. I reclassified that grid based on Value so that I could get an attribute table attached to it.

Now it has a field called "Value" in its attribute table , on which i want to perform "Select by attributes"  query and want those cells selected

like for a feature layer I would have simply done it as :


If Not TypeOf pMap.Layer(0) Is IFeatureLayer Then Exit Sub
  Set pFeatureLayer = pMap.Layer(0)
  Set pFeatureSelection = pFeatureLayer 'QI
  
  'Create the query filter
  Set pQueryFilter = New QueryFilter
  pQueryFilter.WhereClause = "VALUE = 12"
  
  'Invalidate only the selection cache
  'Flag the original selection
  pActiveView.PartialRefresh esriViewGeoSelection, Nothing, Nothing
  'Perform the selection
  pFeatureSelection.SelectFeatures pQueryFilter, esriSelectionResultNew, False
  'Flag the new selection
  pActiveView.PartialRefresh esriViewGeoSelection, Nothing, Nothing
  





and could have those features selected.

How can it be possible to select cells in a raster layer in a similar way through VB ?


Please help.

Thanks and Regards,
Priyanka
0 Kudos
0 Replies