reVX.setbacks.setbacks.setbacks_calculator
- setbacks_calculator(feature_type, buffer_type='default', feature_filter_type='centroid', feature_subtypes_to_exclude=None, num_features_per_worker=10000)[source]
Generate a setback calculator for a particular feature.
- Parameters:
feature_type (str | list) – String or list of strings that represent how this feature is distinguished in the local regulations file. In particular, this string (or list of strings) should match the values under the
Feature Type
column of the setback regulations file corresponding to this feature. For example, specifyingfeature_type="property line"
would mean that this setback calculator looks for"property line"
regulations (i.e. parcel setbacks) in the input regulations file. This input is case insensitive (i.e. “ROADS”, “Roads”, “roads”, and “rOAds” are all equivalent), and spaces, dashes, and underscores are interchangeable (i.e. “property line”, “property_line”, and “property-line” are all equivalent).buffer_type (str, optional) – Name of the buffer type to use for this setback calculation. See
BUFFERS
for all available options - this input must be a key from that dictionary. In most cases, the default positive buffer is suitable. By default,"default"
.feature_filter_type (str, optional) – Name of the feature filter type to use for this setback calculation. Typically, features like structures or parcels are filtered using “centroid”, which only applies setback regulations to features whose centroid is within the county with the ordinance. On the other hand, features such as roads, railroads transmission lines, etc., are filtered using “clip”, which clips the feature to the county boundaries before applying a setback. This value must be a key in the
FEATURE_FILTERS
dictionary. By default,"centroid"
.feature_subtypes_to_exclude (list | set, optional) – A list of strings specifying the feature subtypes that should be excluded from the local regulations calculation. By default,
None
.num_features_per_worker (int, optional) – Number of features each worker (CPU processor) on a node processes. By default,
10,000
.
- Returns:
class – A class object that can be used to instantiate the setbacks calculator. The initializer parameters are identical to that of
AbstractBaseSetbacks
.