<html>
<head>
<title></title>
<meta content="MSHTML 6.00.2900.5726" name="GENERATOR"></meta>
</head>
<body>
<div>Sorry, I guess
<span style="FONT-FAMILY: Courier New"><strong>ST_Max_Distance</strong>(</span>geometry <var class="pdparam">g1</var>, geometry <var class="pdparam">g2</var><code>) is just for linestrings in current release</code></div>
<div><code>but in the doc for 1.4 it is presented with geometry1 and geometry2</code></div>
<p><code>/Nicklas</code></p>
<div><br />
<br />
2009-02-19 My Pid wrote:<br />
<br />
Hello again,<br />
><br />
>I found the generate_series function (yes i am a newbie!) and I can use it in order to calculate the distance between<br />
> my centroid (geometry_centroid) and my polygon (geometry_zone) with the following request<br />
><br />
><br />
>SELECT (distance_spheroid(geometry_centroid,ST_AsText(ST_PointN(ExteriorRing(geometry_zone), generate_series(1,(SELECT npoints(geometry_zone) FROM "208_1_26624_zones" WHERE "cellID"='1')))), 'SPHEROID["WGS 84",6378137,298.257223563]')) as d FROM "208_1_26624_zones" WHERE "cellID"='1';<br />
><br />
>Now I can't use the max function because of the following error: "set-valued function called in context that cannot accept a set"<br />
>when I use<br />
><br />
>SELECT max(distance_spheroid(geometry_centroid,ST_AsText(ST_PointN(ExteriorRing(geometry_zone), generate_series(1,(SELECT npoints(geometry_zone) FROM "208_1_26624_zones" WHERE "cellID"='1')))), 'SPHEROID["WGS 84",6378137,298.257223563]')) as d FROM "208_1_26624_zones" WHERE "cellID"='1';<br />
><br />
><br />
>any idea ?<br />
><br />
>thanks!<br />
>Nick<br />
><br />
><br />
>></div>
<div>2009/2/18 My Pid <<a target="_blank">mamat750@gmail.com</a>><br />
>Hello,<br />
><br />
>I would like to know how I could get the maximum distance between a POINT and a POLYGON.<br />
> (the POINT i am talking about here is in fact the ST_Centroid of the mentionned POLYGON)<br />
><br />
>I looked for a function that transform my POLYGON into several POINT but without success.<br />
><br />
>I am working with longitude, latitude, altitude for POINT<br />
>It is really the max distance that I am looking for (not the minimum distance.)<br />
>and "accuracy" is important to me.<br />
><br />
>thanks in advance for your help !<br />
><br />
>regards,<br />
>Nick<br />
><br />
><br />
></div><br />
>
</body>
</html>