gfwapiclient.resources.datasets.resources
¶
Global Fishing Watch (GFW) API Python Client - Datasets API Resource.
Module Contents¶
Classes¶
Datasets data API resource. |
Data¶
API¶
- gfwapiclient.resources.datasets.resources.__all__ = ['DatasetResource']¶
- class gfwapiclient.resources.datasets.resources.DatasetResource(*, http_client: gfwapiclient.http.client.HTTPClient)¶
Bases:
gfwapiclient.http.resources.BaseResource
Datasets data API resource.
This resource provides methods to interact with the datasets data API endpoints.
Initialization
Initialize a new BaseResource.
- Args:
- http_client (HTTPClient):
The HTTP client to send requests.
- async get_sar_fixed_infrastructure(*, z: Optional[int] = None, x: Optional[int] = None, y: Optional[int] = None, geometry: Optional[Union[geojson_pydantic.geometries.Geometry, Dict[str, Any]]] = None, **kwargs: Dict[str, Any]) gfwapiclient.resources.datasets.models.response.SARFixedInfrastructureResult ¶
Get SAR (Synthetic-aperture radar) fixed infrastructure data.
This method fetches SAR fixed infrastructure data, potentially filtered by a geographic geometry. If z, x, and y are not provided but geometry is, the tile containing the geometry’s bounding box will be used.
- Args:
- z: (Optional[int]):
Zoom level (from 0 to 9 for SAR fixed infrastructure dataset). Example: 1.
- x: (Optional[int]):
X index (lat) of the tile. Example: 0.
- y: (Optional[int]):
Y index (lon) of the tile. Example: 1.
- geometry (Optional[Union[Geometry, Dict[str, Any]]]):
Geometry used to filter SAR fixed infrastructure. Example: {“type”: “Polygon”, “coordinates”: […]}.
- **kwargs (Dict[str, Any]):
Additional keyword arguments.
- Returns:
- SARFixedInfrastructureResult:
The result containing the SAR fixed infrastructure details.
- Raises:
- GFWAPIClientError:
If the API request fails.
- RequestParamsValidationError:
If the request parameters are invalid.
- _prepare_get_sar_fixed_infrastructure_request_params(*, z: Optional[int] = None, x: Optional[int] = None, y: Optional[int] = None, geometry: Optional[Union[geojson_pydantic.geometries.Geometry, Dict[str, Any]]] = None) gfwapiclient.resources.datasets.models.request.SARFixedInfrastructureParams ¶
Prepares and returns the request parameters for the get sar fixed infrastructure endpoint.