Remove all inheritDoc tags from src/ol/geom

This commit is contained in:
Frederic Junod
2020-03-25 07:41:13 +01:00
parent 6909416e9a
commit f392f6b6bb
11 changed files with 170 additions and 82 deletions

View File

@@ -36,7 +36,6 @@ class Circle extends SimpleGeometry {
/**
* Make a complete copy of the geometry.
* @return {!Circle} Clone.
* @override
* @api
*/
clone() {
@@ -44,7 +43,11 @@ class Circle extends SimpleGeometry {
}
/**
* @inheritDoc
* @param {number} x X.
* @param {number} y Y.
* @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance.
* @return {number} Minimum squared distance.
*/
closestPointXY(x, y, closestPoint, minSquaredDistance) {
const flatCoordinates = this.flatCoordinates;
@@ -72,7 +75,9 @@ class Circle extends SimpleGeometry {
}
/**
* @inheritDoc
* @param {number} x X.
* @param {number} y Y.
* @return {boolean} Contains (x, y).
*/
containsXY(x, y) {
const flatCoordinates = this.flatCoordinates;
@@ -91,7 +96,9 @@ class Circle extends SimpleGeometry {
}
/**
* @inheritDoc
* @param {import("../extent.js").Extent} extent Extent.
* @protected
* @return {import("../extent.js").Extent} extent Extent.
*/
computeExtent(extent) {
const flatCoordinates = this.flatCoordinates;
@@ -122,7 +129,8 @@ class Circle extends SimpleGeometry {
}
/**
* @inheritDoc
* Get the type of this geometry.
* @return {import("./GeometryType.js").default} Geometry type.
* @api
*/
getType() {
@@ -130,7 +138,9 @@ class Circle extends SimpleGeometry {
}
/**
* @inheritDoc
* Test if the geometry and the passed extent intersect.
* @param {import("../extent.js").Extent} extent Extent.
* @return {boolean} `true` if the geometry and the extent intersect.
* @api
*/
intersectsExtent(extent) {
@@ -193,16 +203,10 @@ class Circle extends SimpleGeometry {
this.changed();
}
/**
* @inheritDoc
*/
getCoordinates() {
return null;
}
/**
* @inheritDoc
*/
setCoordinates(coordinates, opt_layout) {}
/**
@@ -216,7 +220,10 @@ class Circle extends SimpleGeometry {
}
/**
* @inheritDoc
* Rotate the geometry around a given coordinate. This modifies the geometry
* coordinates in place.
* @param {number} angle Rotation angle in radians.
* @param {import("../coordinate.js").Coordinate} anchor The rotation center.
* @api
*/
rotate(angle, anchor) {
@@ -227,7 +234,10 @@ class Circle extends SimpleGeometry {
}
/**
* @inheritDoc
* Translate the geometry. This modifies the geometry coordinates in place. If
* instead you want a new geometry, first `clone()` this geometry.
* @param {number} deltaX Delta X.
* @param {number} deltaY Delta Y.
* @api
*/
translate(deltaX, deltaY) {

View File

@@ -184,8 +184,7 @@ class Geometry extends BaseObject {
* coordinates in place.
* @abstract
* @param {number} sx The scaling factor in the x-direction.
* @param {number=} opt_sy The scaling factor in the y-direction (defaults to
* sx).
* @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx).
* @param {import("../coordinate.js").Coordinate=} opt_anchor The scale origin (defaults to the center
* of the geometry extent).
* @api

View File

@@ -61,7 +61,6 @@ class GeometryCollection extends Geometry {
/**
* Make a complete copy of the geometry.
* @return {!GeometryCollection} Clone.
* @override
* @api
*/
clone() {
@@ -71,7 +70,11 @@ class GeometryCollection extends Geometry {
}
/**
* @inheritDoc
* @param {number} x X.
* @param {number} y Y.
* @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance.
* @return {number} Minimum squared distance.
*/
closestPointXY(x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
@@ -86,7 +89,9 @@ class GeometryCollection extends Geometry {
}
/**
* @inheritDoc
* @param {number} x X.
* @param {number} y Y.
* @return {boolean} Contains (x, y).
*/
containsXY(x, y) {
const geometries = this.geometries_;
@@ -99,7 +104,9 @@ class GeometryCollection extends Geometry {
}
/**
* @inheritDoc
* @param {import("../extent.js").Extent} extent Extent.
* @protected
* @return {import("../extent.js").Extent} extent Extent.
*/
computeExtent(extent) {
createOrUpdateEmpty(extent);
@@ -144,7 +151,9 @@ class GeometryCollection extends Geometry {
}
/**
* @inheritDoc
* Create a simplified version of this geometry using the Douglas Peucker algorithm.
* @param {number} squaredTolerance Squared tolerance.
* @return {GeometryCollection} Simplified GeometryCollection.
*/
getSimplifiedGeometry(squaredTolerance) {
if (this.simplifiedGeometryRevision !== this.getRevision()) {
@@ -179,7 +188,8 @@ class GeometryCollection extends Geometry {
}
/**
* @inheritDoc
* Get the type of this geometry.
* @return {import("./GeometryType.js").default} Geometry type.
* @api
*/
getType() {
@@ -187,7 +197,9 @@ class GeometryCollection extends Geometry {
}
/**
* @inheritDoc
* Test if the geometry and the passed extent intersect.
* @param {import("../extent.js").Extent} extent Extent.
* @return {boolean} `true` if the geometry and the extent intersect.
* @api
*/
intersectsExtent(extent) {
@@ -208,7 +220,10 @@ class GeometryCollection extends Geometry {
}
/**
* @inheritDoc
* Rotate the geometry around a given coordinate. This modifies the geometry
* coordinates in place.
* @param {number} angle Rotation angle in radians.
* @param {import("../coordinate.js").Coordinate} anchor The rotation center.
* @api
*/
rotate(angle, anchor) {
@@ -220,7 +235,13 @@ class GeometryCollection extends Geometry {
}
/**
* @inheritDoc
* Scale the geometry (with an optional origin). This modifies the geometry
* coordinates in place.
* @abstract
* @param {number} sx The scaling factor in the x-direction.
* @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx).
* @param {import("../coordinate.js").Coordinate=} opt_anchor The scale origin (defaults to the center
* of the geometry extent).
* @api
*/
scale(sx, opt_sy, opt_anchor) {
@@ -255,7 +276,12 @@ class GeometryCollection extends Geometry {
}
/**
* @inheritDoc
* Apply a transform function to the coordinates of the geometry.
* The geometry is modified in place.
* If you do not want the geometry modified in place, first `clone()` it and
* then use this function on the clone.
* @param {import("../proj.js").TransformFunction} transformFn Transform function.
* Called with a flat array of geometry coordinates.
* @api
*/
applyTransform(transformFn) {
@@ -267,7 +293,10 @@ class GeometryCollection extends Geometry {
}
/**
* @inheritDoc
* Translate the geometry. This modifies the geometry coordinates in place. If
* instead you want a new geometry, first `clone()` this geometry.
* @param {number} deltaX Delta X.
* @param {number} deltaY Delta Y.
* @api
*/
translate(deltaX, deltaY) {
@@ -279,7 +308,7 @@ class GeometryCollection extends Geometry {
}
/**
* @inheritDoc
* Clean up.
*/
disposeInternal() {
this.unlistenGeometriesChange_();

View File

@@ -81,7 +81,6 @@ class LineString extends SimpleGeometry {
/**
* Make a complete copy of the geometry.
* @return {!LineString} Clone.
* @override
* @api
*/
clone() {
@@ -89,7 +88,11 @@ class LineString extends SimpleGeometry {
}
/**
* @inheritDoc
* @param {number} x X.
* @param {number} y Y.
* @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance.
* @return {number} Minimum squared distance.
*/
closestPointXY(x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
@@ -147,7 +150,6 @@ class LineString extends SimpleGeometry {
/**
* Return the coordinates of the linestring.
* @return {Array<import("../coordinate.js").Coordinate>} Coordinates.
* @override
* @api
*/
getCoordinates() {
@@ -193,7 +195,9 @@ class LineString extends SimpleGeometry {
}
/**
* @inheritDoc
* @param {number} squaredTolerance Squared tolerance.
* @return {LineString} Simplified LineString.
* @protected
*/
getSimplifiedGeometryInternal(squaredTolerance) {
const simplifiedFlatCoordinates = [];
@@ -204,7 +208,8 @@ class LineString extends SimpleGeometry {
}
/**
* @inheritDoc
* Get the type of this geometry.
* @return {import("./GeometryType.js").default} Geometry type.
* @api
*/
getType() {
@@ -212,7 +217,9 @@ class LineString extends SimpleGeometry {
}
/**
* @inheritDoc
* Test if the geometry and the passed extent intersect.
* @param {import("../extent.js").Extent} extent Extent.
* @return {boolean} `true` if the geometry and the extent intersect.
* @api
*/
intersectsExtent(extent) {
@@ -225,7 +232,6 @@ class LineString extends SimpleGeometry {
* Set the coordinates of the linestring.
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
* @param {GeometryLayout=} opt_layout Layout.
* @override
* @api
*/
setCoordinates(coordinates, opt_layout) {

View File

@@ -52,7 +52,6 @@ class LinearRing extends SimpleGeometry {
/**
* Make a complete copy of the geometry.
* @return {!LinearRing} Clone.
* @override
* @api
*/
clone() {
@@ -60,7 +59,11 @@ class LinearRing extends SimpleGeometry {
}
/**
* @inheritDoc
* @param {number} x X.
* @param {number} y Y.
* @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance.
* @return {number} Minimum squared distance.
*/
closestPointXY(x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
@@ -88,7 +91,6 @@ class LinearRing extends SimpleGeometry {
/**
* Return the coordinates of the linear ring.
* @return {Array<import("../coordinate.js").Coordinate>} Coordinates.
* @override
* @api
*/
getCoordinates() {
@@ -97,7 +99,9 @@ class LinearRing extends SimpleGeometry {
}
/**
* @inheritDoc
* @param {number} squaredTolerance Squared tolerance.
* @return {LinearRing} Simplified LinearRing.
* @protected
*/
getSimplifiedGeometryInternal(squaredTolerance) {
const simplifiedFlatCoordinates = [];
@@ -108,7 +112,8 @@ class LinearRing extends SimpleGeometry {
}
/**
* @inheritDoc
* Get the type of this geometry.
* @return {import("./GeometryType.js").default} Geometry type.
* @api
*/
getType() {
@@ -116,7 +121,10 @@ class LinearRing extends SimpleGeometry {
}
/**
* @inheritDoc
* Test if the geometry and the passed extent intersect.
* @param {import("../extent.js").Extent} extent Extent.
* @return {boolean} `true` if the geometry and the extent intersect.
* @api
*/
intersectsExtent(extent) {
return false;
@@ -126,7 +134,6 @@ class LinearRing extends SimpleGeometry {
* Set the coordinates of the linear ring.
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
* @param {GeometryLayout=} opt_layout Layout.
* @override
* @api
*/
setCoordinates(coordinates, opt_layout) {

View File

@@ -93,7 +93,6 @@ class MultiLineString extends SimpleGeometry {
/**
* Make a complete copy of the geometry.
* @return {!MultiLineString} Clone.
* @override
* @api
*/
clone() {
@@ -101,7 +100,11 @@ class MultiLineString extends SimpleGeometry {
}
/**
* @inheritDoc
* @param {number} x X.
* @param {number} y Y.
* @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance.
* @return {number} Minimum squared distance.
*/
closestPointXY(x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
@@ -154,7 +157,6 @@ class MultiLineString extends SimpleGeometry {
/**
* Return the coordinates of the multilinestring.
* @return {Array<Array<import("../coordinate.js").Coordinate>>} Coordinates.
* @override
* @api
*/
getCoordinates() {
@@ -224,7 +226,9 @@ class MultiLineString extends SimpleGeometry {
}
/**
* @inheritDoc
* @param {number} squaredTolerance Squared tolerance.
* @return {MultiLineString} Simplified MultiLineString.
* @protected
*/
getSimplifiedGeometryInternal(squaredTolerance) {
const simplifiedFlatCoordinates = [];
@@ -236,7 +240,8 @@ class MultiLineString extends SimpleGeometry {
}
/**
* @inheritDoc
* Get the type of this geometry.
* @return {import("./GeometryType.js").default} Geometry type.
* @api
*/
getType() {
@@ -244,7 +249,9 @@ class MultiLineString extends SimpleGeometry {
}
/**
* @inheritDoc
* Test if the geometry and the passed extent intersect.
* @param {import("../extent.js").Extent} extent Extent.
* @return {boolean} `true` if the geometry and the extent intersect.
* @api
*/
intersectsExtent(extent) {
@@ -256,7 +263,6 @@ class MultiLineString extends SimpleGeometry {
* Set the coordinates of the multilinestring.
* @param {!Array<Array<import("../coordinate.js").Coordinate>>} coordinates Coordinates.
* @param {GeometryLayout=} opt_layout Layout.
* @override
* @api
*/
setCoordinates(coordinates, opt_layout) {

View File

@@ -49,7 +49,6 @@ class MultiPoint extends SimpleGeometry {
/**
* Make a complete copy of the geometry.
* @return {!MultiPoint} Clone.
* @override
* @api
*/
clone() {
@@ -58,7 +57,11 @@ class MultiPoint extends SimpleGeometry {
}
/**
* @inheritDoc
* @param {number} x X.
* @param {number} y Y.
* @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance.
* @return {number} Minimum squared distance.
*/
closestPointXY(x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
@@ -83,7 +86,6 @@ class MultiPoint extends SimpleGeometry {
/**
* Return the coordinates of the multipoint.
* @return {Array<import("../coordinate.js").Coordinate>} Coordinates.
* @override
* @api
*/
getCoordinates() {
@@ -125,7 +127,8 @@ class MultiPoint extends SimpleGeometry {
}
/**
* @inheritDoc
* Get the type of this geometry.
* @return {import("./GeometryType.js").default} Geometry type.
* @api
*/
getType() {
@@ -133,7 +136,9 @@ class MultiPoint extends SimpleGeometry {
}
/**
* @inheritDoc
* Test if the geometry and the passed extent intersect.
* @param {import("../extent.js").Extent} extent Extent.
* @return {boolean} `true` if the geometry and the extent intersect.
* @api
*/
intersectsExtent(extent) {
@@ -153,7 +158,6 @@ class MultiPoint extends SimpleGeometry {
* Set the coordinates of the multipoint.
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @override
* @api
*/
setCoordinates(coordinates, opt_layout) {

View File

@@ -138,7 +138,6 @@ class MultiPolygon extends SimpleGeometry {
/**
* Make a complete copy of the geometry.
* @return {!MultiPolygon} Clone.
* @override
* @api
*/
clone() {
@@ -153,7 +152,11 @@ class MultiPolygon extends SimpleGeometry {
}
/**
* @inheritDoc
* @param {number} x X.
* @param {number} y Y.
* @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance.
* @return {number} Minimum squared distance.
*/
closestPointXY(x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
@@ -170,7 +173,9 @@ class MultiPolygon extends SimpleGeometry {
}
/**
* @inheritDoc
* @param {number} x X.
* @param {number} y Y.
* @return {boolean} Contains (x, y).
*/
containsXY(x, y) {
return linearRingssContainsXY(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, x, y);
@@ -196,7 +201,6 @@ class MultiPolygon extends SimpleGeometry {
* By default, coordinate orientation will depend on how the geometry was
* constructed.
* @return {Array<Array<Array<import("../coordinate.js").Coordinate>>>} Coordinates.
* @override
* @api
*/
getCoordinates(opt_right) {
@@ -266,7 +270,9 @@ class MultiPolygon extends SimpleGeometry {
}
/**
* @inheritDoc
* @param {number} squaredTolerance Squared tolerance.
* @return {MultiPolygon} Simplified MultiPolygon.
* @protected
*/
getSimplifiedGeometryInternal(squaredTolerance) {
const simplifiedFlatCoordinates = [];
@@ -332,7 +338,8 @@ class MultiPolygon extends SimpleGeometry {
}
/**
* @inheritDoc
* Get the type of this geometry.
* @return {import("./GeometryType.js").default} Geometry type.
* @api
*/
getType() {
@@ -340,7 +347,9 @@ class MultiPolygon extends SimpleGeometry {
}
/**
* @inheritDoc
* Test if the geometry and the passed extent intersect.
* @param {import("../extent.js").Extent} extent Extent.
* @return {boolean} `true` if the geometry and the extent intersect.
* @api
*/
intersectsExtent(extent) {
@@ -352,7 +361,6 @@ class MultiPolygon extends SimpleGeometry {
* Set the coordinates of the multipolygon.
* @param {!Array<Array<Array<import("../coordinate.js").Coordinate>>>} coordinates Coordinates.
* @param {GeometryLayout=} opt_layout Layout.
* @override
* @api
*/
setCoordinates(coordinates, opt_layout) {

View File

@@ -27,7 +27,6 @@ class Point extends SimpleGeometry {
/**
* Make a complete copy of the geometry.
* @return {!Point} Clone.
* @override
* @api
*/
clone() {
@@ -36,7 +35,11 @@ class Point extends SimpleGeometry {
}
/**
* @inheritDoc
* @param {number} x X.
* @param {number} y Y.
* @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance.
* @return {number} Minimum squared distance.
*/
closestPointXY(x, y, closestPoint, minSquaredDistance) {
const flatCoordinates = this.flatCoordinates;
@@ -56,7 +59,6 @@ class Point extends SimpleGeometry {
/**
* Return the coordinate of the point.
* @return {import("../coordinate.js").Coordinate} Coordinates.
* @override
* @api
*/
getCoordinates() {
@@ -64,14 +66,17 @@ class Point extends SimpleGeometry {
}
/**
* @inheritDoc
* @param {import("../extent.js").Extent} extent Extent.
* @protected
* @return {import("../extent.js").Extent} extent Extent.
*/
computeExtent(extent) {
return createOrUpdateFromCoordinate(this.flatCoordinates, extent);
}
/**
* @inheritDoc
* Get the type of this geometry.
* @return {import("./GeometryType.js").default} Geometry type.
* @api
*/
getType() {
@@ -79,7 +84,9 @@ class Point extends SimpleGeometry {
}
/**
* @inheritDoc
* Test if the geometry and the passed extent intersect.
* @param {import("../extent.js").Extent} extent Extent.
* @return {boolean} `true` if the geometry and the extent intersect.
* @api
*/
intersectsExtent(extent) {
@@ -87,7 +94,8 @@ class Point extends SimpleGeometry {
}
/**
* @inheritDoc
* @param {!Array<*>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
* @api
*/
setCoordinates(coordinates, opt_layout) {

View File

@@ -112,7 +112,6 @@ class Polygon extends SimpleGeometry {
/**
* Make a complete copy of the geometry.
* @return {!Polygon} Clone.
* @override
* @api
*/
clone() {
@@ -120,7 +119,11 @@ class Polygon extends SimpleGeometry {
}
/**
* @inheritDoc
* @param {number} x X.
* @param {number} y Y.
* @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance.
* @return {number} Minimum squared distance.
*/
closestPointXY(x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
@@ -137,7 +140,9 @@ class Polygon extends SimpleGeometry {
}
/**
* @inheritDoc
* @param {number} x X.
* @param {number} y Y.
* @return {boolean} Contains (x, y).
*/
containsXY(x, y) {
return linearRingsContainsXY(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, x, y);
@@ -163,7 +168,6 @@ class Polygon extends SimpleGeometry {
* By default, coordinate orientation will depend on how the geometry was
* constructed.
* @return {Array<Array<import("../coordinate.js").Coordinate>>} Coordinates.
* @override
* @api
*/
getCoordinates(opt_right) {
@@ -281,7 +285,9 @@ class Polygon extends SimpleGeometry {
}
/**
* @inheritDoc
* @param {number} squaredTolerance Squared tolerance.
* @return {Polygon} Simplified Polygon.
* @protected
*/
getSimplifiedGeometryInternal(squaredTolerance) {
const simplifiedFlatCoordinates = [];
@@ -294,7 +300,8 @@ class Polygon extends SimpleGeometry {
}
/**
* @inheritDoc
* Get the type of this geometry.
* @return {import("./GeometryType.js").default} Geometry type.
* @api
*/
getType() {
@@ -302,7 +309,9 @@ class Polygon extends SimpleGeometry {
}
/**
* @inheritDoc
* Test if the geometry and the passed extent intersect.
* @param {import("../extent.js").Extent} extent Extent.
* @return {boolean} `true` if the geometry and the extent intersect.
* @api
*/
intersectsExtent(extent) {
@@ -314,7 +323,6 @@ class Polygon extends SimpleGeometry {
* Set the coordinates of the polygon.
* @param {!Array<Array<import("../coordinate.js").Coordinate>>} coordinates Coordinates.
* @param {GeometryLayout=} opt_layout Layout.
* @override
* @api
*/
setCoordinates(coordinates, opt_layout) {

View File

@@ -41,7 +41,9 @@ class SimpleGeometry extends Geometry {
}
/**
* @inheritDoc
* @param {import("../extent.js").Extent} extent Extent.
* @protected
* @return {import("../extent.js").Extent} extent Extent.
*/
computeExtent(extent) {
return createOrUpdateFromFlatCoordinates(this.flatCoordinates,
@@ -91,7 +93,9 @@ class SimpleGeometry extends Geometry {
}
/**
* @inheritDoc
* Create a simplified version of this geometry using the Douglas Peucker algorithm.
* @param {number} squaredTolerance Squared tolerance.
* @return {SimpleGeometry} Simplified geometry.
*/
getSimplifiedGeometry(squaredTolerance) {
if (this.simplifiedGeometryRevision !== this.getRevision()) {
@@ -224,8 +228,7 @@ class SimpleGeometry extends Geometry {
* Scale the geometry (with an optional origin). This modifies the geometry
* coordinates in place.
* @param {number} sx The scaling factor in the x-direction.
* @param {number=} opt_sy The scaling factor in the y-direction (defaults to
* sx).
* @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx).
* @param {import("../coordinate.js").Coordinate=} opt_anchor The scale origin (defaults to the center
* of the geometry extent).
* @api