Reference¶
jakteristics¶
- jakteristics.compute_features(points, search_radius, *, kdtree=None, num_threads=-1, max_k_neighbors=50000, euclidean_distance=True, feature_names=None, eps=0.0)¶
Compute features for a set of points.
- Parameters
points (
ndarray
) – A contiguous (n, 3) array of xyz coordinates to query.search_radius (
float
) – The radius to query neighbors at each point.kdtree (
Optional
[cKDTree
]) – If None, the kdtree is computed from the list of points. Must be an instance of jakteristics.cKDTree (and not scipy.spatial.cKDTree).num_threads (
int
) – The number of threads (OpenMP) to use when doing the computation. Default: The number of cores on the machine.max_k_neighbors (
int
) – The maximum number of neighbors to query Larger number will use more memory, but the neighbor points are not all kept at the same time in memory. Note: if this number is smaller, the neighbor search will not be faster. The radius is used to do the query, and the neighbors are then removed according to this parameter.euclidean_distance (
bool
) – How to compute the distance between 2 points. If true, the Euclidean distance is used. If false, the sum-of-absolute-values is used (“Manhattan” distance).feature_names (
Optional
[List
[str
]]) – The feature names to compute (see constants.FEATURE_NAMES for possible values) Default: all featureseps (
float
) – Return approximate nearest neighbors; the k-th returned value is guaranteed to be no further than (1+eps) times the distance to the real k-th nearest neighbor.
- Return type
ndarray
- Returns
The computed features, one row per query point, and one column per requested feature.
jakteristics.las_utils¶
- jakteristics.las_utils.read_las_xyz(filename, with_offset=False)¶
Reads xyz coordinates of a las file, optionally as single precision floating point.
- Parameters
filename (
Union
[str
,Path
]) – The las file to readwith_offset (
bool
) – If True, returns a tuple of a float32 array of coordinates, and the las header offset If False, returns only float64 coordinates Default: False
- Return type
Union
[array
,Tuple
[ndarray
,List
[float
]]]- Returns
Depending on the with_offset parameter, either an (n x 3) array, or a tuple of an (n x 3) array and the file offset.
- jakteristics.las_utils.write_with_extra_dims(input_path, output_path, extra_dims, extra_dims_names)¶
From an existing las file, create a new las file with extra dimensions
- Parameters
input_path (
Path
) – The input las file.output_path (
Path
) – The output las file.extra_dims (
array
) – The numpy array containing geometric features.extra_dims_names (
List
) – A list of names corresponding to each column of extra_dims.