transitlos.network¶
Build (or load a cached) simplified, AOI-cropped walking street network.
Thin wrapper around UrbanAccessAnalyzer.api.StreetNetwork: downloads (or
reads a local PBF), simplifies, and crops to the AOI -- unless a previously
saved+simplified network already exists at cache_dir, in which case it is
loaded instead of rebuilt.
prepare_street_network(aoi, cache_dir=None, cluster_distance=10.0, pbf_path=None, network_type='all', ignore_oneway=True)
¶
Return a simplified, AOI-cropped StreetNetwork, using a cache if available.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
aoi
|
AreaOfInterest
|
Area of interest the network is built/cropped for. |
required |
cache_dir
|
Optional[str]
|
Directory to load a previously |
None
|
cluster_distance
|
float
|
Cluster distance (meters) passed to
|
10.0
|
pbf_path
|
Optional[str]
|
Path to a local |
None
|
network_type
|
str
|
Defaults to |
'all'
|
ignore_oneway
|
bool
|
Defaults to |
True
|
Returns:
| Type | Description |
|---|---|
StreetNetwork
|
A |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no cached network is found and |