0.0.9
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.
(BandWithIndex | null)
:
Gets the reported minimum and maximum values for an asset (or band).
Searches through different extension fields in raster, claasification, 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 bounding box for the whole collection.
(BoundingBox | null)
:
Returns the individual 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 bounding box for all the STAC collections.
(BoundingBox | null)
:
Returns a list of 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 bounding box for the item.
(BoundingBox | null)
:
Returns bounding boxes for the item.
Array<BoundingBox>
:
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 bounding box for all the STAC items.
(BoundingBox | null)
:
Returns a list of bounding boxes for all the STAC items.
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?)
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).
Returns the center of the STAC entity.
((BoundingBox | null))
(Point | null)
:
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)
:
Checks whether the given thing is a valid bounding box.
A valid bounding box is an array with 4 or 6 numbers that are valid WGS84 coordinates and span a rectangle. See the STAC specification for details.
((BoundingBox | Array<number>))
A potential bounding box.
boolean
:
true
if valid,
false
otherwise
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)
:
Checks whether a URI is a GDAL Virtual Filesystem URI.
Such an URI usually starts with /vsi
(except for /vsicurl/
).
(string)
boolean
:
true
if an GDAL Virtual Filesystem URI,
false
otherwise.
(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 an string with length > 0,
false
otherwise.
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 succeeds 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>
:
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
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
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
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 link
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
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.
A bounding box (2D oder 3D).
A point (2D or 3D).
A band with the corresponding index.
Type: Object
A data provider.
Type: Object
The RGB bands.
Type: Object
(BandWithIndex)
: The red band with its index
(BandWithIndex)
: The green band with its index
(BandWithIndex)
: The blue band with its index
Statistics
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
(BandWithIndex)
: The red band with its index
(BandWithIndex)
: The green band with its index
(BandWithIndex)
: The blue band with its index