polaris.network.ie.import_export.ImportExport#
- class polaris.network.ie.import_export.ImportExport(supply_database_path: PathLike)#
Bases:
object
This class allows for importing and exporting to the GMNS format.
- __init__(supply_database_path: PathLike)#
Methods
__init__
(supply_database_path)dump
(folder_name)Creates a folder and dumps all tables in the database to CSV files
from_gmns
(gmns_folder, crs)Imports the network data from the GMNS format
restore
(folder_name[, jumpstart])Reloads the network from a previous dump to csv
to_gmns
(gmns_folder, crs)Exports the network data to the GMNS format
- __init__(supply_database_path: PathLike)#
- dump(folder_name: str) None #
Creates a folder and dumps all tables in the database to CSV files
- Args:
folder_name (
str
): Folder where the dump files are to be placed
- restore(folder_name: PathLike, jumpstart=False) None #
Reloads the network from a previous dump to csv
- Args:
folder_name (
str
): Folder where the dump files are located jumpstart (bool
): Copies base sql already initialized with spatialite base tables. It saves abouta minute of runtime.
- from_gmns(gmns_folder: str, crs: str)#
Imports the network data from the GMNS format
- Args:
gmns_folder (
str
): Folder where the GMNS files are located crs (str
): CRS of the exported dataset in readable format by PyProj (e.g. ‘epsg:4326’)
- to_gmns(gmns_folder: str, crs: str)#
Exports the network data to the GMNS format
- Args:
gmns_folder (
str
): Folder where the GMNS files are to be placed crs (str
): CRS of the exported dataset in readable format by PyProj (e.g. ‘epsg:4326’)