Skip to main content

Class: GeodesicResampler

Resamples projected geodesic (great-circle) paths between defined endpoints into series of straight line segments.

Constructors

constructor

new GeodesicResampler(minDistance, dpTolerance, maxDepth): GeodesicResampler

Constructor.

Parameters

NameTypeDescription
minDistancenumberThe minimum geodesic distance this resampler enforces between two adjacent resampled points, in great-arc radians.
dpTolerancenumberThe Douglas-Peucker tolerance this resampler uses when deciding whether to discard a resampled point during the line 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

GeodesicResampler

Defined in

src/sdk/geo/GeodesicResampler.ts:31

Properties

dpTolerance

Readonly dpTolerance: number

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

Defined in

src/sdk/geo/GeodesicResampler.ts:31


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/GeodesicResampler.ts:31


minDistance

Readonly minDistance: number

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

Defined in

src/sdk/geo/GeodesicResampler.ts:31

Methods

resample

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

Resamples a projected geodesic (great-circle) path.

Parameters

NameTypeDescription
projectionGeoProjectionThe projection to use.
startLatLonInterfaceThe start of the path.
endLatLonInterfaceThe end of the path.
handlerGeodesicResamplerHandlerA function to handle the resampled points. The function is called once for each resampled point, in order.

Returns

void

Throws

Error when the start and end of the path are antipodal.

Defined in

src/sdk/geo/GeodesicResampler.ts:45