stac-js

0.5.6

A STAC Band.

You can access all properties of the given STAC Band object directly, e.g., band.name.

new Band(data: (Object | Band), index: (number | string), context: (Collection | Item | Asset | null))

Extends STACObject

Parameters
data ((Object | Band)) The STAC Band object
index ((number | string) = null) The band index
context ((Collection | Item | Asset | null) = null) The object that contains the band
Properties
name (string)
Static Members
fromBands(bands, context)
Instance Members
getContext()
getObjectType()
getIndex()
getMetadata(field)
getStatistics()
getMinMaxValues()
getNoDataValues()
isBand

A STAC Asset or Item Asset Definition.

You can access all properties of the given STAC Asset object directly, e.g., asset.href.

new Asset(data: (Object | Asset), key: string, context: (Collection | Item | null))

Extends STACReference

Parameters
data ((Object | Asset)) The STAC Asset object
key (string = null) The asset key
context ((Collection | Item | null) = null) The object that contains the asset
Properties
href (string)
title (string?)
description (string?)
type (string?)
roles (Array<string>?)
Static Members
fromAssets(assets, context)
Instance Members
getObjectType()
getAbsoluteUrl(stringify)
getKey()
getMetadata(field)
getBands()
findVisualBands()
findBand(value, property)
getBand(band)
getStatistics()
getMinMaxValues()
getNoDataValues()
hasRole(roles, includeKey)
getAlternates(merged)
fillAlternate()
isAsset
isAlternate
isDefinition
isHTTP
isPreview

A STAC Catalog.

You can access all properties of the given STAC Catalog object directly, e.g. catalog.title.

new Catalog(data: Object, absoluteUrl: (string | null))

Extends CatalogLike

Parameters
data (Object) The STAC Catalog object
absoluteUrl ((string | null) = null) Absolute URL of the STAC Catalog
Properties
stac_version (string)
stac_extensions (Array<string>?)
type (string)
id (string)
title (string?)
description (string)
links (Array<Link>)

ChildrenCollection

src/childrencollection.js

Represents a list of children (Catalogs and Collections) as returned by the /children endpoint of the STAC API - Children extension.

new ChildrenCollection(data: Object, absoluteUrl: (string | null))

Extends APICollection

Parameters
data (Object) The STAC API Children object
absoluteUrl ((string | null) = null) Absolute URL of the children endpoint
Properties
children (Array<(Catalog | Collection)>)
links (Array<Link>)
Static Members
isResponse(data)
Instance Members
getObjectType()
getAll()
toGeoJSON(fixAntimeridian)
getBoundingBox()
getBoundingBoxes()
getTemporalExtent()
getTemporalExtents()
isChildrenCollection

A STAC Collection.

You can access all properties of the given STAC Collection object directly, e.g. collection.title.

new Collection(data: Object, absoluteUrl: (string | null))

Extends CatalogLike

Parameters
data (Object) The STAC Collection object
absoluteUrl ((string | null) = null) Absolute URL of the STAC Collection
Properties
stac_version (string)
stac_extensions (Array<string>?)
type (string)
id (string)
title (string?)
description (string)
keywords (Array<string>?)
license (string)
providers (Array<Provider>)
extent (Extent)
summaries (Object<string, (Array | Object)>)
links (Array<Link>)
assets (Object<string, Asset>)
Instance Members
getSummary(field)
getBands()

CollectionCollection

src/collectioncollection.js

Represents an Collections containing Collections.

new CollectionCollection(data: Object, absoluteUrl: (string | null))

Extends APICollection

Parameters
data (Object) The STAC API Collections object
absoluteUrl ((string | null) = null) Absolute URL of the STAC Item Collection
Properties
collections (Array<Collection>)
links (Array<Link>)
Static Members
isResponse(data)
Instance Members
getObjectType()
getAll()
toGeoJSON(fixAntimeridian)
getBoundingBox()
getBoundingBoxes()
getTemporalExtent()
getTemporalExtents()
isCollectionCollection

