<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Lee<br>
I think a minimum enclosing circle might also be larger than the
polygon.  Think of a circle circumscribing a square.  However I think
you are right in needing a circle.  A district that is an elongated
rectangle (could be a severely gerrymandered district) would have a
ratio of 1 if the convex hull is used but a circle would have a much
larger area.<br>
Bruce<br>
<br>
<br>
Lee Meilleur wrote:
<blockquote
 cite="mid:EE2E75216F55D2458F566BD899F5DECAB6E1EC1B68@mail.lcc.local"
 type="cite">
  <pre wrap="">
The area of the convex hull is actually larger than the area of the polygon, so the ratio ends up being greater than 1.  With the Roeck test, the ratio will always be between 0 and 1, with a compact polygon approaching 1 (the area of the inner circle approaching the area of the polygon).  A ratio approaching 0 would indicate a gerrymandered district.

Assuming my statement is correct that is:

SELECT congress.district, area(ST_ConvexHull(congress.the_geom)) / area(congress.the_geom) AS convex_roeck FROM congress;

Bruce, thanks for the idea, I'll see what I can produce from my minimal experience with stored procedures.



-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a> [<a class="moz-txt-link-freetext" href="mailto:postgis-users-bounces@postgis.refractions.net">mailto:postgis-users-bounces@postgis.refractions.net</a>] On Behalf Of Martin Davis
Sent: Friday, October 24, 2008 11:40 AM
To: PostGIS Users Discussion
Subject: Re: [postgis-users] Roeck test


Wouldn't it be easier and more accurate to use the convex hull of the polygon instead of the minimum enclosing ball? The CH will have smaller area (i.e. be a tighter bound on the area covered by the polygon), so it seems like it would give a more accurate basis for comparison.

Lee Meilleur wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Has anyone calculated the Roeck test using PostGIS?  This is an area
based measure that computes the ratio of the area of a polygon to the
area of the minimum enclosing circle for the polygon.  It's used to
measure compactness of districts for redistricting applications,
basically a way to test for gerrymandering.  Thanks.

Lee Meilleur
LCC-GIS Office
Minnesota Legislature
100 Rev. Dr. MLK Jr Blvd.
55 State Office Building
St. Paul, MN 55155
651.296.0098  Fax: 651.297.3697
<a class="moz-txt-link-abbreviated" href="mailto:lee.meilleur@gis.leg.mn">lee.meilleur@gis.leg.mn</a>
<a class="moz-txt-link-freetext" href="http://www.gis.leg.mn">http://www.gis.leg.mn</a>


_______________________________________________
postgis-users mailing list <a class="moz-txt-link-abbreviated" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>


    </pre>
  </blockquote>
  <pre wrap=""><!---->
--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022

_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>
_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>


  </pre>
</blockquote>
<br>
</body>
</html>