py3dtiles package

class py3dtiles.B3dm[source]

Bases: TileContent

static from_array(array)[source]

Parameters

array : numpy.array

Returns

t : TileContent

static from_glTF(gltf, bt=None)[source]

Parameters

gltfGlTF

glTF object representing a set of objects

btBatch Table (optional)

BatchTable object containing per-feature metadata

Returns

tile : TileContent

class py3dtiles.BatchTable[source]

Bases: object

Only the JSON header has been implemented for now. According to the batch table documentation, the binary body is useful for storing long arrays of data (better performances)

add_property_from_array(propertyName, array)[source]
to_array()[source]
class py3dtiles.Feature[source]

Bases: object

static from_array(positions_dtype, positions, colors_dtype=None, colors=None)[source]

Parameters

positions_dtype : numpy.dtype

positionsnumpy.array

Array of uint8.

colors_dtype : numpy.dtype

colorsnumpy.array

Array of uint8.

Returns

f : Feature

static from_values(x, y, z, red=None, green=None, blue=None)[source]
to_array()[source]
class py3dtiles.GlTF[source]

Bases: object

static from_array(array)[source]

Parameters

array : numpy.array

Returns

glTF : GlTf

static from_binary_arrays(arrays, transform, binary=True, batched=True, uri=None, textureUri=None)[source]

Parameters

arraysarray of dictionaries

Each dictionary has the data for one geometry arrays[‘position’]: binary array of vertex positions arrays[‘normal’]: binary array of vertex normals arrays[‘uv’]: binary array of vertex texture coordinates

(Not implemented yet)

arrays[‘bbox’]: geometry bounding box (numpy.array)

transformnumpy.array

World coordinates transformation flattend matrix

Returns

glTF : GlTF

to_array()[source]
class py3dtiles.Pnts[source]

Bases: TileContent

static from_array(array)[source]

Parameters

array : numpy.array

Returns

t : TileContent

static from_features(pdtype, cdtype, features)[source]

Parameters

dtypenumpy.dtype

Numpy description of a single feature

features : Feature[]

Returns

tile : TileContent

class py3dtiles.TileContent[source]

Bases: ABC

save_as(filename)[source]
sync()[source]

Allow to synchronize headers with contents.

to_array()[source]
to_hex_str()[source]
class py3dtiles.TileContentReader[source]

Bases: object

static read_array(array)[source]
static read_file(filename)[source]
class py3dtiles.TriangleSoup[source]

Bases: object

static from_wkb_multipolygon(wkb, associatedData=[])[source]

Parameters

wkbstring

Well-Known Binary binary string describing a multipolygon

associatedDataarray

array of multipolygons containing data attached to the wkb parameter multipolygon. Must be the same size as wkb.

Returns

ts : TriangleSoup

getBbox()[source]

Parameters

Returns

Array [[minX, minY, minZ],[maxX, maxY, maxZ]]

getDataArray(index)[source]

Parameters

index: int

The index of the associated data

Returns

Binary array of vertice data

getNormalArray()[source]

Parameters

Returns

Binary array of vertice normals

getPositionArray()[source]

Parameters

Returns

Binary array of vertice positions

py3dtiles.convert_to_ecef(x, y, z, epsg_input)[source]

Subpackages

Submodules