Class: GeoProjectionPathStreamStack
A stack of TransformingPathStreams which transforms an input in spherical geographic coordinates to planar projected coordinates. The stack contains two sub-stacks: a pre-projected stack which transforms the path before it is projected, and a post-projected stack which transforms the projected path before it is sent to the consumer. Transforming streams can be added to the top and bottom of each sub-stack. The input will be passed through each stream in the pre-projected stack from top to bottom, then projected, then passed through each stream in the post- projected stack from top to bottom, and the final transformed output will be passed to the consumer.
Hierarchy
AbstractTransformingPathStream
↳
GeoProjectionPathStreamStack
Constructors
constructor
• new GeoProjectionPathStreamStack(consumer
, projection
, minDistance
, dpTolerance
, maxDepth
): GeoProjectionPathStreamStack
Constructor.
Parameters
Name | Type | Description |
---|---|---|
consumer | PathStream | The path stream that consumes this stream's transformed output. |
projection | GeoProjection | The projection this stream uses. |
minDistance | number | The minimum great-circle distance this stream's resampler enforces between two adjacent resampled points, in great-arc radians. |
dpTolerance | number | The Douglas-Peucker tolerance this stream's 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 stream's resampler. The number of resampled points is bounded from above by 2^[maxDepth] - 1. |
Returns
Overrides
AbstractTransformingPathStream.constructor
Defined in
src/sdk/components/map/GeoProjectionPathStreamStack.ts:28
• new GeoProjectionPathStreamStack(consumer
, projection
, resampler
): GeoProjectionPathStreamStack
Constructor.
Parameters
Name | Type | Description |
---|---|---|
consumer | PathStream | The path stream that consumes this stream's transformed output. |
projection | GeoProjection | The projection this stream uses. |
resampler | GeoCircleResampler | The geo circle resampler this stream uses. |
Returns
Overrides
AbstractTransformingPathStream.constructor
Defined in
src/sdk/components/map/GeoProjectionPathStreamStack.ts:35
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(x
, y
, radius
, startAngle
, endAngle
, counterClockwise?
): void
Paths an arc.
Parameters
Name | Type | Description |
---|---|---|
x | number | The x-coordinate of the center of the circle containing the arc. |
y | number | The y-coordinate of the center of the circle containing the arc. |
radius | number | The radius of the arc. |
startAngle | number | The angle of the start of the arc, in radians. |
endAngle | number | The angle of the end of the arc, in radians. |
counterClockwise? | boolean | Whether the arc should be drawn counterclockwise. False by default. |
Returns
void
Overrides
AbstractTransformingPathStream.arc
Defined in
src/sdk/components/map/GeoProjectionPathStreamStack.ts:168
beginPath
▸ beginPath(): void
Begins a path. Erases all previous path state.
Returns
void
Overrides
AbstractTransformingPathStream.beginPath
Defined in
src/sdk/components/map/GeoProjectionPathStreamStack.ts:143
bezierCurveTo
▸ bezierCurveTo(cp1x
, cp1y
, cp2x
, cp2y
, x
, y
): void
Paths a cubic Bezier curve from the current point to a specified point.
Parameters
Name | Type | Description |
---|---|---|
cp1x | number | The x-coordinate of the first control point. |
cp1y | number | The y-coordinate of the first control point. |
cp2x | number | The x-coordinate of the second control point. |
cp2y | number | The y-coordinate of the second control point. |
x | number | The x-coordinate of the end point. |
y | number | The y-coordinate of the end point. |
Returns
void
Overrides
AbstractTransformingPathStream.bezierCurveTo
Defined in
src/sdk/components/map/GeoProjectionPathStreamStack.ts:158
closePath
▸ closePath(): void
Paths a line from the current point to the first point defined by the current path.
Returns
void
Overrides
AbstractTransformingPathStream.closePath
Defined in
src/sdk/components/map/GeoProjectionPathStreamStack.ts:173
getConsumer
▸ getConsumer(): PathStream
Gets the path stream that is consuming this stream's transformed output.
Returns
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
The projection used by this stream.
Defined in
src/sdk/components/map/GeoProjectionPathStreamStack.ts:55
lineTo
▸ lineTo(x
, y
): void
Paths a straight line from the current point to a specified point.
Parameters
Name | Type | Description |
---|---|---|
x | number | The x-coordinate of the end point. |
y | number | The y-coordinate of the end point. |
Returns
void
Overrides
AbstractTransformingPathStream.lineTo
Defined in
src/sdk/components/map/GeoProjectionPathStreamStack.ts:153
moveTo
▸ moveTo(x
, y
): void
Moves to a specified point.
Parameters
Name | Type | Description |
---|---|---|
x | number | The x-coordinate of the point to which to move. |
y | number | The y-coordinate of the point to which to move. |
Returns
void
Overrides
AbstractTransformingPathStream.moveTo
Defined in
src/sdk/components/map/GeoProjectionPathStreamStack.ts:148
popPostProjected
▸ popPostProjected(): undefined
| TransformingPathStream
Removes the top-most path stream from the post-projected stack. The removed stream will have its consumer set to NullPathStream.INSTANCE.
Returns
undefined
| TransformingPathStream
The removed path stream, or undefined if this stack was empty.
Defined in
src/sdk/components/map/GeoProjectionPathStreamStack.ts:114
popPreProjected
▸ popPreProjected(): undefined
| TransformingPathStream
Removes the top-most path stream from the pre-projected stack. The removed stream will have its consumer set to NullPathStream.INSTANCE.
Returns
undefined
| TransformingPathStream
The removed path stream, or undefined if this stack was empty.
Defined in
src/sdk/components/map/GeoProjectionPathStreamStack.ts:80
pushPostProjected
▸ pushPostProjected(stream
): void
Adds a transforming path stream to the top of the post-projected stack.
Parameters
Name | Type | Description |
---|---|---|
stream | TransformingPathStream | A transforming path stream. |
Returns
void
Defined in
src/sdk/components/map/GeoProjectionPathStreamStack.ts:105
pushPreProjected
▸ pushPreProjected(stream
): void
Adds a transforming path stream to the top of the pre-projected stack.
Parameters
Name | Type | Description |
---|---|---|
stream | TransformingPathStream | A transforming path stream. |
Returns
void
Defined in
src/sdk/components/map/GeoProjectionPathStreamStack.ts:71
quadraticCurveTo
▸ quadraticCurveTo(cpx
, cpy
, x
, y
): void
Paths a quadrative Bezier curve from the current point to a specified point.
Parameters
Name | Type | Description |
---|---|---|
cpx | number | The x-coordinate of the control point. |
cpy | number | The y-coordinate of the control point. |
x | number | The x-coordinate of the end point. |
y | number | The y-coordinate of the end point. |
Returns
void
Overrides
AbstractTransformingPathStream.quadraticCurveTo
Defined in
src/sdk/components/map/GeoProjectionPathStreamStack.ts:163
setConsumer
▸ setConsumer(consumer
): void
Sets the path stream that consumes this stream's transformed output.
Parameters
Name | Type | Description |
---|---|---|
consumer | PathStream | The new consuming path stream. |
Returns
void
Overrides
AbstractTransformingPathStream.setConsumer
Defined in
src/sdk/components/map/GeoProjectionPathStreamStack.ts:136
setProjection
▸ setProjection(projection
): void
Sets the projection used by this stream.
Parameters
Name | Type | Description |
---|---|---|
projection | GeoProjection | A projection. |
Returns
void
Defined in
src/sdk/components/map/GeoProjectionPathStreamStack.ts:63
shiftPostProjected
▸ shiftPostProjected(): undefined
| TransformingPathStream
Removes the bottom-most path stream from the post-projected stack. The removed stream will have its consumer set to NullPathStream.INSTANCE.
Returns
undefined
| TransformingPathStream
The removed path stream, or undefined if this stack was empty.
Defined in
src/sdk/components/map/GeoProjectionPathStreamStack.ts:131
shiftPreProjected
▸ shiftPreProjected(): undefined
| TransformingPathStream
Removes the bottom-most path stream from the pre-projected stack. The removed stream will have its consumer set to NullPathStream.INSTANCE.
Returns
undefined
| TransformingPathStream
The removed path stream, or undefined if this stack was empty.
Defined in
src/sdk/components/map/GeoProjectionPathStreamStack.ts:97
unshiftPostProjected
▸ unshiftPostProjected(stream
): void
Adds a transforming path stream to the bottom of the post-projected stack.
Parameters
Name | Type | Description |
---|---|---|
stream | TransformingPathStream | A transforming path stream. |
Returns
void
Defined in
src/sdk/components/map/GeoProjectionPathStreamStack.ts:122
unshiftPreProjected
▸ unshiftPreProjected(stream
): void
Adds a transforming path stream to the bottom of the pre-projected stack.
Parameters
Name | Type | Description |
---|---|---|
stream | TransformingPathStream | A transforming path stream. |
Returns
void
Defined in
src/sdk/components/map/GeoProjectionPathStreamStack.ts:88