reVX.setbacks.regulations.SetbackRegulations

class SetbackRegulations(base_setback_dist, regulations_fpath=None, multiplier=None)[source]

Bases: AbstractBaseRegulations

Setback regulation values.

Parameters:
  • base_setback_dist (float | int) – Base setback distance (m). This value will be used to calculate the setback distance when a multiplier is provided either via the regulations_fpath csv or the multiplier input. In these cases, the setbacks will be calculated using base_setback_dist * multiplier.

  • regulations_fpath (str | None, optional) – Path to regulations .csv or .gpkg file. At a minimum, this file must contain the following columns:

    • Feature Type: Contains labels for the type of setback that each row represents. This should be a “feature_type” label that can be found in the SETBACK_SPECS dictionary (e.g. "structures", "roads", "water", etc.), unless you have created your own setback calculator using setbacks_calculator(), in which case this label can match the feature_type input you used for that function call.

    • Feature Subtype: Contains labels for feature subtypes. The feature subtypes are only used for down-selecting the local regulations that should be applied for a particular feature, so often you can leave this blank or set it to None. If you do specify this value, it should be a “feature_subtypes_to_exclude” label that can be found in the SETBACK_SPECS dictionary, unless you have created your own setback calculator using setbacks_calculator(), in which case this label can match the feature_subtypes_to_exclude input you used for that function call.

    • Value Type: Specifies wether the value is a multiplier or static height. See below for more info.

    • Value: Numeric value of the setback or multiplier.

    • FIPS: Specifies a unique 5-digit code for each county (this can be an integer - no leading zeros required). This is used to match the county regulations to the county’s spatial extent.

    Valid options for the Value Type are (case-insensitive; dashes, underscores, and spaces are interchangeable):

    • “Structure Height Multiplier”

    • “Meters”

    If this input is None, a generic setback of base_setback_dist * multiplier is used. By default None.

  • multiplier (int | float | str | None, optional) – A setback multiplier to use if regulations are not supplied. This multiplier will be applied to the base_setback_dist to calculate the setback. If supplied along with regulations_fpath, this input will be used to apply a setback to all counties not listed in the regulations file. By default None.

Methods

Attributes

REQUIRED_COLUMNS

base_setback_dist

The base setback distance, in meters.

df

Regulations table.

generic

Regulation value used for global regulations.

generic_exists

Flag indicating wether generic regulations exist.

locals_exist

Flag indicating wether local regulations exist.

multiplier

Generic setback multiplier.

property base_setback_dist

The base setback distance, in meters.

Type:

float

property multiplier

Generic setback multiplier.

Type:

int | float

property generic

Regulation value used for global regulations.

Type:

float | None

property df

Regulations table.

Type:

geopandas.GeoDataFrame | None

property generic_exists

Flag indicating wether generic regulations exist.

Type:

bool

property locals_exist

Flag indicating wether local regulations exist.

Type:

bool