data.landfire.url module

Functions that return URLs used to query the LANDFIRE LFPS API. Note that these functions do not actually query the API themselves - instead, they return URLs that can be used to implement such queries.

Function

Description

Base URLs

api

Returns the base URL for the LANDFIRE LFPS API

products

Returns the base URL used to query LANDFIRE product info

job

Returns base URLs for job queries

Jobs

submit_job

Returns the URL used to submit a job

job_status

Returns the URL used to query a job’s status


Base URLs

pfdf.data.landfire.url.api()

Returns the base URL to the LANDFIRE LFPS API

api()
Outputs:

str – The API URL

pfdf.data.landfire.url.products()

Returns the base URL used to query API products

products()
Outputs:

str – The base URL

pfdf.data.landfire.url.job(action=None)

Returns the base URLs for job queries

Base URL
job()

Returns the base URL for job queries.

Job Action
job(action)

Returns the base URL used to implement a particular job action. Supported job actions are “submit”, “status”, and “cancel”.

Inputs:
  • action (str) – A job action whose base URL should be returned

Outputs:

str – The base URL for a job query

Jobs

pfdf.data.landfire.url.submit_job(layers, bounds, email, *, decode=False)

Returns the URL used to submit a job

submit_job(layers, bounds, email)
submit_job(..., *, decode=True)

Returns the URL used to submit a job. The layers input should be a string or sequence of strings indicating the LANDFIRE layers included in the job. The bounds input should be a BoundingBox-like input, and must have a CRS. The email address must be a string, and is used by LANDFIRE to track usage statistics. By default, returns a percent encoded URL. Set decode=True to return a decoded URL instead.

Inputs:
  • layers (str | list[str]) – A list of LANDFIRE layers to include in the job

  • bounds (BoundingBox-like) – The bounding box for the job

  • email (str) – An email address associated with the job

  • decode (bool) – True to return a decoded URL. False (default) to return a percent encoded URL

Outputs:

str – The URL for the job submission

pfdf.data.landfire.url.job_status(id, *, decode=False)

Returns the URL used to query a job’s status

job_status(id)
job_status(..., *, decode=True)

Returns the URL used to query the status of the job with the indicated processing ID. By default, returns a percent encoded URL. Set decode=True to return a decoded URL instead.

Inputs:
  • id (str) – The processing ID of the queried job

  • decode (bool) – True to return a decoded URL. False (default) to return a percent encoded URL

Outputs:

str – The URL used to query a job’s status