data.landfire.products module¶
Functions that return information about LANDFIRE products available via the the LFPS API. A given LANDFIRE product may have multiple versions, and each version is referred to as a “layer”. LANDFIRE uses acronyms to refer to individual products (which may have multiple versions), and you can use these acronyms to filter results in this module.
Function |
Description |
---|---|
General Queries |
|
Returns information about queried LANDFIRE layers |
|
Returns a list of supported product acronyms |
|
Returns the names of queried LANDFIRE layers |
|
Specific Layers |
|
Returns info of the latest version of a specific product |
|
Returns info on a queried layer |
General Queries¶
- pfdf.data.landfire.products.query(acronym=None, *, timeout=10)¶
Returns information about available LANDFIRE layers
Product Info
query() query(acronym)
Returns a list of product info dicts for available LANDFIRE layers. By default, returns info for all available products. Use the
acronym
input to only return info on products matching the specified acronym. You can retrieve a list of supported acronyms using the acronyms function.Timeout
query(..., *, timeout)
Specifies a maximum time in seconds for connecting to the LFPS server. This option is typically a scalar, but may also use a vector with two elements. In this case, the first value is the timeout to connect with the server, and the second value is the time for the server to return the first byte. You can also set timeout to None, in which case API queries will never time out. This may be useful for some slow connections, but is generally not recommended as your code may hang indefinitely if the server fails to respond.
- Inputs:
acronym (str) – A product acronym used to filter product info results
timeout (scalar | vector) – The maximum time in seconds to establish a connection with the LFPS server
- Outputs:
list[dict] – A list of product info dicts
- pfdf.data.landfire.products.acronyms(*, timeout=10)¶
Returns the list of product acronyms supported by LANDFIRE LFPS
List Acronyms
acronyms()
Queries LANDFIRE and returns the complete list of product acronyms supported by LFPS. These acronyms can be used to query products that have multiple versions.
Timeout
acronyms(*, timeout)
Specifies a maximum time in seconds for connecting to the LFPS server. This option is typically a scalar, but may also use a vector with two elements. In this case, the first value is the timeout to connect with the server, and the second value is the time for the server to return the first byte. You can also set timeout to None, in which case API queries will never time out. This may be useful for some slow connections, but is generally not recommended as your code may hang indefinitely if the server fails to respond.
- Inputs:
timeout (scalar | vector) – The maximum time in seconds to establish a connection with the LFPS server
- Outputs:
list[str] – The list of product acronyms supported by LFPS
- pfdf.data.landfire.products.layers(acronym=None, *, timeout=10)¶
Returns the names of LANDFIRE layers
List Layer Names
layers() layers(acronym)
Returns the names of LANDFIRE layers. By default, returns the names of all LANDFIRE layers available via LFPS. Use the
acronym
input to only return the names of layers matching the specified acronym. You can retrieve a list of supported acronyms using the acronyms function.Timeout
layers(..., *, timeout)
Specifies a maximum time in seconds for connecting to the LFPS server. This option is typically a scalar, but may also use a vector with two elements. In this case, the first value is the timeout to connect with the server, and the second value is the time for the server to return the first byte. You can also set timeout to None, in which case API queries will never time out. This may be useful for some slow connections, but is generally not recommended as your code may hang indefinitely if the server fails to respond.
- Inputs:
acronym (str) – A product acronym used to filter layer names
timeout (scalar | vector) – The maximum time in seconds to establish a connection with the LFPS server
- Outputs:
list[str] – A list of LANDFIRE layer names
Specific Layers¶
- pfdf.data.landfire.products.latest(acronym, *, timeout=10)¶
Returns info on the latest version of a specific product
Latest Version
latest(acronym)
Returns the product info dict for the latest version of the LANDFIRE product matching the queried acronym.
Timeout
latest(..., *, timeout)
Specifies a maximum time in seconds for connecting to the LFPS server. This option is typically a scalar, but may also use a vector with two elements. In this case, the first value is the timeout to connect with the server, and the second value is the time for the server to return the first byte. You can also set timeout to None, in which case API queries will never time out. This may be useful for some slow connections, but is generally not recommended as your code may hang indefinitely if the server fails to respond.
- Inputs:
acronym (str) – The acronym of the product whose latest version should be determined
timeout (scalar | vector) – The maximum time in seconds to establish a connection with the LFPS server
- Output:
dict – The product info dict of the latest version of the queried product
- pfdf.data.landfire.products.layer(layer, *, timeout=10)¶
Returns the product info dict for a queried layer
Layer Info
layer(layer)
Returns the product info dict for the queried LANDFIRE layer.
Timeout
layer(..., *, timeout)
Specifies a maximum time in seconds for connecting to the LFPS server. This option is typically a scalar, but may also use a vector with two elements. In this case, the first value is the timeout to connect with the server, and the second value is the time for the server to return the first byte. You can also set timeout to None, in which case API queries will never time out. This may be useful for some slow connections, but is generally not recommended as your code may hang indefinitely if the server fails to respond.
- Inputs:
layer (str) – The name of the LANDFIRE layer whose info should be returned
timeout (scalar | vector) – The maximum time in seconds to establish a connection with the LFPS server
- Outputs:
dict – The product info dict for the queried layer