# Display tif file that contains multiple images

**URL:** <https://community.thinkgeo.com/t/display-tif-file-that-contains-multiple-images/3832>\
**Category:** WPF\
**Created:** [June 24, 2015, 2:21am UTC](https://community.thinkgeo.com/t/display-tif-file-that-contains-multiple-images/3832 "2015-06-24T02:21:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![miri](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/m/3da27b/32.png) [@miri](https://community.thinkgeo.com/u/miri)\
**Post date:** [June 24, 2015, 2:21am UTC](https://community.thinkgeo.com/t/display-tif-file-that-contains-multiple-images/3832/1 "2015-06-24T02:21:28Z")

</div>

Hello,  
  
  
  
I&nbsp;need&nbsp;to&nbsp;open&nbsp;a&nbsp;.tiff&nbsp;file&nbsp;that&nbsp;contains&nbsp;several&nbsp;"pages"/"images"&nbsp;within&nbsp;it.  
  
I&nbsp;read&nbsp;the&nbsp;file&nbsp;into&nbsp;a&nbsp;GeoTiffRasterLayer,&nbsp;but&nbsp;then&nbsp;I&nbsp;can&nbsp;see&nbsp;only&nbsp;1&nbsp;image&nbsp;(probably&nbsp;the&nbsp;first&nbsp;one)  
  
  
  
The&nbsp;file&nbsp;I&nbsp;am&nbsp;working&nbsp;with&nbsp;contains&nbsp;7&nbsp;"pages",&nbsp;you&nbsp;can&nbsp;download&nbsp;it&nbsp;from&nbsp;here:&nbsp;  
  
tif:&nbsp;dropbox.com/s/n1aty7zebr2m034/Map500000\_9281.tif?dl=0  
  
tfw:&nbsp;dropbox.com/s/df3asxw2u0yk8pc/Map500000\_9281.tfw?dl=0  
  
  
  
How&nbsp;can&nbsp;I&nbsp;display&nbsp;all&nbsp;the&nbsp;images&nbsp;in&nbsp;the&nbsp;file?&nbsp;  
  
Best&nbsp;regards

> `public static bool AddGeoTiffLayers(string filePath, WpfMap map,bool refresh, out GeoTiffRasterLayer layer)`  
> `      ``{`  
> `          ``try`  
> `          ``{`  
> `              ``string layerName = new FileInfo(filePath).Name;`  
> `              ``string extentionName = Path.GetExtension(filePath).ToUpperInvariant();               `  
> `           `&nbsp;  
> `              ``GeoTiffRasterLayer worldLayer = new GeoTiffRasterLayer(filePath);`  
> `              ``string key = KeyGen.NewStringKey();`  
> `              ``worldLayer.Name = key;              `  
> `             `&nbsp;  
> `              ``LayerOverlay layerOverlay = new LayerOverlay();`  
> `              ``layerOverlay.Name = key;                              `  
> `              ``layerOverlay.Layers.Add(key, worldLayer);             `  
> `              ``map.Overlays.Add(key, layerOverlay);               `  
> `              ``layer = worldLayer;`  
> `              ``if (refresh)`  
> `                  ``map.Refresh((map.Overlays[key]));`  
> `              ``return true;`  
> `              `&nbsp;  
> `          ``}`  
> `          ``catch (Exception ex)`  
> `          ``{`  
> `              ``MessageBox.Show(ex.Message, ex.GetType().ToString(), MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, (MessageBoxOptions)0);              `  
> `          ``}`  
> `          ``layer = null;`  
> `          ``return false;`  
> `         `&nbsp;  
> `      ``}`

---

<div class="post-metadata">

**Author:** ![Troy](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/t/85f322/32.png) [@Troy](https://community.thinkgeo.com/u/Troy)\
**Post date:** [June 26, 2015, 2:47am UTC](https://community.thinkgeo.com/t/display-tif-file-that-contains-multiple-images/3832/2 "2015-06-26T02:47:32Z")

</div>

Hi&nbsp;Miri,  
  
  
  
I&nbsp;tried&nbsp;your&nbsp;data&nbsp;and&nbsp;looks&nbsp;like&nbsp;there&nbsp;is&nbsp;only&nbsp;one&nbsp;"image"&nbsp;in&nbsp;the&nbsp;tif&nbsp;file.&nbsp;would&nbsp;you&nbsp;please&nbsp;verify&nbsp;it?&nbsp;If&nbsp;there&nbsp;are&nbsp;some&nbsp;other&nbsp;images,&nbsp;we&nbsp;can&nbsp;specify&nbsp;its&nbsp;FeatureClassName&nbsp;property&nbsp;and&nbsp;FeatureSchemaName&nbsp;to&nbsp;display&nbsp;the&nbsp;difference&nbsp;image.  
  
  
  
Any&nbsp;questions,&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;us&nbsp;know.  
  
  
  
Thanks,  
  
  
  
Troy
