[GRASSLIST:4070] Re: direction to nearest...?
Eric G. Miller
egm2 at jps.net
Fri Jul 12 16:52:47 EDT 2002
On Fri, Jul 12, 2002 at 10:38:59AM +0200, Radim Blazek wrote:
> I wanted suggest also to do that all in database like: select id1,
> first(id2) from (select id1, id2, (x2-x1)^2 + (y2-y1)^2 as d from
> pok1, pok2 where val1 = val2 order by (x2-x1)^2 + (y2-y1)^2) as xxx
> group by id1 ; etc., but I found that there is no first() aggregate
> function in postgres.
See LIMIT. Or, maybe a MIN or MAX aggregate? Or, see builtin postgres
distance operator...
--
Eric G. Miller <egm2 at jps.net>
More information about the grass-user
mailing list