[postgis-users] Help determining position

Surya Tarigan surya.tarigan at yahoo.com
Fri Oct 16 05:08:20 PDT 2009


Dear list,
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.

SELECT min(ST_Distance(l.the_geom,r.the_geom)) as Min_Width
  FROM (select row_number() over (order by the_geom) as rin, the_geom
          from River r
          where r.Name = 'Barito' ) as l,
        (select row_number() over (order by the_geom) as rin, the_geom
          from River r
          where r.Name = 'Barito' ) as r
  WHERE l.rin = 1
    AND r.rin = 2;

kind regards,

surya


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20091016/ac603483/attachment.html>


More information about the postgis-users mailing list