optiwindnet.importer ==================== .. py:module:: optiwindnet.importer Module Contents --------------- .. py:function:: L_from_yaml(filepath: pathlib.Path | str, handle: str | None = None) -> networkx.Graph Import wind farm data from .yaml file. Two options available for COORDINATE_FORMAT: "planar" and "latlon". Format "planar" is: [label] easting northing. Example:: LABEL 234.2 5212.5 Format "latlon" is: [label] latitude longitude. Example:: LABEL1 11°22.333'N 44°55.666'E LABEL2 11.3563°N 44.8903°E LABEL3 11°22'20"N 44°55'40"E The [label] is optional. Ensure no spaces within a latitude or longitude. The coordinate pair may be separated by "," or ";" and may be enclosed in "[]" or "()". Example:: LABEL [234.2, 5212.5] :param filepath: path to `.yaml` file to read. :param handle: Short moniker for the site. :returns: Unconnected location graph L. .. py:function:: L_from_pbf(filepath: pathlib.Path | str, handle: str | None = None) -> networkx.Graph Import wind farm data from .osm.pbf file. :param filepath: path to `.osm.pbf` file to read. :param handle: Short moniker for the site. :returns: Unconnected location graph L. .. py:function:: L_from_windIO(filepath: pathlib.Path | str, handle: str | None = None) -> networkx.Graph Import wind farm data from a windIO .yaml file. :param filepath: path to windIO `.yaml` file to read. :param handle: Short moniker for the site. :returns: Unconnected location geometry L. .. py:function:: load_repository(path: pathlib.Path | str | None = None) -> tuple[networkx.Graph, Ellipsis] Load locations from files of known formats into a namedtuple. Each file (.yaml or .osm.pbf) is translated into a location graph and included as an attribute in the returned namedtuple. The attribute name can be specified in the .yaml with the field `HANDLE` or in the .osm.pbf file with the tag `handle` applied to the power plant object. :param path: Path to look for location files (non-recursive). If omited, the locations included in optiwindnet are loaded. :returns: Named tuple which has the location handles as attribute identifiers.