[postgis-devel] Does ST_Max_Distance work on anyone's install
Mark Cave-Ayland
mark.cave-ayland at siriusit.co.uk
Wed Oct 29 04:17:26 PDT 2008
Obe, Regina wrote:
> http://postgis.refractions.net/documentation/manual-svn/ST_Max_Distance.
> html
>
> I noticed Robert Burgholzer tried to use it and couldn't either
> evidentally. Though I thought it worked once upon a time.
Strange. There is actually code in the function to "do things"TM but the
elog() at the top of the function causes it to exit straightaway!
Looking at svn log you can see the following comments:
------------------------------------------------------------------------
r756 | strk | 2004-08-26 17:55:09 +0100 (Thu, 26 Aug 2004) | 2 lines
max_distance() raises an 'unimplemented yet' error.
------------------------------------------------------------------------
...
------------------------------------------------------------------------
r753 | strk | 2004-08-26 16:02:59 +0100 (Thu, 26 Aug 2004) | 2 lines
Added (bogus) max_distance(geom,geom)
------------------------------------------------------------------------
And the relevant commit diff is:
pg83 at zeno:~/src/postgis-svn/trunk/lwgeom$ svn diff -r 755:756
lwgeom_functions_basic.c
Index: lwgeom_functions_basic.c
===================================================================
--- lwgeom_functions_basic.c (revision 755)
+++ lwgeom_functions_basic.c (revision 756)
@@ -1735,6 +1735,9 @@
double maxdist = 0;
int i;
+ elog(ERROR, "This function is unimplemented yet");
+ PG_RETURN_NULL();
+
geom1 = (LWGEOM *)PG_DETOAST_DATUM(PG_GETARG_DATUM(0));
line1 = lwline_deserialize(SERIALIZED_FORM(geom1));
if ( line1 == NULL ) PG_RETURN_NULL(); // not a linestring
I'd say from this that strk had a go at implementing this function but
realised it didn't work properly and so disabled it soon afterwards :(
HTH,
Mark.
--
Mark Cave-Ayland
Sirius Corporation - The Open Source Experts
http://www.siriusit.co.uk
T: +44 870 608 0063
More information about the postgis-devel
mailing list