py3dtiles.tileset.content.pnts_feature_table module#

class py3dtiles.tileset.content.pnts_feature_table.PntsFeatureTable[source]#

Bases: FeatureTable[PntsFeatureTableHeader, PntsFeatureTableBody]

static from_array(tile_header: TileContentHeader, array: npt.NDArray[np.uint8]) PntsFeatureTable[source]#
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) PntsFeatureTable[source]#
get_feature_at(index: int) tuple[ndarray[Any, dtype[float32 | uint16]], ndarray[Any, dtype[uint8 | uint16]] | None, ndarray[Any, dtype[float32 | uint8]] | None][source]#
get_feature_color_at(index: int) ndarray[Any, dtype[uint8 | uint16]] | None[source]#
get_feature_normal_at(index: int) ndarray[Any, dtype[float32 | uint8]] | None[source]#
get_feature_position_at(index: int) ndarray[Any, dtype[float32 | uint16]][source]#
nb_points() int[source]#
to_array() ndarray[Any, dtype[uint8]][source]#
class py3dtiles.tileset.content.pnts_feature_table.PntsFeatureTableBody(positions: None | ndarray[Any, dtype[float32 | uint16]] = None, color: ndarray[Any, dtype[uint8 | uint16]] | None = None, normal: ndarray[Any, dtype[float32 | uint8]] | None = None)[source]#

Bases: FeatureTableBody

classmethod from_array(feature_table_header: PntsFeatureTableHeader, array: ndarray[Any, dtype[uint8]]) PntsFeatureTableBody[source]#
to_array() ndarray[Any, dtype[uint8]][source]#
class py3dtiles.tileset.content.pnts_feature_table.PntsFeatureTableHeader[source]#

Bases: FeatureTableHeader

static from_array(array: ndarray[Any, dtype[uint8]]) PntsFeatureTableHeader[source]#
static from_semantic(position_semantic: Literal[SemanticPoint.POSITION, SemanticPoint.POSITION_QUANTIZED], color_semantic: Literal[SemanticPoint.RGB, SemanticPoint.RGBA, SemanticPoint.RGB565] | None, normal_semantic: Literal[SemanticPoint.NORMAL, SemanticPoint.NORMAL_OCT16P] | None, nb_points: int, quantized_volume_offset: ndarray[Any, dtype[float32]] | None = None, quantized_volume_scale: ndarray[Any, dtype[float32]] | None = None, constant_rgba: ndarray[Any, dtype[uint8]] | None = None) PntsFeatureTableHeader[source]#
to_array() ndarray[Any, dtype[uint8]][source]#
to_json() dict[str, int | dict[str, int] | tuple[float, float, float] | list[float] | tuple[int, int, int, int]][source]#
class py3dtiles.tileset.content.pnts_feature_table.SemanticCategory(value)[source]#

Bases: Enum

An enumeration.

BATCH = 4#
COLOR = 2#
NONE = 0#
NORMAL = 3#
POSITION = 1#
class py3dtiles.tileset.content.pnts_feature_table.SemanticPoint(value)[source]#

Bases: Enum

An enumeration.

BATCH_ID = 8#
NONE = 0#
NORMAL = 6#
NORMAL_OCT16P = 7#
POSITION = 1#
POSITION_QUANTIZED = 2#
RGB = 4#
RGB565 = 5#
RGBA = 3#
py3dtiles.tileset.content.pnts_feature_table.check_array_size(array: ndarray[Any, dtype[float32 | uint16 | uint8]], semantic: SemanticPoint, nb_points: int) None[source]#

This function checks if the size of the given array is correct according semantic and nb_points. If not, it raises an InvalidPntsError exception.

py3dtiles.tileset.content.pnts_feature_table.check_semantic_type(semantic: SemanticPoint, category: SemanticCategory) None[source]#

This function checks if the category of the semantic is the same as the parameter category. If not, it raises an InvalidPntsError exception.