energy_data_retrieval.wind_catalogue.mastr#

Conservative offline staging of explicit MaStR named wind-park groups.

A reported park label is not a registry farm ID. Freeze reviewed group identities; retain unit registry IDs, partial inventory scope and exclusion from MW totals.

energy_data_retrieval.wind_catalogue.mastr.distance(a, b)[source]#

Great-circle separation in km for latitude/longitude degrees.

Parameters:
  • a (tuple[float, float])

  • b (tuple[float, float])

Return type:

float

energy_data_retrieval.wind_catalogue.mastr.point(row)[source]#

Reject missing and out-of-country coordinates rather than geocode them.

Parameters:

row (dict[str, str])

Return type:

tuple[float, float] | None

energy_data_retrieval.wind_catalogue.mastr.stage(units, dictionary, existing, *, source_id, now, state_code='1411')[source]#

Review the full selected state, retaining all rejected group decisions.

Accept only explicit park labels with at least three units, one municipality, one operator, activated onshore records and a maximum 15 km extent. Hold any other park label within 500 m or prior catalogue project within 10 km. These conservative screens support inventory identity, not phase reconciliation.

Parameters:
  • units (list[dict[str, str]])

  • dictionary (dict[str, str])

  • existing (list[dict[str, Any]])

  • source_id (str)

  • now (str)

  • state_code (str)

Return type:

tuple[list[dict[str, Any]], list[dict[str, Any]]]

energy_data_retrieval.wind_catalogue.mastr.read_partition(wind_xml, dictionary_xml, *, expected_total, expected_selected, state_code='1411')[source]#

Read the complete pinned member; reject incomplete XML or row counts.

Callers verify original member SHA-256 before parsing. The current adapter is bounded to explicitly supported states rather than silently broadening.

Parameters:
  • wind_xml (Path)

  • dictionary_xml (Path)

  • expected_total (int)

  • expected_selected (int)

  • state_code (str)

Return type:

tuple[list[dict[str, str]], dict[str, str]]