mosaic.operations.sample#

sample(geometry, sampling, method, normal_offset=0.0, bidirectional=False, **kwargs)[source]#

Sample points from a fitted model.

Parameters:
geometryGeometry or GeometryData

Input data.

samplingfloat

Sampling rate or number of points to generate.

methodstr

Sampling method to use: - ‘distance’ : Sample by average inter-point distance - ‘points’ : Sample by total point count

normal_offsetfloat, optional

Point offset along normal vector, defaults to 0.0.

bidirectionalbool, optional

Draw inward and outward facing points at the same time. This doubles the total number of points. Default is False.

Returns:
mosaic.geometry.GeometryData

Sampled geometry.

Raises:
ValueError

If geometry has no fitted model.