<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV><FONT size=2>
<P>Dear list,</P>
<P>with help of the list I am able to determine minimum width of a river using SQL below. Especially thanks to Mr. Simon Greener.. I still need to determine position (in meter and also latlon) of this point from the river mounth. Can anybody give me suggestion what Postgis function I should use together with the following SQL.</P></FONT></DIV>
<DIV> </DIV>
<DIV>SELECT min(ST_Distance(l.the_geom,r.the_geom)) as Min_Width<BR> FROM (select row_number() over (order by the_geom) as rin, the_geom<BR> from River r<BR> where r.Name = 'Barito' ) as l,<BR> (select row_number() over (order by the_geom) as rin, the_geom<BR> from River r<BR> where r.Name = 'Barito' ) as r<BR> WHERE l.rin = 1<BR> AND r.rin = 2;<BR><BR>kind regards,</DIV>
<DIV> </DIV>
<DIV>surya</DIV></div><br>
</body></html>