<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:m="http://schemas.microsoft.com/office/2004/12/omml" 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 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EpostStil17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="NO-BOK" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">I want some polygons (with attribute artype=21) to snap into some neighbor-polygon. I have set the tolerance to 5m.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Put not all of the polygons in the result has been snapping, the gap is under the tolerance.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">The sql:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">create table test_ar5jm.snipsnap AS SELECT p1.jmsign,ST_Union(ST_Buffer(ST_Snap(p1.geo,p2.geo, 5),0)) as geo
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">FROM test_ar5jm.temp_aij_flate<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">AS p1 CROSS JOIN test_ar5jm.temp_aij_flate As p2<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">WHERE p1.artype = 21 <o:p></o:p></span></p>
<p class="MsoNormal">GROUP BY p1.jmsign;<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">Figures from QGis before snapping and after snapping in attachedment.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Times New Roman","serif";color:navy;mso-fareast-language:NO-BOK">Vennlig hilsen<br>
</span><b><span style="font-size:10.5pt;font-family:"Times New Roman","serif";color:navy;mso-fareast-language:NO-BOK">Astrid Bjørnerød</span></b><span style="font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:NO-BOK"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:NO-BOK"> <o:p></o:p></span></p>
<p class="MsoNormal"><i><span style="font-size:9.0pt;font-family:"Times New Roman","serif";color:navy;mso-fareast-language:NO-BOK">Seksjon Geomatikk</span></i><span style="font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:NO-BOK"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Times New Roman","serif";color:navy;mso-fareast-language:NO-BOK">-------------------------------------------<br>
</span><span style="font-size:9.0pt;font-family:"Times New Roman","serif";color:#007F00;mso-fareast-language:NO-BOK">Norsk institutt for skog og landskap<br>
</span><span style="font-size:9.0pt;font-family:"Times New Roman","serif";color:navy;mso-fareast-language:NO-BOK">Pb 115, NO-1431 Ås</span><span style="font-size:9.0pt;font-family:"Times New Roman","serif";color:#007F00;mso-fareast-language:NO-BOK">
<br>
</span><span style="font-size:9.0pt;font-family:"Times New Roman","serif";color:navy;mso-fareast-language:NO-BOK">T (+47) 64 94 96 96<br>
F (+47) 64 94 80 01<br>
-------------------------------------------<br>
</span><span style="font-size:9.0pt;font-family:"Times New Roman","serif";color:#007F00;mso-fareast-language:NO-BOK"><a href="http://www.skogoglandskap.no"><span style="color:blue">www.skogoglandskap.no</span></a><br>
</span><span style="font-size:9.0pt;font-family:"Times New Roman","serif";color:navy;mso-fareast-language:NO-BOK">-------------------------------------------</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>