- url(*, fire=None, version=None, start_date=None, assessment_date=None, publication_date=None, extent=None, extent_type=None, extent_relation='intersects', bbox=None, point=None, geometry=None, geometry_relation='intersects', geometry_layer=None, geometry_driver=None, geometry_encoding=None, max=None, offset=None, decode=False, json=False, fields=None)¶
Returns the URL used to search PWFDF with given search filters.
Search URL
url(...) url(..., *, decode=True)
Returns the URL used to search the PWFDF collection with the given search filters. By default, returns a web-encoded URL. Set
decode=Trueto return a decoded URL, which is more human-readable.sbJSON Url
url(..., *, json=True) url(..., *, json=True, fields)
By default, returns the URL for the ScienceBase user interface. Set
json=Trueto return the URL for an sbJSON API response instead. Usefieldsto indicate the sbJSON fields that should be included in the response.Fire Event
url(..., *, fire)
Searches for assessments whose fire matches the given name. Note that the provided fire name must exactly match an assessment’s fire name (case-insensitive). Partial matches are not supported.
Version Number
url(..., *, version)
Searches for assessments matching the provided version number.
Caution
The
versionmust be a full 2-part version number. Major version numbers are not supported.Date Range
url(..., *, start_date) url(..., *, assessment_date) url(..., *, publication_date)
Searches for assessments matching a given date range. Use
start_dateto filter by the fire start date,assessment_dateto filter by the date the assessment was run, andpublication_dateto filter by the date that the assessment was published to ScienceBase.In general, a date input may be a (1) integer year, (2) datetime.date object, (3) datetime.datetime object, (4) YYYY, YYYY-MM, or YYYY-MM-DD date string, or (5) a tuple of two such inputs. If the input is a year or a month, matches all assessments that fall within that interval. If the input is a 2-tuple, then it is interpreted as a date range and the search matches assessments that fall between the two dates. If the first date is a year or month, then the date range will begin on the first day of that interval. If the last date is a year or month, then the range will end on the final day of that interval.
Extent
url(..., *, extent) url(..., *, extent_type) url(..., *, extent_relation)
Searches for assessments in a spatial area with well-known coordinates, such as a country or state. The
extentmay be the name of a supported extent, or an integer extent ID. Useextent_relationto set the spatial relationship between the extent and the search results. Options are:Relation
Description
intersects(default) Matches assessments that intersect the extent at any point
withinOnly matches assessments that are fully contained within the extent
disjointMatches assessments that do not intersect the extent at any point
Use
extent_typeto specify the type of extent being searched. This option is usually not necessary, but can be useful for guarding against extents with similar names.Geometry
url(..., *, bbox) url(..., *, point) url(..., *, geometry) url(..., *, geometry_relation)
Searches for assessments in a custom geospatial area. You may use one of the following search types at a time:
Search Type
Description
bboxSearches a custom bounding box. The input may be either (1) a WGS-84 [xmin, ymin, xmax, ymax] coordinate sequence, or (2) a GIS file path. If a file, then the bounding box is calculated from the contained geometries.
pointSearches a custom geospatial point. The input may be either (1) a [lon, lat] sequence, or (2) a GIS file path. If a file, then the point is determined as the center of the bounding box of the contained geometries.
geometrySearches a custom geospatial geometry. The input may be either (1) a WGS-84 GeoJSON-like dict (with
typeandcoordinateskeys), or (2) a GIS file path. In practice, only coarse geometries are supported (fewer than 100 coordinate points).Note
GIS files may use any CRS. Unlike explicit coordinate points, they are not limited to WGS-84.
Use
geometry_relationto set the spatial relationship between the geometry and the search results. Options are:Relation
Description
intersects(default) Matches assessments that intersect the geometry at any point
withinOnly matches assessments that are fully contained within the geometry
disjointMatches assessments that do not intersect the geometry at any point
Geometry File IO
url(..., *, geometry_layer) url(..., *, geometry_driver) url(..., *, geometry_encoding)
Advanced options for reading a geometry from a GIS file. Use
geometry_layerwhen the file has multiple data layers. The layer may either be a layer name, or an integer index. Reads the first layer if not otherwise specified. Usegeometry_driverto specify the file format when the file uses a non-standard extension. Most drivers will automatically detect the file encoding, but you can usegeometry_encodingto explicitly specify the encoding if detection fails.Paging
url(..., *, max) url(..., *, offset)
Paging options for the ScienceBase API. Use
maxto set the maximum number of ScienceBase product records that should be retrieved. Defaults to 500 and cannot exceed 1000. Useoffsetto specify the number of ScienceBase products to skip before retrieving search results.- Inputs:
fire (str) – The name of a fire event
version (str) – A version number
start_date (str | int | datetime.date | datetime.datetime | tuple) – A date range in which matching fire events began
assessment_date (str | int | datetime.date | datetime.datetime | tuple) – A date range in which matching assessment were performed
publication_date (str | int | datetime.date | datetime.datetime | tuple) – A date range in which matching assessments were published to ScienceBase
extent (str | int) – An extent name or integer ID
extent_type (str) – The type of extent being searched
extent_relation (str) – The spatial relationship between the extent and the search results
bbox (str | Path | [float, float, float, float]) – A custom bounding box to search. Either a file path, or a WGS-84 [xmin, ymin, xmax, ymax] coordinate sequence
point (str | Path | [float, float]) – A custom geospatial point to search. Either a file path, or a [lon, lat] point.
geometry (str | Path | dict) – A custom geospatial geometry to search. Either a file path or a WGS-84 GeoJSON geometry-like dict
geometry_relation (str) – The spatial relationship between the geometry and the search results
geometry_layer (str | int) – The name or index of a data layer in a geometry file
geometry_driver (str) – The file format driver to use to read a geometry file
geometry_encoding (str) – The file encoding to use to read a geometry file
max (int) – The maximum number of ScienceBase records to retrieve per API query
offset (int) – The number of ScienceBase records to skip before retrieving results
decode (bool) – True to return a decoded URL. False (default) to return a percent-encoded URL suitable for web requests.
json (bool) – True to return a URL for a JSON response. False (default) to return a URL for the ScienceBase user interface
fields (list[str]) – A list of sbJSON fields that should be included in the response
- Outputs:
str – The URL used to search PWFDF with the given search filters