2

I have a collection of lines in PostgreSQL w/PostGIS/pgRouting and have built topology.

I need to produce a route that starts and ends at the same location, but traverses all of the edges.

Can pgRouting solve this routing problem? And if so, what approach or routing function(s) should be used?

enter image description here

  • 3
    ...or Chinese Postman Problem, i.e a Route Inspection Problem. and AFAIK not implemented in pgRouting as of yet...it's one hell of a computational effort, especially if the Eulerian circuit is not given. – ThingumaBob Dec 6 '18 at 14:39
  • 1
    Chinese Postman has been implented this year as a Google Summer of Code project named as ChPP: github.com/pgRouting/pgrouting/wiki/… We appreciate, if someone could give it a try with a real use case, and if you run into troubles, feel free to talk to us on Gitter or file an issue on Github. – dkastl Dec 6 '18 at 15:27
  • Documentation is available in the experimental functions section of the development branch: docs.pgrouting.org/dev/en/chinesePostmanProblem-family.html – dkastl Dec 6 '18 at 15:29
  • @ThingumaBob and FSimardGIS, if you don't know, why do you give a comment, that is actually not correct? – dkastl Dec 6 '18 at 15:33
  • 1
    I was able to load the docker image and successfully run the cpp function. It seems to work. But in my case...I don't need to go out and back for each edge unless it is necessary. But the cpp function does this for every edge...which I guess is what a postman does. But not what I need--very close though. – Jay Cummins Dec 7 '18 at 1:32

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.