Thanks for the reply. I have a bizarre behavior with version 1.5.8/GEOS 3.3.3. I'll try to extract a test case in order to discuss it in more detail.

Thanks for the replies,

Peter

On 10/18/2013 03:39 PM, Nicklas Avén wrote:
If I understand you right your assumption is true.

What makes you wondering?

In 2d you will always get the distance to a vertexpoint in at least one of the two geometries.

You can use ST_ShortestLine to see between what points the distance is calculated.

So:

SELECT ST_Distance('LINESTRING(1 1, 1 10)'::geometry, 'LINESTRING(2 5, 10 5)'::geometry);
 returns 1
and
SELECT ST_AsText(ST_ShortestLine('LINESTRING(1 1, 1 10)'::geometry, 'LINESTRING(2 5, 10 5)'::geometry));
returns 'LINESTRING(1 5, 2 5)'::geometry

geography type calculations is of course another story.


HTH

Nicklas




2013-10-18 Peter Hopfgartner wrote:

I took it for granted, that ST_Distance between two two dimensional
>geometries followes the definition of
>
>dist(A, B) = inf(d(a,b)), where a is an arbitrary point in set A and b
>an arbitrary point in set B and d() is the euclidean distance
>
>For some reason I'm now wondering if my assumption is true.
>
>Thanks for your patience,
>
>Peter
>
>--
>Peter Hopfgartner
>R3 GIS
>
>web : http://www.r3-gis.com
>
>_______________________________________________
>postgis-users mailing list
>[email protected]
>http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
>


_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users


--
Peter Hopfgartner
R3 GIS Srl - GmbH
Via Johann Kravogl-Str. 2
I-39012 Meran/Merano (BZ)
web  : www.r3-gis.com
mail : [email protected]
phone: +39 0473 494949
fax  : +39 0473 069902

ATTENZIONE! Le informazioni contenute nella presente e-mail e nei documenti 
eventualmente allegati sono confidenziali. La loro diffusione, distribuzione 
e/o riproduzione da parte di terzi, senza autorizzazione del mittente è vietata 
e può violare il D. Lgs. 196/2003. In caso di ricezione per errore, Vogliate 
immediatamente informare il mittente del messaggio e distruggere la e-mail.

ACHTUNG! Die in dieser Nachricht oder in den beigelegten Dokumenten 
beinhalteten Informationen sind streng vertraulich. Ihre Verbreitung und/oder 
ihre Wiedergabe durch Dritte ist ohne Erlaubnis des Absenders verboten und 
verstößt gegen das Legislativdekret 196/2003. Sollten Sie diese Mitteilung 
irrtümlicherweise erhalten haben, bitten wir Sie uns umgehend zu informieren 
und anschließend die Mitteilung zu vernichten.

WARNING! This e-mail may contain confidential and/or privileged information. If 
you are not the intended recipient (or have received this e-mail in error) 
please notify the sender immediately and destroy this e-mail. Any unauthorised 
copying, disclosure or distribution of the material in this e-mail is strictly 
forbidden and could be against the law (D. Lgs. 196/2003)

_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

Reply via email to