py3dtiles.tileset.content.pnts module

class py3dtiles.tileset.content.pnts.Pnts(header: PntsHeader, body: PntsBody)[source]

Bases: TileContent

static from_array(array: ndarray[Any, dtype[uint8]]) Pnts[source]

Creates a Pnts from an array

static from_features(feature_table_header: PntsFeatureTableHeader, position_array: ndarray[Any, dtype[float32 | uint16]], color_array: ndarray[Any, dtype[uint8 | uint16]] | None = None, normal_position: ndarray[Any, dtype[float32 | uint8]] | None = None) Pnts[source]

Creates a Pnts from features defined by pd_type and cd_type.

static from_file(tile_path: Path) Pnts[source]
static from_points(points: ndarray[Any, dtype[uint8]], include_rgb: bool, include_classification: bool, include_intensity: bool) Pnts[source]

Create a pnts from an uint8 data array containing:

  • points as SemanticPoint.POSITION

  • if include_rgb, rgb as SemanticPoint.RGB

  • if include_classification, classification as a single np.uint8 value that will be put in the batch table

  • if include_intensity, intensity as a single np.uint8 value that will be put in the batch table

Parameters:
  • include_rgb – Whether the points array contains rgb values

  • include_classification – Whether the point array contains classification values

  • include_intensity – whether the point array contains intensity values

  • points – the points array. Contains at least 3

sync() None[source]

Synchronizes headers with the Pnts body.

class py3dtiles.tileset.content.pnts.PntsBody[source]

Bases: TileContentBody

static from_array(header: PntsHeader, array: ndarray[Any, dtype[uint8]]) PntsBody[source]

Creates a PntsBody from an array and the header

get_points(transform: ndarray[Any, dtype[float64]] | None) tuple[ndarray[Any, dtype[float32]], ndarray[Any, dtype[uint8 | uint16]] | None][source]
to_array() ndarray[Any, dtype[uint8]][source]

Returns the body as a numpy array.

class py3dtiles.tileset.content.pnts.PntsHeader[source]

Bases: TileContentHeader

BYTE_LENGTH = 28
static from_array(array: ndarray[Any, dtype[uint8]]) PntsHeader[source]

Create a PntsHeader from an array

magic_value: Literal[b'b3dm', b'pnts']
to_array() ndarray[Any, dtype[uint8]][source]

Returns the header as a numpy array.

version: int