Class StacCollection
This class allows accessing commonly used fields in STAC Item They are often used in STAC Item properties, but can also be used in other places, e.g. an Item Asset or Collection Asset. STAC Common Metadata
Inheritance
Implements
Namespace: Stac
Assembly: DotNetStac.dll
Syntax
public class StacCollection : object, IStacCatalog, IStacParent, IStacObject, IStacPropertiesContainer, ILinksCollectionObject, ICloneable
Constructors
| Improve this Doc View SourceStacCollection(StacCollection)
Initializes a new instance of the StacCollection class.
Declaration
public StacCollection(StacCollection stacCollection)
Parameters
Type | Name | Description |
---|---|---|
StacCollection | stacCollection | existing Stac Collection |
StacCollection(String, String, StacExtent, IDictionary<String, StacAsset>, IEnumerable<StacLink>, String)
Initializes a new instance of the StacCollection class.
Declaration
public StacCollection(string id, string description, StacExtent extent, IDictionary<string, StacAsset> assets = null, IEnumerable<StacLink> links = null, string license = "proprietary")
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Identifier of the collection |
System.String | description | Description of the collection |
StacExtent | extent | Extent of the collection |
IDictionary<System.String, StacAsset> | assets | Assets of the collection |
IEnumerable<StacLink> | links | Links of the collection |
System.String | license | License of the collection |
Fields
| Improve this Doc View SourceMEDIATYPE
Media type for STAC Collection
Declaration
public const string MEDIATYPE = null
Field Value
Type | Description |
---|---|
System.String |
Properties
| Improve this Doc View SourceAssets
Gets the asset objects that are available for this collection.
Declaration
public IDictionary<string, StacAsset> Assets { get; }
Property Value
Type | Description |
---|---|
IDictionary<System.String, StacAsset> |
Description
Gets or sets detailed multi-line description to fully explain the Collection. CommonMark 0.29 syntax MAY be used for rich text representation.
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String | Detailed multi-line description to fully explain the Collection. CommonMark 0.29 syntax MAY be used for rich text representation. |
Extent
Gets spatial and temporal extents.
Declaration
public StacExtent Extent { get; }
Property Value
Type | Description |
---|---|
StacExtent |
Id
Gets identifier for the Collection.
Declaration
public string Id { get; }
Property Value
Type | Description |
---|---|
System.String |
Keywords
Gets list of keywords describing the Collection.
Declaration
public Collection<string> Keywords { get; }
Property Value
Type | Description |
---|---|
Stac.Collection<System.String> |
License
Gets or sets collection's license(s), either a SPDX License identifier, various if multiple licenses apply or proprietary for all other cases.
Declaration
public string License { get; set; }
Property Value
Type | Description |
---|---|
System.String | Collection's license(s), either a SPDX License identifier, various if multiple licenses apply or proprietary for all other cases. |
Links
Gets a list of references to other documents.
Declaration
public ICollection<StacLink> Links { get; }
Property Value
Type | Description |
---|---|
ICollection<StacLink> |
MediaType
Gets the type of the object
Declaration
public ContentType MediaType { get; }
Property Value
Type | Description |
---|---|
ContentType |
Properties
Gets collection extended data
Declaration
public IDictionary<string, object> Properties { get; }
Property Value
Type | Description |
---|---|
IDictionary<System.String, System.Object> |
Providers
Gets a list of providers, which may include all organizations capturing or processing the data or the hosting provider. Providers should be listed in chronological order with the most recent provider being the last element of the list.
Declaration
public Collection<StacProvider> Providers { get; }
Property Value
Type | Description |
---|---|
Stac.Collection<StacProvider> | A list of providers, which may include all organizations capturing or processing the data or the hosting provider. Providers should be listed in chronological order with the most recent provider being the last element of the list. |
StacExtensions
Gets a list of extension identifiers the Collection implements
Declaration
public ICollection<string> StacExtensions { get; }
Property Value
Type | Description |
---|---|
ICollection<System.String> |
StacObjectContainer
Gets the StacObjectContainer.
Declaration
public IStacObject StacObjectContainer { get; }
Property Value
Type | Description |
---|---|
IStacObject |
StacVersion
Gets or sets the STAC version the Collection implements
Declaration
public SemVersion StacVersion { get; set; }
Property Value
Type | Description |
---|---|
SemVersion |
Summaries
Gets a map of property summaries, either a set of values or statistics such as a range.
Declaration
public Dictionary<string, IStacSummaryItem> Summaries { get; }
Property Value
Type | Description |
---|---|
Dictionary<System.String, IStacSummaryItem> |
Title
Gets or sets a short descriptive one-line title for the Collection.
Declaration
public string Title { get; set; }
Property Value
Type | Description |
---|---|
System.String | A short descriptive one-line title for the Collection. |
Type
Gets sTAC type (Collection)
Declaration
public virtual string Type { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceClone()
Declaration
public object Clone()
Returns
Type | Description |
---|---|
System.Object |
Create(String, String, IDictionary<Uri, StacItem>, String, Uri, IDictionary<String, StacAsset>)
Generate a collection corresponding to the items' dictionary. Spatial and temporal extents are computed. Fields values are summarized in stats object and value sets. All Items are updated with the collection id
Declaration
public static StacCollection Create(string id, string description, IDictionary<Uri, StacItem> items, string license = null, Uri collectionUri = null, IDictionary<string, StacAsset> assets = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | Identifier of the collection |
System.String | description | Description of the collection |
IDictionary<Uri, StacItem> | items | Dictionary of Uri, StacItem. Uri points to the StacItem destination. |
System.String | license | License of the collection |
Uri | collectionUri | Uri of the collection. If provided, the items Uri and made relative to this one. |
IDictionary<System.String, StacAsset> | assets | Assets of the collection |
Returns
Type | Description |
---|---|
StacCollection | StacCollection |
ShouldSerializeAssets()
Declaration
public bool ShouldSerializeAssets()
Returns
Type | Description |
---|---|
System.Boolean |
ShouldSerializeStacExtensions()
Declaration
public bool ShouldSerializeStacExtensions()
Returns
Type | Description |
---|---|
System.Boolean |
ShouldSerializeSummaries()
Declaration
public bool ShouldSerializeSummaries()
Returns
Type | Description |
---|---|
System.Boolean |
Update(IDictionary<Uri, StacItem>)
Update the collection with new items.
Declaration
public void Update(IDictionary<Uri, StacItem> items)
Parameters
Type | Name | Description |
---|---|---|
IDictionary<Uri, StacItem> | items | Dictionary of Uri, StacItem. Uri points to the StacItem destination. |