Class: GeodesicResampler
Defined in: src/sdk/geo/GeodesicResampler.ts:14
Resamples projected geodesic (great-circle) paths between defined endpoints into series of straight line segments.
Constructors
Constructor
new GeodesicResampler(
minDistance
,dpTolerance
,maxDepth
):GeodesicResampler
Defined in: src/sdk/geo/GeodesicResampler.ts:31
Constructor.
Parameters
Parameter | Type | Description |
---|---|---|
minDistance | number | The minimum geodesic distance this resampler enforces between two adjacent resampled points, in great-arc radians. |
dpTolerance | number | The Douglas-Peucker tolerance this resampler uses when deciding whether to discard a resampled point during the line 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
GeodesicResampler
Properties
dpTolerance
readonly
dpTolerance:number
Defined in: src/sdk/geo/GeodesicResampler.ts:31
The Douglas-Peucker tolerance this resampler uses when deciding whether to discard a resampled point during the line simplification process.
maxDepth
readonly
maxDepth:number
Defined in: src/sdk/geo/GeodesicResampler.ts:31
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/GeodesicResampler.ts:31
The minimum geodesic distance this resampler enforces between two adjacent resampled points, in great-arc radians.
Methods
resample()
resample(
projection
,start
,end
,handler
):void
Defined in: src/sdk/geo/GeodesicResampler.ts:45
Resamples a projected geodesic (great-circle) path.
Parameters
Parameter | Type | Description |
---|---|---|
projection | GeoProjection | The projection to use. |
start | LatLonInterface | The start of the path. |
end | LatLonInterface | The end of the path. |
handler | GeodesicResamplerHandler | A 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.