1

I have a cost network, but it's not a street mapping network. I know the nodes and edges as I defined them. pgRouting looks like a good choice, but every single example I can find uses Open Street Map as the data. I don't have GPS coordinates. The x1,y1 for nodes makes no sense in my graphs, my nodes have specific ids, not coordinates. The costs aren't calculated from the coordinates, they're assigned by me on the various edges based on domain knowledge specific to my domain.

Are there any examples of how to create a custom network in pgRouting? I'm really struggling because the examples are "and then you use this tool to import OSM data"...which doesn't help me at all.

Chris Kessel
  • 5,583
  • 4
  • 36
  • 55

2 Answers2

0

@Chris Kessel

I don't know if this is still relevant, but it may help others:

Basically, what you need to have is a table with edges, where in column 'source' is the id of a node on one end of the edge and in column 'target' - id of the node on the other end. You also have to have a defined cost for the edge, I'm not sure what this will be for you - usually it's distance or time units.

Ususally this is done with geo info using pgr_createTopology function, but in your case you will need to just create this yourself, I suppose.

I think this link can help you: https://anitagraser.com/2011/02/07/a-beginners-guide-to-pgrouting/

seizethedata
  • 130
  • 1
  • 1
  • 8
-2

The answer to the question "Are there any examples of how to create a custom network in pgRouting?" is Yes there are.

Vicky
  • 119
  • 2