[postgis-users] Crossing roads

Andrew Ross rummage_bin at yahoo.com
Mon Dec 15 08:53:28 PST 2008


Hi Milo,
Thanks for looking at this question,  I am looing for an automated method for grouping street segments together based on a given intersection, in other word creating groups of segment ids for all of the segments on either side of the intersection: 3 groups if the intersection looks like a "T", 4 groups if it looks like a "cross", etc.
The final objective is to run this query twice, to consider two cross streets on a single thoroughfare, then inner join them by "segment id" which then gives me all of the segment ids on a street between "cross street 1" and "cross street 2".  These segment ids will then be associated with scanned contract drawings maintained in a document management system (catalogued by projects, which in turn are catalogued by "on-street","cross street 1" and "cross street 2")
Since the inner join part is trivial, I figured I'd just ask about creating the sets of records that would be fed to it
Thanks,
Andrew




________________________________
From: Milo van der Linden <mlinden at zeelandnet.nl>
To: PostGIS Users Discussion <postgis-users at postgis.refractions.net>
Sent: Monday, December 15, 2008 10:24:50 AM
Subject: Re: [postgis-users] Crossing roads

Hello Andrew,

Can you give some more detail on the why part of this question? Why would you want to find all the elements that connect to elements that connect to an intersection? This sounds like you are either:
- Trying to do routing and prepare the network for that (in that case; check to see if pgRouting is working for you)
- Looking for an automated mechanism to group segments together

Kind regards,

Milo van der Linden

Obe, Regina wrote:
> Andrew,
>  Not sure I understand your question.  Are you saying your street segments are cut such that they only connect at junctions.  Kind of like tiger tlids.
>  And given each intersection, you are trying to find continguous segments from the intersection?
>  e.g.
>  -----------        -------------  ---------------  Intersection -------------------------- -------------------------------  -----------------
>      t3                              t2                  t1                                        s3                s4                              sn
>                                                                                  |a1
>                                                                                |a2
>                                                                                |an
> So you would keep on collecting segments as long as they are connected to the previous ones?
>  Thanks,
> Regina
> 
> ------------------------------------------------------------------------
> *From:* postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] *On Behalf Of *Andrew Ross
> *Sent:* Saturday, December 13, 2008 11:05 AM
> *To:* postgis-users at postgis.refractions.net
> *Subject:* [postgis-users] Crossing roads
> 
> 
> Hi Everybody,
> 
> I hope I'm posting to the right location (I just subscribed to this list).  I have sent this question before but have not seen it listed anywhere yet.
> 
> 
> In any case, I have a road network in which all of the street segments are snapped together.  I need to group all of the line segments of two streets that cross each other (street 1 and street 2 as shown below) into 4 groups of segments defined as all of those located on either side of the intersection, (street segments A, street segments B, street segments C and street segments D, as shown at the bottom). 
>  
> Can anybody give me a high level idea of what functions / methods can be used to achieve this?  
>  
> I’ve gotten as far as identifying the 4 segments actually connected to the intersection using the ST_Intersection function.  
>  
> How would I get all other segments connected to these 4?  
>  
> Do I have to write a recursive function using ST_Touches ?  I’d rather not if there is a more elegant way of doing this.
> 
>  
> Thanks in advance,
> 
> Andrew
> 
>  
>  
>  
>                                    1
> 
>                                    1
> 
>                                    1
> 
>                                    1
> 
>            222222222222 X 22222222222222
> 
>                                    1
> 
>                                    1
> 
>                                    1
> 
>                                    1
> 
>  
>  
>  
>                                    A
> 
>                                    A
> 
>                                    A
> 
>                                    A
> 
>            BBBBBBBBBBXCCCCCCCCCCC
> 
>                                    D
> 
>                                    D
> 
>                                    D
> 
>                                    D
> 
>  
>  
> ------------------------------------------------------------------------
> 
> ------------------------------------------------------------------------
> 
> *The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer. *
> 
> ------------------------------------------------------------------------
> 
> * Help make the earth a greener place. If at all possible resist printing this email and join us in saving paper. *
> 
> * *
> 
> * *
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>  

_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users



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


More information about the postgis-users mailing list