# Beginner geoTiff Question

**URL:** <https://community.thinkgeo.com/t/beginner-geotiff-question/1367>\
**Category:** WinForms\
**Created:** [July 28, 2010, 9:20am UTC](https://community.thinkgeo.com/t/beginner-geotiff-question/1367 "2010-07-28T09:20:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lee2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/l/e9a140/32.png) [@Lee2](https://community.thinkgeo.com/u/Lee2)\
**Post date:** [July 28, 2010, 9:20am UTC](https://community.thinkgeo.com/t/beginner-geotiff-question/1367/1 "2010-07-28T09:20:15Z")

</div>

As&nbsp;an&nbsp;absolute&nbsp;beginner&nbsp;with&nbsp;GIS&nbsp;in&nbsp;general,&nbsp;I&nbsp;am&nbsp;already&nbsp;stuck&nbsp;just&nbsp;trying&nbsp;to&nbsp;display&nbsp;a&nbsp;satellite&nbsp;photo.&nbsp;&nbsp;We&nbsp;would&nbsp;like&nbsp;to&nbsp;be&nbsp;able&nbsp;to&nbsp;import&nbsp;a&nbsp;GeoTiff&nbsp;or&nbsp;something&nbsp;similar&nbsp;and&nbsp;then&nbsp;draw&nbsp;the&nbsp;boundaries&nbsp;of&nbsp;the&nbsp;farm&nbsp;fields&nbsp;on&nbsp;top.  
  
  
  
I&nbsp;have&nbsp;attached&nbsp;the&nbsp;header&nbsp;information&nbsp;from&nbsp;the&nbsp;GeoTiff&nbsp;I&nbsp;am&nbsp;using,&nbsp;and&nbsp;am&nbsp;hoping&nbsp;someone&nbsp;can&nbsp;give&nbsp;me&nbsp;a&nbsp;code&nbsp;snippet&nbsp;to&nbsp;display&nbsp;it&nbsp;as&nbsp;a&nbsp;layer&nbsp;in&nbsp;a&nbsp;winforms/vb&nbsp;map&nbsp;control&nbsp;in&nbsp;the&nbsp;latest&nbsp;version&nbsp;of&nbsp;desktop.  
  
  
  
Thanks&nbsp;a&nbsp;lot,  
  
Lee&nbsp;Elliott  
  
  
  
&nbsp;

[info.txt](https://community.thinkgeo.com/uploads/default/original/1X/3f003c74234d41bb341a27dd0789623b67b03a6f.txt) (1.98 KB)

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [July 28, 2010, 7:58pm UTC](https://community.thinkgeo.com/t/beginner-geotiff-question/1367/2 "2010-07-28T19:58:38Z")

</div>

Lee,&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;post&nbsp;and&nbsp;welcome&nbsp;you&nbsp;to&nbsp;ThinkGeo&nbsp;Desktop&nbsp;Discussion&nbsp;forum.  
  
&nbsp;  
  
Try&nbsp;the&nbsp;following&nbsp;code&nbsp;snippet&nbsp;from&nbsp;our&nbsp;HowDoI&nbsp;sample&nbsp;showing&nbsp;a&nbsp;standard&nbsp;tiff&nbsp;file,&nbsp;hope&nbsp;it&nbsp;helps.

`Private Sub LoadAGeoTiffImage_Load(ByVal sender As Object, ByVal e As EventArgs)      winformsMap1.MapUnit = GeographyUnit.DecimalDegree      winformsMap1.BackgroundOverlay.BackgroundBrush = New GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean)      Dim worldImageLayer As New GeoTiffRasterLayer("..\..\SampleData\Data\world.tif")      worldImageLayer.UpperThreshold = Double.MaxValue      worldImageLayer.LowerThreshold = 0      Dim staticOverlay As New LayerOverlay()      staticOverlay.Layers.Add("WorldImageLayer", worldImageLayer)      winformsMap1.Overlays.Add(staticOverlay)      winformsMap1.CurrentExtent = New RectangleShape(-118.098, 84.3, 118.098, -84.3)      winformsMap1.Refresh()End Sub`

Any&nbsp;more&nbsp;questions&nbsp;just&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;me&nbsp;know.

Thanks.

Yale

&nbsp;

---

<div class="post-metadata">

**Author:** ![Lee2](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/l/e9a140/32.png) [@Lee2](https://community.thinkgeo.com/u/Lee2)\
**Post date:** [July 29, 2010, 10:05am UTC](https://community.thinkgeo.com/t/beginner-geotiff-question/1367/3 "2010-07-29T10:05:11Z")

</div>

Hi&nbsp;Yale,&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;I’ve&nbsp;tried&nbsp;all&nbsp;the&nbsp;examples&nbsp;I&nbsp;could&nbsp;find&nbsp;but&nbsp;I&nbsp;can’t&nbsp;get&nbsp;them&nbsp;to&nbsp;work&nbsp;with&nbsp;my&nbsp;geoTiff.&nbsp;&nbsp;The&nbsp;usual&nbsp;free&nbsp;GIS&nbsp;viewers&nbsp;open&nbsp;it&nbsp;no&nbsp;problem,&nbsp;but&nbsp;I’m&nbsp;not&nbsp;sure&nbsp;how&nbsp;to&nbsp;deal&nbsp;with&nbsp;the&nbsp;meters,&nbsp;etc.&nbsp;&nbsp;I&nbsp;extracted&nbsp;the&nbsp;header&nbsp;to&nbsp;the&nbsp;attached&nbsp;file&nbsp;in&nbsp;the&nbsp;first&nbsp;post.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;again,&nbsp;  
&nbsp;Lee&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [July 29, 2010, 7:01pm UTC](https://community.thinkgeo.com/t/beginner-geotiff-question/1367/4 "2010-07-29T19:01:01Z")

</div>

Lee,

Try&nbsp;to&nbsp;change&nbsp;the&nbsp;MapUnit&nbsp;and&nbsp;boundingBox&nbsp;for&nbsp;the&nbsp;map&nbsp;control&nbsp;shown&nbsp;as&nbsp;following:

`Private Sub DisplayMap_Load(ByVal sender As Object, ByVal e As EventArgs)            winformsMap1.MapUnit = GeographyUnit.Meter            winformsMap1.BackgroundOverlay.BackgroundBrush = New GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean)            Dim worldImageLayer As New GeoTiffRasterLayer("..\..\SampleData\Data\world.tif")            worldImageLayer.UpperThreshold = Double.MaxValue            worldImageLayer.LowerThreshold = 0            Dim staticOverlay As New LayerOverlay()            staticOverlay.Layers.Add("WorldImageLayer", worldImageLayer)            winformsMap1.Overlays.Add(staticOverlay)            worldImageLayer.Open()            winformsMap1.CurrentExtent = worldImageLayer.GetBoundingBox()            winformsMap1.Refresh()End Sub`

If&nbsp;you&nbsp;still&nbsp;have&nbsp;problem,&nbsp;it&nbsp;would&nbsp;be&nbsp;nice&nbsp;if&nbsp;you&nbsp;could&nbsp;send&nbsp;us&nbsp;your&nbsp;data,&nbsp;you&nbsp;can&nbsp;wrap&nbsp;it&nbsp;and&nbsp;send&nbsp;it&nbsp;to&nbsp;[forumsupport@thinkgeo.com](mailto:forumsupport@thinkgeo.com)&nbsp;and&nbsp;asked&nbsp;for&nbsp;forword&nbsp;to&nbsp;Yale&nbsp;with&nbsp;this&nbsp;post&nbsp;mentioned.

Any&nbsp;more&nbsp;questions&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;me&nbsp;know.

Thanks.

Yale  
  
&nbsp;
