Skip to main content

Class: GeoCircleResampler

Defined in: src/sdk/geo/GeoCircleResampler.ts:111

Resamples projected great- and small-circle paths between defined endpoints into series of straight line segments and circular arcs.

Constructors

Constructor

new GeoCircleResampler(minDistance, dpTolerance, maxDepth): GeoCircleResampler

Defined in: src/sdk/geo/GeoCircleResampler.ts:162

Constructor.

Parameters

ParameterTypeDescription
minDistancenumberThe minimum great-circle distance this resampler enforces between two adjacent resampled points, in great-arc radians.
dpTolerancenumberThe Douglas-Peucker tolerance, in pixels, this resampler uses when deciding whether to discard a resampled point during the simplification process.
maxDepthnumberThe maximum depth of the resampling algorithm used by this resampler. The number of resampled points is bounded from above by 2^[maxDepth] - 1.

Returns

GeoCircleResampler

Properties

dpTolerance

readonly dpTolerance: number

Defined in: src/sdk/geo/GeoCircleResampler.ts:162

The Douglas-Peucker tolerance, in pixels, this resampler uses when deciding whether to discard a resampled point during the simplification process.


maxDepth

readonly maxDepth: number

Defined in: src/sdk/geo/GeoCircleResampler.ts:162

The maximum depth of the resampling algorithm used by this resampler. The number of resampled points is bounded from above by 2^[maxDepth] - 1.


minDistance

readonly minDistance: number

Defined in: src/sdk/geo/GeoCircleResampler.ts:162

The minimum great-circle distance this resampler enforces between two adjacent resampled points, in great-arc radians.

Methods

resample()

resample(projection, circle, start, end, handler): void

Defined in: src/sdk/geo/GeoCircleResampler.ts:176

Resamples a projected great- or small-circle path.

Parameters

ParameterTypeDescription
projectionGeoProjectionThe projection to use.
circleGeoCircleThe geo circle along which the path lies.
startReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">> | LatLonInterfaceThe start of the path.
endReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">> | LatLonInterfaceThe end of the path.
handlerGeoCircleResamplerHandlerA function to handle the resampled points. The function is called once for each resampled point, in order.

Returns

void