geosoft.gxpy.geometry_utility submodule¶
Geometry utilities.
- Constants
- SPLINE_LINEAR
- SPLINE_CUBIC
- SPLINE_AKIMA
- SPLINE_NEAREST
See also
Note
Regression tests provide usage examples: Tests
-
exception
GeometryUtilityException
(message)[source]¶ Bases:
geosoft.GXRuntimeError
Exceptions from
geosoft.gxpy.geometry_utility
.New in version 9.4.
-
resample
(pp, interval, spline=1, closed=None)[source]¶ Return points resampled at a constant separation along the trace of points.
- Parameters
pp –
geosoft.gxpy.geometry.PPoint
instance, or a 2D numpy array.interval – constant sampling interval
spline –
spline method, one of:
SPLINE_LINEAR
points will be along linear line segments between points
SPLINE_CUBIC
use a minimum-curvature smooth spline
SPLINE_AKIMA
us an Akima spline, which will not over-shoot data
SPLINE_NEAREST
assign the nearest value
closed –
True
to close the line. Smooth splines will appear continuous at the join if closed. If not specified and the first and last points are the same,True
is assumed.
- Returns
geosoft.gxpy.geometry.PPoint
instance, or a 2D numpy array, matching the type passed.
New in version 9.4.