Re: [postgis] distance...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [postgis] distance...

Brenn Erik
Hi,

Yes you can. You can use the PostGIS StartPoint() function to find the
starting point of each line. Then you can feed the start points to the
distance() function.

regards,
  erik brenn


>From: [hidden email]
>Reply-To: [hidden email]
>To: [hidden email]
>Subject: [postgis] distance...
>Date: Thu, 29 Nov 2001 11:04:22 -0000
>
>Hello all
>
>I think this is a postgis question:
>
>i have defined roads in the database and they are something like this:
>                  |3
>                  |
>                  |
>                  |
>                  |
>-----------------|
>1               2|
>                  |
>                  |4
>
>The points 1 (x,y) and 2 (x,y) defined "road 1" and points 3 (x,y) and
>4 (x,y). But what i need to know is the distance between points 1 and
>3. Can i do this using postgis functions?
>
>Thanks
>João
>


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Universal Inkjet Refill Kit $29.95
Refill any ink cartridge for less!
Includes black and color ink.
http://us.click.yahoo.com/gwUrIA/MkNDAA/ySSFAA/PhFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[hidden email]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



Reply | Threaded
Open this post in threaded view
|

Re: [postgis] distance...

David Blasby-3
Brenn Erik wrote:
> Yes you can. You can use the PostGIS StartPoint() function to find the
> starting point of each line. Then you can feed the start points to the
> distance() function.

Right -

        distance(FirstPoint(l1), FirstPoint(l2) )

(there's also a LastPoint() function)

dave

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Universal Inkjet Refill Kit $29.95
Refill any ink cartridge for less!
Includes black and color ink.
http://us.click.yahoo.com/gwUrIA/MkNDAA/ySSFAA/PhFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[hidden email]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/