py3dtiles.reader.xyz_reader module
- py3dtiles.reader.xyz_reader.get_metadata(path: Path, fraction: int = 100) MetadataReaderType [source]
- py3dtiles.reader.xyz_reader.run(filename: str, offset_scale: Tuple[ndarray[Any, dtype[float64]], ndarray[Any, dtype[float64]], ndarray[Any, dtype[float64]] | None, float | None], portion: Tuple[int, ...], transformer: Transformer | None, color_scale: float | None) Generator[Tuple[ndarray[Any, dtype[float32]], ndarray[Any, dtype[uint8]], ndarray[Any, dtype[uint8]]], None, None] [source]
Reads points from a .xyz or .csv file
Consider XYZIRGB format following FME documentation(*). We do the following hypothesis and enhancements:
A header line defining columns in CSV style may be present, but will be ignored.
The separator separating the columns is automagically guessed by the reader. This is generally fail safe. It will not harm to use commonly accepted separators like space, tab, colon, semi-colon.
The order of columns is fixed. The reader does the following assumptions: - 3 columns mean XYZ - 4 columns mean XYZI - 6 columns mean XYZRGB - 7 columns mean XYZIRGB - 8 columns mean XYZIRGB followed by classification data.
Classification data must be integers only.
all columns after the 8th column will be ignored.
NOTE: we assume RGB are 8 bits components.