ThinkGeo.com    |     Documentation    |     Premium Support

RasterLayer Background Drawing Question

I was wondering if there is a way to control the background drawing, or not drawing of a RasterLayer. Specifically I am using a MrSidRasterLayer. By background drawing I mean the areas on the image file where there is not data. I have included two files to illustrate the functionality I need.


In the first image (image_before) you can see the actual image data does not include the entire extent of the image canvas. If I try to tile two spatially coincident images on the map the black areas block out the neighboring image.


The second image (image_after) shows the image drawn without drawing the background. In this case I can successfully spatially coincident images.


The desired functionality I illustrated in image_after was archived using ArcMap. In the layer properties I was able to select an option that told it to draw the background with RGB as 0,0,0. I am hoping there is a similar way I can achieve the same results using the MrSidRasterLayer.


Any feedback is greatly appreciated. Thanks


Eric S.


 



Eric,


If I am not misunderstanding anything, this requirement is almost same with following post one:
gis.thinkgeo.com/Support/Dis...fault.aspx
 
Try following property:
mrSidRasterLayer.KeyColors.Add(GeoColor.FromArgb(0, 0, 0, 0));
 
Any more questions just feel free to let me know.
 
Thanks.
 
Yale

Yale,


Thanks for pointing out the other thread. Sorry I missed it. The snippet you provided helped but did not quite do the trick. I am no imagaery master, so I am not quite sure why, but I had to change the alpha value to 255, instead of 0. I can now sucesfully tile my images. Thanks


Eric.



Eric, 
  
 Thanks for your feedback. 
  
 I am not quite sure the difference mentioned. I am glad you are making progress. 
  
 Any more questions just feel free to let us know. 
  
 Thanks. 
  
 Yale