brails.scrapers.nti_scraper.nti_scraper module
This module defines a class for retrieving tunnel data from NTI.
|
A class for scraping and processing National Tunnel Inventory (NTI) data. |
- class brails.scrapers.nti_scraper.nti_scraper.NTIScraper(input_dict: Dict[str, Any] | None = None)
Bases:
object
A class for scraping and processing National Tunnel Inventory (NTI) data.
The class handles tasks such as fetching and processing tunnel data, meshing the region into smaller cells for efficient data retrieval, and organizing the results into an AssetInventory.
- Attributes:
- length_unit (str):
The unit of length (default is ‘ft’).
- inventory (AssetInventory):
An inventory object that holds the assets for this instance.
- Methods:
- get_assets(region: RegionBoundary) -> AssetInventory:
Retrieves tunnel inventory data within a given region boundary, processes the data, and returns the inventory of assets.
- get_assets(region: RegionBoundary) AssetInventory
Retrieve tunnel inventory within a given region.
This method processes the region boundary, splits it into smaller cells, fetches the necessary tunnel data for each cell, and returns the processed tunnel asset inventory.
- Args:
- region (RegionBoundary):
A RegionBoundary object representing the geographic region for which to retrieve tunnel inventory data.
- Returns:
- AssetInventory:
An AssetInventory object containing the tunnel assets within the specified region.
- Raises:
- TypeError:
If the region argument is not an instance of the RegionBoundary class. The error message will indicate that the ‘region’ argument must be an instance of the RegionBoundary class.