Class: GeoProjectionPathStream
A path stream which transforms a path stream in geographic spherical coordinates to one in projected planar coordinates.
Hierarchy
AbstractTransformingPathStream
↳
GeoProjectionPathStream
Constructors
constructor
• new GeoProjectionPathStream(consumer
, projection
, minDistance
, dpTolerance
, maxDepth
): GeoProjectionPathStream
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/graphics/path/GeoProjectionPathStream.ts:36
• new GeoProjectionPathStream(consumer
, projection
, resampler
): GeoProjectionPathStream
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/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
Name | 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
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
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/graphics/path/GeoProjectionPathStream.ts:59
lineTo
▸ lineTo(lon
, lat
): void
Paths a great-circle arc from the current point to a specified point.
Parameters
Name | 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
Defined in
src/sdk/graphics/path/GeoProjectionPathStream.ts:103
moveTo
▸ moveTo(lon
, lat
): void
Moves to a specified point.
Parameters
Name | 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
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
Name | Type | Description |
---|---|---|
consumer | PathStream | The 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
Name | Type | Description |
---|---|---|
projection | GeoProjection | A projection. |
Returns
void
Defined in
src/sdk/graphics/path/GeoProjectionPathStream.ts:67