A STAC Item.

You can access all properties of the given STAC Item object directly, e.g. item.id or item.properties.datetime.

new Item(data: Object, absoluteUrl: (string | null))

Extends STAC

Parameters
data (Object) The STAC Item object
absoluteUrl ((string | null) = null) Absolute URL of the STAC Item
Properties
stac_version (string)
stac_extensions (Array<string>?)
type (string)
id (string)
geometry ((Object | null))
bbox (Array<number>?)
properties (ItemProperties)
links (Array<Link>)
assets (Object<string, Asset>)
collection (string?)
Instance Members
getObjectType()
toGeoJSON(fixAntimeridian)
getBoundingBox()
getBoundingBoxes()
getDateTime()
getTemporalExtent()
getTemporalExtents()
getMetadata(field)
getBands()

Represents an ItemCollection containing Items.

new ItemCollection(data: Object, absoluteUrl: (string | null))

Extends APICollection

Parameters
data (Object) The STAC Item Collection object
absoluteUrl ((string | null) = null) Absolute URL of the STAC Item Collection
Properties
type (string)
features (Array<Item>)
links (Array<Link>)
Static Members
isResponse(data)
Instance Members
getObjectType()
getAll()
toGeoJSON(fixAntimeridian)
getBoundingBox()
getBoundingBoxes()
getTemporalExtent()
getTemporalExtents()

A STAC Link object.

You can access all properties of the given STAC Link object directly, e.g. link.href.

new Link(data: (Object | Link), context: (STAC | null))

Extends STACReference

Parameters
data ((Object | Link)) The STAC Link object
context ((STAC | null) = null) The object that contains the link
Properties
href (string)
rel (string)
type (string?)
title (string?)
method (string?)
headers (Object<string, string>?)
body (Object?)
merge (boolean?)
Static Members
Instance Members
getObjectType()
isPreview

geojsonMediaType

src/mediatypes.js

The GeoJSON media type.

geojsonMediaType

Type: string

stacMediaTypes

src/mediatypes.js

All STAC media types (JSON + GeoJSON).

stacMediaTypes

Type: Array<string>

schemaMediaType

src/mediatypes.js

The media type for JSON Schemas (e.g. queryables).

schemaMediaType

Type: string

browserImageTypes

src/mediatypes.js

All image media types that Web Browsers can show (GIF, JPEG, PNG, WebP).

browserImageTypes

Type: Array<string>

cogMediaTypes

src/mediatypes.js

All Cloud Optimized GeoTiff media types.

cogMediaTypes

Type: Array<string>

wozMediaTypes

src/mediatypes.js

All web-optimized GeoZARR media types.

wozMediaTypes

Type: Array<string>

zarrMediaTypes

src/mediatypes.js

All ZARR media types.

zarrMediaTypes

Type: Array<string>

geotiffMediaTypes

src/mediatypes.js

All GeoTiff media types (including COG media types).

geotiffMediaTypes

Type: Array<string>

imageMediaTypes

src/mediatypes.js

All image media types combined (Web Browser + GeoTiff).

imageMediaTypes

Type: Array<string>

Hierarchical relation types used by STAC.

hierarchical

All relation types used by STAC for pagination.

pagination

Type: Array<string>

All relation types used by Queryables in STAC and OGC APIs.

queryables

Type: Array<string>

All relation types used by Sortables in STAC and OGC APIs.

sortables

Type: Array<string>

browserProtocols

src/http.js

Protocols supported by browsers (http and https).

browserProtocols

Type: Array<string>

Fixes a GeoJSON object (Feature, FeatureCollection or Geometry) so that geometries crossing the antimeridian are split into valid multi-geometries.

Polygons may become MultiPolygons and LineStrings may become MultiLineStrings. Geometries that don't cross the antimeridian are returned (mostly) unchanged, but the winding order may be fixed (unless disabled via the options).

