# Problem Projecting Shapes

**URL:** <https://community.thinkgeo.com/t/problem-projecting-shapes/1453>\
**Category:** WinForms\
**Created:** [October 7, 2010, 7:41am UTC](https://community.thinkgeo.com/t/problem-projecting-shapes/1453 "2010-10-07T07:41:49Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steven1](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/steven1/32/18983_2.png) [@Steven1](https://community.thinkgeo.com/u/Steven1)\
**Post date:** [October 7, 2010, 7:41am UTC](https://community.thinkgeo.com/t/problem-projecting-shapes/1453/1 "2010-10-07T07:41:49Z")

</div>

Hi,

I&nbsp;am&nbsp;working&nbsp;on&nbsp;an&nbsp;application&nbsp;that&nbsp;automatically&nbsp;changes&nbsp;the&nbsp;coordinate&nbsp;system&nbsp;of&nbsp;map&nbsp;layers&nbsp;when&nbsp;zoomed&nbsp;in&nbsp;beyond&nbsp;a&nbsp;certain&nbsp;threshold&nbsp;scale.&nbsp;&nbsp;I&nbsp;noticed&nbsp;that&nbsp;after&nbsp;setting&nbsp;the&nbsp;Projection&nbsp;on&nbsp;certain&nbsp;map&nbsp;layers&nbsp;I&nbsp;would&nbsp;get&nbsp;an&nbsp;error&nbsp;when&nbsp;trying&nbsp;to&nbsp;call&nbsp;GetBounidngBox&nbsp;on&nbsp;the&nbsp;feature&nbsp;layer.&nbsp;&nbsp;Specifically,&nbsp;this&nbsp;happens&nbsp;if&nbsp;I&nbsp;set&nbsp;the&nbsp;Projection&nbsp;object&nbsp;on&nbsp;a&nbsp;layer&nbsp;that's&nbsp;in&nbsp;geographical&nbsp;NAD83&nbsp;to&nbsp;projected&nbsp;NAD83&nbsp;zone&nbsp;16.

So&nbsp;then&nbsp;I&nbsp;tried&nbsp;saving&nbsp;the&nbsp;extent&nbsp;of&nbsp;the&nbsp;layer&nbsp;as&nbsp;a&nbsp;Rectangle&nbsp;shape&nbsp;and&nbsp;then&nbsp;converting&nbsp;the&nbsp;rectangle&nbsp;to&nbsp;whaterver&nbsp;coordinate&nbsp;system&nbsp;I&nbsp;need&nbsp;and&nbsp;got&nbsp;essentially&nbsp;the&nbsp;same&nbsp;error.&nbsp;&nbsp;As&nbsp;a&nbsp;test,&nbsp;I&nbsp;took&nbsp;the&nbsp;coordinates&nbsp;of&nbsp;the&nbsp;Lower&nbsp;Right&nbsp;corner&nbsp;of&nbsp;the&nbsp;saved&nbsp;Rectangle&nbsp;and&nbsp;tried&nbsp;to&nbsp;convert&nbsp;just&nbsp;that&nbsp;one&nbsp;coordinate&nbsp;pair&nbsp;and&nbsp;I&nbsp;still&nbsp;get&nbsp;essentially&nbsp;the&nbsp;same&nbsp;error,&nbsp;stack&nbsp;trace&nbsp;below:

System.InvalidOperationException&nbsp;was&nbsp;unhandled  
  
&nbsp;&nbsp;Message=latitude&nbsp;or&nbsp;longitude&nbsp;exceeded&nbsp;limits  
  
&nbsp;&nbsp;Source=MapSuiteCore  
  
&nbsp;&nbsp;StackTrace:  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;ThinkGeo.MapSuite.Core.ManagedProj4Projection.ThrowException(Int32&nbsp;errorNumber)  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;ThinkGeo.MapSuite.Core.ManagedProj4Projection.ConvertToExternalProjectionCore(Double[]&nbsp;x,&nbsp;Double[]&nbsp;y)  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;ThinkGeo.MapSuite.Core.Projection.ConvertToExternalProjection(Double&nbsp;x,&nbsp;Double&nbsp;y)  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;TestProjection.Module1.Main()&nbsp;in&nbsp;C:\Users\steller\AppData\Local\Temporary&nbsp;Projects\TestProjection\Module1.vb:line&nbsp;7  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;System.AppDomain.\_nExecuteAssembly(RuntimeAssembly&nbsp;assembly,&nbsp;String[]&nbsp;args)  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;System.AppDomain.ExecuteAssembly(String&nbsp;assemblyFile,&nbsp;Evidence&nbsp;assemblySecurity,&nbsp;String[]&nbsp;args)  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;System.Threading.ThreadHelper.ThreadStart\_Context(Object&nbsp;state)  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;System.Threading.ExecutionContext.Run(ExecutionContext&nbsp;executionContext,&nbsp;ContextCallback&nbsp;callback,&nbsp;Object&nbsp;state,&nbsp;Boolean&nbsp;ignoreSyncCtx)  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;System.Threading.ExecutionContext.Run(ExecutionContext&nbsp;executionContext,&nbsp;ContextCallback&nbsp;callback,&nbsp;Object&nbsp;state)  
  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;System.Threading.ThreadHelper.ThreadStart()  
  
&nbsp;&nbsp;InnerException:

&nbsp;

Here&nbsp;is&nbsp;a&nbsp;code&nbsp;snippet:

`Dim oProj4 As New ManagedProj4Projection(ManagedProj4Projection.GetEpsgParameters(4269), ManagedProj4Projection.GetEpsgParameters(26916))oProj4.Open()Dim oVertex As Vertex = oProj4.ConvertToExternalProjection(-178.215026855469, 18.9247817993164)`

&nbsp;

Any&nbsp;ideas?&nbsp;&nbsp;

Steve

---

<div class="post-metadata">

**Author:** ![Ted](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/t/db5fbb/32.png) [@Ted](https://community.thinkgeo.com/u/Ted)\
**Post date:** [October 7, 2010, 7:56am UTC](https://community.thinkgeo.com/t/problem-projecting-shapes/1453/2 "2010-10-07T07:56:41Z")

</div>

I&nbsp;can&nbsp;jump&nbsp;in&nbsp;on&nbsp;this&nbsp;one.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-178&nbsp;degrees&nbsp;is&nbsp;almost&nbsp;on&nbsp;the&nbsp;international&nbsp;date&nbsp;line,&nbsp;way&nbsp;out&nbsp;in&nbsp;the&nbsp;pacific.&nbsp;&nbsp;&nbsp;A&nbsp;UTM&nbsp;projection&nbsp;is&nbsp;on&nbsp;"valid"&nbsp;relative&nbsp;to&nbsp;distortion&nbsp;within&nbsp;a&nbsp;six&nbsp;degree&nbsp;range,&nbsp;and&nbsp;mathematically&nbsp;valid&nbsp;within&nbsp;maybe&nbsp;a&nbsp;12&nbsp;to&nbsp;24&nbsp;degree&nbsp;range.&nbsp;&nbsp;&nbsp;Zone&nbsp;16&nbsp;is&nbsp;around&nbsp;-84&nbsp;degrees…&nbsp;its&nbsp;center&nbsp;is&nbsp;a&nbsp;little&nbsp;east&nbsp;of&nbsp;Chicago.&nbsp;&nbsp;&nbsp;&nbsp;So&nbsp;the&nbsp;error&nbsp;being&nbsp;thrown&nbsp;is&nbsp;because&nbsp;you&nbsp;are&nbsp;trying&nbsp;to&nbsp;use&nbsp;a&nbsp;projection&nbsp;that&nbsp;is&nbsp;not&nbsp;applicable&nbsp;to&nbsp;the&nbsp;data&nbsp;being&nbsp;projected.

---

<div class="post-metadata">

**Author:** ![Steven1](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/steven1/32/18983_2.png) [@Steven1](https://community.thinkgeo.com/u/Steven1)\
**Post date:** [October 7, 2010, 10:09am UTC](https://community.thinkgeo.com/t/problem-projecting-shapes/1453/3 "2010-10-07T10:09:05Z")

</div>

Hi&nbsp;Ted,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;response.&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Yes,&nbsp;I&nbsp;kind&nbsp;of&nbsp;figured&nbsp;the&nbsp;reason&nbsp;for&nbsp;the&nbsp;error&nbsp;was&nbsp;that&nbsp;the&nbsp;coordinate&nbsp;being&nbsp;transformed&nbsp;produced&nbsp;a&nbsp;coordinate&nbsp;that&nbsp;falls&nbsp;outside&nbsp;of&nbsp;the&nbsp;UTM&nbsp;zone&nbsp;to&nbsp;which&nbsp;it’s&nbsp;being&nbsp;converted.&nbsp;&nbsp;Which&nbsp;brings&nbsp;me&nbsp;to&nbsp;another&nbsp;question.&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;can&nbsp;apply&nbsp;the&nbsp;UTM&nbsp;zone&nbsp;16&nbsp;coordinate&nbsp;system&nbsp;to&nbsp;my&nbsp;NAD83&nbsp;geographic&nbsp;layer&nbsp;and&nbsp;it&nbsp;works&nbsp;just&nbsp;fine.&nbsp;&nbsp;My&nbsp;understanding&nbsp;is&nbsp;that&nbsp;the&nbsp;same&nbsp;ManagedProj4Projection&nbsp;object&nbsp;that&nbsp;is&nbsp;managing&nbsp;the&nbsp;drawing&nbsp;of&nbsp;the&nbsp;NAD83&nbsp;geographic&nbsp;layer&nbsp;is&nbsp;also&nbsp;converting&nbsp;coordinates.&nbsp;&nbsp;These&nbsp;same&nbsp;coordinates&nbsp;must&nbsp;surely&nbsp;exist&nbsp;in&nbsp;the&nbsp;geographic&nbsp;layer.&nbsp;&nbsp;So&nbsp;why&nbsp;does&nbsp;the&nbsp;same&nbsp;error&nbsp;NOT&nbsp;occur&nbsp;when&nbsp;reprojecting&nbsp;this&nbsp;layer?&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Steve

---

<div class="post-metadata">

**Author:** ![Val](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/v/e56c9b/32.png) [@Val](https://community.thinkgeo.com/u/Val)\
**Post date:** [October 7, 2010, 11:38am UTC](https://community.thinkgeo.com/t/problem-projecting-shapes/1453/4 "2010-10-07T11:38:05Z")

</div>

Steven,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Can&nbsp;you&nbsp;rephrase&nbsp;your&nbsp;question?&nbsp;I&nbsp;am&nbsp;not&nbsp;sure&nbsp;I&nbsp;understand&nbsp;what&nbsp;your&nbsp;concern&nbsp;is.&nbsp;If&nbsp;you&nbsp;are&nbsp;wondering&nbsp;why&nbsp;the&nbsp;same&nbsp;error&nbsp;does&nbsp;not&nbsp;occur&nbsp;when&nbsp;going&nbsp;from&nbsp;UTM&nbsp;to&nbsp;Geographic,&nbsp;it&nbsp;is&nbsp;because&nbsp;UTM&nbsp;values&nbsp;are&nbsp;always&nbsp;going&nbsp;to&nbsp;correspond&nbsp;to&nbsp;valid&nbsp;Geographic&nbsp;values&nbsp;while&nbsp;the&nbsp;reverse&nbsp;is&nbsp;not&nbsp;always&nbsp;true&nbsp;as&nbsp;Ted&nbsp;explained&nbsp;it.&nbsp;Thank&nbsp;you.

---

<div class="post-metadata">

**Author:** ![Steven1](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/steven1/32/18983_2.png) [@Steven1](https://community.thinkgeo.com/u/Steven1)\
**Post date:** [October 7, 2010, 3:20pm UTC](https://community.thinkgeo.com/t/problem-projecting-shapes/1453/5 "2010-10-07T15:20:27Z")

</div>

Val,&nbsp;  
  
  
  
Thanks&nbsp;for&nbsp;your&nbsp;response.&nbsp;&nbsp;Sorry&nbsp;to&nbsp;ask&nbsp;my&nbsp;question&nbsp;in&nbsp;a&nbsp;confusing&nbsp;way.&nbsp;  
  
  
  
These&nbsp;are&nbsp;the&nbsp;steps:&nbsp;  
  
  
  
1.&nbsp;Apply&nbsp;UTM&nbsp;Zone&nbsp;16&nbsp;coordinate&nbsp;system&nbsp;to&nbsp;a&nbsp;layer&nbsp;in&nbsp;UTM83&nbsp;geographic.&nbsp;&nbsp;The&nbsp;layer&nbsp;is&nbsp;for&nbsp;US&nbsp;counties.&nbsp;  
  
3.&nbsp;Attempt&nbsp;to&nbsp;get&nbsp;the&nbsp;extent&nbsp;of&nbsp;the&nbsp;layer&nbsp;by&nbsp;calling&nbsp;GetBoundingBox.&nbsp;  
  
3.&nbsp;Every&nbsp;time&nbsp;I&nbsp;try&nbsp;to&nbsp;do&nbsp;this&nbsp;the&nbsp;GetBoundingBox&nbsp;returns&nbsp;an&nbsp;error:&nbsp;  
  
  
  
System.ArgumentOutOfRangeException&nbsp;was&nbsp;unhandled&nbsp;  
  
Message=The&nbsp;input&nbsp;double&nbsp;value&nbsp;is&nbsp;out&nbsp;of&nbsp;range.&nbsp;  
  
Parameter&nbsp;name:&nbsp;maxX&nbsp;  
  
Source=MapSuiteCore&nbsp;  
  
ParamName=maxX&nbsp;  
  
StackTrace:&nbsp;  
  
at&nbsp;ThinkGeo.MapSuite.Core.x6d719af406ea4c2c.x12e7df23649722cf(Double&nbsp;x86d4512e4c7d8814,&nbsp;String&nbsp;x34decc57f0820440,&nbsp;Double&nbsp;xaee3bf422e2fd725,&nbsp;x1acec04cd58c1af5&nbsp;xa798986acdb65a29,&nbsp;Double&nbsp;xe21f77686f8b957e,&nbsp;x1acec04cd58c1af5&nbsp;x495f4164830ffad5)&nbsp;  
  
at&nbsp;ThinkGeo.MapSuite.Core.x6d719af406ea4c2c.xb86d8097d383be05(Double&nbsp;x86d4512e4c7d8814,&nbsp;String&nbsp;x34decc57f0820440,&nbsp;Double&nbsp;xaee3bf422e2fd725,&nbsp;x1acec04cd58c1af5&nbsp;xa798986acdb65a29)&nbsp;  
  
at&nbsp;ThinkGeo.MapSuite.Core.RectangleShape..ctor(Double&nbsp;minX,&nbsp;Double&nbsp;maxY,&nbsp;Double&nbsp;maxX,&nbsp;Double&nbsp;minY)&nbsp;  
  
at&nbsp;ThinkGeo.MapSuite.Core.MultipointShape.GetBoundingBoxFromPoints(IEnumerable`1&nbsp;points)&nbsp;  
  
at&nbsp;ThinkGeo.MapSuite.Core.MultipointShape.GetBoundingBoxCore()&nbsp;  
  
at&nbsp;ThinkGeo.MapSuite.Core.BaseShape.GetBoundingBox()&nbsp;  
  
at&nbsp;ThinkGeo.MapSuite.Core.Projection.ConvertToExternalProjection(RectangleShape&nbsp;rectangleShape)&nbsp;  
  
at&nbsp;ThinkGeo.MapSuite.Core.FeatureSource.ConvertToExternalProjection(RectangleShape&nbsp;rectangle)&nbsp;  
  
at&nbsp;ThinkGeo.MapSuite.Core.FeatureSource.GetBoundingBox()&nbsp;  
  
at&nbsp;ThinkGeo.MapSuite.Core.FeatureLayer.GetBoundingBoxCore()&nbsp;  
  
at&nbsp;ThinkGeo.MapSuite.Core.Layer.GetBoundingBox()&nbsp;  
  
InnerException:&nbsp;&nbsp;

I&nbsp;can&nbsp;send&nbsp;a&nbsp;sample&nbsp;app&nbsp;but&nbsp;it's&nbsp;too&nbsp;big&nbsp;to&nbsp;attach.

Thanks,

Steve

&nbsp;

---

<div class="post-metadata">

**Author:** ![Val](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/v/e56c9b/32.png) [@Val](https://community.thinkgeo.com/u/Val)\
**Post date:** [October 7, 2010, 4:04pm UTC](https://community.thinkgeo.com/t/problem-projecting-shapes/1453/6 "2010-10-07T16:04:22Z")

</div>

It&nbsp;is&nbsp;normal&nbsp;that&nbsp;you&nbsp;are&nbsp;going&nbsp;to&nbsp;get&nbsp;an&nbsp;error&nbsp;if&nbsp;you&nbsp;project&nbsp;all&nbsp;the&nbsp;counties&nbsp;of&nbsp;the&nbsp;US&nbsp;to&nbsp;UTM&nbsp;Zone&nbsp;16.&nbsp;As&nbsp;Ted&nbsp;explained,&nbsp;a&nbsp;UTM&nbsp;zone&nbsp;is&nbsp;valid&nbsp;within&nbsp;a&nbsp;certain&nbsp;longitude&nbsp;range.&nbsp;As&nbsp;you&nbsp;can&nbsp;see&nbsp;in&nbsp;the&nbsp;attached&nbsp;picture&nbsp;of&nbsp;the&nbsp;UTM&nbsp;zones&nbsp;for&nbsp;the&nbsp;USA.&nbsp;You&nbsp;can&nbsp;apply&nbsp;the&nbsp;UTM&nbsp;zone&nbsp;16&nbsp;to&nbsp;counties&nbsp;that&nbsp;are&nbsp;only&nbsp;in&nbsp;some&nbsp;states&nbsp;such&nbsp;as&nbsp;Illinois,&nbsp;Indiana,&nbsp;Kentucky&nbsp;Tennessee&nbsp;and&nbsp;a&nbsp;few&nbsp;more.

 ![](https://community.thinkgeo.com/uploads/default/original/2X/b/b756bbce8376c0744e1dbe6e77a4cdbf9c4e6935.jpg)

&nbsp;

If&nbsp;you&nbsp;want&nbsp;more&nbsp;in&nbsp;depth&nbsp;explanation&nbsp;on&nbsp;this,&nbsp;I&nbsp;suggest&nbsp;you&nbsp;check&nbsp;out&nbsp;this&nbsp;site:&nbsp;[en.wikipedia.org/wiki/Universal\_Tra...ate\_system](http://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system)

---

<div class="post-metadata">

**Author:** ![Steven1](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/steven1/32/18983_2.png) [@Steven1](https://community.thinkgeo.com/u/Steven1)\
**Post date:** [October 7, 2010, 7:56pm UTC](https://community.thinkgeo.com/t/problem-projecting-shapes/1453/7 "2010-10-07T19:56:26Z")

</div>

Thanks&nbsp;Val,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;am&nbsp;well-versed&nbsp;in&nbsp;coordinates&nbsp;systems&nbsp;and&nbsp;have&nbsp;spent&nbsp;a&nbsp;number&nbsp;of&nbsp;years&nbsp;programming&nbsp;applications&nbsp;using&nbsp;ESRI&nbsp;products&nbsp;such&nbsp;as&nbsp;MapObjects&nbsp;and&nbsp;ArcEnigne.&nbsp;&nbsp;What&nbsp;I&nbsp;am&nbsp;attempting&nbsp;is&nbsp;to&nbsp;reproduce&nbsp;an&nbsp;application&nbsp;I&nbsp;wrote&nbsp;in&nbsp;the&nbsp;last&nbsp;couple&nbsp;of&nbsp;years&nbsp;that&nbsp;allows&nbsp;the&nbsp;user&nbsp;to&nbsp;see&nbsp;a&nbsp;geographical&nbsp;coordinate&nbsp;system&nbsp;when&nbsp;zoomed&nbsp;out&nbsp;past&nbsp;a&nbsp;certain&nbsp;threshold,&nbsp;but&nbsp;to&nbsp;have&nbsp;the&nbsp;features&nbsp;displayed&nbsp;in&nbsp;a&nbsp;projected&nbsp;zone&nbsp;when&nbsp;zoomed&nbsp;in&nbsp;(for&nbsp;example,&nbsp;for&nbsp;editing).&nbsp;&nbsp;I&nbsp;had&nbsp;very&nbsp;little&nbsp;trouble&nbsp;making&nbsp;this&nbsp;work&nbsp;in&nbsp;ESRI’s&nbsp;ArcEngine&nbsp;but&nbsp;it&nbsp;appears&nbsp;I&nbsp;will&nbsp;have&nbsp;to&nbsp;use&nbsp;a&nbsp;workaround&nbsp;to&nbsp;make&nbsp;it&nbsp;work&nbsp;with&nbsp;ThinkGeo.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Just&nbsp;an&nbsp;observation.&nbsp;&nbsp;There&nbsp;is&nbsp;no&nbsp;reason&nbsp;why&nbsp;you&nbsp;should&nbsp;not&nbsp;be&nbsp;able&nbsp;to&nbsp;get&nbsp;an&nbsp;Extent&nbsp;with&nbsp;GetBoundingBox&nbsp;on&nbsp;a&nbsp;geographical&nbsp;layer&nbsp;that’s&nbsp;been&nbsp;projected&nbsp;into&nbsp;a&nbsp;zoned&nbsp;coordinate&nbsp;system,&nbsp;except&nbsp;for&nbsp;the&nbsp;validation&nbsp;that’s&nbsp;being&nbsp;performed&nbsp;behind&nbsp;the&nbsp;scenes.&nbsp;&nbsp;It&nbsp;would&nbsp;be&nbsp;nice&nbsp;if&nbsp;there&nbsp;was&nbsp;an&nbsp;option&nbsp;to&nbsp;disable&nbsp;the&nbsp;validation.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;help,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Steve

---

<div class="post-metadata">

**Author:** ![Ted](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/t/db5fbb/32.png) [@Ted](https://community.thinkgeo.com/u/Ted)\
**Post date:** [October 7, 2010, 8:23pm UTC](https://community.thinkgeo.com/t/problem-projecting-shapes/1453/8 "2010-10-07T20:23:45Z")

</div>

I'm&nbsp;a&nbsp;customer..&nbsp;not&nbsp;a&nbsp;ThinkGeo&nbsp;person,&nbsp;but&nbsp;I'll&nbsp;defend&nbsp;ThinkGeo&nbsp;here.&nbsp;&nbsp;&nbsp;&nbsp;In&nbsp;my&nbsp;opinion,&nbsp;based&nbsp;upon&nbsp;my&nbsp;experience&nbsp;with&nbsp;ESRI&nbsp;products,&nbsp;there&nbsp;is&nbsp;no&nbsp;way&nbsp;you&nbsp;could&nbsp;have&nbsp;displayed&nbsp;data&nbsp;at&nbsp;178&nbsp;degrees&nbsp;west&nbsp;in&nbsp;a&nbsp;NAD83&nbsp;UTM&nbsp;Zone&nbsp;16&nbsp;projection.&nbsp;&nbsp;&nbsp;And&nbsp;if&nbsp;your&nbsp;data&nbsp;is&nbsp;US&nbsp;counties,&nbsp;how&nbsp;do&nbsp;you&nbsp;even&nbsp;get&nbsp;that&nbsp;point&nbsp;:).

We&nbsp;do&nbsp;the&nbsp;same&nbsp;thing&nbsp;as&nbsp;you...&nbsp;we&nbsp;display&nbsp;a&nbsp;geographic&nbsp;projection&nbsp;when&nbsp;zoomed&nbsp;out&nbsp;beyond&nbsp;a&nbsp;state&nbsp;or&nbsp;two,&nbsp;and&nbsp;based&nbsp;upon&nbsp;where&nbsp;the&nbsp;user&nbsp;zooms&nbsp;into,&nbsp;we&nbsp;switch&nbsp;to&nbsp;UTM&nbsp;NA83&nbsp;projections.&nbsp;&nbsp;But&nbsp;we&nbsp;calculate&nbsp;the&nbsp;projection&nbsp;based&nbsp;upon&nbsp;the&nbsp;centroid&nbsp;of&nbsp;the&nbsp;view&nbsp;we&nbsp;are&nbsp;zooming&nbsp;to.&nbsp;&nbsp;That&nbsp;way,&nbsp;we&nbsp;are&nbsp;always&nbsp;displaying&nbsp;the&nbsp;data&nbsp;in&nbsp;its&nbsp;least&nbsp;distorted&nbsp;projection.&nbsp;&nbsp;&nbsp;&nbsp;For&nbsp;this&nbsp;purpose,&nbsp;ThinkGeo's&nbsp;tools&nbsp;work&nbsp;just&nbsp;fine,&nbsp;w/o&nbsp;a&nbsp;work&nbsp;around.

There&nbsp;must&nbsp;be&nbsp;something&nbsp;that&nbsp;we&nbsp;are&nbsp;overlooking&nbsp;on&nbsp;how&nbsp;you&nbsp;are&nbsp;getting&nbsp;the&nbsp;geographic&nbsp;coordinates&nbsp;of&nbsp;the&nbsp;bounding&nbsp;box.

---

<div class="post-metadata">

**Author:** ![Steven1](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/steven1/32/18983_2.png) [@Steven1](https://community.thinkgeo.com/u/Steven1)\
**Post date:** [October 8, 2010, 7:21am UTC](https://community.thinkgeo.com/t/problem-projecting-shapes/1453/9 "2010-10-08T07:21:00Z")

</div>

Hi&nbsp;Ted,

No&nbsp;need&nbsp;to&nbsp;come&nbsp;to&nbsp;ThinkGeo's&nbsp;defense,&nbsp;I'm&nbsp;a&nbsp;big&nbsp;fan&nbsp;of&nbsp;their&nbsp;products,&nbsp;ESRI&nbsp;not&nbsp;so&nbsp;much.

The&nbsp;western&nbsp;tip&nbsp;of&nbsp;the&nbsp;Aleutian&nbsp;Islands&nbsp;in&nbsp;Alaska&nbsp;is&nbsp;around&nbsp;-178&nbsp;degrees&nbsp;and,&nbsp;as&nbsp;you&nbsp;can&nbsp;see&nbsp;it&nbsp;is&nbsp;diplaying&nbsp;while&nbsp;being&nbsp;projected&nbsp;in&nbsp;NAD83&nbsp;Zone&nbsp;16.&nbsp;&nbsp;It&nbsp;is&nbsp;not&nbsp;a&nbsp;useful&nbsp;view,&nbsp;nor&nbsp;is&nbsp;it&nbsp;my&nbsp;intention&nbsp;to&nbsp;ever&nbsp;use&nbsp;it&nbsp;in&nbsp;this&nbsp;way.&nbsp;&nbsp;

![]()

Here's&nbsp;my&nbsp;real&nbsp;problem.&nbsp;&nbsp;I&nbsp;have&nbsp;implemented&nbsp;a&nbsp;TOC&nbsp;(table&nbsp;of&nbsp;contents)&nbsp;control&nbsp;that&nbsp;displays&nbsp;the&nbsp;layers&nbsp;in&nbsp;the&nbsp;map.&nbsp;&nbsp;One&nbsp;of&nbsp;the&nbsp;things&nbsp;you&nbsp;can&nbsp;do&nbsp;is&nbsp;right-click&nbsp;on&nbsp;a&nbsp;layer&nbsp;and&nbsp;choose&nbsp;'Zoom&nbsp;To&nbsp;Layer'.&nbsp;&nbsp;Let's&nbsp;say&nbsp;this&nbsp;is&nbsp;done&nbsp;on&nbsp;the&nbsp;counties&nbsp;layer&nbsp;when&nbsp;the&nbsp;map&nbsp;is&nbsp;zoomed&nbsp;in&nbsp;on&nbsp;some&nbsp;features&nbsp;that&nbsp;are&nbsp;projected&nbsp;to&nbsp;UTM&nbsp;Zone&nbsp;16.&nbsp;&nbsp;The&nbsp;only&nbsp;reason&nbsp;I&nbsp;need&nbsp;the&nbsp;'GetBoundingBox'&nbsp;function&nbsp;would&nbsp;be&nbsp;to&nbsp;get&nbsp;a&nbsp;full&nbsp;extent&nbsp;for&nbsp;the&nbsp;counties&nbsp;layer.&nbsp;&nbsp;My&nbsp;intention&nbsp;was&nbsp;to&nbsp;get&nbsp;the&nbsp;extent,&nbsp;project&nbsp;it&nbsp;into&nbsp;the&nbsp;UTM83&nbsp;Geogaphic&nbsp;coordinate&nbsp;system&nbsp;and&nbsp;then&nbsp;apply&nbsp;that&nbsp;exten&nbsp;to&nbsp;the&nbsp;map.&nbsp;&nbsp;The&nbsp;Projection&nbsp;object&nbsp;for&nbsp;each&nbsp;of&nbsp;the&nbsp;layers&nbsp;would&nbsp;also&nbsp;need&nbsp;to&nbsp;be&nbsp;adjusted.&nbsp;&nbsp;I&nbsp;probably&nbsp;just&nbsp;need&nbsp;to&nbsp;change&nbsp;the&nbsp;order&nbsp;of&nbsp;things&nbsp;a&nbsp;bit,&nbsp;apply&nbsp;the&nbsp;UTM83&nbsp;Geographic&nbsp;coordinate&nbsp;system&nbsp;first&nbsp;and&nbsp;do&nbsp;the&nbsp;'GetBoundingBox'&nbsp;second.

I'll&nbsp;get&nbsp;it&nbsp;figured&nbsp;out&nbsp;eventually,&nbsp;especially&nbsp;with&nbsp;all&nbsp;the&nbsp;help&nbsp;to&nbsp;be&nbsp;found&nbsp;on&nbsp;this&nbsp;forum.

Thanks&nbsp;again,

Steve

&nbsp;

&nbsp;

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![Ted](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/t/db5fbb/32.png) [@Ted](https://community.thinkgeo.com/u/Ted)\
**Post date:** [October 8, 2010, 7:24am UTC](https://community.thinkgeo.com/t/problem-projecting-shapes/1453/10 "2010-10-08T07:24:02Z")

</div>

Ahhhh…&nbsp;&nbsp;&nbsp;I&nbsp;got&nbsp;to&nbsp;wondering&nbsp;about&nbsp;Alaska&nbsp;after&nbsp;I&nbsp;posted.&nbsp;&nbsp;&nbsp;&nbsp;We&nbsp;don’t&nbsp;have&nbsp;to&nbsp;deal&nbsp;with&nbsp;that&nbsp;problem&nbsp;in&nbsp;our&nbsp;app.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;the&nbsp;info!

---

<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:** [October 9, 2010, 6:26am UTC](https://community.thinkgeo.com/t/problem-projecting-shapes/1453/11 "2010-10-09T06:26:32Z")

</div>

Hi,&nbsp;Guys,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;read&nbsp;through&nbsp;all&nbsp;the&nbsp;posts&nbsp;and&nbsp;found&nbsp;I&nbsp;am&nbsp;far&nbsp;lost&nbsp;on&nbsp;the&nbsp;projection&nbsp;knowledge,&nbsp;some&nbsp;of&nbsp;them&nbsp;are&nbsp;still&nbsp;not&nbsp;very&nbsp;clear&nbsp;to&nbsp;me.&nbsp;Hmm,&nbsp;thanks&nbsp;for&nbsp;all&nbsp;your&nbsp;post&nbsp;and&nbsp;contributions,&nbsp;I&nbsp;really&nbsp;learnt&nbsp;a&nbsp;lot&nbsp;from&nbsp;it.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Yale&nbsp;

---

<div class="post-metadata">

**Author:** ![Val](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/v/e56c9b/32.png) [@Val](https://community.thinkgeo.com/u/Val)\
**Post date:** [October 11, 2010, 10:40am UTC](https://community.thinkgeo.com/t/problem-projecting-shapes/1453/12 "2010-10-11T10:40:25Z")

</div>

Steven,&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;Do&nbsp;you&nbsp;still&nbsp;need&nbsp;help&nbsp;on&nbsp;that&nbsp;projection&nbsp;topic?&nbsp;If&nbsp;you&nbsp;still&nbsp;do,&nbsp;let&nbsp;us&nbsp;know&nbsp;and&nbsp;we&nbsp;will&nbsp;work&nbsp;on&nbsp;the&nbsp;complete&nbsp;solution&nbsp;for&nbsp;you.&nbsp;Also,&nbsp;if&nbsp;you&nbsp;have&nbsp;it&nbsp;figured&nbsp;out,&nbsp;it&nbsp;would&nbsp;be&nbsp;great&nbsp;to&nbsp;share&nbsp;it&nbsp;with&nbsp;the&nbsp;community.&nbsp;I&nbsp;think&nbsp;it&nbsp;could&nbsp;also&nbsp;be&nbsp;a&nbsp;good&nbsp;idea&nbsp;for&nbsp;a&nbsp;Code&nbsp;Community&nbsp;project.&nbsp;Thank&nbsp;you.

---

<div class="post-metadata">

**Author:** ![Steven1](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/steven1/32/18983_2.png) [@Steven1](https://community.thinkgeo.com/u/Steven1)\
**Post date:** [October 12, 2010, 6:16am UTC](https://community.thinkgeo.com/t/problem-projecting-shapes/1453/13 "2010-10-12T06:16:15Z")

</div>

Hi&nbsp;Val,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;think&nbsp;I&nbsp;have&nbsp;solved&nbsp;my&nbsp;problem.&nbsp;&nbsp;I&nbsp;rearranged&nbsp;the&nbsp;order&nbsp;that&nbsp;things&nbsp;happen&nbsp;in&nbsp;the&nbsp;code&nbsp;and&nbsp;now,&nbsp;when&nbsp;I&nbsp;need&nbsp;to&nbsp;get&nbsp;the&nbsp;full&nbsp;extent&nbsp;for&nbsp;a&nbsp;layer&nbsp;in&nbsp;a&nbsp;geographic&nbsp;coordinate&nbsp;system&nbsp;I&nbsp;remove&nbsp;any&nbsp;projection&nbsp;that’s&nbsp;been&nbsp;applied&nbsp;first,&nbsp;then&nbsp;GetBouningBox&nbsp;returns&nbsp;a&nbsp;valid&nbsp;result&nbsp;without&nbsp;an&nbsp;error.&nbsp;&nbsp;It&nbsp;appears&nbsp;that&nbsp;your&nbsp;Services&nbsp;Edition&nbsp;sample,&nbsp;‘Geodetic&nbsp;To&nbsp;State&nbsp;Plane’&nbsp;does&nbsp;something&nbsp;similar&nbsp;to&nbsp;what&nbsp;we&nbsp;are&nbsp;doing&nbsp;in&nbsp;our&nbsp;application.&nbsp;&nbsp;We&nbsp;are&nbsp;using&nbsp;a&nbsp;layer&nbsp;of&nbsp;UTM&nbsp;zones&nbsp;to&nbsp;determine&nbsp;what&nbsp;zone&nbsp;we’re&nbsp;in&nbsp;so&nbsp;we&nbsp;know&nbsp;which&nbsp;projected&nbsp;coordinate&nbsp;system&nbsp;to&nbsp;apply&nbsp;when&nbsp;the&nbsp;map&nbsp;is&nbsp;zoomed&nbsp;in.&nbsp;&nbsp;We&nbsp;do&nbsp;the&nbsp;same&nbsp;thing&nbsp;for&nbsp;State&nbsp;Plane&nbsp;zones.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Steve

---

<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:** [October 12, 2010, 7:21am UTC](https://community.thinkgeo.com/t/problem-projecting-shapes/1453/14 "2010-10-12T07:21:16Z")

</div>

Steven,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;your&nbsp;sharing&nbsp;of&nbsp;ideas,&nbsp;I&nbsp;appreciate&nbsp;it&nbsp;very&nbsp;much.&nbsp;We&nbsp;have&nbsp;some&nbsp;very&nbsp;profound&nbsp;samples&nbsp;shown&nbsp;in&nbsp;our&nbsp;code&nbsp;gallery;&nbsp;it&nbsp;would&nbsp;be&nbsp;great&nbsp;if&nbsp;a&nbsp;sample&nbsp;showing&nbsp;how&nbsp;your&nbsp;problem&nbsp;be&nbsp;solved&nbsp;to&nbsp;be&nbsp;added&nbsp;to&nbsp;the&nbsp;gallery,&nbsp;while&nbsp;just&nbsp;feel&nbsp;easy&nbsp;if&nbsp;not&nbsp;convenient.&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Any&nbsp;more&nbsp;questions&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;me&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Yale&nbsp;

---

<div class="post-metadata">

**Author:** ![Steven1](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/steven1/32/18983_2.png) [@Steven1](https://community.thinkgeo.com/u/Steven1)\
**Post date:** [October 12, 2010, 8:31am UTC](https://community.thinkgeo.com/t/problem-projecting-shapes/1453/15 "2010-10-12T08:31:04Z")

</div>

Yale,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;will&nbsp;consider&nbsp;putting&nbsp;something&nbsp;together&nbsp;that&nbsp;demonstrates&nbsp;the&nbsp;concept&nbsp;of&nbsp;changing&nbsp;to&nbsp;an&nbsp;appropriate&nbsp;UTM&nbsp;Zone&nbsp;when&nbsp;zoomed&nbsp;in&nbsp;beyond&nbsp;a&nbsp;certain&nbsp;scale,&nbsp;say&nbsp;1:316,800&nbsp;(this&nbsp;is&nbsp;simply&nbsp;a&nbsp;constant&nbsp;defined&nbsp;in&nbsp;our&nbsp;code).&nbsp;&nbsp;It&nbsp;may&nbsp;be&nbsp;awhile&nbsp;before&nbsp;I&nbsp;am&nbsp;able&nbsp;to&nbsp;do&nbsp;this&nbsp;so&nbsp;please&nbsp;be&nbsp;patient.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;the&nbsp;great&nbsp;forum!&nbsp;  
&nbsp;&nbsp;  
&nbsp;Steve

---

<div class="post-metadata">

**Author:** ![Val](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/v/e56c9b/32.png) [@Val](https://community.thinkgeo.com/u/Val)\
**Post date:** [October 12, 2010, 8:37am UTC](https://community.thinkgeo.com/t/problem-projecting-shapes/1453/16 "2010-10-12T08:37:32Z")

</div>

Steven,&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;&nbsp;Yes,&nbsp;that&nbsp;would&nbsp;be&nbsp;great&nbsp;if&nbsp;you&nbsp;could&nbsp;send&nbsp;us&nbsp;something&nbsp;related&nbsp;to&nbsp;that.&nbsp;In&nbsp;the&nbsp;meantime,&nbsp;I&nbsp;will&nbsp;try&nbsp;to&nbsp;find&nbsp;some&nbsp;time&nbsp;to&nbsp;create&nbsp;a&nbsp;project&nbsp;similar&nbsp;to&nbsp;yours&nbsp;for&nbsp;the&nbsp;Code&nbsp;Community.&nbsp;Thank&nbsp;you&nbsp;again&nbsp;for&nbsp;the&nbsp;idea.
