<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
This kind of question can be answered by a classic N-polygon
overlay. AFAIK PostGIS doesn't have such a function directly, so
you will have to compute the noding of the polygon linework,
followed by a polygonization step. Then take a interior point of
each resultant polygon and compute how many source polygons it lies
in. You can then union the set of polygons for each count of
interest.<br>
<br>
Be warned - if the sample below is representative of your data, you
may well encounter TopologyExceptions, since it appears that there
is a lot of nearly coincident linework.<br>
<br>
No doubt others can weigh in if there is a better way of doing this
in PostGIS.<br>
<br>
<div class="moz-cite-prefix">On 7/30/2013 9:37 AM, Sparr wrote:<br>
</div>
<blockquote
cite="mid:CANp3UNBieEjYUy9TdDZnzSkSaMyaOFF+-goHqc9xq_4dq8qNPA@mail.gmail.com"
type="cite">
<div dir="ltr">It was suggested on IRC that I ask this question to
this mailing list.
<div><br>
</div>
<div>I have a set of 1000 (or many more) polygons, most of which
intersect with each other. I want to produce a polygon (or set
of polygons, or an empty set) describing the area covered by
N-or-more of those polygons. For N=1, the answer is the union
of all of the polygons. For N=1000, the answer is their
intersection. The naive way to calculate N=2 through N=999 is
to make a list of combinations of polygons, intersect those,
and then union the results, but this will require a
prohibitively large number of union and intersection
operations in some cases.
<div>
<br>
</div>
<div>To illustrate the problem, here is an example with a
smaller set of data (422 polygons right now):</div>
<div><br>
</div>
<div><a moz-do-not-send="true"
href="http://regionaldifferences.com/results.html?region=New%20England&lat=42&lon=-73&zoom=6">http://regionaldifferences.com/results.html?region=New%20England&lat=42&lon=-73&zoom=6</a><br>
</div>
<div><br>
</div>
<div>If you hover your mouse over the center of Massachusetts
you'll see that 98% of the polygons (415/422 currently)
intersect there. Syracuse NY is about 25%.</div>
<div><br>
</div>
<div>What I want is the outline of specific percentiles on
this map. I want a single polygon representing the
50%-or-more area, and a single polygon representing the
90%-or-more area, etc.</div>
</div>
<div><br>
</div>
<div>Can PostGIS do this without my needing to assemble a string
of union and intersection operations for the query? I would
prefer not to rasterize the data unless it proves infeasible
to do this with the full precision vector data.</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a>
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<p class="" avgcert""="" color="#000000" align="left">No virus
found in this message.<br>
Checked by AVG - <a moz-do-not-send="true"
href="http://www.avg.com">www.avg.com</a><br>
Version: 2013.0.3349 / Virus Database: 3209/6535 - Release Date:
07/30/13</p>
</blockquote>
<br>
</body>
</html>