The function does not work in-place, it returns a new object. Nevertheless, some (nested) properties may still be shared with the input object, so the input object should not be altered afterwards.

fixGeoJson(geojson: Object, options: FixOptions): Object
Parameters
geojson (Object) The GeoJSON object to fix.
options (FixOptions = {}) Options for fixing the GeoJSON object.
Returns
Object: The fixed GeoJSON object.

fixGeoJson

src/geo.js

Fix coordinates in a GeoJSON object to be within the CRS range.

Function works in-place.

fixGeoJson(geojson: Object): Object
Parameters
geojson (Object) The GeoJSON object to be checked.
Returns
Object: The fixed GeoJSON object.

segmentGeoJson

src/antimeridian.js

Returns the segments of a GeoJSON object that are created when splitting its geometries at the antimeridian.

segmentGeoJson(geojson: Object, greatCircle: boolean): Object
Parameters
geojson (Object) The GeoJSON object (Feature, FeatureCollection or Geometry) to segment.
greatCircle (boolean = true) Compute the crossing latitude on the great circle between the two points (see FixOptions).
Returns
Object: A GeoJSON MultiLineString with the segments.

Calculates the bounding box for a (fixed) GeoJSON Polygon or MultiPolygon.

Supports antimeridian-spanning bounding boxes (where the western longitude is larger than the eastern longitude) as per RFC 7946, section 5.2.

bbox(shape: Object, forceOverAntimeridian: boolean): BoundingBox
Parameters
shape (Object) The GeoJSON Feature, Polygon or MultiPolygon.
forceOverAntimeridian (boolean = false) Force the bounding box to span the antimeridian.
Returns
BoundingBox: The bounding box ([west, south, east, north]).

Calculates the centroid for a (fixed) GeoJSON Polygon or MultiPolygon.

Handles the antimeridian by calculating the centroid from an identical MultiPolygon with longitudes in [0, 360).

The centroid is area-weighted (as in shapely, which the Python implementation uses), not the mean of the vertices.

centroid(shape: Object): Point
Parameters
shape (Object) The GeoJSON Feature or Geometry.
Returns
Point: The centroid ([longitude, latitude]).

Checks whether a given media type is in the list of media types.

isMediaType(type: (string | undefined), allowedTypes: (string | Array<string>), allowUndefined: boolean): boolean
Parameters
type ((string | undefined)) The potential media type.
allowedTypes ((string | Array<string>)) A list of allowed media types (or a single media type as string).
allowUndefined (boolean = false) If set to true , returns true if undefined is passed as type .
Returns
boolean: true if the media type is allowed, false otherwise.

isStacMediaType

src/mediatypes.js

Checks whether the given media type is a STAC media type (JSON or GeoJSON).

isStacMediaType(type: (string | undefined), allowUndefined: boolean): boolean
Parameters
type ((string | undefined)) The potential media type.
allowUndefined (boolean = false) If set to true , returns true if undefined is passed as type .
Returns
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.

hasText(string: any): boolean
Parameters
string (any) A variable to check.
Returns
boolean: true is the given variable is a string with length > 0, false otherwise.

Computes the size of an array (number of array elements) or object (number of key-value-pairs).

Returns 0 for all other data types.

size(obj: any): number
Parameters
obj (any)
Returns
number: The size of the array or object as integer, 0 for other data types.

ensureNumber

src/utils.js

Ensures a number is between a minimum and maximum value, but with a delta.

