Interface: GarminChartDisplayProjection
Defined in: src/garminsdk/components/charts/GarminChartDisplayProjection.ts:36
A projection used to display a chart in a Garmin terminal (airport) chart display.
Methods
convertChartToDisplay()
convertChartToDisplay(
point
,out
):Float64Array
Defined in: src/garminsdk/components/charts/GarminChartDisplayProjection.ts:104
Converts a point defined in the displayed chart's internal coordinate system to the pixel coordinates in the
display window to which the original point is projected. If this projection is not valid, then this method returns
[NaN, NaN]
.
Parameters
Parameter | Type | Description |
---|---|---|
point | ReadonlyFloat64Array | The point to convert, as [x, y] in the displayed chart's internal coordinate system. |
out | Float64Array | The array to which to write the result. |
Returns
Float64Array
The pixel coordinates in the display window, as [x, y]
, to which the specified point in the displayed
chart's internal coordinate system is projected.
convertChartToGeo()
convertChartToGeo<
T
>(point
,out
):T
Defined in: src/garminsdk/components/charts/GarminChartDisplayProjection.ts:172
Converts a set of coordinates in the displayed chart's internal coordinate system within the geo-referenced area
to the corresponding geographic coordinates. If there are no geo-referencing data available or the coordinates
fall outside the geo-referenced area, then this method returns NaN
for both latitude and longitude.
Type Parameters
Type Parameter |
---|
T extends Float64Array <ArrayBufferLike > | GeoPoint |
Parameters
Parameter | Type | Description |
---|---|---|
point | ReadonlyFloat64Array | The point to convert, as [x, y] in the displayed chart's internal coordinate system. |
out | T | The object to which to write the results. If an array is supplied, then the coordinates are returned as [lon, lat] in degrees. |
Returns
T
The geographic coordinates corresponding to the specified coordinates in the displayed chart's internal coordinate system.
convertDisplayToChart()
convertDisplayToChart(
point
,out
):Float64Array
Defined in: src/garminsdk/components/charts/GarminChartDisplayProjection.ts:115
Converts a point in the display window to a set of coordinates in the displayed chart's internal coordinate system
from which the original point is projected. If this projection is not valid, then this method returns
[NaN, NaN]
.
Parameters
Parameter | Type | Description |
---|---|---|
point | ReadonlyFloat64Array | The point to convert, as [x, y] in pixels. |
out | Float64Array | The array to which to write the result. |
Returns
Float64Array
The coordinates, as [x, y]
in the displayed chart's internal coordinate system, that is projected to
the specified point in the display window.
convertDisplayToGeo()
convertDisplayToGeo<
T
>(point
,out
):T
Defined in: src/garminsdk/components/charts/GarminChartDisplayProjection.ts:195
Converts a set of coordinates in the display window within the geo-referenced area to the corresponding geographic
coordinates. If this projection is invalid, or there are no geo-referencing data available, or the coordinates
fall outside the geo-referenced area, then this method returns NaN
for both latitude and longitude.
Type Parameters
Type Parameter |
---|
T extends Float64Array <ArrayBufferLike > | GeoPoint |
Parameters
Parameter | Type | Description |
---|---|---|
point | ReadonlyFloat64Array | The point to convert, as [x, y] in pixels. |
out | T | The object to which to write the results. If an array is supplied, then the coordinates are returned as [lon, lat] in degrees. |
Returns
T
The geographic coordinates corresponding to the specified coordinates in the display window.
convertGeoToChart()
convertGeoToChart(
point
,out
):Float64Array
Defined in: src/garminsdk/components/charts/GarminChartDisplayProjection.ts:160
Converts a set of geographic coordinates in the geo-referenced area of the displayed chart to the corresponding
coordinates in the chart's internal coordinate system, as [x, y]
. If there are no geo-referencing data available
or the geographic coordinates fall outside the geo-referenced area, then this method returns [NaN, NaN]
.
Parameters
Parameter | Type | Description |
---|---|---|
point | Readonly <Omit <Float64Array <ArrayBufferLike >, "set" | "sort" | "copyWithin" >> | Readonly <LatLonInterface > | The geographic coordinates to convert, as either [lon, lat] in degrees or a LatLonInterface . |
out | Float64Array | The array to which to write the results. |
Returns
Float64Array
The set of coordinates in the chart's internal coordinate system, as [x, y]
, corresponding to the
specified geographical coordinates.
convertGeoToDisplay()
convertGeoToDisplay(
point
,out
):Float64Array
Defined in: src/garminsdk/components/charts/GarminChartDisplayProjection.ts:184
Converts a set of geographic coordinates in the geo-referenced area of the displayed chart to the corresponding
coordinates in the display window, as [x, y]
in pixels. If this projection is invalid, or there are no
geo-referencing data available, or the geographic coordinates fall outside the geo-referenced area, then this
method returns [NaN, NaN]
.
Parameters
Parameter | Type | Description |
---|---|---|
point | Readonly <Omit <Float64Array <ArrayBufferLike >, "set" | "sort" | "copyWithin" >> | Readonly <LatLonInterface > | The geographic coordinates to convert, as either [lon, lat] in degrees or a LatLonInterface . |
out | Float64Array | The array to which to write the results. |
Returns
Float64Array
The set of coordinates in the display window, as [x, y]
in pixels, corresponding to the specified
geographical coordinates.
getChartBounds()
getChartBounds():
ReadonlyFloat64Array
Defined in: src/garminsdk/components/charts/GarminChartDisplayProjection.ts:69
Gets the boundaries of the chart area that is displayed, as [x_min, y_min, x_max, y_max]
in the chart's internal
coordinate system. (0, 0)
is the top-left corner of the chart, with the positive x axis pointing to the left and
the positive y axis pointing downward. If there is no displayed chart, then this method returns [0, 0, 0, 0]
.
Returns
The boundaries of the chart area that is displayed, as [x_min, y_min, x_max, y_max]
in the chart's
internal coordinate system.
getChartPan()
getChartPan():
ReadonlyFloat64Array
Defined in: src/garminsdk/components/charts/GarminChartDisplayProjection.ts:93
Gets the panning offset (translation) applied to the chart, as [x, y]
in units of the chart's internal
coordinate system. An offset of [0, 0]
indicates the displayed chart area is centered in the display window. If
this projection is not valid, then this method returns [0, 0]
.
Returns
The panning offset (translation) applied to the chart, as [x, y]
in units of the chart's internal
coordinate system.
getChartRotation()
getChartRotation():
number
Defined in: src/garminsdk/components/charts/GarminChartDisplayProjection.ts:84
Gets the rotation angle applied to the chart, in radians. Positive angles represent clockwise rotation. The rotation axis is always about the center of the display window. If this projection is not valid, then this method returns 0.
Returns
number
The rotation angle applied to the chart, in radians.
getChartScale()
getChartScale():
number
Defined in: src/garminsdk/components/charts/GarminChartDisplayProjection.ts:76
Gets the scaling factor applied to the chart. The scaling factor converts the displayed chart's internal coordinate system units to pixels. If this projection is not valid, then this method returns 1.
Returns
number
The scaling factor applied to the chart.
getDisplaySelection()
getDisplaySelection():
Readonly
<GarminChartDisplayProjectionDisplaySelection
>
Defined in: src/garminsdk/components/charts/GarminChartDisplayProjection.ts:41
Gets information describing the chart that is selected to be displayed.
Returns
Readonly
<GarminChartDisplayProjectionDisplaySelection
>
Information describing the chart that is selected to be displayed.
getDisplaySize()
getDisplaySize():
ReadonlyFloat64Array
Defined in: src/garminsdk/components/charts/GarminChartDisplayProjection.ts:60
Gets the size of this projection's target display window, as [width, height]
in pixels.
Returns
The size of this projection's target display window, as [width, height]
in pixels.
getGeoReferenceChartBounds()
getGeoReferenceChartBounds():
Float64Array
Defined in: src/garminsdk/components/charts/GarminChartDisplayProjection.ts:125
Gets the boundaries of the displayed chart area that is geo-referenced, as [x_min, y_min, x_max, y_max]
in the
chart's internal coordinate system. (0, 0)
is the top-left corner of the chart, with the positive x axis
pointing to the left and the positive y axis pointing downward. If there is no displayed chart or if the displayed
chart area has no geo-referencing data, then this method returns [0, 0, 0, 0]
.
Returns
Float64Array
The boundaries of the displayed chart area that is geo-referenced, as [x_min, y_min, x_max, y_max]
in
the chart's internal coordinate system.
getGeoReferenceRotation()
getGeoReferenceRotation():
number
Defined in: src/garminsdk/components/charts/GarminChartDisplayProjection.ts:149
Gets the post-projection rotation angle, in radians, of the Lambert conformal conic projection that projects a set of geographic coordinates in the geo-referenced area of the displayed chart to a set of coordinates in the chart's internal coordinate system. The rotation angle is equivalent to the angular offset of the direction of true north along the projection's central meridian from the "up" direction (negative y axis) in the chart's internal coordinate system. If geo-referencing data are not available, then this method returns 0.
Returns
number
The post-projection rotation angle, in radians, of the Lambert conformal conic projection that projects a set of geographic coordinates in the geo-referenced area of the displayed chart to a set of coordinates in the chart's internal coordinate system.
getGeoReferenceScaleFactor()
getGeoReferenceScaleFactor():
number
Defined in: src/garminsdk/components/charts/GarminChartDisplayProjection.ts:137
Gets the nominal scale factor of the Lambert conformal conic projection that projects a set of geographic coordinates in the geo-referenced area of the displayed chart to a set of coordinates in the chart's internal coordinate system. A nominal scale factor of 1 projects a geographic distance along the projection's standard parallels of 1 great-arc radian to a length of one unit in the chart's internal coordinate system. If geo-referencing data are not available, then this method returns 1.
Returns
number
The nominal scale factor of the Lambert conformal conic projection that projects a set of geographic coordinates in the geo-referenced area of the displayed chart to a set of coordinates in the chart's internal coordinate system.
isGeoReferenced()
isGeoReferenced():
boolean
Defined in: src/garminsdk/components/charts/GarminChartDisplayProjection.ts:54
Checks whether this projection has geo-referencing data available for the currently displayed chart.
Returns
boolean
Whether this projection has geo-referencing data available for the currently displayed chart.
isValid()
isValid():
boolean
Defined in: src/garminsdk/components/charts/GarminChartDisplayProjection.ts:48
Checks whether this projection is valid. This projection is considered valid if and only if a chart page is displayed, and both the displayed chart area and the target display window have non-zero areas.
Returns
boolean
Whether this projection is valid.