[postgis-users] Nearest point on an linestring

TECHER Jean David davidtecher at yahoo.fr
Tue Dec 21 00:53:09 PST 2004

create a plp/pgsql function using numpoints() and pointn() and find the
minimum distance for each point from the linestring to your query point...

numpoints() help you to know the number of points in the lienstring and
pointn() extract the n° point of the lienstring
TECHER Jean David
Responsable Informatique 01MAP
e-mail: davidtecher at yahoo.fr
Bureau: 04 67 45 60 27
Portable: 06 85 37 36 75
site perso : http://techer.pascal.free.fr/postgis/
site pro: http://www.01map.com/download/
K-S:"The greatest trick the devil pulled off was convincing people he didn't
----- Original Message -----
From: <skoehler at buschjena.de>
To: <postgis-users at postgis.refractions.net>
Sent: Tuesday, December 21, 2004 8:57 AM
Subject: [postgis-users] Nearest point on an linestring

> Hello,
> with the distance function I can compute the distance between an
> linestring and an point. But how can I compute the nearest point on the
> linestring to my query point?
> I think the distance function needs this point also and so the information
> is in the system, how can I use it?
> Thanks
> Steffen
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

More information about the postgis-users mailing list