ensureNumber(num: number, min: number, max: number, delta: number): (number | null)
Parameters
num (number) The number to check.
min (number) The minimum value.
max (number) The maximum value.
delta (number = 0.00000001) The delta that the number is allowed to be larger or smaller.
Returns
(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.

isObject(obj: any): boolean
Parameters
obj (any) A variable to check.
Returns
boolean: true is the given variable is an object, false otherwise.

mergeArraysOfObjects

src/utils.js

Merges any number of arrays of objects.

mergeArraysOfObjects(bands: ...Array<Object>): Array<Object>
Parameters
bands (...Array<Object>)
Returns
Array<Object>:

getMinMaxValues

src/utils.js

Gets the reported minimum and maximum values for an asset.

getMinMaxValues(object: StacObject): Statistics
Deprecated: Use getStatistics() instead.
Parameters
object (StacObject)
Returns
Statistics:
Related
{getStatistics}

getStatistics

src/utils.js

Gets the reported statistics for a STAC object.

Searches through different extension fields in raster, classification, and file.

getStatistics(object: StacObject): Statistics
Parameters
object (StacObject)
Returns
Statistics:

computeHistogramStats

src/utils.js

Computes mean and standard deviation from a raster histogram object.

The histogram must have min, max, count, and buckets fields. Bucket width is computed as (max - min) / count and each bucket center is used as a representative value for the weighted calculations.

computeHistogramStats(histogram: Object): HistogramStats
Parameters
histogram (Object) The raster histogram object.
Name Description
histogram.min number Minimum value of the distribution.
histogram.max number Maximum value of the distribution.
histogram.count number Number of buckets.
histogram.buckets Array<number> Pixel counts per bucket.
Returns
HistogramStats: The computed mean and standard deviation, or null if not computable.

getNoDataValues

src/utils.js

Gets the reported no-data values for a STAC Object.

Searches through different extension fields in nodata, classification, and file.

getNoDataValues(object: StacObject): Array<any>
Parameters
object (StacObject)
Returns
Array<any>:

A STAC API Collection (i.e. an ItemCollection, a CollectionCollection or a ChildrenCollection)

You can access all properties of the given STAC Catalog object directly, e.g. collection.links.

Don't instantiate this class!

APICollection

Extends STACHypermedia

Parameters
data (Object) The STAC API Collection object
absoluteUrl ((string | null) = null) Absolute URL of the STAC Item Collection
keyMap (Object<string, function> = {}) Keys and functions that convert the values to stac-js objects.
privateKeys (Array<string> = []) Keys that are private members of the stac-js objects (for cloning and export).
Instance Members
getAll()
isApiCollection

Class for common parts of Catalogs and Collections.

Note that we implement getBoundingBox and getTemporalExtent here, although not defined for STAC catalogs. This allows us to read those entities from the root catalog, if provided. In case they are not provided, the methods will just return null as usual.

Don't instantiate this class!

CatalogLike

Extends STAC

Parameters
data (Object) The STAC Catalog or Collection object
absoluteUrl ((string | null) = null) Absolute URL of the STAC Catalog or Collection
keyMap (Object<string, function> = {}) Keys and functions that convert the values to stac-js objects.
privateKeys (Array<string> = []) Keys that are private members of the stac-js objects (for cloning and export).
Instance Members
getObjectType()
toGeoJSON(fixAntimeridian)
getBoundingBox()
getBoundingBoxes()
getRawBoundingBoxes()
getTemporalExtent()
getTemporalExtents()

toAbsolute

src/http.js

Converts a relative URL to an absolute URL based on the given base URL.

toAbsolute(href: string, baseUrl: string, stringify: boolean): (string | URI)
Parameters
href (string) The URL to convert.
baseUrl (string) The base URL to resolve against.
stringify (boolean = true) If true (default), returns a string, otherwise a URI object.
Returns
(string | URI): The absolute URL.

normalizeUri

src/http.js

Normalizes a URI by resolving it against an optional base URL and removing trailing slashes. Optionally strips query parameters and fragments.

normalizeUri(href: string, baseUrl: (string | null), noParams: boolean, stringify: boolean): (string | URI)
Parameters
href (string) The URL to normalize.
baseUrl ((string | null) = null) The base URL to resolve against, or null to skip resolution.
noParams (boolean = false) If true , removes query parameters and fragments.
stringify (boolean = true) If true (default), returns a string, otherwise a URI object.
Returns
(string | URI): The normalized URL.

centerOfBoundingBox

src/geo.js

Returns the center of the STAC entity.

centerOfBoundingBox(bbox: (BoundingBox | null)): (Point | null)
Parameters
bbox ((BoundingBox | null))
Returns
(Point | null):

toGeoJSON

src/geo.js

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.

Bounding boxes that cross the antimeridian (i.e. west > east, see RFC 7946, section 5.2) are always split into two polygons at the antimeridian. The antimeridian fix for geometries is NOT applied as whether a bounding box crosses the antimeridian is explicitly encoded (west > east) and must not be inferred from the longitude span as done for geometries. Otherwise, valid bounding boxes that span more than 180 degrees of longitude would be broken up.

toGeoJSON(bboxes: (BoundingBox | Array<BoundingBox>), fixAntimeridian: (boolean | FixOptions)): (Object | null)
Parameters
bboxes ((BoundingBox | Array<BoundingBox>))
fixAntimeridian ((boolean | FixOptions) = false) Deprecated, has no effect. Bounding boxes are always split at the antimeridian if needed.
Returns
(Object | null):

ensureBoundingBox

src/geo.js

Ensure this is a valid bounding box.

This function will ensure that the given bounding box is valid and otherwise return null.

Longitudes outside of [-180, 180] are wrapped around the antimeridian, e.g. a bounding box of [175, -41, 190, -37] becomes [175, -41, -170, -37]. This may result in a bounding box that crosses the antimeridian (i.e. west > east) as defined by GeoJSON (RFC 7946, section 5.2).

If the bounding box is 3D, the function will return a 2D bounding box unless allow3D is set to true. Doesn't ensure that the bounding box is 3D in case allow3D is set to true.

ensureBoundingBox(bbox: (BoundingBox | Array<number>), allow3D: boolean): (BoundingBox | null)
Parameters
bbox ((BoundingBox | Array<number>)) The bounding box to check.
allow3D (boolean = false) Whether to return 3D bounding boxes or not. By default all bounding boxes are returned as 2D.
Returns
(BoundingBox | null):

isAntimeridianBoundingBox

src/geo.js

Checks whether the given bounding box crosses the antimeridian.

isAntimeridianBoundingBox(bbox: BoundingBox): boolean
Parameters
bbox (BoundingBox)
Returns
boolean:

unionBoundingBox

src/geo.js

Compute the union of a list of bounding boxes.

The function is aware of the antimeridian: input boxes may cross it (west > east) and the returned box may cross it, too, if that yields the smaller extent. Following GeoJSON (RFC 7946, section 5.2), a box crossing the antimeridian is expressed with a western longitude that is larger than the eastern longitude.

The function ignores any invalid bounding boxes or values for the third dimension.

unionBoundingBox(bboxes: Array<(BoundingBox | null)>): (BoundingBox | null)
Parameters
bboxes (Array<(BoundingBox | null)>)
Returns
(BoundingBox | null):
Related
{ensureBoundingBox}

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.

isoToDate(str: any): (Date | null)
Parameters
str (any)
Returns
(Date | null):

centerDateTime

src/datetime.js

Computes the center datetime between two datetimes.

centerDateTime(start: Date, end: Date): Date
Parameters
start (Date) start datetime
end (Date) end datetime
Returns
Date: center datetime

unionDateTime

src/datetime.js

Computes a single interval from multiple temporal intervals.

unionDateTime(list: Array<Array<Date>>): (Array<Date> | null)
Parameters
list (Array<Array<Date>>) A list of temporal intervals
Returns
(Array<Date> | null): The merged temporal interval

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.

create(data: Object, migrate: boolean, updateVersionNumber: boolean): (Catalog | Collection | CollectionCollection | ChildrenCollection | Item | ItemCollection)
Parameters
data (Object) The STAC object
migrate (boolean = true) true to migrate to the latest version, false otherwise
updateVersionNumber (boolean = false) true to update the version number (to the latest version), false otherwise. Only applies if migrate is set to true .
Returns
(Catalog | Collection | CollectionCollection | ChildrenCollection | Item | ItemCollection): The created object instance.

STACHypermedia

src/hypermedia.js

STAC Hypermedia class for STAC objects.

Don't instantiate this class!

STACHypermedia

Extends STACObject

Parameters
data (Object) The STAC object
absoluteUrl ((string | null) = null) Absolute URL of the STAC object
keyMap (Object<string, function> = {}) Keys and functions that convert the values to stac-js objects.
privateKeys (Array<string> = []) Keys that are private members of the stac-js objects (for cloning and export).
Properties
links (Array<Link>)
Instance Members
getAbsoluteUrl(stringify)
setAbsoluteUrl(url)
getStacLinksWithRel(rel, allowUndefined)
getStacLinkWithRel(rel, allowUndefined)
getSchemaLinkWithRels(rels)
getLinkWithRel(rel)
getLinksWithRels(rels)
getLinksWithOtherRels(rels)

STACObject

src/object.js

Base class for STAC objects.

Don't instantiate this class!

STACObject
Parameters
data (Object) The STAC object
keyMap (Object<string, function> = {}) Keys and functions that convert the values to stac-js objects.
privateKeys (Array<string> = []) Keys that are private members of the stac-js objects (for cloning and export).
Instance Members
getObjectType()
getAbsoluteUrl(stringify)
getMetadata(field)
toGeoJSON(fixAntimeridian)
getBoundingBox()
getCenter()
getBoundingBoxes()
toJSON()
isItem
isCatalog
isCatalogLike
isCollection
isItemCollection
isCollectionCollection
isChildrenCollection
isReference
isApiCollection
isSTAC
isAsset
isBand

Class for STAC spec entities (Item, Catalog and Collection).

Don't instantiate this class!

STAC

Extends STACHypermedia

Parameters
data (Object) The STAC object
absoluteUrl ((string | null) = null) Absolute URL of the STAC object
keyMap (Object<string, function> = {}) Keys and functions that convert the values to stac-js objects.
privateKeys (Array<string> = []) Keys that are private members of the stac-js objects (for cloning and export).
Instance Members
getTemporalExtent()
getTemporalExtents()
getIcons(allowUndefined)
getThumbnails(browserOnly, prefer, includeGraphic)
getDefaultGeoFile(type, httpOnly, optimizedOnly)
rankGeoFiles(type, httpOnly, optimizedOnly, roleScores, additionalCriteria)
findVisualAssets()
getAsset(key)
getAssets()
getAssetsWithRoles(roles, includeKey)
getAssetWithRole(role, includeKey)
getAssetsByTypes(types)
equals(other)
is(other)
supportsExtension(pattern)
isSTAC

STACReference

src/reference.js

A STAC reference as base for Assets and Links.

Don't instantiate this class!

STACReference

Extends STACObject

Parameters
data (Object) The STAC API Collection object
context ((STAC | null) = null) The object that contains the reference
keyMap (Object<string, function> = {}) Keys and functions that convert the values to stac-js objects.
privateKeys (Array<string> = []) Keys that are private members of the stac-js objects (for cloning and export).
Properties
href (string)
type (string?)
Instance Members
getAbsoluteUrl(stringify)
getContext()
canBrowserDisplayImage(allowUndefined)
isType(types)
isReference
isGeoTIFF
isCOG
isHTTP
isPreview

Fix GeoJSON geometries that cross the antimeridian (180th meridian / dateline) by splitting them into valid multi-geometries.

This is a JavaScript port of antimeridian-ts by Kris Powell (https://github.com/krisaoe/antimeridian-ts, Apache-2.0), which itself is a port of the Python antimeridian package by Pete Gadomski (https://github.com/gadomski/antimeridian).

Deviations from antimeridian-ts (mostly in favor of the Python implementation):

  • Rings of polygons that were split at the antimeridian are properly closed (first position === last position) as required by the GeoJSON specification.
  • Geometry types that can't cross the antimeridian (e.g. Point and MultiPoint) and Features without a geometry are returned unchanged instead of throwing an error.
  • GeometryCollections are supported by fixing each geometry individually.
  • Unclosed input rings are closed and consecutive (near-)duplicate positions are removed before processing, like shapely does in the Python implementation.
  • The interpolation in crossingLatitudeFlat and the joining of split segments in buildPolygons are fixed to match the Python implementation.
  • The centroid is area-weighted (as in shapely) instead of a mean of the vertices.
  • Multiple holes in the same polygon are all preserved (the Python implementation in fact drops all but the last hole per polygon).
  • Near-duplicate positions are detected with an absolute tolerance instead of numpy's default relative tolerance, which collapses small geometries far from the null island (https://github.com/gadomski/antimeridian/issues/230).
antimeridian

Options for fixing GeoJSON.

FixOptions

Type: Object

Properties
forceNorthPole (boolean?) : Force the geometry to enclose the north pole.
forceSouthPole (boolean?) : Force the geometry to enclose the south pole.
fixWinding (boolean?) : Fix the winding order so that exterior rings are counter-clockwise and holes are clockwise (as per RFC 7946).
greatCircle (boolean?) : Compute the latitude at which a segment crosses the antimeridian on the great circle between the two points. If set to false , a planar (flat) interpolation is used instead.
reverse (boolean?) : Reverse the coordinates of LineStrings and Polygons before fixing.

BoundingBox

src/types.js

A bounding box (2D oder 3D).

BoundingBox

Type: Array<number>

A point (2D or 3D).

Point

Type: Array<number>

A data provider.

Provider

Type: Object

Properties
name (string) : The name of the organization or the individual.
description (string?) : Description
roles (Array<string>?) : Roles of the provider. Any of licensor, producer, processor or host.
url (string?) : Homepage

Statistics

src/utils.js

Statistics

Statistics

Type: Object

Properties
minimum ((number | null)) : Minimum value
maximum ((number | null)) : Maximum value
mean ((number | null)) : Mean value (optional)
stddev ((number | null)) : Standard deviation (optional)

HistogramStats

src/utils.js

Computed histogram statistics.

HistogramStats

Type: Object

Properties
mean ((number | null)) : Mean value
stddev ((number | null)) : Standard deviation

VisualBands

src/asset.js

The RGB bands.

VisualBands

Type: Object

Properties
red (Band) : The red band with its index
green (Band) : The green band with its index
blue (Band) : The blue band with its index
src/apicollection.js

Pagination links.

PaginationLinks

Type: Object

Properties
first ((Link | null)) : Link to the first page
prev ((Link | null)) : Link to the previous page
next ((Link | null)) : Link to the next page
last ((Link | null)) : Link to the last page

Extents

Extent

Type: Object

Properties
spatial (SpatialExtent) : Spatial extents
temporal (TemporalExtent) : Temporal extents

SpatialExtent

src/collection.js

Spatial Extents

SpatialExtent

Type: Object

Properties
bbox (Array<Array<number>>) : Bounding boxes

TemporalExtent

src/collection.js

Temporal Extents

TemporalExtent

Type: Object

Properties
interval (Array<Array<(string | null)>>) : Intervals

ItemProperties

src/item.js

Metadata for an item, the item properties.

ItemProperties

Type: Object

Properties
datetime (string) : Date and Time

AssetScore

src/stac.js

Object with an asset and the corresponding score.

AssetScore

Type: Object

Properties
asset (Asset)
score (number)

STAC~rankGeoFiles

src/stac.js

A function that can influence the score.

Returns a relative addition to the score. Negative values subtract from the score.

STAC~rankGeoFiles(asset: Asset)

Type: Function

Parameters
asset (Asset) The asset to calculate the score for.

VisualAssets

src/stac.js

The single-band assets for RGB composites.

VisualAssets

Type: Object

Properties
red (Band) : The red band with its index
green (Band) : The green band with its index
blue (Band) : The blue band with its index