0.1.4
A STAC Band.
You can access all properties of the given STAC Band object directly, e.g., band.name
.
Extends STACObject
((Collection | Item | Asset | null)
= null
)
The object that contains the band
(string)
Returns the STAC entity that contains the band.
(Collection | Item | Asset | null)
:
Returns the metadata for the given field name.
Returns the metadata from the asset, if present.
Otherwise, returns the metadata from calling getMetadata()
on the STAC entity that contains the asset.
(string)
Field name
any
:
The value of the field
Gets the reported minimum and maximum values for a band.
Searches through different extension fields in raster, classification, and file.
Statistics
:
A STAC Asset or Item Asset Definition.
You can access all properties of the given STAC Asset object directly, e.g., asset.href
.
Extends STACReference
(string
= null
)
The asset key
((Collection | Item | null)
= null
)
The object that contains the asset
Converts an object of STAC Assets into an object of stac-js Assets.
((Collection | Item | null)
= null
)
The object that contains the assets
Object<string, Asset>
:
Improved Assets
Returns the metadata for the given field name.
Returns the metadata from the asset, if present.
Otherwise, returns the metadata from calling getMetadata()
on the STAC entity that contains the asset.
(string)
Field name
any
:
The value of the field
Find the RGB bands.
(VisualBands | null)
:
Object with the RGB bands or null
Returns the band for the given criteria.
Searches the given property
(default: name
) for the given value(s).
(any)
A single value to find or a list of values to find one of.
(string
= 'name'
)
The property in the bands to match against.
(Band | null)
:
Gets the reported minimum and maximum values for an asset.
Searches through different extension fields in raster, classification, and file.
Statistics
:
A STAC Catalog.
You can access all properties of the given STAC Catalog object directly, e.g. catalog.title
.
Extends CatalogLike
(Object)
The STAC Catalog object
((string | null)
= null
)
Absolute URL of the STAC Catalog
A STAC Collection.
You can access all properties of the given STAC Collection object directly, e.g. collection.title
.
Extends CatalogLike
(Object)
The STAC Collection object
((string | null)
= null
)
Absolute URL of the STAC Collection
(string)
(string)
(string)
(string?)
(string)
(string)
(Extent)
Returns a single union 2D bounding box for the whole collection.
(BoundingBox | null)
:
Returns the individual 2D bounding boxes for the collection, without the union bounding box if multiple bounding boxes are given.
Array<BoundingBox>
:
Returns all bounding boxes from the collection, including the union bounding box.
Array<BoundingBox>
:
Represents an Collections containing Collections.
Extends APICollection
(Object)
The STAC API Collections object
((string | null)
= null
)
Absolute URL of the STAC Item Collection
(Array<Collection>)
Returns all collections.
Array<Collection>
:
All STAC Collections
Returns a single 2D bounding box for all the STAC collections.
(BoundingBox | null)
:
Returns a list of 2D bounding boxes for all the STAC collections.
Array<BoundingBox>
:
A STAC Item.
You can access all properties of the given STAC Item object directly, e.g. item.id
or item.properties.datetime
.
Extends STAC
(Object)
The STAC Item object
((string | null)
= null
)
Absolute URL of the STAC Item
(string)
(string)
(string)
((Object | null))
(ItemProperties)
(string?)
Returns a single 2D bounding box for the item.
(BoundingBox | null)
:
Returns 2D bounding boxes for the item.
Array<BoundingBox>
:
A STAC Link object.
You can access all properties of the given STAC Link object directly, e.g. link.href
.
Extends STACReference
((STAC | null)
= null
)
The object that contains the link
(string)
(string)
(string?)
(string?)
(string?)
(Object?)
(boolean?)
Represents an ItemCollection containing Items.
Extends APICollection
(Object)
The STAC Item Collection object
((string | null)
= null
)
Absolute URL of the STAC Item Collection
Returns a single 2D bounding box for all the STAC items.
(BoundingBox | null)
:
Returns a list of 2D bounding boxes for all the STAC items.
Array<BoundingBox>
:
Protocols supported by browsers (http and https).
The GeoJSON media type.
Type: string
All STAC media types (JSON + GeoJSON).
All image media types that Web Browsers can show (GIF, JPEG, PNG, WebP).
All Cloud Optimized GeoTiff media types.
All GeoTiff media types (including COG media types).
All image media types combined (Web Browser + GeoTiff).
(string | URI)
:
(string)
((string | null)
= null
)
(boolean
= false
)
(boolean
= true
)
(string | URI)
:
Checks whether a given media type is in the list of media types.
boolean
:
true
if the media type is allowed,
false
otherwise.
Checks whether the given media type is a STAC media type (JSON or GeoJSON).
boolean
:
true
if the media type is a STAC media type,
false
otherwise.
Checks whether a variable is a string and contains at least one character.
(any)
A variable to check.
boolean
:
true
is the given variable is a string with length > 0,
false
otherwise.
Ensures a number is between a minimum and maximum value, but with a delta.
(number)
The number to check.
(number)
The minimum value.
(number)
The maximum value.
(number
= 0.00000001
)
The delta that the number is allowed to be larger or smaller.
(number | null)
:
Checks whether a variable is a real object or not.
This is a more strict version of typeof x === 'object'
as this example would also succeed for arrays and null
.
This function only returns true
for real objects and not for arrays, null
or any other data types.
(any)
A variable to check.
boolean
:
true
is the given variable is an object,
false
otherwise.
Merges any number of arrays of objects.
Array<Object>
:
Gets the reported minimum and maximum values for a STAC object.
Searches through different extension fields in raster, classification, and file.
(StacObject)
Statistics
:
Gets the reported no-data values for a STAC Object.
Searches through different extension fields in nodata, classification, and file.
(StacObject)
Array<any>
:
Class for common parts of Catalogs and Collections.
Don't instantiate this class!
Extends STAC
(Object)
The STAC Catalog or Collection object
((string | null)
= null
)
Absolute URL of the STAC Catalog or Collection
A STAC API Collection (i.e. an ItemCollection or a CollectionCollection)
You can access all properties of the given STAC Catalog object directly, e.g. collection.links
.
Don't instantiate this class!
Extends STACHypermedia
(Object)
The STAC API Collection object
((string | null)
= null
)
Absolute URL of the STAC Item Collection
Returns the center of the STAC entity.
((BoundingBox | null))
(Point | null)
:
Fix coordinates in a GeoJSON object to be within the CRS range.
Function works in-place.
(Object)
The GeoJSON object to be checked.
Object
:
The fixed GeoJSON object.
Converts one or more bounding boxes to a GeoJSON Feature.
The Feature contains a Polygon or MultiPolygon based on the given number of valid bounding boxes.
((BoundingBox | Array<BoundingBox>))
(Object | null)
:
Ensure this is a valid bounding box.
This function will ensure that the given bounding box is valid and otherwise return null
.
If the bounding box is 3D, the function will return null
unless allow3D
is set to true
.
((BoundingBox | Array<number>))
The bounding box to check.
(boolean
= false
)
Whether to allow 3D bounding boxes or not.
(BoundingBox | null)
:
Checks whether the given bounding box crosses the antimeridian.
(BoundingBox)
boolean
:
Compute the union of a list of bounding boxes.
The function ignores any invalid bounding boxes or values for the third dimension.
(Array<(BoundingBox | null)>)
(BoundingBox | null)
:
Parses a UTC-based ISO8601 date and time string to a Date object.
Does not support timezones as all STAC datetime must be given in UTC.
(any)
(Date | null)
:
Computes the center datetime between two datetimes.
Date
:
center datetime
Computes a single interval from multiple temporal intervals.
(Array<Date> | null)
:
The merged temporal interval
STAC Hypermedia class for STAC objects.
Don't instantiate this class!
Extends STACObject
Creates the corresponding object for a object that conforms to the STAC specification.
This creates either a Catalog, a Collection or an Item instance. By default it migrates the data to the latest STAC version, but doesn't update the version number.
(Object)
The STAC object
(boolean
= false
)
true
to update the version number (to the latest version),
false
otherwise. Only applies if
migrate
is set to
true
.
(Catalog | Collection | CollectionCollection | Item | ItemCollection)
:
The created object instance.
Base class for STAC objects.
Don't instantiate this class!
(Object)
The STAC object
Returns a single bounding box for the STAC entity.
(BoundingBox | null)
:
Returns the center of the STAC entity.
(BoundingBox | null)
:
Returns a list of bounding boxes for the STAC entity.
Array<BoundingBox>
:
A STAC reference as base for Assets and Links.
Don't instantiate this class!
Extends STACObject
(Object)
The STAC API Collection object
((STAC | null)
= null
)
The object that contains the reference
Checks whether a given reference can be displayed by a browser.
A browser can usually display an image if it is a specific file format (e.g. JPEG, PNG, ...) and is served over HTTP(S).
(any
= false
)
boolean
:
true
if a browser can display the given reference,
false
otherwise.
Class for STAC spec entities (Item, Catalog and Collection).
Don't instantiate this class!
Extends STACHypermedia
Get the thumbnails from the assets and links in a STAC entity.
(boolean
= true
)
Return only images that can be shown in a browser natively (PNG/JPG/GIF/WEBP + HTTP/S).
((string | null)
= null
)
If not
null
(default), prefers a role over the other. Either
thumbnail
or
overview
.
Array<STACReference>
:
Asset or Link
Ranks the GeoTiff assets for visualization purposes.
The score factors can be found below:
(boolean
= true
)
Return only GeoTiffs that can be accessed via HTTP(S)
(boolean
= false
)
Return only COGs
(STAC~rankGeoTIFFs
= null
)
A function to customize the score by adding/subtracting.
Array<AssetScore>
:
GeoTiff assets sorted by score in descending order.
Find the single-band assets for RGB.
(VisualAssets | null)
:
Object with the RGB bands or null
A bounding box (2D oder 3D).
A point (2D or 3D).
A data provider.
Type: Object
Statistics
Type: Object
The RGB bands.
Type: Object
Extents
Type: Object
(SpatialExtent)
: Spatial extents
(TemporalExtent)
: Temporal extents
Spatial Extents
Type: Object
Temporal Extents
Type: Object
Metadata for an item, the item properties.
Type: Object
(string)
: Date and Time
Object with an asset and the corresponding score.
Type: Object
A function that can influence the score.
Returns a relative addition to the score. Negative values subtract from the score.
Type: Function
(Asset)
The asset to calculate the score for.
The single-band assets for RGB composites.
Type: Object