Skip to main content

Class: GeoCircleResampler

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

Constructor.

Parameters

NameTypeDescription
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

Defined in

src/sdk/geo/GeoCircleResampler.ts:162

Properties

dpTolerance

Readonly dpTolerance: number

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

Defined in

src/sdk/geo/GeoCircleResampler.ts:162


maxDepth

Readonly maxDepth: number

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

Defined in

src/sdk/geo/GeoCircleResampler.ts:162


minDistance

Readonly minDistance: number

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

Defined in

src/sdk/geo/GeoCircleResampler.ts:162

Methods

resample

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

Resamples a projected great- or small-circle path.

Parameters

NameTypeDescription
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

Defined in

src/sdk/geo/GeoCircleResampler.ts:176