# Compressed GeoTiff

**URL:** <https://community.thinkgeo.com/t/compressed-geotiff/2121>\
**Category:** WinForms\
**Created:** [October 23, 2012, 5:36am UTC](https://community.thinkgeo.com/t/compressed-geotiff/2121 "2012-10-23T05:36:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan3](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/c68b51/32.png) [@Jonathan3](https://community.thinkgeo.com/u/Jonathan3)\
**Post date:** [October 23, 2012, 5:36am UTC](https://community.thinkgeo.com/t/compressed-geotiff/2121/1 "2012-10-23T05:36:30Z")

</div>

Hello,

I&nbsp;was&nbsp;trying&nbsp;to&nbsp;use&nbsp;some&nbsp;GeoTiff&nbsp;files&nbsp;using&nbsp;code&nbsp;like:  
  
**GeoTiffRasterLayer&nbsp;myTiffLayer&nbsp;=&nbsp;new&nbsp;GeoTiffRasterLayer(@"C:\Users\Public\Documents\Raster\SU01\_v2.tif");**

But&nbsp;when&nbsp;try&nbsp;to&nbsp;open&nbsp;the&nbsp;layer&nbsp;I&nbsp;get:  
  
**&nbsp;{"Cound&nbsp;not&nbsp;open&nbsp;the&nbsp;incoming&nbsp;Image,&nbsp;please&nbsp;check&nbsp;the&nbsp;tiff&nbsp;image&nbsp;is&nbsp;valid."}**

However&nbsp;I&nbsp;found&nbsp;that&nbsp;I&nbsp;could&nbsp;open&nbsp;the&nbsp;file&nbsp;either&nbsp;using&nbsp;GdiPlusRasterLayer&nbsp;or&nbsp;by&nbsp;opening&nbsp;the&nbsp;tiff&nbsp;file&nbsp;in&nbsp;MS-Paint&nbsp;and&nbsp;re-saving&nbsp;outside&nbsp;of&nbsp;MapSuite.&nbsp;&nbsp;I&nbsp;am&nbsp;pretty&nbsp;sure&nbsp;this&nbsp;is&nbsp;because&nbsp;the&nbsp;file(s)&nbsp;are&nbsp;compressed&nbsp;using&nbsp;LZW.

1.&nbsp;&nbsp;Is&nbsp;LZW&nbsp;compression&nbsp;a&nbsp;problem&nbsp;for&nbsp;GeoTiffs?

2.&nbsp;&nbsp;Also&nbsp;if&nbsp;I&nbsp;use&nbsp;GdiPlusRasterLayer&nbsp;is&nbsp;there&nbsp;a&nbsp;way&nbsp;I&nbsp;can&nbsp;still&nbsp;geo-reference&nbsp;using&nbsp;the&nbsp;TFW&nbsp;file?

Thanks,  
  
Jonathan

&nbsp;

---

<div class="post-metadata">

**Author:** ![Ryan](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/a8b319/32.png) [@Ryan](https://community.thinkgeo.com/u/Ryan)\
**Post date:** [October 23, 2012, 3:56pm UTC](https://community.thinkgeo.com/t/compressed-geotiff/2121/2 "2012-10-23T15:56:41Z")

</div>

Hi&nbsp;Jonathan,&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;questions!&nbsp;  
&nbsp;&nbsp;  
&nbsp;We&nbsp;do&nbsp;not&nbsp;support&nbsp;LZW&nbsp;compressed&nbsp;GeoTiff&nbsp;files.You&nbsp;would&nbsp;need&nbsp;to&nbsp;write&nbsp;a&nbsp;utility&nbsp;or&nbsp;method&nbsp;to&nbsp;uncompress&nbsp;these&nbsp;and&nbsp;then&nbsp;load&nbsp;them&nbsp;into&nbsp;the&nbsp;control.&nbsp;  
&nbsp;&nbsp;  
&nbsp;If&nbsp;you&nbsp;wish&nbsp;to&nbsp;use&nbsp;a&nbsp;GeoTiff&nbsp;with&nbsp;an&nbsp;embedded&nbsp;georeference&nbsp;information&nbsp;you&nbsp;would&nbsp;set&nbsp;GeoTiffLibraryType.UnmanagedLibTiff.&nbsp;  
&nbsp;If&nbsp;you&nbsp;have&nbsp;a&nbsp;seperate&nbsp;world&nbsp;file&nbsp;(.tfw)&nbsp;you&nbsp;would&nbsp;use&nbsp;the&nbsp;GeoTiffLibraryType.ManagedLibTiff.

---

<div class="post-metadata">

**Author:** ![Jonathan3](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/j/c68b51/32.png) [@Jonathan3](https://community.thinkgeo.com/u/Jonathan3)\
**Post date:** [October 24, 2012, 6:24am UTC](https://community.thinkgeo.com/t/compressed-geotiff/2121/3 "2012-10-24T06:24:24Z")

</div>

Ryan,

Thank&nbsp;you&nbsp;for&nbsp;the&nbsp;information&nbsp;about&nbsp;the&nbsp;library&nbsp;type,&nbsp;currently&nbsp;we&nbsp;do&nbsp;use&nbsp;a&nbsp;separate&nbsp;world&nbsp;file.

Regards,  
  
Jonathan

---

<div class="post-metadata">

**Author:** ![Ryan](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/a8b319/32.png) [@Ryan](https://community.thinkgeo.com/u/Ryan)\
**Post date:** [October 24, 2012, 1:46pm UTC](https://community.thinkgeo.com/t/compressed-geotiff/2121/4 "2012-10-24T13:46:24Z")

</div>

Glad&nbsp;to&nbsp;be&nbsp;of&nbsp;assistance!
