Electric network is a kind of utility network in GIS. In this network we have a point
layer that consist power stations and end users. Power stations called source
and end users called sink
. And also we have one or more line
layer that consist power lines. (in the simplest case).
The direction of this network is from sources to sinks
My question is how to use pgRouting
to identify the direct of this network? pgRouting has function called pgr_createTopology
that builds a network topology based on the geometry information. When I call this function it fill source
column and target
column of my line layer. source and target show the direction of my network. But this direction is not based of source and sink.
In general can we define our own direction in specific network with pgRouting and not use its default direction?
As per my understanding of pgRouting, source and target values of a line are calculated using digitization direction of line.So if u want your direction to be from source to sink. Check the digitization direction of your line segment and where ever it incorrect or in the wrong direction, reverse the digitization direction using ArcMap or QGIS. And then run pgr_createTopology.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.