<div dir="ltr"><div class="gmail_default" style="font-family:times new roman,serif;font-size:small;color:#444444"><span style="color:rgb(36,39,41);font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:15px">Hello,</span><br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:small;color:#444444"><p style="margin:0px 0px 1em;padding:0px;border:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-weight:400;font-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both;color:rgb(36,39,41);letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-weight:400;font-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both;color:rgb(36,39,41);letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Please, see this 2 polygons example.</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-weight:400;font-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both;color:rgb(36,39,41);letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">I Convert them to linestrings (ST_Boundary) and then to polygons again (ST_Polygonize) and I can't reach to same polygons...</p><p style="margin:0px 0px 1em;padding:0px;border:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-weight:400;font-stretch:inherit;line-height:inherit;font-family:Arial,"Helvetica Neue",Helvetica,sans-serif;font-size:15px;vertical-align:baseline;box-sizing:inherit;clear:both;color:rgb(36,39,41);letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">This is a bug from ST_Polygonize function?</p><pre style="margin:0px 0px 1em;padding:5px;border:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:inherit;font-variant-east-asian:inherit;font-weight:400;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;font-size:13px;vertical-align:baseline;box-sizing:inherit;width:auto;max-height:600px;overflow:auto;background-color:rgb(239,240,241);word-wrap:normal;color:rgb(36,39,41);letter-spacing:normal;text-align:left;text-indent:0px;text-transform:none;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-stretch:inherit;line-height:inherit;font-family:Consolas,Menlo,Monaco,"Lucida Console","Liberation Mono","DejaVu Sans Mono","Bitstream Vera Sans Mono","Courier New",monospace,sans-serif;font-size:13px;vertical-align:baseline;box-sizing:inherit;background-color:rgb(239,240,241);white-space:inherit">DROP TABLE IF EXISTS areas;
CREATE TABLE areas (
id integer,
geom GEOMETRY
);

INSERT INTO areas (id, geom) VALUES
(1, ST_GeometryFromText('POLYGON (( 152475.78309656942 348633.83643648896 100.0 , 152819.11124438787 348634.30014856393 100.0 , 152813.0950157867 348346.43594807677 100.0 , 151948.4678701025 348359.31090193643 100.0 , 151945.74402745243 348463.90645969921 100.0 , 152474.91289439827 348458.49244305107 100.0 , 152475.78309656942 348633.83643648896 100.0 ), ( 152527.33647845959 348558.83199005033 100.0 , 152529.2307245445 348407.29230325681 100.0 , 152709.18410261182 348403.50381108694 100.0 , 152709.18410261182 348558.83199005033 100.0 , 152527.33647845959 348558.83199005033 100.0 ), ( 152006.95163549151 348435.14978348627 100.0 , 152006.95163549151 348385.89938685647 100.0 , 152092.19270658147 348384.00514083228 100.0 , 152091.24558356937 348434.20266047411 100.0 , 152006.95163549151 348435.14978348627 100.0 ))')),
(2, ST_GeometryFromText('POLYGON (( 152527.33647845959 348558.83199005033 100.0 , 152709.18410261182 348558.83199005033 100.0 , 152709.18410261182 348403.50381108694 100.0 , 152529.22480595027 348407.76579079556 100.0 , 152527.33647845959 348558.83199005033 100.0 ))'))
;

DROP TABLE IF EXISTS poly2line;
create table poly2line as
SELECT ST_Boundary((ST_Dump(geom)).geom) AS geom
FROM areas;

DROP TABLE IF EXISTS polygonize;
CREATE TABLE polygonize AS
select (st_dump(ST_Polygonize(geom))).geom as geom
from poly2line;</code></pre>

<br></div><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><p style="FONT-FAMILY:'Times New Roman';FONT-SIZE:medium"></p>
<p></p>
<p style="FONT-FAMILY:'Times New Roman';FONT-SIZE:medium"></p>
<p></p>
<p style="FONT-FAMILY:'Times New Roman';FONT-SIZE:medium"></p>
<p></p>
<p style="FONT-FAMILY:'Times New Roman';FONT-SIZE:medium"></p>
<p style="FONT-FAMILY:'Courier New';FONT-SIZE:12px"></p>
<p><font face="times new roman, serif"><span style="COLOR:rgb(153,153,153)"><br></span></font></p>
<p><font face="times new roman, serif"><span style="COLOR:rgb(153,153,153)">Paulo Pires</span> </font></p>
<p></p>
<hr align="left" size="1" width="95">
<font size="1" face="times new roman, serif"><span style="COLOR:rgb(255,102,0)">phone</span>  <span style="COLOR:rgb(153,153,153)">964592113</span> <br><span style="COLOR:rgb(255,102,0)">e-mail</span>  <a href="mailto:paulopires16@gmail.com" target="_blank"><span style="COLOR:rgb(153,153,153)">paulopires16@gmail.com</span></a> <br><span style="COLOR:rgb(255,102,0)">crypt</span>   <a href="http://kerckhoffs.surfnet.nl/pks/lookup?op=get&search=0x878711213981EEF6" target="_blank"><span style="COLOR:rgb(153,153,153)">myPGP public key for encryption emails</span></a> <br><span style="COLOR:rgb(255,102,0)">links </span>   <a href="http://facebook.com/paulopires16" target="_blank"><span style="COLOR:rgb(153,153,153)">facebook</span></a> · <a href="http://twitter.com/#!/paulopires16" target="_blank"><span style="COLOR:rgb(153,153,153)">twitter</span></a> · <a href="http://www.linkedin.com/pub/paulo-pires/36/4a7/607" target="_blank"><span style="COLOR:rgb(153,153,153)">linkedin</span></a> · <a href="http://netlog.com/paulopires16" target="_blank"><span style="COLOR:rgb(153,153,153)">netlog</span></a> · <a href="http://download.oracle.com/javase/6/docs/api/" target="_blank"><span style="COLOR:rgb(153,153,153)">javase</span></a> · <a href="http://www.oracle.com/us/syndication/feeds/index.html" target="_blank"><span style="COLOR:rgb(153,153,153)">oracle</span></a> <br></font>
<div align="center" style="text-align:center"><span style="font-size:12.0pt;font-family:"Times New Roman","serif"">

<hr size="2" width="100%" align="center">

</span></div>

<p style="margin-bottom:12.0pt"><span style="font-size:7.5pt;font-family:"Arial","sans-serif";color:gray">Aviso Legal:<br>
Esta mensagem de Paulo Pires é destinada exclusivamente ao destinatário. Pode conter
informação confidencial ou legalmente protegida. A incorrecta transmissão desta
mensagem não significa a perda de confidencialidade. Se esta mensagem for
recebida por engano, por favor envie-a de volta para o remetente e apague-a do
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de
usar, revelar ou distribuir qualquer parte desta mensagem.<br>
<br>
Disclaimer:<br>
This message from Paulo Pires is destined exclusively to the intended receiver. It
may contain confidential or legally protected information. The incorrect
transmission of this message does not mean the loss of its confidentiality. If
this message is received by mistake, please send it back to the sender and
delete it from your system immediately. It is forbidden to any person who is
not the intended receiver to use, distribute or copy any part of this message.</span></p></div></div></div>
</div>