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: AssetDefinition)[source]¶
- asset_defn: 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 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.- 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, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[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.
- 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
orAsset
.- Raises:
pystac.ExtensionTypeError – If an invalid object type is passed.
- name: Literal['pc'] = 'pc'¶
- 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'}¶
- schema_uri: str = 'https://stac-extensions.github.io/pointcloud/v1.0.0/schema.json'¶
- 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 name: str¶
Gets or sets the name property for this Schema.
- properties: dict[str, Any]¶
- property size: int¶
Gets or sets the size value.
- property type: SchemaType¶
Gets or sets the type property. Valid values are
floating
,unsigned
, andsigned
.
- class pystac.extensions.pointcloud.SchemaType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[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.
- 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.
- 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 thesummaries
field of aCollection
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 type: list[PhenomenologyType | str] | None¶