<html><body><div style="font-family: garamond,new york,times,serif; font-size: 12pt; color: #000000"><div>Hi,</div><div><br data-mce-bogus="1"></div><div>Maybe you could have a look at the snaptogrid function to address this kind of precision issue.</div><div><br data-mce-bogus="1"></div><div><div>select st_equals(st_snaptogrid(a.geom,51),st_snaptogrid(b.geom,51))</div><div>from</div><div>(select st_geomfromtext('LINESTRING(571927 6327619.2,571906.899999999 6327612.4,571826.700000003 6327586.3,571770.600000001 6327567,571718.700000003 6327549.9,571670.899999999 6327532.4,571589.5 6327505)') geom) a,</div><div>(select st_geomfromtext('LINESTRING(571927 6327619.2,571906.899999999 6327612.4,571826.700000003 6327586.3,571824.343590402 6327585.48932789,571770.600000001 6327567,571718.700000003 6327549.9,571670.899999999 6327532.4,571589.5 6327505)') geom) b</div><div><br data-mce-bogus="1"></div><div>Cheers,</div><div>Hug</div></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br></div><div data-marker="__SIG_PRE__"><br><br></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>De: </b>"GUILLAUME ARNAUD" <guillaume.arnaud@ledepartement82.fr><br><b>À: </b>"PostGIS Users Discussion" <postgis-users@lists.osgeo.org><br><b>Envoyé: </b>Jeudi 5 Décembre 2019 14:56:46<br><b>Objet: </b>[postgis-users] st_equals on line with tolerance<br></div><div><br></div><div data-marker="__QUOTED_TEXT__"><p>Hi,</p>
<p>I need to compare these 2 lines (srid : 2154) : <br>
</p>
<p>"LINESTRING(571927 6327619.2,571906.899999999
6327612.4,571826.700000003 6327586.3,571770.600000001
6327567,571718.700000003 6327549.9,571670.899999999
6327532.4,571589.5 6327505)"</p>
<p>"LINESTRING(571927 6327619.2,571906.899999999
6327612.4,571826.700000003 6327586.3,571824.343590402
6327585.48932789,571770.600000001 6327567,571718.700000003
6327549.9,571670.899999999 6327532.4,571589.5 6327505)"</p>
<p>I want the result of sql say that it match ?</p>
<p>The difference is only this point : 571824.343590402
6327585.48932789 (add by an app) and this point is very close from
the first line : 1.98930589140335e-09 m so, can i add a tolerance
to compare ?</p>
<p>Thanks.<br>
</p>
<div class="moz-signature">-- <br>
<table width="450" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr valign="bottom">
<td colspan="2">
<hr size="3" noshade="noshade"> </td>
<td>
<br>
</td>
</tr>
<tr>
<td>
<a href="http://www.ledepartement.fr" hreflang="fr" target="_blank">
<img alt="Logo CD82" width="150" border="0" align="left" src="http://www.ledepartement.fr/fileadmin/integration/lib/images/logo-cd82-footer.png
">
</a> </td>
<td>
<font size="3" face="Eras Medium ITC">
Guillaume ARNAUD
</font><br>
<font size="2" face="Eras Medium ITC">
Technicien SIG
</font><br>
<font>
Cellule SIGD
</font><br>
<font>
Direction des systèmes informatiques et de
télécommunication
</font><br>
<font>
Pôle coordination et ressources
</font><br>
<font size="2" face="Eras Medium ITC">Tél : 05 63 91 82 37
</font><br>
<a class="moz-txt-link-freetext" href="mailto:
guillaume.arnaud@ledepartement82.fr
" target="_blank"><font size="2">
guillaume.arnaud@ledepartement82.fr
</font></a><font size="2">
</font></td>
</tr>
<tr valign="top">
<td colspan="2">
<hr size="3" noshade="noshade">
</td>
</tr>
</tbody>
</table>
</div>
<br>_______________________________________________<br>postgis-users mailing list<br>postgis-users@lists.osgeo.org<br>https://lists.osgeo.org/mailman/listinfo/postgis-users<br></div></div></body></html>