vector_translation_from_file#
- caf.toolkit.translation.vector_translation_from_file(vector_path, translation_path, output_path, *, vector_zone_column, translation_from_column, translation_to_column, translation_factors_column)[source]#
Translate zoning system of vector CSV file.
Load vector from CSV, perform translation and write to new CSV.
- Parameters:
vector_path (pathlib.Path) – Path to CSV file containing data to be translated.
translation_path (pathlib.Path) – Path to translation lookup CSV.
output_path (pathlib.Path) – CSV path to save the translated data to.
vector_zone_column (str | int) – Name, or position, of the zone ID column in vector_path file.
translation_from_column (str | int) – Name, or position, of zone ID column in translation which corresponds to the current vector zone ID.
translation_to_column (str | int) – Name, or position, of column in translation for the new zone IDs.
translation_factors_column (str | int) – Name, or position, of column in translation containing the splitting factors.
- Return type:
None