6

Given a polygon featureclass containing many polygons of different sizes and shapes, which geometric attributes (area, perimeter, etc) could be used to filter the polygons? It's probably best to ask this in two parts:

  1. Which geometric attributes do polygons possess?
  2. How would you calculate these attributes? Geoprocessing tools/ArcObjects preferred, but I would be satisfied with conceptual calculations which could then be coded.

As an example, I am considering calculating the maximum length of a polygon by breaking the edge of the polygon into points at a small interval and then calculating the distance between all points - the longest distance would be the maximum length of that polygon.

I'm hoping to use these attributes to allow interactive user control of polygon filtering.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Radar
  • 10,659
  • 9
  • 60
  • 113
  • 5
    A little more guidance about the purpose of this interactive "polygon filtering" is needed here, because there are infinitely many conceivable geometric properties polygons can have. Thus your first question is not practically answerable. – whuber Nov 19 '12 at 17:24
  • 3
    2d or 3d realm? – Brad Nesom Nov 19 '12 at 17:32
  • 1
    @whuber Fair enough. To simplify: Which attributes could be pictured visually by a GIS user? For example, polygon area can be filtered easily by specifying only those polygons with an area > 200m^2 be kept. It would be harder for a GIS user to picture complex angular geometry. So, I'd like attributes that could be comprehended simply to translate to filtering in the GIS. – Radar Nov 19 '12 at 17:35
  • @BradNesom 3D realm is acceptable, but as above it would have to be simple. Eg. simple polygon average depth. – Radar Nov 19 '12 at 17:36
  • 3
    Arguably, there are still infinitely many such attributes. For instance, consider the modulus of the 17th coefficient of the Fourier series of the radial part of a convex polygon relative to its centroid(!). It's just a number and so is easily "visualized" and used for filtering. (It actually has a fairly simple interpretation, too, but that doesn't matter.) Obviously I could have picked any one of the infinitely many coefficients. – whuber Nov 19 '12 at 17:55
  • How about I go with "easily 'spatially' visualized" and specify that this should be accessible to an intermediate GIS user, not an expert or GIS developer :) – Radar Nov 19 '12 at 18:02
  • BTW, the maximum distance is called its diameter. There exist efficient ways to calculate it. (I believe Dan Patterson implemented one for ArcGIS and posted it on ArcScripts many years ago.) – whuber Nov 19 '12 at 18:02
  • 1
    That begs the question of what "easily spatially visualized" means. For instance, a number is pretty easy to visualize :-). Moroever, the Fourier coefficients can be related to sizes and relative locations of the angles at a polygon's vertices, so one might imagine that even novice users (such as kindergartners :-) could be taught to visualize or interpret seemingly arcane geometric properties. This brings us back to the beginning: unless you seriously restrict the scope of this question, it doesn't look answerable. – whuber Nov 19 '12 at 18:04
  • The above example of diameter is something that I would be specifically looking for. I'll take a look for Dan's script - he was an instructor of mine for ~4 years, so it's always nice to still be learning something from him. – Radar Nov 19 '12 at 18:04
  • 3
    In that case, start with his bounding container toolset. – whuber Nov 19 '12 at 18:06
  • I get the feeling we're going with attributes like area, length of perimeter and so on. You have a lot of suggestions already. So I'll restrict my comment to one more: Polygon orientation - which you can get from the Calculate Polygon Main Angle tool in the Cartography toolbox. This is something that "the man on the Clapham omnibus" should be able to visualize without extensive training! – MappaGnosis Nov 19 '12 at 19:21
  • @Sylvester ... or diameter, or extent, or minimum area bounding box, or maximum inscribed (circle, triangle, rectangle, isothetic rectangle), or tortuosity, or number of vertices, or number of connected components, or number of rings, or average curvature, or average signed curvature, or closest approximating circle (using an L1, L2, L-Infinity, or other norm), or closest approximating rectangle, or ellipse representing all first and second moments (which would include one form of "orientation"), or longest inscribed line segment, or ... There are just too many to list! – whuber Nov 19 '12 at 20:04
  • Point taken @whuber. I suppose I'll have to refine my question and make it much more application specific. – Radar Nov 19 '12 at 21:42
  • 1
    You can easily do these calculations with ArcObject - polygon is composed of rings - rings of segments - segments of vertices and from each vertex you can obtain X,Y,Z coordinates. You can then construct an array of lines from these points and isolate the longest one. Because polygons are constructed from inner and outer rings you can even decide whether to include or exclude holes, handle multi-geometry, etc. 2D or 3D. Are you looking for an example of a procedure how this is actually done with ArcObjects/.Net? – Jakub Sisak GeoGraphics Nov 20 '12 at 14:06
  • Thanks @Jakub - the methodology you mention is what I'm looking for. If you have an existing example that would be great, otherwise I'm alright with coding it up. – Radar Nov 20 '12 at 17:17

4 Answers4

1

Here is an interesting Python tool named "Shape Metrics". It calculates 12 different metrics for each polygon. There is a good PowerPoint presentation describing each Metric. The Arc Tool Box is written for ArcGIS 9.3.

Shape Metrics Tool

klewis
  • 7,475
  • 17
  • 19
0

I had a similar problem for finding unique polygons in groups of "counterpart" polygons (representing same area, but drawn slightly differently). I was successfully able to filter out unique polygons by using:

  • Acreage
  • Perimeter
  • centroid (x, y)
  • Extent(Max X, Max Y, min x, min y)
crld
  • 882
  • 5
  • 11
0

Off the top of my head: Is composed of lines and points, encloses a plane, may have a centroid or identifier such as name or feature class. May contain a fill of a feature class, Has interior and exterior edges. segment can be read from origin point back to origin point with no seg fault error. Has more than 3 points. Has an area. Since all GIS polygons are already composed of segments, why not use existing segment endpoints? I think they have no length as that is the function of the lines, I'm guessing you meant perimeter.

lewis
  • 1,507
  • 10
  • 18
0

Topological characteristics are generally quite intuitive to understand.

Geometrically people are usually pretty poor (how big is 200m at X scale on screen?) I would let them select one example or draw a primary shape on screen and then calculate matched from this.

AnserGIS
  • 1,068
  • 7
  • 19