I'm having a problem with reading pixel values from the image server layer. The image server layer class implements IRasterLayer, so when I tried to read pixel values using
IRaster2 obtained through the
IRasterLayer implementation, I could read pixel values. However, these pixel values are sometimes one pixel shifted because there are two rasters in the layer and their pixels are not lined up perfectly.
IRaster2 only accepts one row & column pair, which means that it doesn't take into account multiple raster sources in the image server layer and, if their pixels are not aligned perfectly, just one row & column counting from the upper left corner of the layer cannot read the original pixel values from the data sources.
I tried to access individual rasters stored in the attribute table of the image server layer (Raster column), but it returns null. For example, the following line returns null:
In ArcMap, I can access each row's raster data in the attribute table.
The Identify tool in ArcMap doesn't have this problem and it can read original pixel values from individual raster sources.
I'm sure there should be an easy way of accessing source rasters in the image server layer. Or there should be a recommended method for reading pixel values from the image server layer.