pystac.extensions.pointcloud#

Implements the Point Cloud Extension.

class pystac.extensions.pointcloud.AssetPointcloudExtension(asset: Asset)[source]#

A concrete implementation of PointcloudExtension on an Asset that extends the Asset fields to include properties defined in the Point Cloud Extension.

This class should generally not be instantiated directly. Instead, call PointcloudExtension.ext() on an Asset to extend it.

additional_read_properties: Iterable[dict[str, Any]] | None = None#

If present, this will be a list containing 1 dictionary representing the properties of the owning Item.

asset_href: str#

The href value of the Asset being extended.

properties: dict[str, Any]#

The Asset fields, including extension properties.

class pystac.extensions.pointcloud.ItemAssetsPointcloudExtension(item_asset: AssetDefinition)[source]#
asset_defn: item_assets.AssetDefinition#
properties: dict[str, Any]#

The properties that this extension wraps.

The extension which implements PropertiesExtension can use _get_property and _set_property to get and set values on this instance. Note that _set_properties mutates the properties directly.

class pystac.extensions.pointcloud.ItemPointcloudExtension(item: Item)[source]#

A concrete implementation of PointcloudExtension on an Item that extends the properties of the Item to include properties defined in the Point Cloud Extension.

This class should generally not be instantiated directly. Instead, call PointcloudExtension.ext() on an Item to extend it.

item: pystac.Item#
properties: dict[str, Any]#

The properties that this extension wraps.

The extension which implements PropertiesExtension can use _get_property and _set_property to get and set values on this instance. Note that _set_properties mutates the properties directly.

class pystac.extensions.pointcloud.PhenomenologyType(value)[source]#

Valid values for the pc:type field in the Pointcloud Item Properties.

EOPC = 'eopc'#
LIDAR = 'lidar'#
OTHER = 'other'#
RADAR = 'radar'#
SONAR = 'sonar'#
class pystac.extensions.pointcloud.PointcloudExtension[source]#

An abstract class that can be used to extend the properties of an Item or Asset with properties from the Point Cloud Extension. This class is generic over the type of STAC Object to be extended (e.g. Item, Asset).

To create a concrete instance of PointcloudExtension, use the PointcloudExtension.ext() method. For example:

>>> item: pystac.Item = ...
>>> pc_ext = PointcloudExtension.ext(item)
apply(count: int, type: PhenomenologyType | str, encoding: str, schemas: list[Schema], density: float | None = None, statistics: list[Statistic] | None = None) None[source]#

Applies Pointcloud extension properties to the extended Item.

Parameters:
  • count – REQUIRED. The number of points in the cloud.

  • type – REQUIRED. Phenomenology type for the point cloud. Possible valid values might include lidar, eopc, radar, sonar, or otherThe type of file or data format of the cloud.

  • encoding – REQUIRED. Content encoding or format of the data.

  • schemas – REQUIRED. A sequential array of items that define the dimensions and their types.

  • density – Number of points per square unit area.

  • statistics – A sequential array of items mapping to pc:schemas defines per-channel statistics.

property count: int#

Gets or sets the number of points in the Item.

property density: float | None#

Gets or sets the number of points per square unit area.

property encoding: str#

Gets or sets the content encoding or format of the data.

classmethod ext(obj: T, add_if_missing: bool = False) PointcloudExtension[T][source]#

Extends the given STAC Object with properties from the Point Cloud Extension.

This extension can be applied to instances of Item or Asset.

Raises:

pystac.ExtensionTypeError – If an invalid object type is passed.

classmethod get_schema_uri() str[source]#

Gets the schema URI associated with this extension.

name: Literal['pc'] = 'pc'#
property schemas: list[pystac.extensions.pointcloud.Schema]#

Gets or sets the list of Schema instances defining dimensions and types for the data.

property statistics: list[Statistic] | None#

Gets or sets the list of Statistic instances describing the pre-channel statistics. Elements in this list map to elements in the PointcloudExtension.schemas list.

classmethod summaries(obj: Collection, add_if_missing: bool = False) SummariesPointcloudExtension[source]#
property type: PhenomenologyType | str#

