You are here: > ESRI Forums > arcgis desktop discussion forums > Thread Replies

ArcGIS Desktop Discussion Forums

ArcGIS Desktop - ArcMap Layers and Symbology forum

Polygon Width   Timothy Maguire Jun 14, 2007
Re: Polygon Width   Flavio Mendikovic Jun 18, 2007
Re: Polygon Width   David Lamb Jun 18, 2007
Re: Polygon Width   Timothy Maguire Jul 02, 2007
Re: Polygon Width   David Lamb Jul 02, 2007
Re: Polygon Width   Timothy Maguire Jul 02, 2007
Re: Polygon Width   David Lamb Jul 02, 2007
Re: Polygon Width   Timothy Maguire Jul 02, 2007
Re: Polygon Width   William Huber Jul 03, 2007
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Polygon Width 
Author Timothy Maguire 
Date Jun 14, 2007 
Message Hello Users,
I was wondering if any knows of a way to derive the maximum width of a polygon. I would like to use width as a way to identify possible habitat for an endangered species. Thanks
Tim 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Polygon Width 
Author Flavio Mendikovic 
Date Jun 18, 2007 
Message I think it's 100.

When you enter a number bigger than 100 you get a message: Please enter number between 0 and 100.
 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Polygon Width 
Author David Lamb 
Date Jun 18, 2007 
Message Do you mean the outline width of the polygon or the actual dimensions of the polygon? Programatically you could get the polygon's IEnvelope, which would give you the width. The envelope is just a rectangle that the polygon fits within.

David 
  David Lamb 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Polygon Width 
Author Timothy Maguire 
Date Jul 02, 2007 
Message David,
Thanks for the reply. I need to find out the actual width of the polygon, not its outline width. I do not know what IEnvelope is, can you explain further. Thanks again.
Tim 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Polygon Width 
Author David Lamb 
Date Jul 02, 2007 
Message Each feature has a bounding envelope around it (except for points), which is essentially a rectangle that is around it. IEnvelope is an interface that allows a program to access the properties of a feature's envelope.

What I did was create a new field of type double. Then used field calculator, checked advanced and used the code below to obtain a width value from the envelope. Put Output in the bottom textbox.
http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esriGeometry/IEnvelope.htm

You can obtain all the properties of the envelope by using the .Width syntax. So pEnve.XMax would return the largest x coordinate for the envelope.

David 
 
Dim Output As Double
Dim pPoly as IPolygon
Set pPoly = [Shape]
Dim pEnve as IEnvelope
Set pEnve = pPoly.Envelope
Output = pEnve.Width
 
  David Lamb 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Polygon Width 
Author Timothy Maguire 
Date Jul 02, 2007 
Message David,
Thanks for the help. That worked great except for long narrow polygons that are at an angle. When I measure the thickest section of the polygon it may be 100 meters, but the Ienvelope output says that it is over 800 meters wide. Any thoughts? For small rectangular polygons it works great.
Tim 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Polygon Width 
Author David Lamb 
Date Jul 02, 2007 
Message Unfortunately the code just returns the "width" of the dashed line in the attached image, and not the thickest part of the actual polygon. I'm not entirely sure how this would be done.

David 
  David Lamb 
  rectangle example.jpg (opens in new window)
 
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Polygon Width 
Author Timothy Maguire 
Date Jul 02, 2007 
Message David,
Thanks again for your help. you got me part way to what I need to do. I may have to do it manually. Thanks again.
Tim 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Polygon Width 
Author William Huber 
Date Jul 03, 2007 
Message David,

You could adapt the solution posted on the AV 3.x forums at http://forums.esri.com/Thread.asp?c=3&f=39&t=185037&mc=5#msgid546550
  --Bill Huber
Quantitative Decisions (http://www.quantdec.com )
More GIS Q&A at http://gis.stackexchange.com/q/3083/664