Remove all inheritDoc tags from src/ol/geom
This commit is contained in:
@@ -36,7 +36,6 @@ class Circle extends SimpleGeometry {
|
|||||||
/**
|
/**
|
||||||
* Make a complete copy of the geometry.
|
* Make a complete copy of the geometry.
|
||||||
* @return {!Circle} Clone.
|
* @return {!Circle} Clone.
|
||||||
* @override
|
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
clone() {
|
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) {
|
closestPointXY(x, y, closestPoint, minSquaredDistance) {
|
||||||
const flatCoordinates = this.flatCoordinates;
|
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) {
|
containsXY(x, y) {
|
||||||
const flatCoordinates = this.flatCoordinates;
|
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) {
|
computeExtent(extent) {
|
||||||
const flatCoordinates = this.flatCoordinates;
|
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
|
* @api
|
||||||
*/
|
*/
|
||||||
getType() {
|
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
|
* @api
|
||||||
*/
|
*/
|
||||||
intersectsExtent(extent) {
|
intersectsExtent(extent) {
|
||||||
@@ -193,16 +203,10 @@ class Circle extends SimpleGeometry {
|
|||||||
this.changed();
|
this.changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
*/
|
|
||||||
getCoordinates() {
|
getCoordinates() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
*/
|
|
||||||
setCoordinates(coordinates, opt_layout) {}
|
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
|
* @api
|
||||||
*/
|
*/
|
||||||
rotate(angle, anchor) {
|
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
|
* @api
|
||||||
*/
|
*/
|
||||||
translate(deltaX, deltaY) {
|
translate(deltaX, deltaY) {
|
||||||
|
|||||||
@@ -184,8 +184,7 @@ class Geometry extends BaseObject {
|
|||||||
* coordinates in place.
|
* coordinates in place.
|
||||||
* @abstract
|
* @abstract
|
||||||
* @param {number} sx The scaling factor in the x-direction.
|
* @param {number} sx The scaling factor in the x-direction.
|
||||||
* @param {number=} opt_sy The scaling factor in the y-direction (defaults to
|
* @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx).
|
||||||
* sx).
|
|
||||||
* @param {import("../coordinate.js").Coordinate=} opt_anchor The scale origin (defaults to the center
|
* @param {import("../coordinate.js").Coordinate=} opt_anchor The scale origin (defaults to the center
|
||||||
* of the geometry extent).
|
* of the geometry extent).
|
||||||
* @api
|
* @api
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ class GeometryCollection extends Geometry {
|
|||||||
/**
|
/**
|
||||||
* Make a complete copy of the geometry.
|
* Make a complete copy of the geometry.
|
||||||
* @return {!GeometryCollection} Clone.
|
* @return {!GeometryCollection} Clone.
|
||||||
* @override
|
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
clone() {
|
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) {
|
closestPointXY(x, y, closestPoint, minSquaredDistance) {
|
||||||
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
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) {
|
containsXY(x, y) {
|
||||||
const geometries = this.geometries_;
|
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) {
|
computeExtent(extent) {
|
||||||
createOrUpdateEmpty(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) {
|
getSimplifiedGeometry(squaredTolerance) {
|
||||||
if (this.simplifiedGeometryRevision !== this.getRevision()) {
|
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
|
* @api
|
||||||
*/
|
*/
|
||||||
getType() {
|
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
|
* @api
|
||||||
*/
|
*/
|
||||||
intersectsExtent(extent) {
|
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
|
* @api
|
||||||
*/
|
*/
|
||||||
rotate(angle, anchor) {
|
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
|
* @api
|
||||||
*/
|
*/
|
||||||
scale(sx, opt_sy, opt_anchor) {
|
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
|
* @api
|
||||||
*/
|
*/
|
||||||
applyTransform(transformFn) {
|
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
|
* @api
|
||||||
*/
|
*/
|
||||||
translate(deltaX, deltaY) {
|
translate(deltaX, deltaY) {
|
||||||
@@ -279,7 +308,7 @@ class GeometryCollection extends Geometry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* Clean up.
|
||||||
*/
|
*/
|
||||||
disposeInternal() {
|
disposeInternal() {
|
||||||
this.unlistenGeometriesChange_();
|
this.unlistenGeometriesChange_();
|
||||||
|
|||||||
@@ -81,7 +81,6 @@ class LineString extends SimpleGeometry {
|
|||||||
/**
|
/**
|
||||||
* Make a complete copy of the geometry.
|
* Make a complete copy of the geometry.
|
||||||
* @return {!LineString} Clone.
|
* @return {!LineString} Clone.
|
||||||
* @override
|
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
clone() {
|
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) {
|
closestPointXY(x, y, closestPoint, minSquaredDistance) {
|
||||||
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
||||||
@@ -147,7 +150,6 @@ class LineString extends SimpleGeometry {
|
|||||||
/**
|
/**
|
||||||
* Return the coordinates of the linestring.
|
* Return the coordinates of the linestring.
|
||||||
* @return {Array<import("../coordinate.js").Coordinate>} Coordinates.
|
* @return {Array<import("../coordinate.js").Coordinate>} Coordinates.
|
||||||
* @override
|
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
getCoordinates() {
|
getCoordinates() {
|
||||||
@@ -193,7 +195,9 @@ class LineString extends SimpleGeometry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @param {number} squaredTolerance Squared tolerance.
|
||||||
|
* @return {LineString} Simplified LineString.
|
||||||
|
* @protected
|
||||||
*/
|
*/
|
||||||
getSimplifiedGeometryInternal(squaredTolerance) {
|
getSimplifiedGeometryInternal(squaredTolerance) {
|
||||||
const simplifiedFlatCoordinates = [];
|
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
|
* @api
|
||||||
*/
|
*/
|
||||||
getType() {
|
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
|
* @api
|
||||||
*/
|
*/
|
||||||
intersectsExtent(extent) {
|
intersectsExtent(extent) {
|
||||||
@@ -225,7 +232,6 @@ class LineString extends SimpleGeometry {
|
|||||||
* Set the coordinates of the linestring.
|
* Set the coordinates of the linestring.
|
||||||
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
|
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
|
||||||
* @param {GeometryLayout=} opt_layout Layout.
|
* @param {GeometryLayout=} opt_layout Layout.
|
||||||
* @override
|
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
setCoordinates(coordinates, opt_layout) {
|
setCoordinates(coordinates, opt_layout) {
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ class LinearRing extends SimpleGeometry {
|
|||||||
/**
|
/**
|
||||||
* Make a complete copy of the geometry.
|
* Make a complete copy of the geometry.
|
||||||
* @return {!LinearRing} Clone.
|
* @return {!LinearRing} Clone.
|
||||||
* @override
|
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
clone() {
|
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) {
|
closestPointXY(x, y, closestPoint, minSquaredDistance) {
|
||||||
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
||||||
@@ -88,7 +91,6 @@ class LinearRing extends SimpleGeometry {
|
|||||||
/**
|
/**
|
||||||
* Return the coordinates of the linear ring.
|
* Return the coordinates of the linear ring.
|
||||||
* @return {Array<import("../coordinate.js").Coordinate>} Coordinates.
|
* @return {Array<import("../coordinate.js").Coordinate>} Coordinates.
|
||||||
* @override
|
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
getCoordinates() {
|
getCoordinates() {
|
||||||
@@ -97,7 +99,9 @@ class LinearRing extends SimpleGeometry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @param {number} squaredTolerance Squared tolerance.
|
||||||
|
* @return {LinearRing} Simplified LinearRing.
|
||||||
|
* @protected
|
||||||
*/
|
*/
|
||||||
getSimplifiedGeometryInternal(squaredTolerance) {
|
getSimplifiedGeometryInternal(squaredTolerance) {
|
||||||
const simplifiedFlatCoordinates = [];
|
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
|
* @api
|
||||||
*/
|
*/
|
||||||
getType() {
|
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) {
|
intersectsExtent(extent) {
|
||||||
return false;
|
return false;
|
||||||
@@ -126,7 +134,6 @@ class LinearRing extends SimpleGeometry {
|
|||||||
* Set the coordinates of the linear ring.
|
* Set the coordinates of the linear ring.
|
||||||
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
|
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
|
||||||
* @param {GeometryLayout=} opt_layout Layout.
|
* @param {GeometryLayout=} opt_layout Layout.
|
||||||
* @override
|
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
setCoordinates(coordinates, opt_layout) {
|
setCoordinates(coordinates, opt_layout) {
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ class MultiLineString extends SimpleGeometry {
|
|||||||
/**
|
/**
|
||||||
* Make a complete copy of the geometry.
|
* Make a complete copy of the geometry.
|
||||||
* @return {!MultiLineString} Clone.
|
* @return {!MultiLineString} Clone.
|
||||||
* @override
|
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
clone() {
|
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) {
|
closestPointXY(x, y, closestPoint, minSquaredDistance) {
|
||||||
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
||||||
@@ -154,7 +157,6 @@ class MultiLineString extends SimpleGeometry {
|
|||||||
/**
|
/**
|
||||||
* Return the coordinates of the multilinestring.
|
* Return the coordinates of the multilinestring.
|
||||||
* @return {Array<Array<import("../coordinate.js").Coordinate>>} Coordinates.
|
* @return {Array<Array<import("../coordinate.js").Coordinate>>} Coordinates.
|
||||||
* @override
|
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
getCoordinates() {
|
getCoordinates() {
|
||||||
@@ -224,7 +226,9 @@ class MultiLineString extends SimpleGeometry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @param {number} squaredTolerance Squared tolerance.
|
||||||
|
* @return {MultiLineString} Simplified MultiLineString.
|
||||||
|
* @protected
|
||||||
*/
|
*/
|
||||||
getSimplifiedGeometryInternal(squaredTolerance) {
|
getSimplifiedGeometryInternal(squaredTolerance) {
|
||||||
const simplifiedFlatCoordinates = [];
|
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
|
* @api
|
||||||
*/
|
*/
|
||||||
getType() {
|
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
|
* @api
|
||||||
*/
|
*/
|
||||||
intersectsExtent(extent) {
|
intersectsExtent(extent) {
|
||||||
@@ -256,7 +263,6 @@ class MultiLineString extends SimpleGeometry {
|
|||||||
* Set the coordinates of the multilinestring.
|
* Set the coordinates of the multilinestring.
|
||||||
* @param {!Array<Array<import("../coordinate.js").Coordinate>>} coordinates Coordinates.
|
* @param {!Array<Array<import("../coordinate.js").Coordinate>>} coordinates Coordinates.
|
||||||
* @param {GeometryLayout=} opt_layout Layout.
|
* @param {GeometryLayout=} opt_layout Layout.
|
||||||
* @override
|
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
setCoordinates(coordinates, opt_layout) {
|
setCoordinates(coordinates, opt_layout) {
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ class MultiPoint extends SimpleGeometry {
|
|||||||
/**
|
/**
|
||||||
* Make a complete copy of the geometry.
|
* Make a complete copy of the geometry.
|
||||||
* @return {!MultiPoint} Clone.
|
* @return {!MultiPoint} Clone.
|
||||||
* @override
|
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
clone() {
|
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) {
|
closestPointXY(x, y, closestPoint, minSquaredDistance) {
|
||||||
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
||||||
@@ -83,7 +86,6 @@ class MultiPoint extends SimpleGeometry {
|
|||||||
/**
|
/**
|
||||||
* Return the coordinates of the multipoint.
|
* Return the coordinates of the multipoint.
|
||||||
* @return {Array<import("../coordinate.js").Coordinate>} Coordinates.
|
* @return {Array<import("../coordinate.js").Coordinate>} Coordinates.
|
||||||
* @override
|
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
getCoordinates() {
|
getCoordinates() {
|
||||||
@@ -125,7 +127,8 @@ class MultiPoint extends SimpleGeometry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* Get the type of this geometry.
|
||||||
|
* @return {import("./GeometryType.js").default} Geometry type.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
getType() {
|
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
|
* @api
|
||||||
*/
|
*/
|
||||||
intersectsExtent(extent) {
|
intersectsExtent(extent) {
|
||||||
@@ -153,7 +158,6 @@ class MultiPoint extends SimpleGeometry {
|
|||||||
* Set the coordinates of the multipoint.
|
* Set the coordinates of the multipoint.
|
||||||
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
|
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
|
||||||
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
|
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
|
||||||
* @override
|
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
setCoordinates(coordinates, opt_layout) {
|
setCoordinates(coordinates, opt_layout) {
|
||||||
|
|||||||
@@ -138,7 +138,6 @@ class MultiPolygon extends SimpleGeometry {
|
|||||||
/**
|
/**
|
||||||
* Make a complete copy of the geometry.
|
* Make a complete copy of the geometry.
|
||||||
* @return {!MultiPolygon} Clone.
|
* @return {!MultiPolygon} Clone.
|
||||||
* @override
|
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
clone() {
|
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) {
|
closestPointXY(x, y, closestPoint, minSquaredDistance) {
|
||||||
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
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) {
|
containsXY(x, y) {
|
||||||
return linearRingssContainsXY(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, 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
|
* By default, coordinate orientation will depend on how the geometry was
|
||||||
* constructed.
|
* constructed.
|
||||||
* @return {Array<Array<Array<import("../coordinate.js").Coordinate>>>} Coordinates.
|
* @return {Array<Array<Array<import("../coordinate.js").Coordinate>>>} Coordinates.
|
||||||
* @override
|
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
getCoordinates(opt_right) {
|
getCoordinates(opt_right) {
|
||||||
@@ -266,7 +270,9 @@ class MultiPolygon extends SimpleGeometry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @param {number} squaredTolerance Squared tolerance.
|
||||||
|
* @return {MultiPolygon} Simplified MultiPolygon.
|
||||||
|
* @protected
|
||||||
*/
|
*/
|
||||||
getSimplifiedGeometryInternal(squaredTolerance) {
|
getSimplifiedGeometryInternal(squaredTolerance) {
|
||||||
const simplifiedFlatCoordinates = [];
|
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
|
* @api
|
||||||
*/
|
*/
|
||||||
getType() {
|
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
|
* @api
|
||||||
*/
|
*/
|
||||||
intersectsExtent(extent) {
|
intersectsExtent(extent) {
|
||||||
@@ -352,7 +361,6 @@ class MultiPolygon extends SimpleGeometry {
|
|||||||
* Set the coordinates of the multipolygon.
|
* Set the coordinates of the multipolygon.
|
||||||
* @param {!Array<Array<Array<import("../coordinate.js").Coordinate>>>} coordinates Coordinates.
|
* @param {!Array<Array<Array<import("../coordinate.js").Coordinate>>>} coordinates Coordinates.
|
||||||
* @param {GeometryLayout=} opt_layout Layout.
|
* @param {GeometryLayout=} opt_layout Layout.
|
||||||
* @override
|
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
setCoordinates(coordinates, opt_layout) {
|
setCoordinates(coordinates, opt_layout) {
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ class Point extends SimpleGeometry {
|
|||||||
/**
|
/**
|
||||||
* Make a complete copy of the geometry.
|
* Make a complete copy of the geometry.
|
||||||
* @return {!Point} Clone.
|
* @return {!Point} Clone.
|
||||||
* @override
|
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
clone() {
|
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) {
|
closestPointXY(x, y, closestPoint, minSquaredDistance) {
|
||||||
const flatCoordinates = this.flatCoordinates;
|
const flatCoordinates = this.flatCoordinates;
|
||||||
@@ -56,7 +59,6 @@ class Point extends SimpleGeometry {
|
|||||||
/**
|
/**
|
||||||
* Return the coordinate of the point.
|
* Return the coordinate of the point.
|
||||||
* @return {import("../coordinate.js").Coordinate} Coordinates.
|
* @return {import("../coordinate.js").Coordinate} Coordinates.
|
||||||
* @override
|
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
getCoordinates() {
|
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) {
|
computeExtent(extent) {
|
||||||
return createOrUpdateFromCoordinate(this.flatCoordinates, extent);
|
return createOrUpdateFromCoordinate(this.flatCoordinates, extent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* Get the type of this geometry.
|
||||||
|
* @return {import("./GeometryType.js").default} Geometry type.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
getType() {
|
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
|
* @api
|
||||||
*/
|
*/
|
||||||
intersectsExtent(extent) {
|
intersectsExtent(extent) {
|
||||||
@@ -87,7 +94,8 @@ class Point extends SimpleGeometry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @param {!Array<*>} coordinates Coordinates.
|
||||||
|
* @param {import("./GeometryLayout.js").default=} opt_layout Layout.
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
setCoordinates(coordinates, opt_layout) {
|
setCoordinates(coordinates, opt_layout) {
|
||||||
|
|||||||
@@ -112,7 +112,6 @@ class Polygon extends SimpleGeometry {
|
|||||||
/**
|
/**
|
||||||
* Make a complete copy of the geometry.
|
* Make a complete copy of the geometry.
|
||||||
* @return {!Polygon} Clone.
|
* @return {!Polygon} Clone.
|
||||||
* @override
|
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
clone() {
|
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) {
|
closestPointXY(x, y, closestPoint, minSquaredDistance) {
|
||||||
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
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) {
|
containsXY(x, y) {
|
||||||
return linearRingsContainsXY(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, 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
|
* By default, coordinate orientation will depend on how the geometry was
|
||||||
* constructed.
|
* constructed.
|
||||||
* @return {Array<Array<import("../coordinate.js").Coordinate>>} Coordinates.
|
* @return {Array<Array<import("../coordinate.js").Coordinate>>} Coordinates.
|
||||||
* @override
|
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
getCoordinates(opt_right) {
|
getCoordinates(opt_right) {
|
||||||
@@ -281,7 +285,9 @@ class Polygon extends SimpleGeometry {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @param {number} squaredTolerance Squared tolerance.
|
||||||
|
* @return {Polygon} Simplified Polygon.
|
||||||
|
* @protected
|
||||||
*/
|
*/
|
||||||
getSimplifiedGeometryInternal(squaredTolerance) {
|
getSimplifiedGeometryInternal(squaredTolerance) {
|
||||||
const simplifiedFlatCoordinates = [];
|
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
|
* @api
|
||||||
*/
|
*/
|
||||||
getType() {
|
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
|
* @api
|
||||||
*/
|
*/
|
||||||
intersectsExtent(extent) {
|
intersectsExtent(extent) {
|
||||||
@@ -314,7 +323,6 @@ class Polygon extends SimpleGeometry {
|
|||||||
* Set the coordinates of the polygon.
|
* Set the coordinates of the polygon.
|
||||||
* @param {!Array<Array<import("../coordinate.js").Coordinate>>} coordinates Coordinates.
|
* @param {!Array<Array<import("../coordinate.js").Coordinate>>} coordinates Coordinates.
|
||||||
* @param {GeometryLayout=} opt_layout Layout.
|
* @param {GeometryLayout=} opt_layout Layout.
|
||||||
* @override
|
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
setCoordinates(coordinates, opt_layout) {
|
setCoordinates(coordinates, opt_layout) {
|
||||||
|
|||||||
@@ -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) {
|
computeExtent(extent) {
|
||||||
return createOrUpdateFromFlatCoordinates(this.flatCoordinates,
|
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) {
|
getSimplifiedGeometry(squaredTolerance) {
|
||||||
if (this.simplifiedGeometryRevision !== this.getRevision()) {
|
if (this.simplifiedGeometryRevision !== this.getRevision()) {
|
||||||
@@ -224,8 +228,7 @@ class SimpleGeometry extends Geometry {
|
|||||||
* Scale the geometry (with an optional origin). This modifies the geometry
|
* Scale the geometry (with an optional origin). This modifies the geometry
|
||||||
* coordinates in place.
|
* coordinates in place.
|
||||||
* @param {number} sx The scaling factor in the x-direction.
|
* @param {number} sx The scaling factor in the x-direction.
|
||||||
* @param {number=} opt_sy The scaling factor in the y-direction (defaults to
|
* @param {number=} opt_sy The scaling factor in the y-direction (defaults to sx).
|
||||||
* sx).
|
|
||||||
* @param {import("../coordinate.js").Coordinate=} opt_anchor The scale origin (defaults to the center
|
* @param {import("../coordinate.js").Coordinate=} opt_anchor The scale origin (defaults to the center
|
||||||
* of the geometry extent).
|
* of the geometry extent).
|
||||||
* @api
|
* @api
|
||||||
|
|||||||
Reference in New Issue
Block a user