mosaic.operations.sample#
- sample(geometry, sampling, method, normal_offset=0.0, bidirectional=False, **kwargs)[source]#
Generates new points by sampling from a fitted parametric model.
- Parameters:
- geometry
mosaic.geometry.Geometry Input data.
- samplingfloat
Sampling rate or number of points to generate.
- methodstr
Sampling method to use. If not “N points”, sampling is interpreted as a rate and converted to number of points.
- 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.
- geometry
- Returns:
mosaic.geometry.GeometrySampled geometry.
- Raises:
- ValueError
If geometry has no fitted model.