1

I'm currently working on a routing model for 17th and 18th century voyages. These routes are based on data from old shipping logbooks.

I made a separate layer in QGIS which contains point. I exported those points to a shape layer, converted them to a sql structure. I am following the pgRouting workshop, and I am currently trying to convert it to a network topology using the pgr_createTopology function.

However, at the moment I'm getting an error (false) and I am wondering whether this is point-model is the right way to approach it. Especially since the osm examples seem to use a closed model where every line is connected.

Edit: idea

So this is basically what I'm looking for. I have a different network of places inside a table, and I have a table with the routes that are basically points. They do not overlap. By using a function I want to connect the points to the route and make a simple polyline. Apparently this isn't possible with pgrouting, but maybe it still is possible by just using postgis? I need the routes of 20 000 voyages, so the network doesn't need to contain more complicated stuff such as bidirectional. I do need this (for instance the Brouwer Route only goes from The Cape/Cape Town to Indonesia and not vice versa), but I could probably cheat this by making different networks and writing queries that specify different voyages.

  • 1
    Generally for routing you need lines that serve as the network (edges) to route along. Your question sounds like it might be more similar to converting GPS points (say, in gpx format) into lines or tracks. We've got a few questions on that topic, some specific to PostGIS. If all you have is points, you just have the nodes of a network and not the edges. You need both for network analysis. But I'm not overly familiar with the tools you're working with (maybe it can create the edges just from the points?). – Chris W Apr 4 '15 at 21:15
  • The thing with lines it that it seems to be much more difficult to manage. In my head I also had this idea of two different 'networks'. One which only contains the places, and one with the point network. The place basically snaps with the nearest point in the network, and it makes a polyline towards the nearest point network dot near the destination. I have made a picture to make it a bit more clear. – ervazu Apr 5 '15 at 7:48
  • Why would lines be more difficult to manage? You don't really have a network without them. I'm really not familiar with PostGIS, but there is a ST_MakeLine function - as I said, several questions here including a few on PostGIS discuss converting or connecting points into lines. Your idea of connecting places to nearest voyage point brings two conflicts to my mind - the nearest voyage point might be farther away than the nearest point on a line connecting two voyage points, and in network analysis destinations are usually snapped to the nearest point on the network (or lines/edges). – Chris W Apr 6 '15 at 7:15

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.