Tag Info

New answers tagged

0

Some of our customers use RW Net 4 for similar calculations, million of routes every week. This is done locally, so there is no overhead from calling a web service. The key thing here is what quality you expect from the street network and which area you work in? OSM is free, but far from perfect.


2

You say "I'm stuck in iterating all the input folders" so that is the Question this Answer addresses. Iterating through ArcGIS workspaces becomes much easier at ArcGIS 10.1 SP1 using arcpy.da.Walk. However, it could be done using earlier versions of arcpy and arcgisscripting using os.walk as described here or glob and other techniques as described here.


3

AWK is perhaps the most effective tool for such text conversion (although if you're familiar with Perl you might prefer it, out of habit): it was designed for exactly this kind of one-off quick reformatting work. Here is the full AWK code to perform the requested operation on the input specified: BEGIN {OFS="\n"} {print $2, $3, $4, $5 $6, $7, $8 > $1} ...


3

It isn't nice code, but for your specific circumstance, here is some python that should have typing them out by hand: f = open('list.txt', 'r') lines = f.readlines() for line in lines: lineparts = line.split(' ') outfile = open(lineparts[0], 'w') for i in range(1, 4): outfile.write(lineparts[i] + '\n') outfile.write(lineparts[4] + ...



Top 50 recent answers are included