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
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
Parameter | Type | Description |
---|---|---|
projection | GeoProjection | The projection to use. |
circle | GeoCircle | The geo circle along which the path lies. |
start | Readonly <Omit <Float64Array , "set" | "sort" | "copyWithin" >> | LatLonInterface | The start of the path. |
end | Readonly <Omit <Float64Array , "set" | "sort" | "copyWithin" >> | 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