Just join the geometry column from the original edge table which holds the geometry column. Your query will look like this:
SELECT t1.seq, t1.id1 AS Node, t1.id2 AS Edge, t1.cost, t2.geometry FROM PGR_DrivingDistance(
'SELECT id, source, target, cost FROM edge_table',
1, 10, false, false) t1, edge_table t2
WHERE t1.id2 = t2.edge_id
If you want the Nodes instead of the Edges then just refer to the vertex table's geometry column like this:
SELECT t1.seq, t1.id1 AS Node, t1.id2 AS Edge, t1.cost, t2.geometry FROM PGR_DrivingDistance(
'SELECT id, source, target, cost FROM edge_table',
1, 10, false, false) t1, edge_vertex_table t2
WHERE t1.id2 = t2.vertex_id
If you need to use the road distance as the cost of travel, then you would indeed need to use Network Analyst if you are using ArcGIS and want to take advantage of the restrictions imposed on the roads in the network dataset (one-way, turns, etc.).
The solver you would need for this is OD Cost Matrix. You basically need to generate a matrix where each point is routed to all other points. The OD matrix is usually used for modelling business cases where you have a couple of origins (warehouses) and many consumers (retail network points) and you want to report the travel costs between the origins and the destinations.
In your case, however, because everything is stored in the same feature class, you need to load your feature class points both into origins and destinations (i.e., they will be identical). This is a valid approach, and I am using the OD cost matrix this way quite often myself, too.
The number of lines generated for a feature class with N
points will be (N*N) - N
. This is because after the solve, you would exclude those pairs where the source and the origin are the same. You can filter them out easily by using the SQL query on the output cost (travel time or distance) field (traveltimefield > 0
).
Performance wise, it would be wise to choose None for the Output shape type option. I don't know how many points you have in your feature classes, but ~1500 points both in origins and destinations (resulting in ~2.4 mln lines) never was a problem for me to run in just a couple of minutes (I have a decent laptop with i7 CPU though). If you have more points in your feature class, you can run out of memory in ArcMap (it's a 32bit application that cannot take more than just a couple of GBs of RAM).
If you will hit a RAM limit of ArcMap, you might consider running this solve from Python 64bit process. This is what I usually do when processing large road networks (the RAM consumption for the running Python process was about 12GB at peak, no problem).
There are other options of generating the OD matrix outside of ArcGIS if you are OK with just one-way restrictions and no access to other ArcGIS network dataset based restrictions (vehicle height, turns, etc). networkx - a Python package for working with graphs is something I use often for network analysis, but you would need to program Python then.
Best Answer
ArcMap's Network Analyst will easily do what you desire.
Begin by opening your street file's attribute table. Create a new field (column) and call it Time. Use the Field Calculator tool to calculate a value for this field based upon the individual line lengths and their respective speed limits (please specify what units you are working with if you need clarification).
Now, let's create a network dataset:
Display the Network Analyst Toolbar (Customise > Toolbars > Network Analyst). Use this to create a New Service Area (select from dropdown list). On the Service Area tab, click Import Facilities and add the point on the network that you wish to travel from. At the top right of the tab, click on the settings button. Ensure that the network Impedance is set to Time. Modify the Cutoff settings to whatever value you desire for your network.
Finish by pressing Run on the Network Analyst Toolbar. The output should be a polygonal area of the region that can be reached along your network within the number of minutes you specified earlier.