ZoningTranslationInputs#
- class caf.space.inputs.ZoningTranslationInputs(*, zone_1, zone_2, lower_zoning=None, cache_path=PosixPath('I:/Data/Zone Translations/cache'), method=None, sliver_tolerance=0.98, rounding=True, filter_slivers=True, point_handling=False, point_tolerance=1, run_date='23_01_24')#
Bases:
BaseConfigClass for storing and reading input parameters for ZoneTranslation.
- Parameters:
zone_1 (TransZoneSystemInfo) – Zone system 1 information
zone_2 (TransZoneSystemInfo) – Zone system 2 information
lower_zoning (LowerZoneSystemInfo) – Information about the lower zone system, used for performing weighted translations. This should be as small a zone system as possible relative to zone_1 and zone_2. For spatially weighted translations this isn’t needed
cache_path (Path) – File path to a cache of existing translations. This defaults to a location on a network drive, and it is best to keep it there, but it’s more important for weighted translations.
method (str, optional) – The name of the method used for weighting (e.g. pop or emp). This can be anything, but must be included as the tool checks if this parameter exists to decide whether to perform a spatial or weighted translation.
sliver_tolerance (float, default 0.98) – This is a float less than 1, and defaults to 0.98. If filter_slivers (explained below) is chosen, tolerance controls how big or small the slithers need to be to be rounded away. For most users this can be kept as is.
rounding (bool, default True) – Select whether or not zone totals will be rounded to 1 after the translation is performed. Recommended to keep as True.
filter_slivers (bool, True) – Select whether very small overlaps between zones will be filtered out. This accounts for zone boundaries not aligning perfectly when they should between shapefiles, and the tolerance for this is controlled by the tolerance parameter. With this parameter set to false translations can be a bit messy.
point_handling (bool, False) – Select whether point zones should be handled specially. If this is set to True a ‘point_tolerance’ parameter must also be provided. By default, this is set to 1 which would only class true points as point zones. This also only works for weighted translations.
point_tolerance (Optional[float]) – The area of zone below which zones will be treated as point zones. Point zones have their geometry adjusted to the lower zone they sit within.
run_date (str, datetime.datetime.now().strftime("%d_%m_%y")) – When the tool is being run. This is always generated automatically and shouldn’t be included in the config yaml file.