pytuflow.ArrApiClient.fetch_point_tp_for_coords

pytuflow.ArrApiClient.fetch_point_tp_for_coords#

ArrApiClient.fetch_point_tp_for_coords(lat, lon)#

Requests the PointTP and ArealTP layers for arbitrary coordinates, used to fetch an “additional” temporal pattern region’s own point (and, if available, areal) temporal patterns (see temporal_patterns.additional_tp / pytuflow.arr.temporal_patterns.fetch_additional_region_point_tp()). Returns a (point_tp_layer, areal_tp_layer, raw_response) tuple: the raw PointTP layer dict (with its download url), the raw ArealTP layer dict likewise (None if the Data Hub doesn’t provide one for these coordinates), and the full raw JSON response dict (kept for optional verbose working-data output, see pytuflow.arr.working_data).

Parameters:
  • lat (float) – Latitude of the additional temporal pattern region’s representative location.

  • lon (float) – Longitude of the additional temporal pattern region’s representative location.

Returns:

(point_tp_layer, areal_tp_layer, raw_response): the PointTP layer dict, the ArealTP layer dict (None if not available), and the full raw JSON response dict.

Return type:

tuple

Raises:

ArrApiError – If the request fails, the response is not valid JSON, or the PointTP layer is missing.