geosoft.gxpy.geometry_utility submodule

Geometry utilities.

Constants:
SPLINE_LINEAR:geosoft.gxapi.VVU_SPL_LINEAR
SPLINE_CUBIC:geosoft.gxapi.VVU_SPL_CUBIC
SPLINE_AKIMA:geosoft.gxapi.VVU_SPL_AKIMA
SPLINE_NEAREST:geosoft.gxapi.VVU_SPL_NEAREST

Note

Regression tests provide usage examples: Tests

exception GeometryUtilityException(message)

Bases: geosoft.GXRuntimeError

Exceptions from geosoft.gxpy.geometry_utility.

New in version 9.4.

resample(pp, interval, spline=1, closed=None)

Return points resampled at a constant separation along the trace of points.

Parameters:
  • ppgeosoft.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
  • closedTrue 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.