I have a network dataset and I would like to know the network distance (not Euclidean) from each feature point in a shapefile to each other point in another shapefile with the same number of points. However, I would like to have separate tables for each feature, rather than one large table.
Is it possible to iterate through the point features in one shapefile, add the individual point as the "Origin" to an OD Cost Matrix (which already has the "Destination" locations added), solve for the Matrix, and export the lines or the line table, then move on the the next point and do the same? Or is there perhaps a simpler way to do this?
I know I will end up with a ton of tables, but I am hoping to run some analysis the individual tables.
Here is a graphic model from ModelBuilder I was working on:
I was actually just thinking it would probably be easier to simply sort through the matrix and export rows. I am talking about 3,993 origins, so kind of a lot.
A script that could export relevant rows would be great, though the final matrix was too large to load into excel.
– alidrisi Feb 21 '15 at 14:26Import-Csv C:*FileName*.txt | Where-Object {$_.OriginID -eq "1"} | export-csv -Delimiter `t -NoTypeInformation -Path C:*NewFileName*.csv
I am sort of new to scripting. Is there a way to iterate through all rows in the table (ie, OriginID=1,2,3,etc...)?
– alidrisi Feb 21 '15 at 20:50