First of all I just want to state that I'm very new to GIS and that I'm probably not that great at the terminology yet, so bear with me.
I'm having my internship right now and have been tasked with making a bike commuting potential analysis. The data I'm using is road layer (which I have already created a topology for using pgr_createTopology) and two point layers for where individuals live and work created from the centroids of 500x500m squares.
I have managed to do some sort of calculation between my two point layers using pgr_dijkstraCost that looks like this:
SELECT *
FROM pgr_dijkstraCost(
'SELECT gid AS id,
source,
target,
extlen / 1.3 / 60 AS cost
FROM roads',
array(select source FROM living),
array(select target FROM work),
directed := false);
The source and target value in the living and work test tables has a value from 1 to 50 since I initially though that I could make the calculation by calculating when source and target has the same value. I now know that's not possible since pgr_dijkstra wont allow calculations when they are the same. The result I'm getting right now is for every combination I don't want. The final calculation will be for around 300 000 pairs.
So is there a way for me to only do the calculation on specified pairs and not for every possible combination?
Starting from Version 3.1 there is this signature
example usage (taken from the pgRouting documentation)