<div dir="ltr">Hey,<div>this is partially true.<br><br>It behaves strangely when you hit precision limits.</div><div><br></div><div>Cheers,<br>Rémi-C</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/10/18 Nicklas Avén <span dir="ltr"><<a href="mailto:nicklas.aven@jordogskog.no" target="_blank">nicklas.aven@jordogskog.no</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>If I understand you right your assumption is true.
<div><br>
</div>
<div>What makes you wondering?</div>
<div><br>
</div>
<div>In 2d you will always get the distance to a vertexpoint in at least one of the two geometries.</div>
<div><br>
</div>
<div>You can use ST_ShortestLine to see between what points the distance is calculated.</div>
<div><br>
</div>
<div>So:</div>
<div><br>
</div>
<div>SELECT ST_Distance('LINESTRING(1 1, 1 10)'::geometry, 'LINESTRING(2 5, 10 5)'::geometry);</div>
<div> returns 1</div>
<div>and </div>
<div>SELECT ST_AsText(ST_ShortestLine('LINESTRING(1 1, 1 10)'::geometry, 'LINESTRING(2 5, 10 5)'::geometry));</div>
<div>returns 'LINESTRING(1 5, 2 5)'::geometry</div>
<div><br>
</div>
<div>geography type calculations is of course another story.</div>
<div><br>
</div>
<div><br>
</div>
<div>HTH</div><span class="HOEnZb"><font color="#888888">
<div><br>
</div>
<div>Nicklas</div></font></span><div><div class="h5">
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
2013-10-18 Peter Hopfgartner wrote:<br>
<br>
I took it for granted, that ST_Distance between two two dimensional <br>
>geometries followes the definition of<br>
><br>
>dist(A, B) = inf(d(a,b)), where a is an arbitrary point in set A and b <br>
>an arbitrary point in set B and d() is the euclidean distance<br>
><br>
>For some reason I'm now wondering if my assumption is true.<br>
><br>
>Thanks for your patience,<br>
><br>
>Peter<br>
><br>
>-- <br>
>Peter Hopfgartner<br>
>R3 GIS<br>
><br>
>web : <a href="http://www.r3-gis.com" target="_blank">http://www.r3-gis.com</a><br>
><br>
>_______________________________________________<br>
>postgis-users mailing list<br>
><a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
><a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
><br>
>
</div>
</div></div></div>
<br>_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br></blockquote></div><br></div>