<!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="#333333">
Good people;<br>
<br>
In trying to solve my noding problem I have run into a new problem with
intersecting things.<br>
<br>
I have a simple example of two polygon tables, "buildings" and
"parcels", wherein I have<br>
<br>
<ol>
<li>four polygons in buildings</li>
<li>one polygon in parcels</li>
<li>two of the buildings polygons lie completely within the parcels
polygon</li>
<li>one buildings polygon lies partly within the parcels polygon</li>
<li>one buildings polygon lies completely outside the parcels polygon.</li>
</ol>
These polygons are all nice neat rectangles.<br>
<br>
If I execute:<br>
<br>
select
buildingid,parcelid,geometryType(st_intersection(buildings.geom,parcels.geom))<br>
from buildings,parcels<br>
where buildings.geom && parcels.geom;<br>
<br>
I get pretty much what I expect, namely three polygons:<br>
<br>
<tt>buildingid | parcelid | geometrytype <br>
------------+----------+--------------<br>
1 | 101 | POLYGON<br>
2 | 101 | POLYGON<br>
3 | 101 | POLYGON<br>
(3 rows)</tt><br>
<br>
In principle, my "real-world" problem is quite similar. I have:<br>
<br>
three proposed block polygons (like buildings)<br>
3378 vegetation polygons (like parcels)<br>
one of the block polygons lies completely within the vegetation polygons<br>
two of the block polygons lie completely outside the vegetation polygons<br>
<br>
If I execute:<br>
<br>
select geometryType(st_intersection(pblk.geom,pvri.geom))<br>
from pblk,pvri<br>
where pblk.geom && pvri.geom;<br>
<br>
I get something quite different than what I expect. I expect to get
polygons, and sometimes multipolygons - which I assume arise when the
intersection process splits up polygons into several constituent parts.<br>
<br>
But I also get a bunch of geometrycollections. And these
geometrycollections are apparently empty, for example, the first few
lines of output from the above select:<br>
<br>
<tt> numgeometries | geometrytype <br>
---------------+--------------------<br>
| POLYGON<br>
| POLYGON<br>
0 | GEOMETRYCOLLECTION<br>
0 | GEOMETRYCOLLECTION<br>
| POLYGON<br>
0 | GEOMETRYCOLLECTION</tt><br>
<br>
Are these supposed to be there? What conceivable purpose could they
serve?<br>
<pre class="moz-signature" cols="72">--
Regards,
Chris Hermansen · <a class="moz-txt-link-freetext" href="mailto:clh@timberline.ca">mailto:clh@timberline.ca</a>
tel:+1.604.714.2878 · fax:+1.604.733.0631
Timberline Natural Resource Group · <a class="moz-txt-link-freetext" href="http://www.timberline.ca">http://www.timberline.ca</a>
401 · 958 West 8th Avenue · Vancouver BC · Canada · V5Z 1E5
C'est ma façon de parler.
</pre>
</body>
</html>