Gets or sets the phenomenology type for the point cloud.

class pystac.extensions.pointcloud.PointcloudExtensionHooks[source]#
prev_extension_ids = {'pointcloud'}#
schema_uri: str = 'https://stac-extensions.github.io/pointcloud/v1.0.0/schema.json'#
stac_object_types = {STACObjectType.ITEM}#
class pystac.extensions.pointcloud.Schema(properties: dict[str, Any])[source]#

Defines a schema for dimension of a pointcloud (e.g., name, size, type)

Use Schema.create() to create a new instance of Schema from properties.

apply(name: str, size: int, type: SchemaType) None[source]#

Sets the properties for this Schema.

Parameters:
  • name – The name of dimension.

  • size – The size of the dimension in bytes. Whole bytes are supported.

  • type – Dimension type. Valid values are floating, unsigned, and

  • signed

classmethod create(name: str, size: int, type: SchemaType) Schema[source]#

Creates a new Schema.

Parameters:
  • name – The name of dimension.

  • size – The size of the dimension in bytes. Whole bytes are supported.

  • type – Dimension type. Valid values are floating, unsigned, and

  • signed

property name: str#

Gets or sets the name property for this Schema.

properties: dict[str, Any]#
property size: int#

Gets or sets the size value.

to_dict() dict[str, Any][source]#

Returns this schema as a dictionary.

property type: SchemaType#

Gets or sets the type property. Valid values are floating, unsigned, and signed.

class pystac.extensions.pointcloud.SchemaType(value)[source]#

Valid values for the type field in a Schema Object.

FLOATING = 'floating'#
SIGNED = 'signed'#
UNSIGNED = 'unsigned'#
class pystac.extensions.pointcloud.Statistic(properties: dict[str, Any])[source]#

Defines a single statistic for Pointcloud channel or dimension

Use Statistic.create() to create a new instance of Statistic from property values.

apply(name: str, position: int | None = None, average: float | None = None, count: int | None = None, maximum: float | None = None, minimum: float | None = None, stddev: float | None = None, variance: float | None = None) None[source]#

Sets the properties for this Statistic.

Parameters:
  • name – REQUIRED. The name of the channel.

  • position – Optional position of the channel in the schema.

  • average – Optional average of the channel.

  • count – Optional number of elements in the channel.

  • maximum – Optional maximum value of the channel.

  • minimum – Optional minimum value of the channel.

  • stddev – Optional standard deviation of the channel.

  • variance – Optional variance of the channel.

property average: float | None#

Gets or sets the average property.

property count: int | None#

Gets or sets the count property.

classmethod create(name: str, position: int | None = None, average: float | None = None, count: int | None = None, maximum: float | None = None, minimum: float | None = None, stddev: float | None = None, variance: float | None = None) Statistic[source]#

Creates a new Statistic class.

Parameters:
  • name – REQUIRED. The name of the channel.

  • position – Optional position of the channel in the schema.

  • average – Optional average of the channel.

  • count – Optional number of elements in the channel.

  • maximum – Optional maximum value of the channel.

  • minimum – Optional minimum value of the channel.

  • stddev – Optional standard deviation of the channel.

  • variance – Optional variance of the channel.

property maximum: float | None#

Gets or sets the maximum property.

property minimum: float | None#

Gets or sets the minimum property.

property name: str#

Gets or sets the name property.

property position: int | None#

Gets or sets the position property.

properties: dict[str, Any]#
property stddev: float | None#

Gets or sets the stddev property.

to_dict() dict[str, Any][source]#

Returns this statistic as a dictionary.

property variance: float | None#

Gets or sets the variance property.

class pystac.extensions.pointcloud.SummariesPointcloudExtension(collection: Collection)[source]#

A concrete implementation of SummariesExtension that extends the summaries field of a Collection to include properties defined in the Point Cloud Extension.

property count: RangeSummary[int] | None#
property density: RangeSummary[float] | None#
property encoding: list[str] | None#
property statistics: list[Statistic] | None#
summaries: Summaries#

The summaries for the Collection being extended.

property type: list[PhenomenologyType | str] | None#