Move ol.ReprojTriangle to ol/reproj/Triangulation

This commit is contained in:
Michael Kuenzli
2018-04-18 16:39:26 +02:00
parent edce9e9435
commit 4a70ae2fc0
2 changed files with 10 additions and 11 deletions

View File

@@ -7,6 +7,14 @@ import {modulo} from '../math.js';
import {getTransform} from '../proj.js';
/**
* Single triangle; consists of 3 source points and 3 target points.
* @typedef {Object} Triangle
* @property {Array.<module:ol/coordinate~Coordinate>} source
* @property {Array.<module:ol/coordinate~Coordinate>} target
*/
/**
* Maximum number of subdivision steps during raster reprojection triangulation.
* Prevents high memory usage and large number of proj4 calls (for certain
@@ -85,7 +93,7 @@ const Triangulation = function(sourceProj, targetProj, targetExtent,
this.errorThresholdSquared_ = errorThreshold * errorThreshold;
/**
* @type {Array.<ol.ReprojTriangle>}
* @type {Array.<module:ol/reproj/Triangulation~Triangle>}
* @private
*/
this.triangles_ = [];
@@ -340,7 +348,7 @@ Triangulation.prototype.calculateSourceExtent = function() {
/**
* @return {Array.<ol.ReprojTriangle>} Array of the calculated triangles.
* @return {Array.<module:ol/reproj/Triangulation~Triangle>} Array of the calculated triangles.
*/
Triangulation.prototype.getTriangles = function() {
return this.triangles_;

View File

@@ -181,15 +181,6 @@ ol.RasterOperation;
ol.RegularShapeRenderOptions;
/**
* Single triangle; consists of 3 source points and 3 target points.
*
* @typedef {{source: Array.<module:ol/coordinate~Coordinate>,
* target: Array.<module:ol/coordinate~Coordinate>}}
*/
ol.ReprojTriangle;
/**
* Number of features; bounds/extent.
* @typedef {{numberOfFeatures: number,