Skip to main content

Class: GeoProjectionPathStream

Defined in: src/sdk/graphics/path/GeoProjectionPathStream.ts:12

A path stream which transforms a path stream in geographic spherical coordinates to one in projected planar coordinates.

Extends

Constructors

Constructor

new GeoProjectionPathStream(consumer, projection, minDistance, dpTolerance, maxDepth): GeoProjectionPathStream

Defined in: src/sdk/graphics/path/GeoProjectionPathStream.ts:36

Constructor.

Parameters

ParameterTypeDescription
consumerPathStreamThe path stream that consumes this stream's transformed output.
projectionGeoProjectionThe projection this stream uses.
minDistancenumberThe minimum great-circle distance this stream's resampler enforces between two adjacent resampled points, in great-arc radians.
dpTolerancenumberThe Douglas-Peucker tolerance this stream's 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 stream's resampler. The number of resampled points is bounded from above by 2^[maxDepth] - 1.

Returns

GeoProjectionPathStream

Overrides

AbstractTransformingPathStream.constructor

Constructor

new GeoProjectionPathStream(consumer, projection, resampler): GeoProjectionPathStream

Defined in: src/sdk/graphics/path/GeoProjectionPathStream.ts:43

Constructor.

Parameters

ParameterTypeDescription
consumerPathStreamThe path stream that consumes this stream's transformed output.
projectionGeoProjectionThe projection this stream uses.
resamplerGeoCircleResamplerThe geo circle resampler this stream uses.

Returns

GeoProjectionPathStream

Overrides

AbstractTransformingPathStream.constructor

Properties

consumer

protected consumer: PathStream

Defined in: src/sdk/graphics/path/PathStream.ts:144

The path stream that consumes this stream's transformed output.

Inherited from

AbstractTransformingPathStream.consumer

Methods

arc()

arc(lon, lat, radius, startAngle, endAngle, counterClockwise?): void

Defined in: src/sdk/graphics/path/GeoProjectionPathStream.ts:158

Paths a small-circle arc.

Parameters

ParameterTypeDescription
lonnumberThe longitude of the center of the circle containing the arc, in degrees.
latnumberThe latitude of the center of the circle containing the arc, in degrees.
radiusnumberThe radius of the arc, in great-arc radians.
startAnglenumberIf the center of the circle containing the arc is not one of the poles, the true bearing, in degrees, from the center of the circle to the start of the arc; otherwise the longitude, in degrees, of the start of the arc.
endAnglenumberIf the center of the circle containing the arc is not one of the poles, the true bearing, in degrees, from the center of the circle to the end of the arc; otherwise the longitude, in degrees, of the end of the arc.
counterClockwise?booleanWhether the arc should be drawn counterclockwise. False by default.

Returns

void

Overrides

AbstractTransformingPathStream.arc


beginPath()

beginPath(): void

Defined in: src/sdk/graphics/path/GeoProjectionPathStream.ts:72

Begins a path. Erases all previous path state.

Returns

void

Overrides

AbstractTransformingPathStream.beginPath


bezierCurveTo()

bezierCurveTo(): void

Defined in: src/sdk/graphics/path/GeoProjectionPathStream.ts:133

Not supported by this path stream.

Returns

void

Throws

Error when called.

Overrides

AbstractTransformingPathStream.bezierCurveTo


closePath()

closePath(): void

Defined in: src/sdk/graphics/path/GeoProjectionPathStream.ts:215

Paths a great-circle arc from the current point to the first point defined by the current path.

Returns

void

Overrides

AbstractTransformingPathStream.closePath


getConsumer()

getConsumer(): PathStream

Defined in: src/sdk/graphics/path/PathStream.ts:148

Gets the path stream that is consuming this stream's transformed output.

Returns

PathStream

The path stream that is consuming this stream's transformed output.

Inherited from

AbstractTransformingPathStream.getConsumer


getProjection()

getProjection(): GeoProjection

Defined in: src/sdk/graphics/path/GeoProjectionPathStream.ts:59

Gets the projection used by this stream.

Returns

GeoProjection

The projection used by this stream.


lineTo()

lineTo(lon, lat): void

Defined in: src/sdk/graphics/path/GeoProjectionPathStream.ts:103

Paths a great-circle arc from the current point to a specified point.

Parameters

ParameterTypeDescription
lonnumberThe longitude of the end point, in degrees.
latnumberThe latitude of the end point, in degrees.

Returns

void

Throws

Error if the specified point is antipodal to the last pathed point.

Overrides

AbstractTransformingPathStream.lineTo


moveTo()

moveTo(lon, lat): void

Defined in: src/sdk/graphics/path/GeoProjectionPathStream.ts:82

Moves to a specified point.

Parameters

ParameterTypeDescription
lonnumberThe longitude of the point to which to move, in degrees.
latnumberThe latitude of the point to which to move, in degrees.

Returns

void

Overrides

AbstractTransformingPathStream.moveTo


quadraticCurveTo()

quadraticCurveTo(): void

Defined in: src/sdk/graphics/path/GeoProjectionPathStream.ts:141

Not supported by this path stream.

Returns

void

Throws

Error when called.

Overrides

AbstractTransformingPathStream.quadraticCurveTo


setConsumer()

setConsumer(consumer): void

Defined in: src/sdk/graphics/path/PathStream.ts:153

Sets the path stream that consumes this stream's transformed output.

Parameters

ParameterTypeDescription
consumerPathStreamThe new consuming path stream.

Returns

void

Inherited from

AbstractTransformingPathStream.setConsumer


setProjection()

setProjection(projection): void

Defined in: src/sdk/graphics/path/GeoProjectionPathStream.ts:67

Sets the projection used by this stream.

Parameters

ParameterTypeDescription
projectionGeoProjectionA projection.

Returns

void