Work around undetected types in {function(argType):returnType} types
This commit is contained in:
@@ -22,8 +22,8 @@ var twoPi = 2 * Math.PI;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert an RGB pixel into an HCL pixel.
|
* Convert an RGB pixel into an HCL pixel.
|
||||||
* @param {ol.raster.Pixel} pixel A pixel in RGB space.
|
* @param {Array.<number>} pixel A pixel in RGB space.
|
||||||
* @return {ol.raster.Pixel} A pixel in HCL space.
|
* @return {Array.<number>} A pixel in HCL space.
|
||||||
*/
|
*/
|
||||||
function rgb2hcl(pixel) {
|
function rgb2hcl(pixel) {
|
||||||
var red = rgb2xyz(pixel[0]);
|
var red = rgb2xyz(pixel[0]);
|
||||||
@@ -57,8 +57,8 @@ function rgb2hcl(pixel) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert an HCL pixel into an RGB pixel.
|
* Convert an HCL pixel into an RGB pixel.
|
||||||
* @param {ol.raster.Pixel} pixel A pixel in HCL space.
|
* @param {Array.<number>} pixel A pixel in HCL space.
|
||||||
* @return {ol.raster.Pixel} A pixel in RGB space.
|
* @return {Array.<number>} A pixel in RGB space.
|
||||||
*/
|
*/
|
||||||
function hcl2rgb(pixel) {
|
function hcl2rgb(pixel) {
|
||||||
var h = pixel[0];
|
var h = pixel[0];
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ var bins = 10;
|
|||||||
/**
|
/**
|
||||||
* Calculate the Vegetation Greenness Index (VGI) from an input pixel. This
|
* Calculate the Vegetation Greenness Index (VGI) from an input pixel. This
|
||||||
* is a rough estimate assuming that pixel values correspond to reflectance.
|
* is a rough estimate assuming that pixel values correspond to reflectance.
|
||||||
* @param {ol.raster.Pixel} pixel An array of [R, G, B, A] values.
|
* @param {Array.<number>} pixel An array of [R, G, B, A] values.
|
||||||
* @return {number} The VGI value for the given pixel.
|
* @return {number} The VGI value for the given pixel.
|
||||||
*/
|
*/
|
||||||
function vgi(pixel) {
|
function vgi(pixel) {
|
||||||
|
|||||||
@@ -611,29 +611,23 @@ ol.proj.ProjectionLike;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A function that takes an array of input data, performs some operation, and
|
* A function that takes an array of input data, performs some operation, and
|
||||||
* returns an array of ouput data. For `'pixel'` type operations, functions
|
* returns an array of ouput data.
|
||||||
* will be called with an array of {@link ol.raster.Pixel} data and should
|
* For `pixel` type operations, the function will be called with an array of
|
||||||
* return an array of the same. For `'image'` type operations, functions will
|
* pixels, where each pixel is an array of four numbers (`[r, g, b, a]`) in the
|
||||||
* be called with an array of {@link ImageData
|
* range of 0 - 255. It should return an array of the same.
|
||||||
* https://developer.mozilla.org/en-US/docs/Web/API/ImageData} and should return
|
* For `'image'` type operations, functions will be called with an array of
|
||||||
* an array of the same. The operations are called with a second "data"
|
* {@link ImageData https://developer.mozilla.org/en-US/docs/Web/API/ImageData}
|
||||||
* argument, which can be used for storage. The data object is accessible
|
* and should return an array of the same. The operations are called with a
|
||||||
* from raster events, where it can be initialized in "beforeoperations" and
|
* second "data" argument, which can be used for storage. The data object is
|
||||||
* accessed again in "afteroperations".
|
* accessible from raster events, where it can be initialized in
|
||||||
|
* "beforeoperations" and accessed again in "afteroperations".
|
||||||
*
|
*
|
||||||
* @typedef {function((Array.<ol.raster.Pixel>|Array.<ImageData>), Object):
|
* @typedef {function((Array.<Array.<number>>|Array.<ImageData>), Object):
|
||||||
* (Array.<ol.raster.Pixel>|Array.<ImageData>)}
|
* (Array.<Array.<number>>|Array.<ImageData>)}
|
||||||
*/
|
*/
|
||||||
ol.raster.Operation;
|
ol.raster.Operation;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An array of numbers representing pixel values.
|
|
||||||
* @typedef {Array.<number>} ol.raster.Pixel
|
|
||||||
*/
|
|
||||||
ol.raster.Pixel;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {{x: number, y: number, width: number, height: number}}
|
* @typedef {{x: number, y: number, width: number, height: number}}
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user