<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>RE: [postgis-devel] Does ST_Max_Distance work on anyone's install</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=2>Ah okay I agree with Strk on that one.<BR>
<BR>
 For the example he gave I would expect<BR>
it to return 10 too since I think the common use case would be for example<BR>
<BR>
Given a road a and road b -- what's the furthest that anyone would need to trek<BR>
(excluding routing obstacles)  from anywhere on road a to get to anywhere on road b.<BR>
<BR>
Hmm I wonder how much effort it would be to fix it.  I guess strk gave up on it<BR>
so that would mean I am probably  too stupid to attempt it.  Pity though.<BR>
<BR>
Well as functions go I guess its not the most important thing.  Would be more useful for polygons anyway since city to city commuting is more interesting.<BR>
<BR>
-----Original Message-----<BR>
From: postgis-devel-bounces@postgis.refractions.net on behalf of Paul Ramsey<BR>
Sent: Wed 10/29/2008 12:23 PM<BR>
To: PostGIS Development Discussion<BR>
Subject: Re: [postgis-devel] Does ST_Max_Distance work on anyone's install<BR>
<BR>
And there's the answer:<BR>
<BR>
<A HREF="http://postgis.refractions.net/pipermail/postgis-devel/2004-August/000437.html">http://postgis.refractions.net/pipermail/postgis-devel/2004-August/000437.html</A><BR>
<BR>
On Wed, Oct 29, 2008 at 9:21 AM, Paul Ramsey <pramsey@cleverelephant.ca> wrote:<BR>
> I'm pretty sure it existed and worked at one point, because Dave wrote<BR>
> it originally for a particular data processing use case Refractions<BR>
> had. Why strk turned it off is for him to say :)<BR>
><BR>
> P.<BR>
><BR>
> On Wed, Oct 29, 2008 at 4:17 AM, Mark Cave-Ayland<BR>
> <mark.cave-ayland@siriusit.co.uk> wrote:<BR>
>> Obe, Regina wrote:<BR>
>>><BR>
>>> <A HREF="http://postgis.refractions.net/documentation/manual-svn/ST_Max_Distance">http://postgis.refractions.net/documentation/manual-svn/ST_Max_Distance</A>.<BR>
>>> html<BR>
>>><BR>
>>> I noticed Robert Burgholzer tried to use it and couldn't either<BR>
>>> evidentally.  Though I thought it worked once upon a time.<BR>
>><BR>
>> Strange. There is actually code in the function to "do things"TM but the<BR>
>> elog() at the top of the function causes it to exit straightaway!<BR>
>><BR>
>> Looking at svn log you can see the following comments:<BR>
>><BR>
>> ------------------------------------------------------------------------<BR>
>> r756 | strk | 2004-08-26 17:55:09 +0100 (Thu, 26 Aug 2004) | 2 lines<BR>
>><BR>
>> max_distance() raises an 'unimplemented yet' error.<BR>
>><BR>
>> ------------------------------------------------------------------------<BR>
>><BR>
>> ...<BR>
>><BR>
>> ------------------------------------------------------------------------<BR>
>> r753 | strk | 2004-08-26 16:02:59 +0100 (Thu, 26 Aug 2004) | 2 lines<BR>
>><BR>
>> Added (bogus) max_distance(geom,geom)<BR>
>><BR>
>> ------------------------------------------------------------------------<BR>
>><BR>
>><BR>
>> And the relevant commit diff is:<BR>
>><BR>
>> pg83@zeno:~/src/postgis-svn/trunk/lwgeom$ svn diff -r 755:756<BR>
>> lwgeom_functions_basic.c<BR>
>> Index: lwgeom_functions_basic.c<BR>
>> ===================================================================<BR>
>> --- lwgeom_functions_basic.c    (revision 755)<BR>
>> +++ lwgeom_functions_basic.c    (revision 756)<BR>
>> @@ -1735,6 +1735,9 @@<BR>
>>        double maxdist = 0;<BR>
>>        int i;<BR>
>><BR>
>> +       elog(ERROR, "This function is unimplemented yet");<BR>
>> +       PG_RETURN_NULL();<BR>
>> +<BR>
>>        geom1 = (LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));<BR>
>>        line1 = lwline_deserialize(SERIALIZED_FORM(geom1));<BR>
>>        if ( line1 == NULL ) PG_RETURN_NULL(); // not a linestring<BR>
>><BR>
>><BR>
>> I'd say from this that strk had a go at implementing this function but<BR>
>> realised it didn't work properly and so disabled it soon afterwards :(<BR>
>><BR>
>><BR>
>> HTH,<BR>
>><BR>
>> Mark.<BR>
>><BR>
>> --<BR>
>> Mark Cave-Ayland<BR>
>> Sirius Corporation - The Open Source Experts<BR>
>> <A HREF="http://www.siriusit.co.uk">http://www.siriusit.co.uk</A><BR>
>> T: +44 870 608 0063<BR>
>> _______________________________________________<BR>
>> postgis-devel mailing list<BR>
>> postgis-devel@postgis.refractions.net<BR>
>> <A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-devel">http://postgis.refractions.net/mailman/listinfo/postgis-devel</A><BR>
>><BR>
><BR>
_______________________________________________<BR>
postgis-devel mailing list<BR>
postgis-devel@postgis.refractions.net<BR>
<A HREF="http://postgis.refractions.net/mailman/listinfo/postgis-devel">http://postgis.refractions.net/mailman/listinfo/postgis-devel</A><BR>
<BR>
</FONT>
</P>

</BODY>
</HTML>
<HTML><BODY><P><hr size=1></P>
<P><STRONG>
The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer.
</STRONG></P></BODY></HTML>

<P><hr size=1></P>
<P><STRONG><font size="2" color="339900"> Help make the earth a greener place. If at all possible resist printing this email and join us in saving paper. </p> <p> </font></STRONG></P>