Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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:

((IAttributeTable)imageServerLayer).AttributeTable.GetRow(id).Value[rasterFieldIndex]

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.

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.