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
| Parameter | Type | Description |
|---|---|---|
minDistance | number | The minimum great-circle distance this resampler enforces between two adjacent resampled points, in great-arc radians. |
dpTolerance | number | The Douglas-Peucker tolerance, in pixels, this resampler uses when deciding whether to discard a resampled point during the simplification process. |
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. |
Returns
GeoCircleResampler
Properties
dpTolerance
readonlydpTolerance: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
readonlymaxDepth: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
readonlyminDistance: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
| Parameter | Type | Description |
|---|---|---|
projection | GeoProjection | The projection to use. |
circle | ReadonlyGeoCircle | The geo circle along which the path lies. |
start | Readonly<Omit<Float64Array<ArrayBufferLike>, "set" | "sort" | "copyWithin">> | Readonly<LatLonInterface> | The start of the path. |
end | Readonly<Omit<Float64Array<ArrayBufferLike>, "set" | "sort" | "copyWithin">> | Readonly<LatLonInterface> | The end of the path. |
handler | GeoCircleResamplerHandler | A function to handle the resampled points. The function is called once for each resampled point, in order. |
Returns
void