Command-Line Interface#
CAF.space provides a command-line interface (CLI) for the zone correspondence functionality. The below details the basic usage and arguments for running from the command line.
See also
Graphical User Interface for information on parameters.
Inputs module.
Module containing functionality for storing input parameters and reading config file. Classes in this module inherit from the BaseConfig class, and are ultimately used as input parameters for the ZoneTranslation class.
usage: caf.space [-h] [--mode MODE] [--config CONFIG] [--out_path OUT_PATH]
Named Arguments#
- --mode
Mode to run translation in; spatial, weighted or GUI.
Default:
'GUI'- --config
path to config file containing parameters
- --out_path
Path the translation will be saved in.
Config#
CAF.space uses a configuration file in YAML format to provide all the parameters for running zone correspondence with CLI. An example of the config file is given below and details of the parameters are given in Parameters.
zone_1:
name: zone_1
shapefile: examples/zone_1/zone_1.shp
id_col: zone_1_id
zone_2:
name: zone_2
shapefile: examples/zone_2/zone_2.shp
id_col: zone_2_id
cache_path: examples\test_cache
method: test
tolerance: 0.98
rounding: True
filter_slithers: True
lower_zoning:
name: lower
shapefile: examples/lower_zone/lower_zone.shp
id_col: lower_id
weight_data: examples/lower_zone/weight.csv
data_col: weight
weight_id_col: lower_id
weight_data_year: 100