[prev in list] [next in list] [prev in thread] [next in thread]
List: postgis-users
Subject: Re: [postgis-users] Point and intersection of streets.
From: Stephen Woodbridge <woodbri () swoodbridge ! com>
Date: 2010-08-24 21:00:16
Message-ID: 4C7432E0.6030905 () swoodbridge ! com
[Download RAW message or body]
You might try something like:
select a.gid, b.gid,
distance(makepoint(x,y), st_intersection(a.the_geom, b.the_geom)
as dist
from lines a, lines b
where st_expand(makepoint(x,y), max_dist) && a.the_geom and
st_expand(makepoint(x,y), max_dist) && b.the_geom and
st_intersects(a.the_geom, b.the_geom);
You will like need to change this based on whatever SRID you are using.
I have not tried this, but maybe it will get you started.
-Steve
PS: please keep the list CC on this, there are other that can help and
profit from the responses.
On 8/24/2010 1:34 PM, vilella.ricardo@gmail.com wrote:
> My data isn't noded and when I said "near" is by a maximun distance. If
> I had a line A and line B how I can do to know if a point is near of the
> intersection of this lines?
>
> El 24/08/2010 14:04, Stephen Woodbridge <woodbri@swoodbridge.com> escribió:
> > On 8/24/2010 11:19 AM, Ricardo Vilella wrote:
> >
> >
> > I have a layer with lines representing the streets of a city, how I can
> >
> > do to find if a point is near an intersection of two streets?
> >
> >
> >
> >
> > I think we need a little more information:
> >
> >
> >
> > How do you want to define "near"? by some maximum distance?
> >
> > What is an intersection?
> >
> > A. if you data is noded, then intersections are defined by a node
> that has two or more segments with different names.
> >
> > B. if not noded then you have compute all the segment segment
> intersections in the area "near" the point.
> >
> >
> >
> > -Steve
> >
_______________________________________________
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic