![]() ![]() |
ESRI.ArcGIS.ADF.IMS | |
Identify Method | |
See Also Example Send Feedback |
ESRI.ArcGIS.ADF.IMS.Carto.Layer Namespace > ImageLayer Class : Identify Method |
- point
- Point at which to get pixel values for.
Visual Basic (Declaration) | |
---|---|
Public Function Identify( _ ByVal point As Point _ ) As MultibandCollection |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As ImageLayer Dim point As Point Dim value As MultibandCollection value = instance.Identify(point) |
C# | |
---|---|
public MultibandCollection Identify( Point point ) |
Parameters
- point
- Point at which to get pixel values for.
Return Value
MultibandCollection containing the pixel values. The following example performs an identify on an image layer at a point, and displays the results. In this case, the image layer is a single image rather than a raster catalog, so only a single Multiband object will be returned within the MultibandCollection. The image is a JPG image, so we get back three bands, one for each RGB color. This example assumes an existing MapView object.
C# | ![]() |
---|---|
// Find the layer to identify on ImageLayer imgLayer = (ImageLayer)mapView.Layers.FindByName("World Image"); // Do identify Point idPt = new Point(-99.0, 44.0); MultibandCollection idResultCollection = imgLayer.Identify(idPt); // Since this is a single image, only one item is in the collection // (raster catalogs could have multiple image pixels at a location) Multiband idResult = idResultCollection[0]; // Display the value in the pixel. In this case, it's the RGB value of the pixel. Label1.Text = String.Format("Pixel color values in {0} at x={1}, y={2} are: R={3}, G={4}, B={5}", idResult.RasterID, idPt.X, idPt.Y, idResult[0], idResult[1], idResult[2]); |
Visual Basic | ![]() |
---|---|
' Find the layer to identify on Dim imgLayer As ImageLayer = _ CType(mapView.Layers.FindByName("World Image"), ImageLayer) ' Do identify Dim idPt As New Point(-99.0, 44.0) Dim idResultCollection As MultibandCollection = imgLayer.Identify(idPt) ' Since this is a single image, only one item is in the collection ' (raster catalogs could have multiple image pixels at a location) Dim idResult As Multiband = idResultCollection(0) ' Display the value in the pixel. In this case, it's the RGB value of the pixel. Label1.Text = _ String.Format("Pixel color values in {0} at x={1}, y={2} are: R={3}, G={4}, B={5}", _ idResult.RasterID, idPt.X, idPt.Y, idResult(0), idResult(1), idResult(2)) |
This method gets the values at one pixel in the image layer. It is not possible to retrieve values for more than one pixel in a single step.
Identify does not work on GeoTiff layers with image services. It does work on GeoTiff layers in an ArcMap image service. Identify works on all other image formats.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family