Library for reading TransCad files into Numpy arrays
- Required TransCad license to read matrices
- User needs to manually change the path to the TransCad matrix dll on disk for this library to work
- Last tested with Transcad 6, Release 2
NOT RELATED IN ANY WAY WITH CALIPER CORPORATION
Usage example (Matrix)
from tcwpy import TCWMtx
matrix = 'path+matrix_name.mtx'
cores_to_load = ['core1', 'core2']
mymatrix = TCWMtx()
mymatrix.load(matrix, verbose=True) #### verbose option prints on the screen all loading steps happening
mymatrix.load(matrix, justcores=cores_to_load, verbose=True)
for q in mymatrix.matrix.keys():
print q
mymatrix.export(core_name, file_path_and_name, all_cells=False)
mymatrix.value(core, i, j)
matrix.RHash[:] #### for rows
matrix.CHash[:] #### for columns
Usage example (binary)
from tcwpy import DataBintx
f = DataBin()
f.load(path+name_of_the_file.bin)
for name in a.dtype.names: print name
f.info()
f.savetxt(output_file_name.csv)