Skip to main content

Class: GeoProjectionPathStream

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

Hierarchy

Constructors

constructor

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

Constructor.

Parameters

NameTypeDescription
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

Defined in

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

new GeoProjectionPathStream(consumer, projection, resampler): GeoProjectionPathStream

Constructor.

Parameters

NameTypeDescription
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

Defined in

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

Properties

consumer

Protected consumer: PathStream

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

Inherited from

AbstractTransformingPathStream.consumer

Defined in

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

Methods

arc

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

Paths a small-circle arc.

Parameters

NameTypeDescription
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

Defined in

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


beginPath

beginPath(): void

Begins a path. Erases all previous path state.

Returns

void

Overrides

AbstractTransformingPathStream.beginPath

Defined in

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


bezierCurveTo

bezierCurveTo(): void

Not supported by this path stream.

Returns

void

Throws

Error when called.

Overrides

AbstractTransformingPathStream.bezierCurveTo

Defined in

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


closePath

closePath(): void

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

Returns

void

Overrides

AbstractTransformingPathStream.closePath

Defined in

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


getConsumer

getConsumer(): PathStream

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

Defined in

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


getProjection

getProjection(): GeoProjection

Gets the projection used by this stream.

Returns

GeoProjection

The projection used by this stream.

Defined in

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


lineTo

lineTo(lon, lat): void

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

Parameters

NameTypeDescription
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

Defined in

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


moveTo

moveTo(lon, lat): void

Moves to a specified point.

Parameters

NameTypeDescription
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

Defined in

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


quadraticCurveTo

quadraticCurveTo(): void

Not supported by this path stream.

Returns

void

Throws

Error when called.

Overrides

AbstractTransformingPathStream.quadraticCurveTo

Defined in

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


setConsumer

setConsumer(consumer): void

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

Parameters

NameTypeDescription
consumerPathStreamThe new consuming path stream.

Returns

void

Inherited from

AbstractTransformingPathStream.setConsumer

Defined in

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


setProjection

setProjection(projection): void

Sets the projection used by this stream.

Parameters

NameTypeDescription
projectionGeoProjectionA projection.

Returns

void

Defined in

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