<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EstiloCorreo17
{mso-style-type:personal;
font-family:Arial;
color:windowtext;}
span.EstiloCorreo18
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:595.3pt 841.9pt;
margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.Section1
{page:Section1;}
-->
</style>
</head>
<body lang=ES link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Hi,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>We’ve managed to
solve the problem with the cookie cutter. The quick (and quite smart) solution
was to generate a buffer of the geometries of 0 distance, thereby creating the
buffer around <i><span style='font-style:italic'>all</span></i> the geometries,
lines and polygons, thus rendering insignificant the linestring problem.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Cheers,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Matt<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>PS. Here’s the code
if anybodies interested.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>SELECT <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'> buffer(INTERSECTION(<cookie>.the_geom,
<cutter>.the_geom),0) AS the_geom<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>INTO<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> <output><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>FROM <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'> <cookie>,
<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'> <cutter><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>WHERE <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'> <cookie>.the_geom
&& <cutter>.the_geom<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>AND <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font><font size=2
color=navy face=Arial><span lang=EN-GB style='font-size:10.0pt;font-family:
Arial;color:navy'>intersects(<cookie>.the_geom, <cutter>.the_geom);<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<table class=MsoNormalTable border=0 cellpadding=0 align=left width="100%"
bgcolor=white style='width:100.0%;background:white'>
<tr>
<td colspan=2 style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal style='mso-element:frame'><font size=3 color=navy
face="Times New Roman"><span lang=EN-GB style='font-size:12.0pt;color:navy'> <o:p></o:p></span></font></p>
</td>
</tr>
<tr>
<td colspan=2 style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal style='mso-element:frame'><font size=3 color=navy
face="Times New Roman"><span lang=EN-GB style='font-size:12.0pt;color:navy'> <o:p></o:p></span></font></p>
</td>
</tr>
<tr>
<td style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal style='mso-element:frame'><font size=3 color="#2e3a75"
face=Arial><span style='font-size:12.0pt;font-family:Arial;color:#2E3A75'>Matt
Doughty</span></font><font color=navy><span style='color:navy'><o:p></o:p></span></font></p>
</td>
<td rowspan=5 valign=top style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal style='mso-element:frame'><font size=3 color=navy
face="Times New Roman"><span style='font-size:12.0pt;color:navy'><img
width=90 height=100 id="_x0000_i1027" src="cid:image001.jpg@01C82C39.252D4160"><o:p></o:p></span></font></p>
</td>
</tr>
<tr>
<td style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal style='mso-element:frame'><font size=3 color="#2e3a75"
face=Arial><span style='font-size:12.0pt;font-family:Arial;color:#2E3A75'>GEOGRAMA
S.L.</span></font><font color=navy face=Arial><span style='font-family:Arial;
color:navy'><o:p></o:p></span></font></p>
</td>
</tr>
<tr>
<td style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal style='mso-element:frame'><font size=3 color="#2e3a75"
face=Arial><span style='font-size:12.0pt;font-family:Arial;color:#2E3A75'>Tel.:
+34 945 13 13 72 652 77 14 15</span></font><font color=navy face=Arial><span
style='font-family:Arial;color:navy'><o:p></o:p></span></font></p>
</td>
</tr>
<tr>
<td style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal style='mso-element:frame'><font size=3 color="#2e3a75"
face=Arial><span style='font-size:12.0pt;font-family:Arial;color:#2E3A75'>Fax:
+34 945 23 03 40 </span></font><font color=navy face=Arial><span
style='font-family:Arial;color:navy'><o:p></o:p></span></font></p>
</td>
</tr>
<tr>
<td style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal style='mso-element:frame'><font size=3 color="#2e3a75"
face=Arial><span style='font-size:12.0pt;font-family:Arial;color:#2E3A75'>www.geograma.com</span></font><font
color=navy face=Arial><span style='font-family:Arial;color:navy'><o:p></o:p></span></font></p>
</td>
</tr>
<tr>
<td colspan=2 style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal style='mso-element:frame'><font size=3 color=navy
face="Times New Roman"><span style='font-size:12.0pt;color:navy'> <o:p></o:p></span></font></p>
</td>
</tr>
</table>
</div>
<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>
<div>
<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>
<hr size=2 width="100%" align=center tabindex=-1>
</span></font></div>
<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>De:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] <b><span
style='font-weight:bold'>En nombre de </span></b>Matt Doughty<br>
<b><span style='font-weight:bold'>Enviado el:</span></b> miércoles, 21 de
noviembre de 2007 8:16<br>
<b><span style='font-weight:bold'>Para:</span></b>
postgis-users@postgis.refractions.net<br>
<b><span style='font-weight:bold'>Asunto:</span></b> [postgis-users] Problem with
Intersection(Geometry, Geometry)</span></font><o:p></o:p></p>
</div>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>Hi all,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>I’m having some problems with the intersection
function that I’ve been trying to use as a Cookie cutter command.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>I’ve been executing the following script:<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>SELECT <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>
INTERSECTION(<cookie>.the_geom, <cookie-cutter>.the_geom) AS the_geom<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>INTO<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>
<output><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>FROM <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>
<cookie>, <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>
<cookie-cutter><o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>WHERE <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>
<cookie>.the_geom && <cookie-cutter>.the_geom<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>AND <o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>
intersects(<cookie>.the_geom, <cookie-cutter>.the_geom);<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>The problem it gives me is that polygons which need
to be cut don’t turn out right. The output retuns to the geometry column
a GeometryCollection for the polygon in question. This is composed of one
polygon, which is what I want, and a collection of linestrings, each of which
represents a segment of the boundary of the cutting polygon, which obviously I
don’t want.<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>Has anybody come across this and how can I solve the
problem?<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>Cheers,<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'>Matt<o:p></o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
<table class=MsoNormalTable border=0 cellpadding=0 align=left width="100%"
bgcolor=white style='width:100.0%;background:white'>
<tr>
<td colspan=2 style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal style='mso-element:frame'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</td>
</tr>
<tr>
<td colspan=2 style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal style='mso-element:frame'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</td>
</tr>
<tr>
<td style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal style='mso-element:frame'><font size=3 color="#2e3a75"
face=Arial><span style='font-size:12.0pt;font-family:Arial;color:#2E3A75'>Matt
Doughty</span></font><o:p></o:p></p>
</td>
<td rowspan=5 valign=top style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal style='mso-element:frame'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><img width=90
height=100 id="_x0000_i1025" src="cid:image001.jpg@01C82C39.252D4160"><o:p></o:p></span></font></p>
</td>
</tr>
<tr>
<td style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal style='mso-element:frame'><font size=3 color="#2e3a75"
face=Arial><span style='font-size:12.0pt;font-family:Arial;color:#2E3A75'>GEOGRAMA
S.L.</span></font><font face=Arial><span style='font-family:Arial'><o:p></o:p></span></font></p>
</td>
</tr>
<tr>
<td style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal style='mso-element:frame'><font size=3 color="#2e3a75"
face=Arial><span style='font-size:12.0pt;font-family:Arial;color:#2E3A75'>Tel.:
+34 945 13 13 72 652 77 14 15</span></font><font
face=Arial><span style='font-family:Arial'><o:p></o:p></span></font></p>
</td>
</tr>
<tr>
<td style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal style='mso-element:frame'><font size=3 color="#2e3a75"
face=Arial><span style='font-size:12.0pt;font-family:Arial;color:#2E3A75'>Fax:
+34 945 23 03 40 </span></font><font face=Arial><span style='font-family:
Arial'><o:p></o:p></span></font></p>
</td>
</tr>
<tr>
<td style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal style='mso-element:frame'><font size=3 color="#2e3a75"
face=Arial><span style='font-size:12.0pt;font-family:Arial;color:#2E3A75'>www.geograma.com</span></font><font
face=Arial><span style='font-family:Arial'><o:p></o:p></span></font></p>
</td>
</tr>
<tr>
<td colspan=2 style='padding:.75pt .75pt .75pt .75pt'>
<p class=MsoNormal style='mso-element:frame'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'> <o:p></o:p></span></font></p>
</td>
</tr>
</table>
<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>
</div>
</body>
</html>