2

I'm returning to the same question all over again. I'm dealing with electrical network and I'd like to build topology for all network lines in database so I can construct nodes and edges dynamicly for network calculations.

What I have is 2D geography for lines and plenty of different types of points that should together build topology. What I need is a proper way to build nodes and construct edges where endpoint touches other line (with tolerance) or two endpoints touch. I've ended up writing SQL script that does that (uses lots of resources for 100.000 lines). I wonder if there is a better solution using topology?

For what I understand Topology-Geometry does not allow two edges to intersect, so this kind of topology is not useful for infrastructure/utility where conductors, pipelines or even roads cross each other but there is no "node".

So, is there Topology-Network for PostGIS implemented or there is no such thing yet? I remember I solved this problem in SpatiaLite back then for research purposes.

  • 1
    have you had a look at the two more obvious extensions, PostGIS Topology (you are refering to this extension, no?) and pgRouting? both are theoretically capable, with the topology generation functions of pgRouting being the somewhat more user friendly option. in either way, setting up complex graphs is subject to some serious conceptuation, especially with restrictions on intersections (e.g. over/underpasses) etc. – ThingumaBob Dec 3 '18 at 7:12
  • Yes I think pgRouting should be the obvious solution to this problem. I'll have to dig deeper into documentation to see if it fits the purpose. Right now I'm building topology over night with simple grouping of endpoints and some recursive functions for identifying connected network. Thank you for pointing pgRouting out. – Greg Dec 5 '18 at 17:42
  • 1
    if you are then interested in any form of 'routing', pgRouting is the tool of choice. if you can provide a case specific noded network (i.e. start/end vertices at all wanted intersections [tolerance can be given]; simple, valid linestrings), pgr_createTopology should do the job. pgRouting is highly optimized in terms of performance, but as a complete FOSS routing suite not the most straight forward to handle; running the functions is user friendly, using the results can get confusing at first. ...but doing all that manually usually comes second. – ThingumaBob Dec 5 '18 at 21:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.