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
Name | 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
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
Name | 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.
Defined in
src/sdk/geo/GeodesicResampler.ts:45