6.1.2.6. aequilibrae.project.Zoning¶
- class aequilibrae.project.Zoning(network)¶
Bases:
aequilibrae.project.basic_table.BasicTable
Access to the API resources to manipulate the zones table in the project
from aequilibrae import Project p = Project() p.open('path/to/project/folder') zones = p.zoning # We edit the fields for a particular zone zone_downtown = zones.get(1) zone_downtown.population = 637 zone_downtown.employment = 10039 zone_downtown.save() fields = zones.fields # We can also add one more field to the table fields.add('parking_spots', 'Total licensed parking spots', 'INTEGER')
- __init__(network)¶
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 thelayer included in the model
get
(zone_id)Get a zone from the model by its zone_id
new
(zone_id)Creates a new zone
refresh_connection
()Opens a new database connection to avoid thread conflict
save
()Attributes
fields
Returns a FieldEditor class instance to edit the zones table fields and their metadata
- __init__(network)¶