aequilibrae.project.Zoning#

class aequilibrae.project.Zoning(network)[source]#

Access to the API resources to manipulate the zones table in the project

>>> from aequilibrae import Project

>>> project = Project.from_path("/tmp/test_project")


>>> zoning = project.zoning

>>> zone_downtown = zoning.get(1)
>>> zone_downtown.population = 637
>>> zone_downtown.employment = 10039
>>> zone_downtown.save()

# changing the value for an existing value/field
>>> project.about.scenario_name = 'Just a better scenario name'
>>> project.about.write_back()

# We can also add one more field to the table
>>> fields = zoning.fields
>>> fields.add('parking_spots', 'Total licensed parking spots', 'INTEGER')
__init__(network)[source]#

Methods

__init__(network)

all_zones()

Returns a dictionary with all Zone objects available in the model.

coverage()

Returns a single polygon for the entire zoning coverage

create_zoning_layer()

Creates the 'zones' table for project files that did not previously contain it

extent()

Queries the extent of the layer included in the model

get(zone_id)

Get a zone from the model by its zone_id

get_closest_zone(geometry)

Returns the zone in which the given geometry is located.

new(zone_id)

Creates a new zone

refresh_geo_index()

save()

Attributes

fields

Returns a FieldEditor class instance to edit the zones table fields and their metadata