Index: reference.xml
===================================================================
--- reference.xml	(revision 4010)
+++ reference.xml	(working copy)
@@ -9713,7 +9713,7 @@
 	  <refsection>
 		<title>See Also</title>
 
-		<para><xref linkend="ST_DWithin"/>, <xref linkend="ST_Distance_Sphere"/>, <xref linkend="ST_Distance_Spheroid"/>, <xref linkend="ST_Max_Distance" /></para>
+		<para><xref linkend="ST_DWithin"/>, <xref linkend="ST_Distance_Sphere"/>, <xref linkend="ST_Distance_Spheroid"/>, <xref linkend="ST_Max_Distance" /><xref linkend="ST_ShortestLine" /></para>
 	  </refsection>
 	</refentry>
 
@@ -10519,24 +10519,131 @@
 		<title>Description</title>
 
 		<para>Returns the 2-dimensional maximum cartesian distance between two linestrings in
-		projected units.</para>
+		projected units. If g1 and g2 is the same geometry the function will return the distance between
+		the two vertices most far from eachother in that geometry.</para>
 
 	  </refsection>
 
 	  <refsection>
 		<title>Examples</title>
 
-		<programlisting>--ALL EXAMPLES current throw NOT YET IMPLEMENTED</programlisting>
+		<programlisting>postgis=# SELECT ST_Max_Distance('POINT(0 0)'::geometry, 'LINESTRING ( 2 0, 0 2 )'::geometry);
+   st_max_distance
+-----------------
+ 2
+(1 row)</programlisting>
 	  </refsection>
 
 	  <refsection>
 		<title>See Also</title>
 
-		<para><xref linkend="ST_Distance"/></para>
+		<para><xref linkend="ST_Distance"/><xref linkend="ST_LongestLine"/></para>
 	  </refsection>
 	</refentry>
 
+	<refentry id="ST_ShortestLine">
+	  <refnamediv>
+		<refname>ST_ShortestLine</refname>
 
+		<refpurpose>Returns the 2-dimensional shortest line between two geometries</refpurpose>
+	  </refnamediv>
+
+	  <refsynopsisdiv>
+		<funcsynopsis>
+		  <funcprototype>
+			<funcdef>geometry <function>ST_ShortestLine</function></funcdef>
+
+			<paramdef><type>geometry </type>
+			<parameter>g1</parameter></paramdef>
+
+			<paramdef><type>geometry </type>
+			<parameter>g2</parameter></paramdef>
+		  </funcprototype>
+		</funcsynopsis>
+	  </refsynopsisdiv>
+
+	  <refsection>
+		<title>Description</title>
+
+		<para>Returns the 2-dimensional shortest line between two geometries. The function will
+		only return the first shortest line if more than one, that the function finds.
+		If g1 and g2 intersects in just one point the function will return a line with both start
+		and end in that intersection-point.
+		If g1 and g2 are intersecting with more than one point the function will return a line with start
+		and end in the same point but it can be any of the intersecting points.
+		The line returned will always start in g1 and end in g2.
+		The length of the line this function returns will always be the same as st_distance returns for g1 and g2.		
+		</para>
+
+	  </refsection>
+
+	  <refsection>
+		<title>Examples</title>
+
+		<programlisting>postgis=# SELECT astext(st_shortestline('POINT(0 0)'::geometry, 'LINESTRING ( 2 0, 0 2 )'::geometry));;
+   st_shortestline
+-----------------
+ "LINESTRING(0 0,1 1)"
+(1 row)</programlisting>
+	  </refsection>
+
+	  <refsection>
+		<title>See Also</title>
+
+		<para><xref linkend="ST_Distance"/><xref linkend="ST_ShortestLine"/></para>
+	  </refsection>
+	</refentry>
+
+	<refentry id="ST_LongestLine">
+	  <refnamediv>
+		<refname>ST_LongestLine</refname>
+
+		<refpurpose>Returns the 2-dimensional longest line points of two geometries.
+		The function will only return the first longest line if more than one, that the function finds.
+		The line returned will always start in g1 and end in g2.
+		The length of the line this function returns will always be the same as st_max_distance returns for g1 and g2.</refpurpose>
+	  </refnamediv>
+
+	  <refsynopsisdiv>
+		<funcsynopsis>
+		  <funcprototype>
+			<funcdef>geometry <function>ST_LongestLine</function></funcdef>
+
+			<paramdef><type>geometry </type>
+			<parameter>g1</parameter></paramdef>
+
+			<paramdef><type>geometry </type>
+			<parameter>g2</parameter></paramdef>
+		  </funcprototype>
+		</funcsynopsis>
+	  </refsynopsisdiv>
+
+	  <refsection>
+		<title>Description</title>
+
+		<para>Returns the 2-dimensional longest line between the points of two geometries. 
+		</para>
+
+	  </refsection>
+
+	  <refsection>
+		<title>Examples</title>
+
+		<programlisting>postgis=# SELECT astext(st_longestline('POINT(0 0)'::geometry, 'LINESTRING ( 2 0, 0 2 )'::geometry));;
+   st_shortestline
+-----------------
+ "LINESTRING(0 0,2 0)"
+(1 row)</programlisting>
+	  </refsection>
+
+	  <refsection>
+		<title>See Also</title>
+
+		<para><xref linkend="ST_Max_Distance"/><xref linkend="ST_ShortestLine"/></para>
+	  </refsection>
+	</refentry>
+
+
 	<refentry id="ST_OrderingEquals">
 	  <refnamediv>
 		<refname>ST_OrderingEquals</refname>

