Class: GeoProjectionPathStreamStack
Defined in: src/sdk/components/map/GeoProjectionPathStreamStack.ts:15
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.
Extends
Constructors
Constructor
new GeoProjectionPathStreamStack(
consumer
,projection
,minDistance
,dpTolerance
,maxDepth
):GeoProjectionPathStreamStack
Defined in: src/sdk/components/map/GeoProjectionPathStreamStack.ts:31
Constructor.
Parameters
Parameter | 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
GeoProjectionPathStreamStack
Overrides
AbstractTransformingPathStream
.constructor
Constructor
new GeoProjectionPathStreamStack(
consumer
,projection
,resampler
):GeoProjectionPathStreamStack
Defined in: src/sdk/components/map/GeoProjectionPathStreamStack.ts:38
Constructor.
Parameters
Parameter | 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
GeoProjectionPathStreamStack
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/components/map/GeoProjectionPathStreamStack.ts:192
Paths a small-circle arc.
Parameters
Parameter | Type | Description |
---|---|---|
lon | number | The longitude of the center of the circle containing the arc, in degrees. |
lat | number | The latitude of the center of the circle containing the arc, in degrees. |
radius | number | The radius of the arc, in great-arc radians. |
startAngle | number | If 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. |
endAngle | number | If 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? | boolean | Whether the arc should be drawn counterclockwise. False by default. |
Returns
void
Overrides
AbstractTransformingPathStream
.arc
beginPath()
beginPath():
void
Defined in: src/sdk/components/map/GeoProjectionPathStreamStack.ts:146
Begins a path. Erases all previous path state.
Returns
void
Overrides
AbstractTransformingPathStream
.beginPath
bezierCurveTo()
bezierCurveTo(
cp1x
,cp1y
,cp2x
,cp2y
,x
,y
):void
Defined in: src/sdk/components/map/GeoProjectionPathStreamStack.ts:170
Paths a cubic Bezier curve from the current point to a specified point.
Parameters
Parameter | 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
closePath()
closePath():
void
Defined in: src/sdk/components/map/GeoProjectionPathStreamStack.ts:197
Paths a line 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
The path stream that is consuming this stream's transformed output.
Inherited from
AbstractTransformingPathStream
.getConsumer
getProjection()
getProjection():
GeoProjection
Defined in: src/sdk/components/map/GeoProjectionPathStreamStack.ts:58
Gets the projection used by this stream.
Returns
The projection used by this stream.
lineTo()
lineTo(
lon
,lat
):void
Defined in: src/sdk/components/map/GeoProjectionPathStreamStack.ts:165
Paths a great-circle arc from the current point to a specified point.
Parameters
Parameter | Type | Description |
---|---|---|
lon | number | The longitude of the end point, in degrees. |
lat | number | The 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/components/map/GeoProjectionPathStreamStack.ts:155
Moves to a specified point.
Parameters
Parameter | Type | Description |
---|---|---|
lon | number | The longitude of the point to which to move, in degrees. |
lat | number | The latitude of the point to which to move, in degrees. |
Returns
void
Overrides
AbstractTransformingPathStream
.moveTo
popPostProjected()
popPostProjected():
undefined
|TransformingPathStream
Defined in: src/sdk/components/map/GeoProjectionPathStreamStack.ts:117
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.
popPreProjected()
popPreProjected():
undefined
|TransformingPathStream
Defined in: src/sdk/components/map/GeoProjectionPathStreamStack.ts:83
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.
pushPostProjected()
pushPostProjected(
stream
):void
Defined in: src/sdk/components/map/GeoProjectionPathStreamStack.ts:108
Adds a transforming path stream to the top of the post-projected stack.
Parameters
Parameter | Type | Description |
---|---|---|
stream | TransformingPathStream | A transforming path stream. |
Returns
void
pushPreProjected()
pushPreProjected(
stream
):void
Defined in: src/sdk/components/map/GeoProjectionPathStreamStack.ts:74
Adds a transforming path stream to the top of the pre-projected stack.
Parameters
Parameter | Type | Description |
---|---|---|
stream | TransformingPathStream | A transforming path stream. |
Returns
void
quadraticCurveTo()
quadraticCurveTo(
cpx
,cpy
,x
,y
):void
Defined in: src/sdk/components/map/GeoProjectionPathStreamStack.ts:175
Paths a quadrative Bezier curve from the current point to a specified point.
Parameters
Parameter | 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
setConsumer()
setConsumer(
consumer
):void
Defined in: src/sdk/components/map/GeoProjectionPathStreamStack.ts:139
Sets the path stream that consumes this stream's transformed output.
Parameters
Parameter | Type | Description |
---|---|---|
consumer | PathStream | The new consuming path stream. |
Returns
void
Overrides
AbstractTransformingPathStream
.setConsumer
setProjection()
setProjection(
projection
):void
Defined in: src/sdk/components/map/GeoProjectionPathStreamStack.ts:66
Sets the projection used by this stream.
Parameters
Parameter | Type | Description |
---|---|---|
projection | GeoProjection | A projection. |
Returns
void
shiftPostProjected()
shiftPostProjected():
undefined
|TransformingPathStream
Defined in: src/sdk/components/map/GeoProjectionPathStreamStack.ts:134
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.
shiftPreProjected()
shiftPreProjected():
undefined
|TransformingPathStream
Defined in: src/sdk/components/map/GeoProjectionPathStreamStack.ts:100
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.
unshiftPostProjected()
unshiftPostProjected(
stream
):void
Defined in: src/sdk/components/map/GeoProjectionPathStreamStack.ts:125
Adds a transforming path stream to the bottom of the post-projected stack.
Parameters
Parameter | Type | Description |
---|---|---|
stream | TransformingPathStream | A transforming path stream. |
Returns
void
unshiftPreProjected()
unshiftPreProjected(
stream
):void
Defined in: src/sdk/components/map/GeoProjectionPathStreamStack.ts:91
Adds a transforming path stream to the bottom of the pre-projected stack.
Parameters
Parameter | Type | Description |
---|---|---|
stream | TransformingPathStream | A transforming path stream. |
Returns
void