pystac.extensions.pointcloud#
Implements the Point Cloud Extension.
- class pystac.extensions.pointcloud.AssetPointcloudExtension(asset: Asset)[source]#
A concrete implementation of
PointcloudExtension
on anAsset
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 anAsset
to extend it.
- class pystac.extensions.pointcloud.ItemAssetsPointcloudExtension(item_asset: ItemAssetDefinition)[source]#
- asset_defn: ItemAssetDefinition#
- class pystac.extensions.pointcloud.ItemPointcloudExtension(item: Item)[source]#
A concrete implementation of
PointcloudExtension
on anItem
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 anItem
to extend it.
- 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
orAsset
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 thePointcloudExtension.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.
- 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
orAsset
.- Raises:
pystac.ExtensionTypeError – If an invalid object type is passed.
- property schemas: list[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 thePointcloudExtension.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'}#
- stac_object_types = {'Feature'}#
- 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 ofSchema
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
, andsigned
- 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
, andsigned
- property type: SchemaType#
Gets or sets the type property. Valid values are
floating
,unsigned
, andsigned
.
- 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 ofStatistic
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.
- 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.
- class pystac.extensions.pointcloud.SummariesPointcloudExtension(collection: Collection)[source]#
A concrete implementation of
SummariesExtension
that extends thesummaries
field of aCollection
to include properties defined in the Point Cloud Extension.- property count: RangeSummary[int] | None#
- property density: RangeSummary[float] | None#
- property type: list[PhenomenologyType | str] | None#
- class pystac.extensions.pointcloud.T#
Generalized version of
Item
,Asset
, orItemAssetDefinition
alias of TypeVar(‘T’, ~pystac.item.Item, ~pystac.asset.Asset, ~pystac.item_assets.ItemAssetDefinition)