[pgrouting-users] Routing via different Layers/Levels

AUS - Eyad b00038807 at aus.edu
Tue Jan 6 08:48:49 PST 2015


Hi Steve,

You somehow pointed to what I need. The only difference is:

1) my case includes 2 networks overlapping by (x,y) over most of the
sections (one of them shall be completely lifted). Two full networks which
shall connect only where Ramps (with 2 different z-level_edges) are located.
(Nodes/Edges shall not be duplicated because they exist)

2) the case you presented has only one node where there is 2 different (z
coordinates). (This node shall be duplicated).


I would appreciate it if you could send me sample code/link for cloning of
pgr_createTopology to support 3D because unfortunately I'm not a programmer.

Regards,

Eyad


-----Original Message-----
From: pgrouting-users-bounces at lists.osgeo.org
[mailto:pgrouting-users-bounces at lists.osgeo.org] On Behalf Of Stephen
Woodbridge
Sent: Tuesday, January 6, 2015 1:26 AM
To: pgrouting-users at lists.osgeo.org
Subject: Re: [pgrouting-users] Routing via different Layers/Levels

Hi Eyad,

I'm a little confused as to what you are trying to do. Just to be clear:

pgr_nodeNetwork() is for creating nodes and splitting edges the 
intersect but do not have a node at the intersection.

NOTE: there has recently been some bugs reported against 2.0 
pgr_nodeNetwork() and there might be a pull request. Check the tickets.

pgr_createtopology() is takes a nodded network and assigns the nodes to 
the edges.

Typically networks that have overpass/underpass that should not be 
connected, use a zlevel at each end of the segment. So you might 
represent an over pass like:


                   E(0)
                  /
          ----B(1)-----
         /      /      \
A(0)---/      B(0)     \-----C(0)
              /
             /
            D(0)

A-B-C is a highway overpass
B-B-E is a highway underpass

(n) is the zlevel

So B(0) and B(1) have the same x-y position but they are not connected 
together.

You can make a fairly simple clone to pgr_createtopology() to take the 
zlevel*factor as the z value of a point with the x-y values and check 
for 3D distance between the nodes. This will result in the B(0) and B(1) 
getting assigned different node ids and the related segments will then 
not be connected.

I have some old code floating about that does this, but it is a simple 
change if you wanted to do it yourself.

If this is not what you are asking about, sorry, please give more 
details on what you are trying to accomplish.

-Steve

On 1/5/2015 3:57 PM, AUS - Eyad wrote:
> Hi All,
>
> Is there a way to conduct nodding for part of a network instead of the
> whole network in order to restrict routing through specific channels
> (i.e. 2 layers network where access is restricted via ramps)?
>
> I tried the below 2 codes:
>
> 1)select pgr_nodeNetwork('schema.network_table',50,'id','geom') FROM
> schema.network_table where (Layer='first_level');
>
> 2)select pgr_nodeNetwork('schema.network_table' where
> (Layer='first_level'),50,'id','geom');
>
> The first is entering endless loop processing the data; the second is
> returning a syntax Error (@WHERE)!
>
> I know that the second sounds clearly wrong code, but I provided the
> above example trying to brain-storm with all.
>
> If there is no option to do the required while nodding or
> creating_topology, is it possible to utilize 2 separately_noded networks
> (instead of the below highlighted one) within the following code?
>
> SELECT seq, id1 as source, id2 as target, cost FROM pgr_kdijkstraCost(
>
>      'SELECT id, source, target, (st_length(geom) * 0.001) as cost FROM
> *_schema.network_table_noded_*',
>
>      (SELECT id FROM schema.p_table WHERE id=1), (SELECT array_agg(id)
> FROM schema.p_table), false, false
>
>    )
>
> Please advise suitable/potential code..
>
> Happy New Year to ALL
>
> Eyad
>
>
>
> _______________________________________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/pgrouting-users
>

_______________________________________________
Pgrouting-users mailing list
Pgrouting-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/pgrouting-users
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.5577 / Virus Database: 4257/8875 - Release Date: 01/05/15



More information about the Pgrouting-users mailing list