planning
All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s

This commit is contained in:
2024-10-14 09:15:30 +02:00
parent bcba00a730
commit 6e64e138e2
21059 changed files with 2317811 additions and 1 deletions

65
node_modules/ol/geom/Circle.d.ts generated vendored Normal file
View File

@@ -0,0 +1,65 @@
export default Circle;
/**
* @classdesc
* Circle geometry.
*
* @api
*/
declare class Circle extends SimpleGeometry {
/**
* @param {!import("../coordinate.js").Coordinate} center Center.
* For internal use, flat coordinates in combination with `opt_layout` and no
* `opt_radius` are also accepted.
* @param {number} [opt_radius] Radius.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/
constructor(center: import("../coordinate.js").Coordinate, opt_radius?: number | undefined, opt_layout?: any);
/**
* Make a complete copy of the geometry.
* @return {!Circle} Clone.
* @api
*/
clone(): Circle;
/**
* Return the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.
* @return {import("../coordinate.js").Coordinate} Center.
* @api
*/
getCenter(): import("../coordinate.js").Coordinate;
/**
* Return the radius of the circle.
* @return {number} Radius.
* @api
*/
getRadius(): number;
/**
* @private
* @return {number} Radius squared.
*/
private getRadiusSquared_;
/**
* Set the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.
* @param {import("../coordinate.js").Coordinate} center Center.
* @api
*/
setCenter(center: import("../coordinate.js").Coordinate): void;
/**
* Set the center (as {@link module:ol/coordinate~Coordinate coordinate}) and the radius (as
* number) of the circle.
* @param {!import("../coordinate.js").Coordinate} center Center.
* @param {number} radius Radius.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api
*/
setCenterAndRadius(center: import("../coordinate.js").Coordinate, radius: number, opt_layout?: any): void;
getCoordinates(): null;
setCoordinates(coordinates: any, opt_layout: any): void;
/**
* Set the radius of the circle. The radius is in the units of the projection.
* @param {number} radius Radius.
* @api
*/
setRadius(radius: number): void;
}
import SimpleGeometry from "./SimpleGeometry.js";
//# sourceMappingURL=Circle.d.ts.map

1
node_modules/ol/geom/Circle.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Circle.d.ts","sourceRoot":"","sources":["../src/geom/Circle.js"],"names":[],"mappings":";AAQA;;;;;GAKG;AACH;IACE;;;;;;OAMG;IACH,oBANY,OAAO,kBAAkB,EAAE,UAAU,qDAchD;IAED;;;;OAIG;IACH,SAHa,MAAM,CAWlB;IA8CD;;;;OAIG;IACH,aAHY,OAAO,kBAAkB,EAAE,UAAU,CAKhD;IAmBD;;;;OAIG;IACH,aAHY,MAAM,CAKjB;IAED;;;OAGG;IACH,0BAIC;IAkCD;;;;OAIG;IACH,kBAHW,OAAO,kBAAkB,EAAE,UAAU,QAa/C;IAED;;;;;;;OAOG;IACH,2BALY,OAAO,kBAAkB,EAAE,UAAU,UACtC,MAAM,0BAkBhB;IAED,uBAEC;IAED,wDAA0C;IAE1C;;;;OAIG;IACH,kBAHW,MAAM,QAMhB;CAiCF"}

270
node_modules/ol/geom/Circle.js generated vendored Normal file
View File

@@ -0,0 +1,270 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/geom/Circle
*/
import SimpleGeometry from './SimpleGeometry.js';
import { createOrUpdate, forEachCorner, intersects } from '../extent.js';
import { deflateCoordinate } from './flat/deflate.js';
import { rotate, translate } from './flat/transform.js';
/**
* @classdesc
* Circle geometry.
*
* @api
*/
var Circle = /** @class */ (function (_super) {
__extends(Circle, _super);
/**
* @param {!import("../coordinate.js").Coordinate} center Center.
* For internal use, flat coordinates in combination with `opt_layout` and no
* `opt_radius` are also accepted.
* @param {number} [opt_radius] Radius.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/
function Circle(center, opt_radius, opt_layout) {
var _this = _super.call(this) || this;
if (opt_layout !== undefined && opt_radius === undefined) {
_this.setFlatCoordinates(opt_layout, center);
}
else {
var radius = opt_radius ? opt_radius : 0;
_this.setCenterAndRadius(center, radius, opt_layout);
}
return _this;
}
/**
* Make a complete copy of the geometry.
* @return {!Circle} Clone.
* @api
*/
Circle.prototype.clone = function () {
var circle = new Circle(this.flatCoordinates.slice(), undefined, this.layout);
circle.applyProperties(this);
return circle;
};
/**
* @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.
*/
Circle.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {
var flatCoordinates = this.flatCoordinates;
var dx = x - flatCoordinates[0];
var dy = y - flatCoordinates[1];
var squaredDistance = dx * dx + dy * dy;
if (squaredDistance < minSquaredDistance) {
if (squaredDistance === 0) {
for (var i = 0; i < this.stride; ++i) {
closestPoint[i] = flatCoordinates[i];
}
}
else {
var delta = this.getRadius() / Math.sqrt(squaredDistance);
closestPoint[0] = flatCoordinates[0] + delta * dx;
closestPoint[1] = flatCoordinates[1] + delta * dy;
for (var i = 2; i < this.stride; ++i) {
closestPoint[i] = flatCoordinates[i];
}
}
closestPoint.length = this.stride;
return squaredDistance;
}
else {
return minSquaredDistance;
}
};
/**
* @param {number} x X.
* @param {number} y Y.
* @return {boolean} Contains (x, y).
*/
Circle.prototype.containsXY = function (x, y) {
var flatCoordinates = this.flatCoordinates;
var dx = x - flatCoordinates[0];
var dy = y - flatCoordinates[1];
return dx * dx + dy * dy <= this.getRadiusSquared_();
};
/**
* Return the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.
* @return {import("../coordinate.js").Coordinate} Center.
* @api
*/
Circle.prototype.getCenter = function () {
return this.flatCoordinates.slice(0, this.stride);
};
/**
* @param {import("../extent.js").Extent} extent Extent.
* @protected
* @return {import("../extent.js").Extent} extent Extent.
*/
Circle.prototype.computeExtent = function (extent) {
var flatCoordinates = this.flatCoordinates;
var radius = flatCoordinates[this.stride] - flatCoordinates[0];
return createOrUpdate(flatCoordinates[0] - radius, flatCoordinates[1] - radius, flatCoordinates[0] + radius, flatCoordinates[1] + radius, extent);
};
/**
* Return the radius of the circle.
* @return {number} Radius.
* @api
*/
Circle.prototype.getRadius = function () {
return Math.sqrt(this.getRadiusSquared_());
};
/**
* @private
* @return {number} Radius squared.
*/
Circle.prototype.getRadiusSquared_ = function () {
var dx = this.flatCoordinates[this.stride] - this.flatCoordinates[0];
var dy = this.flatCoordinates[this.stride + 1] - this.flatCoordinates[1];
return dx * dx + dy * dy;
};
/**
* Get the type of this geometry.
* @return {import("./Geometry.js").Type} Geometry type.
* @api
*/
Circle.prototype.getType = function () {
return 'Circle';
};
/**
* 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
*/
Circle.prototype.intersectsExtent = function (extent) {
var circleExtent = this.getExtent();
if (intersects(extent, circleExtent)) {
var center = this.getCenter();
if (extent[0] <= center[0] && extent[2] >= center[0]) {
return true;
}
if (extent[1] <= center[1] && extent[3] >= center[1]) {
return true;
}
return forEachCorner(extent, this.intersectsCoordinate.bind(this));
}
return false;
};
/**
* Set the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.
* @param {import("../coordinate.js").Coordinate} center Center.
* @api
*/
Circle.prototype.setCenter = function (center) {
var stride = this.stride;
var radius = this.flatCoordinates[stride] - this.flatCoordinates[0];
var flatCoordinates = center.slice();
flatCoordinates[stride] = flatCoordinates[0] + radius;
for (var i = 1; i < stride; ++i) {
flatCoordinates[stride + i] = center[i];
}
this.setFlatCoordinates(this.layout, flatCoordinates);
this.changed();
};
/**
* Set the center (as {@link module:ol/coordinate~Coordinate coordinate}) and the radius (as
* number) of the circle.
* @param {!import("../coordinate.js").Coordinate} center Center.
* @param {number} radius Radius.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api
*/
Circle.prototype.setCenterAndRadius = function (center, radius, opt_layout) {
this.setLayout(opt_layout, center, 0);
if (!this.flatCoordinates) {
this.flatCoordinates = [];
}
/** @type {Array<number>} */
var flatCoordinates = this.flatCoordinates;
var offset = deflateCoordinate(flatCoordinates, 0, center, this.stride);
flatCoordinates[offset++] = flatCoordinates[0] + radius;
for (var i = 1, ii = this.stride; i < ii; ++i) {
flatCoordinates[offset++] = flatCoordinates[i];
}
flatCoordinates.length = offset;
this.changed();
};
Circle.prototype.getCoordinates = function () {
return null;
};
Circle.prototype.setCoordinates = function (coordinates, opt_layout) { };
/**
* Set the radius of the circle. The radius is in the units of the projection.
* @param {number} radius Radius.
* @api
*/
Circle.prototype.setRadius = function (radius) {
this.flatCoordinates[this.stride] = this.flatCoordinates[0] + radius;
this.changed();
};
/**
* Rotate the geometry around a given coordinate. This modifies the geometry
* coordinates in place.
* @param {number} angle Rotation angle in counter-clockwise radians.
* @param {import("../coordinate.js").Coordinate} anchor The rotation center.
* @api
*/
Circle.prototype.rotate = function (angle, anchor) {
var center = this.getCenter();
var stride = this.getStride();
this.setCenter(rotate(center, 0, center.length, stride, angle, anchor, center));
this.changed();
};
/**
* 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
*/
Circle.prototype.translate = function (deltaX, deltaY) {
var center = this.getCenter();
var stride = this.getStride();
this.setCenter(translate(center, 0, center.length, stride, deltaX, deltaY, center));
this.changed();
};
return Circle;
}(SimpleGeometry));
/**
* Transform each coordinate of the circle from one coordinate reference system
* to another. 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.
*
* Internally a circle is currently represented by two points: the center of
* the circle `[cx, cy]`, and the point to the right of the circle
* `[cx + r, cy]`. This `transform` function just transforms these two points.
* So the resulting geometry is also a circle, and that circle does not
* correspond to the shape that would be obtained by transforming every point
* of the original circle.
*
* @param {import("../proj.js").ProjectionLike} source The current projection. Can be a
* string identifier or a {@link module:ol/proj/Projection~Projection} object.
* @param {import("../proj.js").ProjectionLike} destination The desired projection. Can be a
* string identifier or a {@link module:ol/proj/Projection~Projection} object.
* @return {Circle} This geometry. Note that original geometry is
* modified in place.
* @function
* @api
*/
Circle.prototype.transform;
export default Circle;
//# sourceMappingURL=Circle.js.map

1
node_modules/ol/geom/Circle.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

200
node_modules/ol/geom/Geometry.d.ts generated vendored Normal file
View File

@@ -0,0 +1,200 @@
export default Geometry;
/**
* The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,
* `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,
* `'GeometryCollection'`, or `'Circle'`.
*/
export type Type = 'Point' | 'LineString' | 'LinearRing' | 'Polygon' | 'MultiPoint' | 'MultiLineString' | 'MultiPolygon' | 'GeometryCollection' | 'Circle';
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not
* instantiated in apps.
* Base class for vector geometries.
*
* To get notified of changes to the geometry, register a listener for the
* generic `change` event on your geometry instance.
*
* @abstract
* @api
*/
declare class Geometry extends BaseObject {
constructor();
/**
* @private
* @type {import("../extent.js").Extent}
*/
private extent_;
/**
* @private
* @type {number}
*/
private extentRevision_;
/**
* @protected
* @type {number}
*/
protected simplifiedGeometryMaxMinSquaredTolerance: number;
/**
* @protected
* @type {number}
*/
protected simplifiedGeometryRevision: number;
/**
* Get a transformed and simplified version of the geometry.
* @abstract
* @param {number} revision The geometry revision.
* @param {number} squaredTolerance Squared tolerance.
* @param {import("../proj.js").TransformFunction} [opt_transform] Optional transform function.
* @return {Geometry} Simplified geometry.
*/
simplifyTransformedInternal: (...arg0: any[]) => any;
/**
* Get a transformed and simplified version of the geometry.
* @abstract
* @param {number} squaredTolerance Squared tolerance.
* @param {import("../proj.js").TransformFunction} [opt_transform] Optional transform function.
* @return {Geometry} Simplified geometry.
*/
simplifyTransformed(squaredTolerance: number, opt_transform?: import("../proj.js").TransformFunction | undefined): Geometry;
/**
* Make a complete copy of the geometry.
* @abstract
* @return {!Geometry} Clone.
*/
clone(): Geometry;
/**
* @abstract
* @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: number, y: number, closestPoint: import("../coordinate.js").Coordinate, minSquaredDistance: number): number;
/**
* @param {number} x X.
* @param {number} y Y.
* @return {boolean} Contains (x, y).
*/
containsXY(x: number, y: number): boolean;
/**
* Return the closest point of the geometry to the passed point as
* {@link module:ol/coordinate~Coordinate coordinate}.
* @param {import("../coordinate.js").Coordinate} point Point.
* @param {import("../coordinate.js").Coordinate} [opt_closestPoint] Closest point.
* @return {import("../coordinate.js").Coordinate} Closest point.
* @api
*/
getClosestPoint(point: import("../coordinate.js").Coordinate, opt_closestPoint?: import("../coordinate.js").Coordinate | undefined): import("../coordinate.js").Coordinate;
/**
* Returns true if this geometry includes the specified coordinate. If the
* coordinate is on the boundary of the geometry, returns false.
* @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
* @return {boolean} Contains coordinate.
* @api
*/
intersectsCoordinate(coordinate: import("../coordinate.js").Coordinate): boolean;
/**
* @abstract
* @param {import("../extent.js").Extent} extent Extent.
* @protected
* @return {import("../extent.js").Extent} extent Extent.
*/
protected computeExtent(extent: import("../extent.js").Extent): import("../extent.js").Extent;
/**
* Get the extent of the geometry.
* @param {import("../extent.js").Extent} [opt_extent] Extent.
* @return {import("../extent.js").Extent} extent Extent.
* @api
*/
getExtent(opt_extent?: import("../extent.js").Extent | undefined): import("../extent.js").Extent;
/**
* Rotate the geometry around a given coordinate. This modifies the geometry
* coordinates in place.
* @abstract
* @param {number} angle Rotation angle in radians.
* @param {import("../coordinate.js").Coordinate} anchor The rotation center.
* @api
*/
rotate(angle: number, anchor: import("../coordinate.js").Coordinate): void;
/**
* 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: number, opt_sy?: number | undefined, opt_anchor?: import("../coordinate.js").Coordinate | undefined): void;
/**
* Create a simplified version of this geometry. For linestrings, this uses
* the [Douglas Peucker](https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm)
* algorithm. For polygons, a quantization-based
* simplification is used to preserve topology.
* @param {number} tolerance The tolerance distance for simplification.
* @return {Geometry} A new, simplified version of the original geometry.
* @api
*/
simplify(tolerance: number): Geometry;
/**
* Create a simplified version of this geometry using the Douglas Peucker
* algorithm.
* See https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm.
* @abstract
* @param {number} squaredTolerance Squared tolerance.
* @return {Geometry} Simplified geometry.
*/
getSimplifiedGeometry(squaredTolerance: number): Geometry;
/**
* Get the type of this geometry.
* @abstract
* @return {Type} Geometry type.
*/
getType(): Type;
/**
* 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.
* @abstract
* @param {import("../proj.js").TransformFunction} transformFn Transform function.
* Called with a flat array of geometry coordinates.
*/
applyTransform(transformFn: import("../proj.js").TransformFunction): void;
/**
* Test if the geometry and the passed extent intersect.
* @abstract
* @param {import("../extent.js").Extent} extent Extent.
* @return {boolean} `true` if the geometry and the extent intersect.
*/
intersectsExtent(extent: import("../extent.js").Extent): boolean;
/**
* Translate the geometry. This modifies the geometry coordinates in place. If
* instead you want a new geometry, first `clone()` this geometry.
* @abstract
* @param {number} deltaX Delta X.
* @param {number} deltaY Delta Y.
* @api
*/
translate(deltaX: number, deltaY: number): void;
/**
* Transform each coordinate of the geometry from one coordinate reference
* system to another. The geometry is modified in place.
* For example, a line will be transformed to a line and a circle to a circle.
* 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").ProjectionLike} source The current projection. Can be a
* string identifier or a {@link module:ol/proj/Projection~Projection} object.
* @param {import("../proj.js").ProjectionLike} destination The desired projection. Can be a
* string identifier or a {@link module:ol/proj/Projection~Projection} object.
* @return {Geometry} This geometry. Note that original geometry is
* modified in place.
* @api
*/
transform(source: import("../proj.js").ProjectionLike, destination: import("../proj.js").ProjectionLike): Geometry;
}
import BaseObject from "../Object.js";
//# sourceMappingURL=Geometry.d.ts.map

1
node_modules/ol/geom/Geometry.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Geometry.d.ts","sourceRoot":"","sources":["../src/geom/Geometry.js"],"names":[],"mappings":";;;;;;mBAqBa,OAAO,GAAG,YAAY,GAAG,YAAY,GAAG,SAAS,GAAG,YAAY,GAAG,iBAAiB,GAAG,cAAc,GAAG,oBAAoB,GAAG,QAAQ;AAWpJ;;;;;;;;;;;GAWG;AACH;IACE,cA+CC;IA5CC;;;OAGG;IACH,gBAA4B;IAE5B;;;OAGG;IACH,wBAAyB;IAEzB;;;OAGG;IACH,oDAFU,MAAM,CAEiC;IAEjD;;;OAGG;IACH,sCAFU,MAAM,CAEmB;IAEnC;;;;;;;OAOG;IACH,qDAWE;IAGJ;;;;;;OAMG;IACH,sCAJW,MAAM,uEAEL,QAAQ,CAQnB;IAED;;;;OAIG;IACH,SAFa,QAAQ,CAIpB;IAED;;;;;;;OAOG;IACH,kBANW,MAAM,KACN,MAAM,gBACN,OAAO,kBAAkB,EAAE,UAAU,sBACrC,MAAM,GACL,MAAM,CAIjB;IAED;;;;OAIG;IACH,cAJW,MAAM,KACN,MAAM,GACL,OAAO,CAKlB;IAED;;;;;;;OAOG;IACH,uBALW,OAAO,kBAAkB,EAAE,UAAU,yEAEpC,OAAO,kBAAkB,EAAE,UAAU,CAOhD;IAED;;;;;;OAMG;IACH,iCAJW,OAAO,kBAAkB,EAAE,UAAU,GACpC,OAAO,CAKlB;IAED;;;;;OAKG;IACH,gCAJW,OAAO,cAAc,EAAE,MAAM,GAE5B,OAAO,cAAc,EAAE,MAAM,CAIxC;IAED;;;;;OAKG;IACH,mEAHY,OAAO,cAAc,EAAE,MAAM,CAYxC;IAED;;;;;;;OAOG;IACH,cAJW,MAAM,UACN,OAAO,kBAAkB,EAAE,UAAU,QAK/C;IAED;;;;;;;;;OASG;IACH,UANW,MAAM,qGAQhB;IAED;;;;;;;;OAQG;IACH,oBAJW,MAAM,GACL,QAAQ,CAKnB;IAED;;;;;;;OAOG;IACH,wCAHW,MAAM,GACL,QAAQ,CAInB;IAED;;;;OAIG;IACH,WAFY,IAAI,CAIf;IAED;;;;;;;;OAQG;IACH,4BAHW,OAAO,YAAY,EAAE,iBAAiB,QAKhD;IAED;;;;;OAKG;IACH,yBAHW,OAAO,cAAc,EAAE,MAAM,GAC5B,OAAO,CAIlB;IAED;;;;;;;OAOG;IACH,kBAJW,MAAM,UACN,MAAM,QAKhB;IAED;;;;;;;;;;;;;;OAcG;IACH,kBARW,OAAO,YAAY,EAAE,cAAc,eAEnC,OAAO,YAAY,EAAE,cAAc,GAElC,QAAQ,CAwCnB;CACF"}

298
node_modules/ol/geom/Geometry.js generated vendored Normal file
View File

@@ -0,0 +1,298 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/geom/Geometry
*/
import BaseObject from '../Object.js';
import Units from '../proj/Units.js';
import { abstract } from '../util.js';
import { compose as composeTransform, create as createTransform, } from '../transform.js';
import { createEmpty, createOrUpdateEmpty, getHeight, returnOrUpdate, } from '../extent.js';
import { get as getProjection, getTransform } from '../proj.js';
import { memoizeOne } from '../functions.js';
import { transform2D } from './flat/transform.js';
/**
* @typedef {'Point' | 'LineString' | 'LinearRing' | 'Polygon' | 'MultiPoint' | 'MultiLineString' | 'MultiPolygon' | 'GeometryCollection' | 'Circle'} Type
* The geometry type. One of `'Point'`, `'LineString'`, `'LinearRing'`,
* `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`,
* `'GeometryCollection'`, or `'Circle'`.
*/
/**
* @type {import("../transform.js").Transform}
*/
var tmpTransform = createTransform();
/**
* @classdesc
* Abstract base class; normally only used for creating subclasses and not
* instantiated in apps.
* Base class for vector geometries.
*
* To get notified of changes to the geometry, register a listener for the
* generic `change` event on your geometry instance.
*
* @abstract
* @api
*/
var Geometry = /** @class */ (function (_super) {
__extends(Geometry, _super);
function Geometry() {
var _this = _super.call(this) || this;
/**
* @private
* @type {import("../extent.js").Extent}
*/
_this.extent_ = createEmpty();
/**
* @private
* @type {number}
*/
_this.extentRevision_ = -1;
/**
* @protected
* @type {number}
*/
_this.simplifiedGeometryMaxMinSquaredTolerance = 0;
/**
* @protected
* @type {number}
*/
_this.simplifiedGeometryRevision = 0;
/**
* Get a transformed and simplified version of the geometry.
* @abstract
* @param {number} revision The geometry revision.
* @param {number} squaredTolerance Squared tolerance.
* @param {import("../proj.js").TransformFunction} [opt_transform] Optional transform function.
* @return {Geometry} Simplified geometry.
*/
_this.simplifyTransformedInternal = memoizeOne(function (revision, squaredTolerance, opt_transform) {
if (!opt_transform) {
return this.getSimplifiedGeometry(squaredTolerance);
}
var clone = this.clone();
clone.applyTransform(opt_transform);
return clone.getSimplifiedGeometry(squaredTolerance);
});
return _this;
}
/**
* Get a transformed and simplified version of the geometry.
* @abstract
* @param {number} squaredTolerance Squared tolerance.
* @param {import("../proj.js").TransformFunction} [opt_transform] Optional transform function.
* @return {Geometry} Simplified geometry.
*/
Geometry.prototype.simplifyTransformed = function (squaredTolerance, opt_transform) {
return this.simplifyTransformedInternal(this.getRevision(), squaredTolerance, opt_transform);
};
/**
* Make a complete copy of the geometry.
* @abstract
* @return {!Geometry} Clone.
*/
Geometry.prototype.clone = function () {
return abstract();
};
/**
* @abstract
* @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.
*/
Geometry.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {
return abstract();
};
/**
* @param {number} x X.
* @param {number} y Y.
* @return {boolean} Contains (x, y).
*/
Geometry.prototype.containsXY = function (x, y) {
var coord = this.getClosestPoint([x, y]);
return coord[0] === x && coord[1] === y;
};
/**
* Return the closest point of the geometry to the passed point as
* {@link module:ol/coordinate~Coordinate coordinate}.
* @param {import("../coordinate.js").Coordinate} point Point.
* @param {import("../coordinate.js").Coordinate} [opt_closestPoint] Closest point.
* @return {import("../coordinate.js").Coordinate} Closest point.
* @api
*/
Geometry.prototype.getClosestPoint = function (point, opt_closestPoint) {
var closestPoint = opt_closestPoint ? opt_closestPoint : [NaN, NaN];
this.closestPointXY(point[0], point[1], closestPoint, Infinity);
return closestPoint;
};
/**
* Returns true if this geometry includes the specified coordinate. If the
* coordinate is on the boundary of the geometry, returns false.
* @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
* @return {boolean} Contains coordinate.
* @api
*/
Geometry.prototype.intersectsCoordinate = function (coordinate) {
return this.containsXY(coordinate[0], coordinate[1]);
};
/**
* @abstract
* @param {import("../extent.js").Extent} extent Extent.
* @protected
* @return {import("../extent.js").Extent} extent Extent.
*/
Geometry.prototype.computeExtent = function (extent) {
return abstract();
};
/**
* Get the extent of the geometry.
* @param {import("../extent.js").Extent} [opt_extent] Extent.
* @return {import("../extent.js").Extent} extent Extent.
* @api
*/
Geometry.prototype.getExtent = function (opt_extent) {
if (this.extentRevision_ != this.getRevision()) {
var extent = this.computeExtent(this.extent_);
if (isNaN(extent[0]) || isNaN(extent[1])) {
createOrUpdateEmpty(extent);
}
this.extentRevision_ = this.getRevision();
}
return returnOrUpdate(this.extent_, opt_extent);
};
/**
* Rotate the geometry around a given coordinate. This modifies the geometry
* coordinates in place.
* @abstract
* @param {number} angle Rotation angle in radians.
* @param {import("../coordinate.js").Coordinate} anchor The rotation center.
* @api
*/
Geometry.prototype.rotate = function (angle, anchor) {
abstract();
};
/**
* 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
*/
Geometry.prototype.scale = function (sx, opt_sy, opt_anchor) {
abstract();
};
/**
* Create a simplified version of this geometry. For linestrings, this uses
* the [Douglas Peucker](https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm)
* algorithm. For polygons, a quantization-based
* simplification is used to preserve topology.
* @param {number} tolerance The tolerance distance for simplification.
* @return {Geometry} A new, simplified version of the original geometry.
* @api
*/
Geometry.prototype.simplify = function (tolerance) {
return this.getSimplifiedGeometry(tolerance * tolerance);
};
/**
* Create a simplified version of this geometry using the Douglas Peucker
* algorithm.
* See https://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm.
* @abstract
* @param {number} squaredTolerance Squared tolerance.
* @return {Geometry} Simplified geometry.
*/
Geometry.prototype.getSimplifiedGeometry = function (squaredTolerance) {
return abstract();
};
/**
* Get the type of this geometry.
* @abstract
* @return {Type} Geometry type.
*/
Geometry.prototype.getType = function () {
return abstract();
};
/**
* 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.
* @abstract
* @param {import("../proj.js").TransformFunction} transformFn Transform function.
* Called with a flat array of geometry coordinates.
*/
Geometry.prototype.applyTransform = function (transformFn) {
abstract();
};
/**
* Test if the geometry and the passed extent intersect.
* @abstract
* @param {import("../extent.js").Extent} extent Extent.
* @return {boolean} `true` if the geometry and the extent intersect.
*/
Geometry.prototype.intersectsExtent = function (extent) {
return abstract();
};
/**
* Translate the geometry. This modifies the geometry coordinates in place. If
* instead you want a new geometry, first `clone()` this geometry.
* @abstract
* @param {number} deltaX Delta X.
* @param {number} deltaY Delta Y.
* @api
*/
Geometry.prototype.translate = function (deltaX, deltaY) {
abstract();
};
/**
* Transform each coordinate of the geometry from one coordinate reference
* system to another. The geometry is modified in place.
* For example, a line will be transformed to a line and a circle to a circle.
* 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").ProjectionLike} source The current projection. Can be a
* string identifier or a {@link module:ol/proj/Projection~Projection} object.
* @param {import("../proj.js").ProjectionLike} destination The desired projection. Can be a
* string identifier or a {@link module:ol/proj/Projection~Projection} object.
* @return {Geometry} This geometry. Note that original geometry is
* modified in place.
* @api
*/
Geometry.prototype.transform = function (source, destination) {
/** @type {import("../proj/Projection.js").default} */
var sourceProj = getProjection(source);
var transformFn = sourceProj.getUnits() == Units.TILE_PIXELS
? function (inCoordinates, outCoordinates, stride) {
var pixelExtent = sourceProj.getExtent();
var projectedExtent = sourceProj.getWorldExtent();
var scale = getHeight(projectedExtent) / getHeight(pixelExtent);
composeTransform(tmpTransform, projectedExtent[0], projectedExtent[3], scale, -scale, 0, 0, 0);
transform2D(inCoordinates, 0, inCoordinates.length, stride, tmpTransform, outCoordinates);
return getTransform(sourceProj, destination)(inCoordinates, outCoordinates, stride);
}
: getTransform(sourceProj, destination);
this.applyTransform(transformFn);
return this;
};
return Geometry;
}(BaseObject));
export default Geometry;
//# sourceMappingURL=Geometry.js.map

1
node_modules/ol/geom/Geometry.js.map generated vendored Normal file
View File

@@ -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/geom/GeometryCollection.d.ts generated vendored Normal file
View File

@@ -0,0 +1,72 @@
export default GeometryCollection;
/**
* @classdesc
* An array of {@link module:ol/geom/Geometry~Geometry} objects.
*
* @api
*/
declare class GeometryCollection extends Geometry {
/**
* @param {Array<Geometry>} [opt_geometries] Geometries.
*/
constructor(opt_geometries?: Geometry[] | undefined);
/**
* @private
* @type {Array<Geometry>}
*/
private geometries_;
/**
* @type {Array<import("../events.js").EventsKey>}
*/
changeEventsKeys_: Array<import("../events.js").EventsKey>;
/**
* @private
*/
private unlistenGeometriesChange_;
/**
* @private
*/
private listenGeometriesChange_;
/**
* Make a complete copy of the geometry.
* @return {!GeometryCollection} Clone.
* @api
*/
clone(): GeometryCollection;
/**
* Return the geometries that make up this geometry collection.
* @return {Array<Geometry>} Geometries.
* @api
*/
getGeometries(): Array<Geometry>;
/**
* @return {Array<Geometry>} Geometries.
*/
getGeometriesArray(): Array<Geometry>;
/**
* @return {Array<Geometry>} Geometries.
*/
getGeometriesArrayRecursive(): Array<Geometry>;
/**
* Create a simplified version of this geometry using the Douglas Peucker algorithm.
* @param {number} squaredTolerance Squared tolerance.
* @return {GeometryCollection} Simplified GeometryCollection.
*/
getSimplifiedGeometry(squaredTolerance: number): GeometryCollection;
/**
* @return {boolean} Is empty.
*/
isEmpty(): boolean;
/**
* Set the geometries that make up this geometry collection.
* @param {Array<Geometry>} geometries Geometries.
* @api
*/
setGeometries(geometries: Array<Geometry>): void;
/**
* @param {Array<Geometry>} geometries Geometries.
*/
setGeometriesArray(geometries: Array<Geometry>): void;
}
import Geometry from "./Geometry.js";
//# sourceMappingURL=GeometryCollection.d.ts.map

1
node_modules/ol/geom/GeometryCollection.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"GeometryCollection.d.ts","sourceRoot":"","sources":["../src/geom/GeometryCollection.js"],"names":[],"mappings":";AAaA;;;;;GAKG;AACH;IACE;;OAEG;IACH,qDAeC;IAZC;;;OAGG;IACH,oBAAyD;IAEzD;;OAEG;IACH,mBAFU,MAAM,OAAO,cAAc,EAAE,SAAS,CAAC,CAEtB;IAK7B;;OAEG;IACH,kCAGC;IAED;;OAEG;IACH,gCASC;IAED;;;;OAIG;IACH,SAHa,kBAAkB,CAQ9B;IAsDD;;;;OAIG;IACH,iBAHY,MAAM,QAAQ,CAAC,CAK1B;IAED;;OAEG;IACH,sBAFY,MAAM,QAAQ,CAAC,CAI1B;IAED;;OAEG;IACH,+BAFY,MAAM,QAAQ,CAAC,CAkB1B;IAED;;;;OAIG;IACH,wCAHW,MAAM,GACL,kBAAkB,CAmC7B;IA2BD;;OAEG;IACH,WAFY,OAAO,CAIlB;IAuCD;;;;OAIG;IACH,0BAHW,MAAM,QAAQ,CAAC,QAKzB;IAED;;OAEG;IACH,+BAFW,MAAM,QAAQ,CAAC,QAOzB;CAyCF"}

321
node_modules/ol/geom/GeometryCollection.js generated vendored Normal file
View File

@@ -0,0 +1,321 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/geom/GeometryCollection
*/
import EventType from '../events/EventType.js';
import Geometry from './Geometry.js';
import { closestSquaredDistanceXY, createOrUpdateEmpty, extend, getCenter, } from '../extent.js';
import { listen, unlistenByKey } from '../events.js';
/**
* @classdesc
* An array of {@link module:ol/geom/Geometry~Geometry} objects.
*
* @api
*/
var GeometryCollection = /** @class */ (function (_super) {
__extends(GeometryCollection, _super);
/**
* @param {Array<Geometry>} [opt_geometries] Geometries.
*/
function GeometryCollection(opt_geometries) {
var _this = _super.call(this) || this;
/**
* @private
* @type {Array<Geometry>}
*/
_this.geometries_ = opt_geometries ? opt_geometries : null;
/**
* @type {Array<import("../events.js").EventsKey>}
*/
_this.changeEventsKeys_ = [];
_this.listenGeometriesChange_();
return _this;
}
/**
* @private
*/
GeometryCollection.prototype.unlistenGeometriesChange_ = function () {
this.changeEventsKeys_.forEach(unlistenByKey);
this.changeEventsKeys_.length = 0;
};
/**
* @private
*/
GeometryCollection.prototype.listenGeometriesChange_ = function () {
if (!this.geometries_) {
return;
}
for (var i = 0, ii = this.geometries_.length; i < ii; ++i) {
this.changeEventsKeys_.push(listen(this.geometries_[i], EventType.CHANGE, this.changed, this));
}
};
/**
* Make a complete copy of the geometry.
* @return {!GeometryCollection} Clone.
* @api
*/
GeometryCollection.prototype.clone = function () {
var geometryCollection = new GeometryCollection(null);
geometryCollection.setGeometries(this.geometries_);
geometryCollection.applyProperties(this);
return geometryCollection;
};
/**
* @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.
*/
GeometryCollection.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
return minSquaredDistance;
}
var geometries = this.geometries_;
for (var i = 0, ii = geometries.length; i < ii; ++i) {
minSquaredDistance = geometries[i].closestPointXY(x, y, closestPoint, minSquaredDistance);
}
return minSquaredDistance;
};
/**
* @param {number} x X.
* @param {number} y Y.
* @return {boolean} Contains (x, y).
*/
GeometryCollection.prototype.containsXY = function (x, y) {
var geometries = this.geometries_;
for (var i = 0, ii = geometries.length; i < ii; ++i) {
if (geometries[i].containsXY(x, y)) {
return true;
}
}
return false;
};
/**
* @param {import("../extent.js").Extent} extent Extent.
* @protected
* @return {import("../extent.js").Extent} extent Extent.
*/
GeometryCollection.prototype.computeExtent = function (extent) {
createOrUpdateEmpty(extent);
var geometries = this.geometries_;
for (var i = 0, ii = geometries.length; i < ii; ++i) {
extend(extent, geometries[i].getExtent());
}
return extent;
};
/**
* Return the geometries that make up this geometry collection.
* @return {Array<Geometry>} Geometries.
* @api
*/
GeometryCollection.prototype.getGeometries = function () {
return cloneGeometries(this.geometries_);
};
/**
* @return {Array<Geometry>} Geometries.
*/
GeometryCollection.prototype.getGeometriesArray = function () {
return this.geometries_;
};
/**
* @return {Array<Geometry>} Geometries.
*/
GeometryCollection.prototype.getGeometriesArrayRecursive = function () {
/** @type {Array<Geometry>} */
var geometriesArray = [];
var geometries = this.geometries_;
for (var i = 0, ii = geometries.length; i < ii; ++i) {
if (geometries[i].getType() === this.getType()) {
geometriesArray = geometriesArray.concat(
/** @type {GeometryCollection} */ (geometries[i]).getGeometriesArrayRecursive());
}
else {
geometriesArray.push(geometries[i]);
}
}
return geometriesArray;
};
/**
* Create a simplified version of this geometry using the Douglas Peucker algorithm.
* @param {number} squaredTolerance Squared tolerance.
* @return {GeometryCollection} Simplified GeometryCollection.
*/
GeometryCollection.prototype.getSimplifiedGeometry = function (squaredTolerance) {
if (this.simplifiedGeometryRevision !== this.getRevision()) {
this.simplifiedGeometryMaxMinSquaredTolerance = 0;
this.simplifiedGeometryRevision = this.getRevision();
}
if (squaredTolerance < 0 ||
(this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&
squaredTolerance < this.simplifiedGeometryMaxMinSquaredTolerance)) {
return this;
}
var simplifiedGeometries = [];
var geometries = this.geometries_;
var simplified = false;
for (var i = 0, ii = geometries.length; i < ii; ++i) {
var geometry = geometries[i];
var simplifiedGeometry = geometry.getSimplifiedGeometry(squaredTolerance);
simplifiedGeometries.push(simplifiedGeometry);
if (simplifiedGeometry !== geometry) {
simplified = true;
}
}
if (simplified) {
var simplifiedGeometryCollection = new GeometryCollection(null);
simplifiedGeometryCollection.setGeometriesArray(simplifiedGeometries);
return simplifiedGeometryCollection;
}
else {
this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;
return this;
}
};
/**
* Get the type of this geometry.
* @return {import("./Geometry.js").Type} Geometry type.
* @api
*/
GeometryCollection.prototype.getType = function () {
return 'GeometryCollection';
};
/**
* 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
*/
GeometryCollection.prototype.intersectsExtent = function (extent) {
var geometries = this.geometries_;
for (var i = 0, ii = geometries.length; i < ii; ++i) {
if (geometries[i].intersectsExtent(extent)) {
return true;
}
}
return false;
};
/**
* @return {boolean} Is empty.
*/
GeometryCollection.prototype.isEmpty = function () {
return this.geometries_.length === 0;
};
/**
* 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
*/
GeometryCollection.prototype.rotate = function (angle, anchor) {
var geometries = this.geometries_;
for (var i = 0, ii = geometries.length; i < ii; ++i) {
geometries[i].rotate(angle, anchor);
}
this.changed();
};
/**
* 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
*/
GeometryCollection.prototype.scale = function (sx, opt_sy, opt_anchor) {
var anchor = opt_anchor;
if (!anchor) {
anchor = getCenter(this.getExtent());
}
var geometries = this.geometries_;
for (var i = 0, ii = geometries.length; i < ii; ++i) {
geometries[i].scale(sx, opt_sy, anchor);
}
this.changed();
};
/**
* Set the geometries that make up this geometry collection.
* @param {Array<Geometry>} geometries Geometries.
* @api
*/
GeometryCollection.prototype.setGeometries = function (geometries) {
this.setGeometriesArray(cloneGeometries(geometries));
};
/**
* @param {Array<Geometry>} geometries Geometries.
*/
GeometryCollection.prototype.setGeometriesArray = function (geometries) {
this.unlistenGeometriesChange_();
this.geometries_ = geometries;
this.listenGeometriesChange_();
this.changed();
};
/**
* 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
*/
GeometryCollection.prototype.applyTransform = function (transformFn) {
var geometries = this.geometries_;
for (var i = 0, ii = geometries.length; i < ii; ++i) {
geometries[i].applyTransform(transformFn);
}
this.changed();
};
/**
* 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
*/
GeometryCollection.prototype.translate = function (deltaX, deltaY) {
var geometries = this.geometries_;
for (var i = 0, ii = geometries.length; i < ii; ++i) {
geometries[i].translate(deltaX, deltaY);
}
this.changed();
};
/**
* Clean up.
*/
GeometryCollection.prototype.disposeInternal = function () {
this.unlistenGeometriesChange_();
_super.prototype.disposeInternal.call(this);
};
return GeometryCollection;
}(Geometry));
/**
* @param {Array<Geometry>} geometries Geometries.
* @return {Array<Geometry>} Cloned geometries.
*/
function cloneGeometries(geometries) {
var clonedGeometries = [];
for (var i = 0, ii = geometries.length; i < ii; ++i) {
clonedGeometries.push(geometries[i].clone());
}
return clonedGeometries;
}
export default GeometryCollection;
//# sourceMappingURL=GeometryCollection.js.map

1
node_modules/ol/geom/GeometryCollection.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

8
node_modules/ol/geom/GeometryLayout.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
declare namespace _default {
const XY: string;
const XYZ: string;
const XYM: string;
const XYZM: string;
}
export default _default;
//# sourceMappingURL=GeometryLayout.d.ts.map

1
node_modules/ol/geom/GeometryLayout.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"GeometryLayout.d.ts","sourceRoot":"","sources":["../src/geom/GeometryLayout.js"],"names":[],"mappings":""}

16
node_modules/ol/geom/GeometryLayout.js generated vendored Normal file
View File

@@ -0,0 +1,16 @@
/**
* @module ol/geom/GeometryLayout
*/
/**
* The coordinate layout for geometries, indicating whether a 3rd or 4th z ('Z')
* or measure ('M') coordinate is available. Supported values are `'XY'`,
* `'XYZ'`, `'XYM'`, `'XYZM'`.
* @enum {string}
*/
export default {
XY: 'XY',
XYZ: 'XYZ',
XYM: 'XYM',
XYZM: 'XYZM',
};
//# sourceMappingURL=GeometryLayout.js.map

1
node_modules/ol/geom/GeometryLayout.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"GeometryLayout.js","sourceRoot":"","sources":["../src/geom/GeometryLayout.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AACH,eAAe;IACb,EAAE,EAAE,IAAI;IACR,GAAG,EAAE,KAAK;IACV,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;CACb,CAAC"}

116
node_modules/ol/geom/LineString.d.ts generated vendored Normal file
View File

@@ -0,0 +1,116 @@
export default LineString;
/**
* @classdesc
* Linestring geometry.
*
* @api
*/
declare class LineString extends SimpleGeometry {
/**
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
* For internal use, flat coordinates in combination with `opt_layout` are also accepted.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/
constructor(coordinates: Array<import("../coordinate.js").Coordinate> | Array<number>, opt_layout?: any);
/**
* @private
* @type {import("../coordinate.js").Coordinate}
*/
private flatMidpoint_;
/**
* @private
* @type {number}
*/
private flatMidpointRevision_;
/**
* @private
* @type {number}
*/
private maxDelta_;
/**
* @private
* @type {number}
*/
private maxDeltaRevision_;
/**
* Append the passed coordinate to the coordinates of the linestring.
* @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
* @api
*/
appendCoordinate(coordinate: import("../coordinate.js").Coordinate): void;
/**
* Make a complete copy of the geometry.
* @return {!LineString} Clone.
* @api
*/
clone(): LineString;
/**
* Iterate over each segment, calling the provided callback.
* If the callback returns a truthy value the function returns that
* value immediately. Otherwise the function returns `false`.
*
* @param {function(this: S, import("../coordinate.js").Coordinate, import("../coordinate.js").Coordinate): T} callback Function
* called for each segment. The function will receive two arguments, the start and end coordinates of the segment.
* @return {T|boolean} Value.
* @template T,S
* @api
*/
forEachSegment<T, S>(callback: (this: S, arg1: import("../coordinate.js").Coordinate, arg2: import("../coordinate.js").Coordinate) => T): boolean | T;
/**
* Returns the coordinate at `m` using linear interpolation, or `null` if no
* such coordinate exists.
*
* `opt_extrapolate` controls extrapolation beyond the range of Ms in the
* MultiLineString. If `opt_extrapolate` is `true` then Ms less than the first
* M will return the first coordinate and Ms greater than the last M will
* return the last coordinate.
*
* @param {number} m M.
* @param {boolean} [opt_extrapolate] Extrapolate. Default is `false`.
* @return {import("../coordinate.js").Coordinate|null} Coordinate.
* @api
*/
getCoordinateAtM(m: number, opt_extrapolate?: boolean | undefined): import("../coordinate.js").Coordinate | null;
/**
* Return the coordinates of the linestring.
* @return {Array<import("../coordinate.js").Coordinate>} Coordinates.
* @api
*/
getCoordinates(): Array<import("../coordinate.js").Coordinate>;
/**
* Return the coordinate at the provided fraction along the linestring.
* The `fraction` is a number between 0 and 1, where 0 is the start of the
* linestring and 1 is the end.
* @param {number} fraction Fraction.
* @param {import("../coordinate.js").Coordinate} [opt_dest] Optional coordinate whose values will
* be modified. If not provided, a new coordinate will be returned.
* @return {import("../coordinate.js").Coordinate} Coordinate of the interpolated point.
* @api
*/
getCoordinateAt(fraction: number, opt_dest?: import("../coordinate.js").Coordinate | undefined): import("../coordinate.js").Coordinate;
/**
* Return the length of the linestring on projected plane.
* @return {number} Length (on projected plane).
* @api
*/
getLength(): number;
/**
* @return {Array<number>} Flat midpoint.
*/
getFlatMidpoint(): Array<number>;
/**
* @param {number} squaredTolerance Squared tolerance.
* @return {LineString} Simplified LineString.
* @protected
*/
protected getSimplifiedGeometryInternal(squaredTolerance: number): LineString;
/**
* Set the coordinates of the linestring.
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api
*/
setCoordinates(coordinates: Array<import("../coordinate.js").Coordinate>, opt_layout?: any): void;
}
import SimpleGeometry from "./SimpleGeometry.js";
//# sourceMappingURL=LineString.d.ts.map

1
node_modules/ol/geom/LineString.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"LineString.d.ts","sourceRoot":"","sources":["../src/geom/LineString.js"],"names":[],"mappings":";AAgBA;;;;;GAKG;AACH;IACE;;;;OAIG;IACH,yBAJW,MAAM,OAAO,kBAAkB,EAAE,UAAU,CAAC,GAAC,MAAM,MAAM,CAAC,oBA4CpE;IArCC;;;OAGG;IACH,sBAAyB;IAEzB;;;OAGG;IACH,8BAA+B;IAE/B;;;OAGG;IACH,kBAAmB;IAEnB;;;OAGG;IACH,0BAA2B;IAiB7B;;;;OAIG;IACH,6BAHW,OAAO,kBAAkB,EAAE,UAAU,QAU/C;IAED;;;;OAIG;IACH,SAHa,UAAU,CAUtB;IAuCD;;;;;;;;;;OAUG;IACH,+CAN6B,OAAO,kBAAkB,EAAE,UAAU,QAAE,OAAO,kBAAkB,EAAE,UAAU,qBAcxG;IAED;;;;;;;;;;;;;OAaG;IACH,oBALW,MAAM,0CAEL,OAAO,kBAAkB,EAAE,UAAU,GAAC,IAAI,CAmBrD;IAED;;;;OAIG;IACH,kBAHY,MAAM,OAAO,kBAAkB,EAAE,UAAU,CAAC,CAUvD;IAED;;;;;;;;;OASG;IACH,0BANW,MAAM,iEAGL,OAAO,kBAAkB,EAAE,UAAU,CAahD;IAED;;;;OAIG;IACH,aAHY,MAAM,CAUjB;IAED;;OAEG;IACH,mBAFY,MAAM,MAAM,CAAC,CAQxB;IAED;;;;OAIG;IACH,0DAJW,MAAM,GACL,UAAU,CAerB;IA2BD;;;;;OAKG;IACH,4BAJY,MAAM,OAAO,kBAAkB,EAAE,UAAU,CAAC,0BAgBvD;CACF"}

236
node_modules/ol/geom/LineString.js generated vendored Normal file
View File

@@ -0,0 +1,236 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/geom/LineString
*/
import GeometryLayout from './GeometryLayout.js';
import SimpleGeometry from './SimpleGeometry.js';
import { assignClosestPoint, maxSquaredDelta } from './flat/closest.js';
import { closestSquaredDistanceXY } from '../extent.js';
import { deflateCoordinates } from './flat/deflate.js';
import { douglasPeucker } from './flat/simplify.js';
import { extend } from '../array.js';
import { forEach as forEachSegment } from './flat/segments.js';
import { inflateCoordinates } from './flat/inflate.js';
import { interpolatePoint, lineStringCoordinateAtM } from './flat/interpolate.js';
import { intersectsLineString } from './flat/intersectsextent.js';
import { lineStringLength } from './flat/length.js';
/**
* @classdesc
* Linestring geometry.
*
* @api
*/
var LineString = /** @class */ (function (_super) {
__extends(LineString, _super);
/**
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
* For internal use, flat coordinates in combination with `opt_layout` are also accepted.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/
function LineString(coordinates, opt_layout) {
var _this = _super.call(this) || this;
/**
* @private
* @type {import("../coordinate.js").Coordinate}
*/
_this.flatMidpoint_ = null;
/**
* @private
* @type {number}
*/
_this.flatMidpointRevision_ = -1;
/**
* @private
* @type {number}
*/
_this.maxDelta_ = -1;
/**
* @private
* @type {number}
*/
_this.maxDeltaRevision_ = -1;
if (opt_layout !== undefined && !Array.isArray(coordinates[0])) {
_this.setFlatCoordinates(opt_layout,
/** @type {Array<number>} */ (coordinates));
}
else {
_this.setCoordinates(
/** @type {Array<import("../coordinate.js").Coordinate>} */ (coordinates), opt_layout);
}
return _this;
}
/**
* Append the passed coordinate to the coordinates of the linestring.
* @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
* @api
*/
LineString.prototype.appendCoordinate = function (coordinate) {
if (!this.flatCoordinates) {
this.flatCoordinates = coordinate.slice();
}
else {
extend(this.flatCoordinates, coordinate);
}
this.changed();
};
/**
* Make a complete copy of the geometry.
* @return {!LineString} Clone.
* @api
*/
LineString.prototype.clone = function () {
var lineString = new LineString(this.flatCoordinates.slice(), this.layout);
lineString.applyProperties(this);
return lineString;
};
/**
* @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.
*/
LineString.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
return minSquaredDistance;
}
if (this.maxDeltaRevision_ != this.getRevision()) {
this.maxDelta_ = Math.sqrt(maxSquaredDelta(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0));
this.maxDeltaRevision_ = this.getRevision();
}
return assignClosestPoint(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, this.maxDelta_, false, x, y, closestPoint, minSquaredDistance);
};
/**
* Iterate over each segment, calling the provided callback.
* If the callback returns a truthy value the function returns that
* value immediately. Otherwise the function returns `false`.
*
* @param {function(this: S, import("../coordinate.js").Coordinate, import("../coordinate.js").Coordinate): T} callback Function
* called for each segment. The function will receive two arguments, the start and end coordinates of the segment.
* @return {T|boolean} Value.
* @template T,S
* @api
*/
LineString.prototype.forEachSegment = function (callback) {
return forEachSegment(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, callback);
};
/**
* Returns the coordinate at `m` using linear interpolation, or `null` if no
* such coordinate exists.
*
* `opt_extrapolate` controls extrapolation beyond the range of Ms in the
* MultiLineString. If `opt_extrapolate` is `true` then Ms less than the first
* M will return the first coordinate and Ms greater than the last M will
* return the last coordinate.
*
* @param {number} m M.
* @param {boolean} [opt_extrapolate] Extrapolate. Default is `false`.
* @return {import("../coordinate.js").Coordinate|null} Coordinate.
* @api
*/
LineString.prototype.getCoordinateAtM = function (m, opt_extrapolate) {
if (this.layout != GeometryLayout.XYM &&
this.layout != GeometryLayout.XYZM) {
return null;
}
var extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;
return lineStringCoordinateAtM(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, m, extrapolate);
};
/**
* Return the coordinates of the linestring.
* @return {Array<import("../coordinate.js").Coordinate>} Coordinates.
* @api
*/
LineString.prototype.getCoordinates = function () {
return inflateCoordinates(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);
};
/**
* Return the coordinate at the provided fraction along the linestring.
* The `fraction` is a number between 0 and 1, where 0 is the start of the
* linestring and 1 is the end.
* @param {number} fraction Fraction.
* @param {import("../coordinate.js").Coordinate} [opt_dest] Optional coordinate whose values will
* be modified. If not provided, a new coordinate will be returned.
* @return {import("../coordinate.js").Coordinate} Coordinate of the interpolated point.
* @api
*/
LineString.prototype.getCoordinateAt = function (fraction, opt_dest) {
return interpolatePoint(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, fraction, opt_dest, this.stride);
};
/**
* Return the length of the linestring on projected plane.
* @return {number} Length (on projected plane).
* @api
*/
LineString.prototype.getLength = function () {
return lineStringLength(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);
};
/**
* @return {Array<number>} Flat midpoint.
*/
LineString.prototype.getFlatMidpoint = function () {
if (this.flatMidpointRevision_ != this.getRevision()) {
this.flatMidpoint_ = this.getCoordinateAt(0.5, this.flatMidpoint_);
this.flatMidpointRevision_ = this.getRevision();
}
return this.flatMidpoint_;
};
/**
* @param {number} squaredTolerance Squared tolerance.
* @return {LineString} Simplified LineString.
* @protected
*/
LineString.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {
var simplifiedFlatCoordinates = [];
simplifiedFlatCoordinates.length = douglasPeucker(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, squaredTolerance, simplifiedFlatCoordinates, 0);
return new LineString(simplifiedFlatCoordinates, GeometryLayout.XY);
};
/**
* Get the type of this geometry.
* @return {import("./Geometry.js").Type} Geometry type.
* @api
*/
LineString.prototype.getType = function () {
return 'LineString';
};
/**
* 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
*/
LineString.prototype.intersectsExtent = function (extent) {
return intersectsLineString(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, extent);
};
/**
* Set the coordinates of the linestring.
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api
*/
LineString.prototype.setCoordinates = function (coordinates, opt_layout) {
this.setLayout(opt_layout, coordinates, 1);
if (!this.flatCoordinates) {
this.flatCoordinates = [];
}
this.flatCoordinates.length = deflateCoordinates(this.flatCoordinates, 0, coordinates, this.stride);
this.changed();
};
return LineString;
}(SimpleGeometry));
export default LineString;
//# sourceMappingURL=LineString.js.map

1
node_modules/ol/geom/LineString.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"LineString.js","sourceRoot":"","sources":["../src/geom/LineString.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;GAEG;AACH,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAC,kBAAkB,EAAE,eAAe,EAAC,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAC,wBAAwB,EAAC,MAAM,cAAc,CAAC;AACtD,OAAO,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC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ts generated vendored Normal file
View File

@@ -0,0 +1,59 @@
export default LinearRing;
/**
* @classdesc
* Linear ring geometry. Only used as part of polygon; cannot be rendered
* on its own.
*
* @api
*/
declare class LinearRing extends SimpleGeometry {
/**
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
* For internal use, flat coordinates in combination with `opt_layout` are also accepted.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/
constructor(coordinates: Array<import("../coordinate.js").Coordinate> | Array<number>, opt_layout?: any);
/**
* @private
* @type {number}
*/
private maxDelta_;
/**
* @private
* @type {number}
*/
private maxDeltaRevision_;
/**
* Make a complete copy of the geometry.
* @return {!LinearRing} Clone.
* @api
*/
clone(): LinearRing;
/**
* Return the area of the linear ring on projected plane.
* @return {number} Area (on projected plane).
* @api
*/
getArea(): number;
/**
* Return the coordinates of the linear ring.
* @return {Array<import("../coordinate.js").Coordinate>} Coordinates.
* @api
*/
getCoordinates(): Array<import("../coordinate.js").Coordinate>;
/**
* @param {number} squaredTolerance Squared tolerance.
* @return {LinearRing} Simplified LinearRing.
* @protected
*/
protected getSimplifiedGeometryInternal(squaredTolerance: number): LinearRing;
/**
* Set the coordinates of the linear ring.
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api
*/
setCoordinates(coordinates: Array<import("../coordinate.js").Coordinate>, opt_layout?: any): void;
}
import SimpleGeometry from "./SimpleGeometry.js";
//# sourceMappingURL=LinearRing.d.ts.map

1
node_modules/ol/geom/LinearRing.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"LinearRing.d.ts","sourceRoot":"","sources":["../src/geom/LinearRing.js"],"names":[],"mappings":";AAYA;;;;;;GAMG;AACH;IACE;;;;OAIG;IACH,yBAJW,MAAM,OAAO,kBAAkB,EAAE,UAAU,CAAC,GAAC,MAAM,MAAM,CAAC,oBAgCpE;IAzBC;;;OAGG;IACH,kBAAmB;IAEnB;;;OAGG;IACH,0BAA2B;IAiB7B;;;;OAIG;IACH,SAHa,UAAU,CAKtB;IAuCD;;;;OAIG;IACH,WAHY,MAAM,CAUjB;IAED;;;;OAIG;IACH,kBAHY,MAAM,OAAO,kBAAkB,EAAE,UAAU,CAAC,CAUvD;IAED;;;;OAIG;IACH,0DAJW,MAAM,GACL,UAAU,CAerB;IAqBD;;;;;OAKG;IACH,4BAJY,MAAM,OAAO,kBAAkB,EAAE,UAAU,CAAC,0BAgBvD;CACF"}

148
node_modules/ol/geom/LinearRing.js generated vendored Normal file
View File

@@ -0,0 +1,148 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/geom/LinearRing
*/
import GeometryLayout from './GeometryLayout.js';
import SimpleGeometry from './SimpleGeometry.js';
import { assignClosestPoint, maxSquaredDelta } from './flat/closest.js';
import { closestSquaredDistanceXY } from '../extent.js';
import { deflateCoordinates } from './flat/deflate.js';
import { douglasPeucker } from './flat/simplify.js';
import { inflateCoordinates } from './flat/inflate.js';
import { linearRing as linearRingArea } from './flat/area.js';
/**
* @classdesc
* Linear ring geometry. Only used as part of polygon; cannot be rendered
* on its own.
*
* @api
*/
var LinearRing = /** @class */ (function (_super) {
__extends(LinearRing, _super);
/**
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
* For internal use, flat coordinates in combination with `opt_layout` are also accepted.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/
function LinearRing(coordinates, opt_layout) {
var _this = _super.call(this) || this;
/**
* @private
* @type {number}
*/
_this.maxDelta_ = -1;
/**
* @private
* @type {number}
*/
_this.maxDeltaRevision_ = -1;
if (opt_layout !== undefined && !Array.isArray(coordinates[0])) {
_this.setFlatCoordinates(opt_layout,
/** @type {Array<number>} */ (coordinates));
}
else {
_this.setCoordinates(
/** @type {Array<import("../coordinate.js").Coordinate>} */ (coordinates), opt_layout);
}
return _this;
}
/**
* Make a complete copy of the geometry.
* @return {!LinearRing} Clone.
* @api
*/
LinearRing.prototype.clone = function () {
return new LinearRing(this.flatCoordinates.slice(), this.layout);
};
/**
* @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.
*/
LinearRing.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
return minSquaredDistance;
}
if (this.maxDeltaRevision_ != this.getRevision()) {
this.maxDelta_ = Math.sqrt(maxSquaredDelta(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, 0));
this.maxDeltaRevision_ = this.getRevision();
}
return assignClosestPoint(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);
};
/**
* Return the area of the linear ring on projected plane.
* @return {number} Area (on projected plane).
* @api
*/
LinearRing.prototype.getArea = function () {
return linearRingArea(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);
};
/**
* Return the coordinates of the linear ring.
* @return {Array<import("../coordinate.js").Coordinate>} Coordinates.
* @api
*/
LinearRing.prototype.getCoordinates = function () {
return inflateCoordinates(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);
};
/**
* @param {number} squaredTolerance Squared tolerance.
* @return {LinearRing} Simplified LinearRing.
* @protected
*/
LinearRing.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {
var simplifiedFlatCoordinates = [];
simplifiedFlatCoordinates.length = douglasPeucker(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, squaredTolerance, simplifiedFlatCoordinates, 0);
return new LinearRing(simplifiedFlatCoordinates, GeometryLayout.XY);
};
/**
* Get the type of this geometry.
* @return {import("./Geometry.js").Type} Geometry type.
* @api
*/
LinearRing.prototype.getType = function () {
return 'LinearRing';
};
/**
* 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
*/
LinearRing.prototype.intersectsExtent = function (extent) {
return false;
};
/**
* Set the coordinates of the linear ring.
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api
*/
LinearRing.prototype.setCoordinates = function (coordinates, opt_layout) {
this.setLayout(opt_layout, coordinates, 1);
if (!this.flatCoordinates) {
this.flatCoordinates = [];
}
this.flatCoordinates.length = deflateCoordinates(this.flatCoordinates, 0, coordinates, this.stride);
this.changed();
};
return LinearRing;
}(SimpleGeometry));
export default LinearRing;
//# sourceMappingURL=LinearRing.js.map

1
node_modules/ol/geom/LinearRing.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"LinearRing.js","sourceRoot":"","sources":["../src/geom/LinearRing.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;GAEG;AACH,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAC,kBAAkB,EAAE,eAAe,EAAC,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAC,wBAAwB,EAAC,MAAM,cAAc,CAAC;AACtD,OAAO,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAC,UAAU,IAAI,cAAc,EAA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IAAI,CAAC,IAAI,CAAC,eAAe,EAAE;YACzB,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;SAC3B;QACD,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,kBAAkB,CAC9C,IAAI,CAAC,eAAe,EACpB,CAAC,EACD,WAAW,EACX,IAAI,CAAC,MAAM,CACZ,CAAC;QACF,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IACH,iBAAC;AAAD,CAAC,AAvKD,CAAyB,cAAc,GAuKtC;AAED,eAAe,UAAU,CAAC"}

115
node_modules/ol/geom/MultiLineString.d.ts generated vendored Normal file
View File

@@ -0,0 +1,115 @@
export default MultiLineString;
/**
* @classdesc
* Multi-linestring geometry.
*
* @api
*/
declare class MultiLineString extends SimpleGeometry {
/**
* @param {Array<Array<import("../coordinate.js").Coordinate>|LineString>|Array<number>} coordinates
* Coordinates or LineString geometries. (For internal use, flat coordinates in
* combination with `opt_layout` and `opt_ends` are also accepted.)
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @param {Array<number>} [opt_ends] Flat coordinate ends for internal use.
*/
constructor(coordinates: Array<Array<import("../coordinate.js").Coordinate> | LineString> | Array<number>, opt_layout?: any, opt_ends?: number[] | undefined);
/**
* @type {Array<number>}
* @private
*/
private ends_;
/**
* @private
* @type {number}
*/
private maxDelta_;
/**
* @private
* @type {number}
*/
private maxDeltaRevision_;
/**
* Append the passed linestring to the multilinestring.
* @param {LineString} lineString LineString.
* @api
*/
appendLineString(lineString: LineString): void;
/**
* Make a complete copy of the geometry.
* @return {!MultiLineString} Clone.
* @api
*/
clone(): MultiLineString;
/**
* Returns the coordinate at `m` using linear interpolation, or `null` if no
* such coordinate exists.
*
* `opt_extrapolate` controls extrapolation beyond the range of Ms in the
* MultiLineString. If `opt_extrapolate` is `true` then Ms less than the first
* M will return the first coordinate and Ms greater than the last M will
* return the last coordinate.
*
* `opt_interpolate` controls interpolation between consecutive LineStrings
* within the MultiLineString. If `opt_interpolate` is `true` the coordinates
* will be linearly interpolated between the last coordinate of one LineString
* and the first coordinate of the next LineString. If `opt_interpolate` is
* `false` then the function will return `null` for Ms falling between
* LineStrings.
*
* @param {number} m M.
* @param {boolean} [opt_extrapolate] Extrapolate. Default is `false`.
* @param {boolean} [opt_interpolate] Interpolate. Default is `false`.
* @return {import("../coordinate.js").Coordinate|null} Coordinate.
* @api
*/
getCoordinateAtM(m: number, opt_extrapolate?: boolean | undefined, opt_interpolate?: boolean | undefined): import("../coordinate.js").Coordinate | null;
/**
* Return the coordinates of the multilinestring.
* @return {Array<Array<import("../coordinate.js").Coordinate>>} Coordinates.
* @api
*/
getCoordinates(): Array<Array<import("../coordinate.js").Coordinate>>;
/**
* @return {Array<number>} Ends.
*/
getEnds(): Array<number>;
/**
* Return the linestring at the specified index.
* @param {number} index Index.
* @return {LineString} LineString.
* @api
*/
getLineString(index: number): LineString;
/**
* Return the linestrings of this multilinestring.
* @return {Array<LineString>} LineStrings.
* @api
*/
getLineStrings(): Array<LineString>;
/**
* @return {Array<number>} Flat midpoints.
*/
getFlatMidpoints(): Array<number>;
/**
* @param {number} squaredTolerance Squared tolerance.
* @return {MultiLineString} Simplified MultiLineString.
* @protected
*/
protected getSimplifiedGeometryInternal(squaredTolerance: number): MultiLineString;
/**
* Set the coordinates of the multilinestring.
* @param {!Array<Array<import("../coordinate.js").Coordinate>>} coordinates Coordinates.
* @param {GeometryLayout} [opt_layout] Layout.
* @api
*/
setCoordinates(coordinates: Array<Array<import("../coordinate.js").Coordinate>>, opt_layout?: {
XY: string;
XYZ: string;
XYM: string;
XYZM: string;
} | undefined): void;
}
import SimpleGeometry from "./SimpleGeometry.js";
import LineString from "./LineString.js";
//# sourceMappingURL=MultiLineString.d.ts.map

1
node_modules/ol/geom/MultiLineString.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"MultiLineString.d.ts","sourceRoot":"","sources":["../src/geom/MultiLineString.js"],"names":[],"mappings":";AAkBA;;;;;GAKG;AACH;IACE;;;;;;OAMG;IACH,yBANW,MAAM,MAAM,OAAO,kBAAkB,EAAE,UAAU,CAAC,GAAC,UAAU,CAAC,GAAC,MAAM,MAAM,CAAC,qDAwDtF;IA/CC;;;OAGG;IACH,cAAe;IAEf;;;OAGG;IACH,kBAAmB;IAEnB;;;OAGG;IACH,0BAA2B;IAiC7B;;;;OAIG;IACH,6BAHW,UAAU,QAWpB;IAED;;;;OAIG;IACH,SAHa,eAAe,CAW3B;IAuCD;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,oBANW,MAAM,iFAGL,OAAO,kBAAkB,EAAE,UAAU,GAAC,IAAI,CAsBrD;IAED;;;;OAIG;IACH,kBAHY,MAAM,MAAM,OAAO,kBAAkB,EAAE,UAAU,CAAC,CAAC,CAU9D;IAED;;OAEG;IACH,WAFY,MAAM,MAAM,CAAC,CAIxB;IAED;;;;;OAKG;IACH,qBAJW,MAAM,GACL,UAAU,CAcrB;IAED;;;;OAIG;IACH,kBAHY,MAAM,UAAU,CAAC,CAoB5B;IAED;;OAEG;IACH,oBAFY,MAAM,MAAM,CAAC,CAqBxB;IAED;;;;OAIG;IACH,0DAJW,MAAM,GACL,eAAe,CAqB1B;IA2BD;;;;;OAKG;IACH,4BAJY,MAAM,MAAM,OAAO,kBAAkB,EAAE,UAAU,CAAC,CAAC;;;;;yBAkB9D;CACF"}

272
node_modules/ol/geom/MultiLineString.js generated vendored Normal file
View File

@@ -0,0 +1,272 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/geom/MultiLineString
*/
import GeometryLayout from './GeometryLayout.js';
import LineString from './LineString.js';
import SimpleGeometry from './SimpleGeometry.js';
import { arrayMaxSquaredDelta, assignClosestArrayPoint } from './flat/closest.js';
import { closestSquaredDistanceXY } from '../extent.js';
import { deflateCoordinatesArray } from './flat/deflate.js';
import { douglasPeuckerArray } from './flat/simplify.js';
import { extend } from '../array.js';
import { inflateCoordinatesArray } from './flat/inflate.js';
import { interpolatePoint, lineStringsCoordinateAtM, } from './flat/interpolate.js';
import { intersectsLineStringArray } from './flat/intersectsextent.js';
/**
* @classdesc
* Multi-linestring geometry.
*
* @api
*/
var MultiLineString = /** @class */ (function (_super) {
__extends(MultiLineString, _super);
/**
* @param {Array<Array<import("../coordinate.js").Coordinate>|LineString>|Array<number>} coordinates
* Coordinates or LineString geometries. (For internal use, flat coordinates in
* combination with `opt_layout` and `opt_ends` are also accepted.)
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @param {Array<number>} [opt_ends] Flat coordinate ends for internal use.
*/
function MultiLineString(coordinates, opt_layout, opt_ends) {
var _this = _super.call(this) || this;
/**
* @type {Array<number>}
* @private
*/
_this.ends_ = [];
/**
* @private
* @type {number}
*/
_this.maxDelta_ = -1;
/**
* @private
* @type {number}
*/
_this.maxDeltaRevision_ = -1;
if (Array.isArray(coordinates[0])) {
_this.setCoordinates(
/** @type {Array<Array<import("../coordinate.js").Coordinate>>} */ (coordinates), opt_layout);
}
else if (opt_layout !== undefined && opt_ends) {
_this.setFlatCoordinates(opt_layout,
/** @type {Array<number>} */ (coordinates));
_this.ends_ = opt_ends;
}
else {
var layout = _this.getLayout();
var lineStrings = /** @type {Array<LineString>} */ (coordinates);
var flatCoordinates = [];
var ends = [];
for (var i = 0, ii = lineStrings.length; i < ii; ++i) {
var lineString = lineStrings[i];
if (i === 0) {
layout = lineString.getLayout();
}
extend(flatCoordinates, lineString.getFlatCoordinates());
ends.push(flatCoordinates.length);
}
_this.setFlatCoordinates(layout, flatCoordinates);
_this.ends_ = ends;
}
return _this;
}
/**
* Append the passed linestring to the multilinestring.
* @param {LineString} lineString LineString.
* @api
*/
MultiLineString.prototype.appendLineString = function (lineString) {
if (!this.flatCoordinates) {
this.flatCoordinates = lineString.getFlatCoordinates().slice();
}
else {
extend(this.flatCoordinates, lineString.getFlatCoordinates().slice());
}
this.ends_.push(this.flatCoordinates.length);
this.changed();
};
/**
* Make a complete copy of the geometry.
* @return {!MultiLineString} Clone.
* @api
*/
MultiLineString.prototype.clone = function () {
var multiLineString = new MultiLineString(this.flatCoordinates.slice(), this.layout, this.ends_.slice());
multiLineString.applyProperties(this);
return multiLineString;
};
/**
* @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.
*/
MultiLineString.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
return minSquaredDistance;
}
if (this.maxDeltaRevision_ != this.getRevision()) {
this.maxDelta_ = Math.sqrt(arrayMaxSquaredDelta(this.flatCoordinates, 0, this.ends_, this.stride, 0));
this.maxDeltaRevision_ = this.getRevision();
}
return assignClosestArrayPoint(this.flatCoordinates, 0, this.ends_, this.stride, this.maxDelta_, false, x, y, closestPoint, minSquaredDistance);
};
/**
* Returns the coordinate at `m` using linear interpolation, or `null` if no
* such coordinate exists.
*
* `opt_extrapolate` controls extrapolation beyond the range of Ms in the
* MultiLineString. If `opt_extrapolate` is `true` then Ms less than the first
* M will return the first coordinate and Ms greater than the last M will
* return the last coordinate.
*
* `opt_interpolate` controls interpolation between consecutive LineStrings
* within the MultiLineString. If `opt_interpolate` is `true` the coordinates
* will be linearly interpolated between the last coordinate of one LineString
* and the first coordinate of the next LineString. If `opt_interpolate` is
* `false` then the function will return `null` for Ms falling between
* LineStrings.
*
* @param {number} m M.
* @param {boolean} [opt_extrapolate] Extrapolate. Default is `false`.
* @param {boolean} [opt_interpolate] Interpolate. Default is `false`.
* @return {import("../coordinate.js").Coordinate|null} Coordinate.
* @api
*/
MultiLineString.prototype.getCoordinateAtM = function (m, opt_extrapolate, opt_interpolate) {
if ((this.layout != GeometryLayout.XYM &&
this.layout != GeometryLayout.XYZM) ||
this.flatCoordinates.length === 0) {
return null;
}
var extrapolate = opt_extrapolate !== undefined ? opt_extrapolate : false;
var interpolate = opt_interpolate !== undefined ? opt_interpolate : false;
return lineStringsCoordinateAtM(this.flatCoordinates, 0, this.ends_, this.stride, m, extrapolate, interpolate);
};
/**
* Return the coordinates of the multilinestring.
* @return {Array<Array<import("../coordinate.js").Coordinate>>} Coordinates.
* @api
*/
MultiLineString.prototype.getCoordinates = function () {
return inflateCoordinatesArray(this.flatCoordinates, 0, this.ends_, this.stride);
};
/**
* @return {Array<number>} Ends.
*/
MultiLineString.prototype.getEnds = function () {
return this.ends_;
};
/**
* Return the linestring at the specified index.
* @param {number} index Index.
* @return {LineString} LineString.
* @api
*/
MultiLineString.prototype.getLineString = function (index) {
if (index < 0 || this.ends_.length <= index) {
return null;
}
return new LineString(this.flatCoordinates.slice(index === 0 ? 0 : this.ends_[index - 1], this.ends_[index]), this.layout);
};
/**
* Return the linestrings of this multilinestring.
* @return {Array<LineString>} LineStrings.
* @api
*/
MultiLineString.prototype.getLineStrings = function () {
var flatCoordinates = this.flatCoordinates;
var ends = this.ends_;
var layout = this.layout;
/** @type {Array<LineString>} */
var lineStrings = [];
var offset = 0;
for (var i = 0, ii = ends.length; i < ii; ++i) {
var end = ends[i];
var lineString = new LineString(flatCoordinates.slice(offset, end), layout);
lineStrings.push(lineString);
offset = end;
}
return lineStrings;
};
/**
* @return {Array<number>} Flat midpoints.
*/
MultiLineString.prototype.getFlatMidpoints = function () {
var midpoints = [];
var flatCoordinates = this.flatCoordinates;
var offset = 0;
var ends = this.ends_;
var stride = this.stride;
for (var i = 0, ii = ends.length; i < ii; ++i) {
var end = ends[i];
var midpoint = interpolatePoint(flatCoordinates, offset, end, stride, 0.5);
extend(midpoints, midpoint);
offset = end;
}
return midpoints;
};
/**
* @param {number} squaredTolerance Squared tolerance.
* @return {MultiLineString} Simplified MultiLineString.
* @protected
*/
MultiLineString.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {
var simplifiedFlatCoordinates = [];
var simplifiedEnds = [];
simplifiedFlatCoordinates.length = douglasPeuckerArray(this.flatCoordinates, 0, this.ends_, this.stride, squaredTolerance, simplifiedFlatCoordinates, 0, simplifiedEnds);
return new MultiLineString(simplifiedFlatCoordinates, GeometryLayout.XY, simplifiedEnds);
};
/**
* Get the type of this geometry.
* @return {import("./Geometry.js").Type} Geometry type.
* @api
*/
MultiLineString.prototype.getType = function () {
return 'MultiLineString';
};
/**
* 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
*/
MultiLineString.prototype.intersectsExtent = function (extent) {
return intersectsLineStringArray(this.flatCoordinates, 0, this.ends_, this.stride, extent);
};
/**
* Set the coordinates of the multilinestring.
* @param {!Array<Array<import("../coordinate.js").Coordinate>>} coordinates Coordinates.
* @param {GeometryLayout} [opt_layout] Layout.
* @api
*/
MultiLineString.prototype.setCoordinates = function (coordinates, opt_layout) {
this.setLayout(opt_layout, coordinates, 2);
if (!this.flatCoordinates) {
this.flatCoordinates = [];
}
var ends = deflateCoordinatesArray(this.flatCoordinates, 0, coordinates, this.stride, this.ends_);
this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];
this.changed();
};
return MultiLineString;
}(SimpleGeometry));
export default MultiLineString;
//# sourceMappingURL=MultiLineString.js.map

1
node_modules/ol/geom/MultiLineString.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

56
node_modules/ol/geom/MultiPoint.d.ts generated vendored Normal file
View File

@@ -0,0 +1,56 @@
export default MultiPoint;
/**
* @classdesc
* Multi-point geometry.
*
* @api
*/
declare class MultiPoint extends SimpleGeometry {
/**
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
* For internal use, flat coordinates in combination with `opt_layout` are also accepted.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/
constructor(coordinates: Array<import("../coordinate.js").Coordinate> | Array<number>, opt_layout?: any);
/**
* Append the passed point to this multipoint.
* @param {Point} point Point.
* @api
*/
appendPoint(point: Point): void;
/**
* Make a complete copy of the geometry.
* @return {!MultiPoint} Clone.
* @api
*/
clone(): MultiPoint;
/**
* Return the coordinates of the multipoint.
* @return {Array<import("../coordinate.js").Coordinate>} Coordinates.
* @api
*/
getCoordinates(): Array<import("../coordinate.js").Coordinate>;
/**
* Return the point at the specified index.
* @param {number} index Index.
* @return {Point} Point.
* @api
*/
getPoint(index: number): Point;
/**
* Return the points of this multipoint.
* @return {Array<Point>} Points.
* @api
*/
getPoints(): Array<Point>;
/**
* Set the coordinates of the multipoint.
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api
*/
setCoordinates(coordinates: Array<import("../coordinate.js").Coordinate>, opt_layout?: any): void;
}
import SimpleGeometry from "./SimpleGeometry.js";
import Point from "./Point.js";
//# sourceMappingURL=MultiPoint.d.ts.map

1
node_modules/ol/geom/MultiPoint.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"MultiPoint.d.ts","sourceRoot":"","sources":["../src/geom/MultiPoint.js"],"names":[],"mappings":";AAWA;;;;;GAKG;AACH;IACE;;;;OAIG;IACH,yBAJW,MAAM,OAAO,kBAAkB,EAAE,UAAU,CAAC,GAAC,MAAM,MAAM,CAAC,oBAmBpE;IAED;;;;OAIG;IACH,mBAHW,KAAK,QAUf;IAED;;;;OAIG;IACH,SAHa,UAAU,CAUtB;IAiCD;;;;OAIG;IACH,kBAHY,MAAM,OAAO,kBAAkB,EAAE,UAAU,CAAC,CAUvD;IAED;;;;;OAKG;IACH,gBAJW,MAAM,GACL,KAAK,CAiBhB;IAED;;;;OAIG;IACH,aAHY,MAAM,KAAK,CAAC,CAcvB;IA8BD;;;;;OAKG;IACH,4BAJY,MAAM,OAAO,kBAAkB,EAAE,UAAU,CAAC,0BAgBvD;CACF"}

183
node_modules/ol/geom/MultiPoint.js generated vendored Normal file
View File

@@ -0,0 +1,183 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/geom/MultiPoint
*/
import Point from './Point.js';
import SimpleGeometry from './SimpleGeometry.js';
import { closestSquaredDistanceXY, containsXY } from '../extent.js';
import { deflateCoordinates } from './flat/deflate.js';
import { extend } from '../array.js';
import { inflateCoordinates } from './flat/inflate.js';
import { squaredDistance as squaredDx } from '../math.js';
/**
* @classdesc
* Multi-point geometry.
*
* @api
*/
var MultiPoint = /** @class */ (function (_super) {
__extends(MultiPoint, _super);
/**
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
* For internal use, flat coordinates in combination with `opt_layout` are also accepted.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/
function MultiPoint(coordinates, opt_layout) {
var _this = _super.call(this) || this;
if (opt_layout && !Array.isArray(coordinates[0])) {
_this.setFlatCoordinates(opt_layout,
/** @type {Array<number>} */ (coordinates));
}
else {
_this.setCoordinates(
/** @type {Array<import("../coordinate.js").Coordinate>} */ (coordinates), opt_layout);
}
return _this;
}
/**
* Append the passed point to this multipoint.
* @param {Point} point Point.
* @api
*/
MultiPoint.prototype.appendPoint = function (point) {
if (!this.flatCoordinates) {
this.flatCoordinates = point.getFlatCoordinates().slice();
}
else {
extend(this.flatCoordinates, point.getFlatCoordinates());
}
this.changed();
};
/**
* Make a complete copy of the geometry.
* @return {!MultiPoint} Clone.
* @api
*/
MultiPoint.prototype.clone = function () {
var multiPoint = new MultiPoint(this.flatCoordinates.slice(), this.layout);
multiPoint.applyProperties(this);
return multiPoint;
};
/**
* @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.
*/
MultiPoint.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
return minSquaredDistance;
}
var flatCoordinates = this.flatCoordinates;
var stride = this.stride;
for (var i = 0, ii = flatCoordinates.length; i < ii; i += stride) {
var squaredDistance = squaredDx(x, y, flatCoordinates[i], flatCoordinates[i + 1]);
if (squaredDistance < minSquaredDistance) {
minSquaredDistance = squaredDistance;
for (var j = 0; j < stride; ++j) {
closestPoint[j] = flatCoordinates[i + j];
}
closestPoint.length = stride;
}
}
return minSquaredDistance;
};
/**
* Return the coordinates of the multipoint.
* @return {Array<import("../coordinate.js").Coordinate>} Coordinates.
* @api
*/
MultiPoint.prototype.getCoordinates = function () {
return inflateCoordinates(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);
};
/**
* Return the point at the specified index.
* @param {number} index Index.
* @return {Point} Point.
* @api
*/
MultiPoint.prototype.getPoint = function (index) {
var n = !this.flatCoordinates
? 0
: this.flatCoordinates.length / this.stride;
if (index < 0 || n <= index) {
return null;
}
return new Point(this.flatCoordinates.slice(index * this.stride, (index + 1) * this.stride), this.layout);
};
/**
* Return the points of this multipoint.
* @return {Array<Point>} Points.
* @api
*/
MultiPoint.prototype.getPoints = function () {
var flatCoordinates = this.flatCoordinates;
var layout = this.layout;
var stride = this.stride;
/** @type {Array<Point>} */
var points = [];
for (var i = 0, ii = flatCoordinates.length; i < ii; i += stride) {
var point = new Point(flatCoordinates.slice(i, i + stride), layout);
points.push(point);
}
return points;
};
/**
* Get the type of this geometry.
* @return {import("./Geometry.js").Type} Geometry type.
* @api
*/
MultiPoint.prototype.getType = function () {
return 'MultiPoint';
};
/**
* 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
*/
MultiPoint.prototype.intersectsExtent = function (extent) {
var flatCoordinates = this.flatCoordinates;
var stride = this.stride;
for (var i = 0, ii = flatCoordinates.length; i < ii; i += stride) {
var x = flatCoordinates[i];
var y = flatCoordinates[i + 1];
if (containsXY(extent, x, y)) {
return true;
}
}
return false;
};
/**
* Set the coordinates of the multipoint.
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api
*/
MultiPoint.prototype.setCoordinates = function (coordinates, opt_layout) {
this.setLayout(opt_layout, coordinates, 1);
if (!this.flatCoordinates) {
this.flatCoordinates = [];
}
this.flatCoordinates.length = deflateCoordinates(this.flatCoordinates, 0, coordinates, this.stride);
this.changed();
};
return MultiPoint;
}(SimpleGeometry));
export default MultiPoint;
//# sourceMappingURL=MultiPoint.js.map

1
node_modules/ol/geom/MultiPoint.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"MultiPoint.js","sourceRoot":"","sources":["../src/geom/MultiPoint.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;GAEG;AACH,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAC,wBAAwB,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAClE,OAAO,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,kBAAkB,EA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E,CAAC,CAAC,EAAE;gBAC5B,OAAO,IAAI,CAAC;aACb;SACF;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;OAKG;IACH,mCAAc,GAAd,UAAe,WAAW,EAAE,UAAU;QACpC,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;QAC3C,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE;YACzB,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;SAC3B;QACD,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,kBAAkB,CAC9C,IAAI,CAAC,eAAe,EACpB,CAAC,EACD,WAAW,EACX,IAAI,CAAC,MAAM,CACZ,CAAC;QACF,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IACH,iBAAC;AAAD,CAAC,AAvLD,CAAyB,cAAc,GAuLtC;AAED,eAAe,UAAU,CAAC"}

132
node_modules/ol/geom/MultiPolygon.d.ts generated vendored Normal file
View File

@@ -0,0 +1,132 @@
export default MultiPolygon;
/**
* @classdesc
* Multi-polygon geometry.
*
* @api
*/
declare class MultiPolygon extends SimpleGeometry {
/**
* @param {Array<Array<Array<import("../coordinate.js").Coordinate>>|Polygon>|Array<number>} coordinates Coordinates.
* For internal use, flat coordinates in combination with `opt_layout` and `opt_endss` are also accepted.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @param {Array<Array<number>>} [opt_endss] Array of ends for internal use with flat coordinates.
*/
constructor(coordinates: Array<Array<Array<import("../coordinate.js").Coordinate>> | Polygon> | Array<number>, opt_layout?: any, opt_endss?: number[][] | undefined);
/**
* @type {Array<Array<number>>}
* @private
*/
private endss_;
/**
* @private
* @type {number}
*/
private flatInteriorPointsRevision_;
/**
* @private
* @type {Array<number>}
*/
private flatInteriorPoints_;
/**
* @private
* @type {number}
*/
private maxDelta_;
/**
* @private
* @type {number}
*/
private maxDeltaRevision_;
/**
* @private
* @type {number}
*/
private orientedRevision_;
/**
* @private
* @type {Array<number>}
*/
private orientedFlatCoordinates_;
/**
* Append the passed polygon to this multipolygon.
* @param {Polygon} polygon Polygon.
* @api
*/
appendPolygon(polygon: Polygon): void;
/**
* Make a complete copy of the geometry.
* @return {!MultiPolygon} Clone.
* @api
*/
clone(): MultiPolygon;
/**
* Return the area of the multipolygon on projected plane.
* @return {number} Area (on projected plane).
* @api
*/
getArea(): number;
/**
* Get the coordinate array for this geometry. This array has the structure
* of a GeoJSON coordinate array for multi-polygons.
*
* @param {boolean} [opt_right] Orient coordinates according to the right-hand
* rule (counter-clockwise for exterior and clockwise for interior rings).
* If `false`, coordinates will be oriented according to the left-hand rule
* (clockwise for exterior and counter-clockwise for interior rings).
* By default, coordinate orientation will depend on how the geometry was
* constructed.
* @return {Array<Array<Array<import("../coordinate.js").Coordinate>>>} Coordinates.
* @api
*/
getCoordinates(opt_right?: boolean | undefined): Array<Array<Array<import("../coordinate.js").Coordinate>>>;
/**
* @return {Array<Array<number>>} Endss.
*/
getEndss(): Array<Array<number>>;
/**
* @return {Array<number>} Flat interior points.
*/
getFlatInteriorPoints(): Array<number>;
/**
* Return the interior points as {@link module:ol/geom/MultiPoint~MultiPoint multipoint}.
* @return {MultiPoint} Interior points as XYM coordinates, where M is
* the length of the horizontal intersection that the point belongs to.
* @api
*/
getInteriorPoints(): MultiPoint;
/**
* @return {Array<number>} Oriented flat coordinates.
*/
getOrientedFlatCoordinates(): Array<number>;
/**
* @param {number} squaredTolerance Squared tolerance.
* @return {MultiPolygon} Simplified MultiPolygon.
* @protected
*/
protected getSimplifiedGeometryInternal(squaredTolerance: number): MultiPolygon;
/**
* Return the polygon at the specified index.
* @param {number} index Index.
* @return {Polygon} Polygon.
* @api
*/
getPolygon(index: number): Polygon;
/**
* Return the polygons of this multipolygon.
* @return {Array<Polygon>} Polygons.
* @api
*/
getPolygons(): Array<Polygon>;
/**
* Set the coordinates of the multipolygon.
* @param {!Array<Array<Array<import("../coordinate.js").Coordinate>>>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api
*/
setCoordinates(coordinates: Array<Array<Array<import("../coordinate.js").Coordinate>>>, opt_layout?: any): void;
}
import SimpleGeometry from "./SimpleGeometry.js";
import Polygon from "./Polygon.js";
import MultiPoint from "./MultiPoint.js";
//# sourceMappingURL=MultiPolygon.d.ts.map

1
node_modules/ol/geom/MultiPolygon.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"MultiPolygon.d.ts","sourceRoot":"","sources":["../src/geom/MultiPolygon.js"],"names":[],"mappings":";AA0BA;;;;;GAKG;AACH;IACE;;;;;OAKG;IACH,yBALW,MAAM,MAAM,MAAM,OAAO,kBAAkB,EAAE,UAAU,CAAC,CAAC,GAAC,OAAO,CAAC,GAAC,MAAM,MAAM,CAAC,wDAsF1F;IA9EC;;;OAGG;IACH,eAAgB;IAEhB;;;OAGG;IACH,oCAAqC;IAErC;;;OAGG;IACH,4BAA+B;IAE/B;;;OAGG;IACH,kBAAmB;IAEnB;;;OAGG;IACH,0BAA2B;IAE3B;;;OAGG;IACH,0BAA2B;IAE3B;;;OAGG;IACH,iCAAoC;IAwCtC;;;;OAIG;IACH,uBAHW,OAAO,QAoBjB;IAED;;;;OAIG;IACH,SAHa,YAAY,CAkBxB;IAuDD;;;;OAIG;IACH,WAHY,MAAM,CAUjB;IAED;;;;;;;;;;;;OAYG;IACH,iDAHY,MAAM,MAAM,MAAM,OAAO,kBAAkB,EAAE,UAAU,CAAC,CAAC,CAAC,CAwBrE;IAED;;OAEG;IACH,YAFY,MAAM,MAAM,MAAM,CAAC,CAAC,CAI/B;IAED;;OAEG;IACH,yBAFY,MAAM,MAAM,CAAC,CAoBxB;IAED;;;;;OAKG;IACH,qBAJY,UAAU,CASrB;IAED;;OAEG;IACH,8BAFY,MAAM,MAAM,CAAC,CAqBxB;IAED;;;;OAIG;IACH,0DAJW,MAAM,GACL,YAAY,CAqBvB;IAED;;;;;OAKG;IACH,kBAJW,MAAM,GACL,OAAO,CA0BlB;IAED;;;;OAIG;IACH,eAHY,MAAM,OAAO,CAAC,CA0BzB;IA2BD;;;;;OAKG;IACH,4BAJY,MAAM,MAAM,MAAM,OAAO,kBAAkB,EAAE,UAAU,CAAC,CAAC,CAAC,0BAwBrE;CACF"}

363
node_modules/ol/geom/MultiPolygon.js generated vendored Normal file
View File

@@ -0,0 +1,363 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/geom/MultiPolygon
*/
import GeometryLayout from './GeometryLayout.js';
import MultiPoint from './MultiPoint.js';
import Polygon from './Polygon.js';
import SimpleGeometry from './SimpleGeometry.js';
import { assignClosestMultiArrayPoint, multiArrayMaxSquaredDelta, } from './flat/closest.js';
import { closestSquaredDistanceXY } from '../extent.js';
import { deflateMultiCoordinatesArray } from './flat/deflate.js';
import { extend } from '../array.js';
import { getInteriorPointsOfMultiArray } from './flat/interiorpoint.js';
import { inflateMultiCoordinatesArray } from './flat/inflate.js';
import { intersectsLinearRingMultiArray } from './flat/intersectsextent.js';
import { linearRingssAreOriented, orientLinearRingsArray, } from './flat/orient.js';
import { linearRingss as linearRingssArea } from './flat/area.js';
import { linearRingss as linearRingssCenter } from './flat/center.js';
import { linearRingssContainsXY } from './flat/contains.js';
import { quantizeMultiArray } from './flat/simplify.js';
/**
* @classdesc
* Multi-polygon geometry.
*
* @api
*/
var MultiPolygon = /** @class */ (function (_super) {
__extends(MultiPolygon, _super);
/**
* @param {Array<Array<Array<import("../coordinate.js").Coordinate>>|Polygon>|Array<number>} coordinates Coordinates.
* For internal use, flat coordinates in combination with `opt_layout` and `opt_endss` are also accepted.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @param {Array<Array<number>>} [opt_endss] Array of ends for internal use with flat coordinates.
*/
function MultiPolygon(coordinates, opt_layout, opt_endss) {
var _this = _super.call(this) || this;
/**
* @type {Array<Array<number>>}
* @private
*/
_this.endss_ = [];
/**
* @private
* @type {number}
*/
_this.flatInteriorPointsRevision_ = -1;
/**
* @private
* @type {Array<number>}
*/
_this.flatInteriorPoints_ = null;
/**
* @private
* @type {number}
*/
_this.maxDelta_ = -1;
/**
* @private
* @type {number}
*/
_this.maxDeltaRevision_ = -1;
/**
* @private
* @type {number}
*/
_this.orientedRevision_ = -1;
/**
* @private
* @type {Array<number>}
*/
_this.orientedFlatCoordinates_ = null;
if (!opt_endss && !Array.isArray(coordinates[0])) {
var layout = _this.getLayout();
var polygons = /** @type {Array<Polygon>} */ (coordinates);
var flatCoordinates = [];
var endss = [];
for (var i = 0, ii = polygons.length; i < ii; ++i) {
var polygon = polygons[i];
if (i === 0) {
layout = polygon.getLayout();
}
var offset = flatCoordinates.length;
var ends = polygon.getEnds();
for (var j = 0, jj = ends.length; j < jj; ++j) {
ends[j] += offset;
}
extend(flatCoordinates, polygon.getFlatCoordinates());
endss.push(ends);
}
opt_layout = layout;
coordinates = flatCoordinates;
opt_endss = endss;
}
if (opt_layout !== undefined && opt_endss) {
_this.setFlatCoordinates(opt_layout,
/** @type {Array<number>} */ (coordinates));
_this.endss_ = opt_endss;
}
else {
_this.setCoordinates(
/** @type {Array<Array<Array<import("../coordinate.js").Coordinate>>>} */ (coordinates), opt_layout);
}
return _this;
}
/**
* Append the passed polygon to this multipolygon.
* @param {Polygon} polygon Polygon.
* @api
*/
MultiPolygon.prototype.appendPolygon = function (polygon) {
/** @type {Array<number>} */
var ends;
if (!this.flatCoordinates) {
this.flatCoordinates = polygon.getFlatCoordinates().slice();
ends = polygon.getEnds().slice();
this.endss_.push();
}
else {
var offset = this.flatCoordinates.length;
extend(this.flatCoordinates, polygon.getFlatCoordinates());
ends = polygon.getEnds().slice();
for (var i = 0, ii = ends.length; i < ii; ++i) {
ends[i] += offset;
}
}
this.endss_.push(ends);
this.changed();
};
/**
* Make a complete copy of the geometry.
* @return {!MultiPolygon} Clone.
* @api
*/
MultiPolygon.prototype.clone = function () {
var len = this.endss_.length;
var newEndss = new Array(len);
for (var i = 0; i < len; ++i) {
newEndss[i] = this.endss_[i].slice();
}
var multiPolygon = new MultiPolygon(this.flatCoordinates.slice(), this.layout, newEndss);
multiPolygon.applyProperties(this);
return multiPolygon;
};
/**
* @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.
*/
MultiPolygon.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
return minSquaredDistance;
}
if (this.maxDeltaRevision_ != this.getRevision()) {
this.maxDelta_ = Math.sqrt(multiArrayMaxSquaredDelta(this.flatCoordinates, 0, this.endss_, this.stride, 0));
this.maxDeltaRevision_ = this.getRevision();
}
return assignClosestMultiArrayPoint(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);
};
/**
* @param {number} x X.
* @param {number} y Y.
* @return {boolean} Contains (x, y).
*/
MultiPolygon.prototype.containsXY = function (x, y) {
return linearRingssContainsXY(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, x, y);
};
/**
* Return the area of the multipolygon on projected plane.
* @return {number} Area (on projected plane).
* @api
*/
MultiPolygon.prototype.getArea = function () {
return linearRingssArea(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride);
};
/**
* Get the coordinate array for this geometry. This array has the structure
* of a GeoJSON coordinate array for multi-polygons.
*
* @param {boolean} [opt_right] Orient coordinates according to the right-hand
* rule (counter-clockwise for exterior and clockwise for interior rings).
* If `false`, coordinates will be oriented according to the left-hand rule
* (clockwise for exterior and counter-clockwise for interior rings).
* By default, coordinate orientation will depend on how the geometry was
* constructed.
* @return {Array<Array<Array<import("../coordinate.js").Coordinate>>>} Coordinates.
* @api
*/
MultiPolygon.prototype.getCoordinates = function (opt_right) {
var flatCoordinates;
if (opt_right !== undefined) {
flatCoordinates = this.getOrientedFlatCoordinates().slice();
orientLinearRingsArray(flatCoordinates, 0, this.endss_, this.stride, opt_right);
}
else {
flatCoordinates = this.flatCoordinates;
}
return inflateMultiCoordinatesArray(flatCoordinates, 0, this.endss_, this.stride);
};
/**
* @return {Array<Array<number>>} Endss.
*/
MultiPolygon.prototype.getEndss = function () {
return this.endss_;
};
/**
* @return {Array<number>} Flat interior points.
*/
MultiPolygon.prototype.getFlatInteriorPoints = function () {
if (this.flatInteriorPointsRevision_ != this.getRevision()) {
var flatCenters = linearRingssCenter(this.flatCoordinates, 0, this.endss_, this.stride);
this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, flatCenters);
this.flatInteriorPointsRevision_ = this.getRevision();
}
return this.flatInteriorPoints_;
};
/**
* Return the interior points as {@link module:ol/geom/MultiPoint~MultiPoint multipoint}.
* @return {MultiPoint} Interior points as XYM coordinates, where M is
* the length of the horizontal intersection that the point belongs to.
* @api
*/
MultiPolygon.prototype.getInteriorPoints = function () {
return new MultiPoint(this.getFlatInteriorPoints().slice(), GeometryLayout.XYM);
};
/**
* @return {Array<number>} Oriented flat coordinates.
*/
MultiPolygon.prototype.getOrientedFlatCoordinates = function () {
if (this.orientedRevision_ != this.getRevision()) {
var flatCoordinates = this.flatCoordinates;
if (linearRingssAreOriented(flatCoordinates, 0, this.endss_, this.stride)) {
this.orientedFlatCoordinates_ = flatCoordinates;
}
else {
this.orientedFlatCoordinates_ = flatCoordinates.slice();
this.orientedFlatCoordinates_.length = orientLinearRingsArray(this.orientedFlatCoordinates_, 0, this.endss_, this.stride);
}
this.orientedRevision_ = this.getRevision();
}
return this.orientedFlatCoordinates_;
};
/**
* @param {number} squaredTolerance Squared tolerance.
* @return {MultiPolygon} Simplified MultiPolygon.
* @protected
*/
MultiPolygon.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {
var simplifiedFlatCoordinates = [];
var simplifiedEndss = [];
simplifiedFlatCoordinates.length = quantizeMultiArray(this.flatCoordinates, 0, this.endss_, this.stride, Math.sqrt(squaredTolerance), simplifiedFlatCoordinates, 0, simplifiedEndss);
return new MultiPolygon(simplifiedFlatCoordinates, GeometryLayout.XY, simplifiedEndss);
};
/**
* Return the polygon at the specified index.
* @param {number} index Index.
* @return {Polygon} Polygon.
* @api
*/
MultiPolygon.prototype.getPolygon = function (index) {
if (index < 0 || this.endss_.length <= index) {
return null;
}
var offset;
if (index === 0) {
offset = 0;
}
else {
var prevEnds = this.endss_[index - 1];
offset = prevEnds[prevEnds.length - 1];
}
var ends = this.endss_[index].slice();
var end = ends[ends.length - 1];
if (offset !== 0) {
for (var i = 0, ii = ends.length; i < ii; ++i) {
ends[i] -= offset;
}
}
return new Polygon(this.flatCoordinates.slice(offset, end), this.layout, ends);
};
/**
* Return the polygons of this multipolygon.
* @return {Array<Polygon>} Polygons.
* @api
*/
MultiPolygon.prototype.getPolygons = function () {
var layout = this.layout;
var flatCoordinates = this.flatCoordinates;
var endss = this.endss_;
var polygons = [];
var offset = 0;
for (var i = 0, ii = endss.length; i < ii; ++i) {
var ends = endss[i].slice();
var end = ends[ends.length - 1];
if (offset !== 0) {
for (var j = 0, jj = ends.length; j < jj; ++j) {
ends[j] -= offset;
}
}
var polygon = new Polygon(flatCoordinates.slice(offset, end), layout, ends);
polygons.push(polygon);
offset = end;
}
return polygons;
};
/**
* Get the type of this geometry.
* @return {import("./Geometry.js").Type} Geometry type.
* @api
*/
MultiPolygon.prototype.getType = function () {
return 'MultiPolygon';
};
/**
* 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
*/
MultiPolygon.prototype.intersectsExtent = function (extent) {
return intersectsLinearRingMultiArray(this.getOrientedFlatCoordinates(), 0, this.endss_, this.stride, extent);
};
/**
* Set the coordinates of the multipolygon.
* @param {!Array<Array<Array<import("../coordinate.js").Coordinate>>>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api
*/
MultiPolygon.prototype.setCoordinates = function (coordinates, opt_layout) {
this.setLayout(opt_layout, coordinates, 3);
if (!this.flatCoordinates) {
this.flatCoordinates = [];
}
var endss = deflateMultiCoordinatesArray(this.flatCoordinates, 0, coordinates, this.stride, this.endss_);
if (endss.length === 0) {
this.flatCoordinates.length = 0;
}
else {
var lastEnds = endss[endss.length - 1];
this.flatCoordinates.length =
lastEnds.length === 0 ? 0 : lastEnds[lastEnds.length - 1];
}
this.changed();
};
return MultiPolygon;
}(SimpleGeometry));
export default MultiPolygon;
//# sourceMappingURL=MultiPolygon.js.map

1
node_modules/ol/geom/MultiPolygon.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

28
node_modules/ol/geom/Point.d.ts generated vendored Normal file
View File

@@ -0,0 +1,28 @@
export default Point;
/**
* @classdesc
* Point geometry.
*
* @api
*/
declare class Point extends SimpleGeometry {
/**
* @param {import("../coordinate.js").Coordinate} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/
constructor(coordinates: import("../coordinate.js").Coordinate, opt_layout?: any);
/**
* Make a complete copy of the geometry.
* @return {!Point} Clone.
* @api
*/
clone(): Point;
/**
* Return the coordinate of the point.
* @return {import("../coordinate.js").Coordinate} Coordinates.
* @api
*/
getCoordinates(): import("../coordinate.js").Coordinate;
}
import SimpleGeometry from "./SimpleGeometry.js";
//# sourceMappingURL=Point.d.ts.map

1
node_modules/ol/geom/Point.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Point.d.ts","sourceRoot":"","sources":["../src/geom/Point.js"],"names":[],"mappings":";AAQA;;;;;GAKG;AACH;IACE;;;OAGG;IACH,yBAHW,OAAO,kBAAkB,EAAE,UAAU,oBAM/C;IAED;;;;OAIG;IACH,SAHa,KAAK,CAOjB;IA6BD;;;;OAIG;IACH,kBAHY,OAAO,kBAAkB,EAAE,UAAU,CAKhD;CAgDF"}

121
node_modules/ol/geom/Point.js generated vendored Normal file
View File

@@ -0,0 +1,121 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/geom/Point
*/
import SimpleGeometry from './SimpleGeometry.js';
import { containsXY, createOrUpdateFromCoordinate } from '../extent.js';
import { deflateCoordinate } from './flat/deflate.js';
import { squaredDistance as squaredDx } from '../math.js';
/**
* @classdesc
* Point geometry.
*
* @api
*/
var Point = /** @class */ (function (_super) {
__extends(Point, _super);
/**
* @param {import("../coordinate.js").Coordinate} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/
function Point(coordinates, opt_layout) {
var _this = _super.call(this) || this;
_this.setCoordinates(coordinates, opt_layout);
return _this;
}
/**
* Make a complete copy of the geometry.
* @return {!Point} Clone.
* @api
*/
Point.prototype.clone = function () {
var point = new Point(this.flatCoordinates.slice(), this.layout);
point.applyProperties(this);
return point;
};
/**
* @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.
*/
Point.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {
var flatCoordinates = this.flatCoordinates;
var squaredDistance = squaredDx(x, y, flatCoordinates[0], flatCoordinates[1]);
if (squaredDistance < minSquaredDistance) {
var stride = this.stride;
for (var i = 0; i < stride; ++i) {
closestPoint[i] = flatCoordinates[i];
}
closestPoint.length = stride;
return squaredDistance;
}
else {
return minSquaredDistance;
}
};
/**
* Return the coordinate of the point.
* @return {import("../coordinate.js").Coordinate} Coordinates.
* @api
*/
Point.prototype.getCoordinates = function () {
return !this.flatCoordinates ? [] : this.flatCoordinates.slice();
};
/**
* @param {import("../extent.js").Extent} extent Extent.
* @protected
* @return {import("../extent.js").Extent} extent Extent.
*/
Point.prototype.computeExtent = function (extent) {
return createOrUpdateFromCoordinate(this.flatCoordinates, extent);
};
/**
* Get the type of this geometry.
* @return {import("./Geometry.js").Type} Geometry type.
* @api
*/
Point.prototype.getType = function () {
return 'Point';
};
/**
* 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
*/
Point.prototype.intersectsExtent = function (extent) {
return containsXY(extent, this.flatCoordinates[0], this.flatCoordinates[1]);
};
/**
* @param {!Array<*>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api
*/
Point.prototype.setCoordinates = function (coordinates, opt_layout) {
this.setLayout(opt_layout, coordinates, 0);
if (!this.flatCoordinates) {
this.flatCoordinates = [];
}
this.flatCoordinates.length = deflateCoordinate(this.flatCoordinates, 0, coordinates, this.stride);
this.changed();
};
return Point;
}(SimpleGeometry));
export default Point;
//# sourceMappingURL=Point.js.map

1
node_modules/ol/geom/Point.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Point.js","sourceRoot":"","sources":["../src/geom/Point.js"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;GAEG;AACH,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAC,U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,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;IACnE,CAAC;IAED;;;;OAIG;IACH,6BAAa,GAAb,UAAc,MAAM;QAClB,OAAO,4BAA4B,CAAC,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IACpE,CAAC;IAED;;;;OAIG;IACH,uBAAO,GAAP;QACE,OAAO,OAAO,CAAC;IACjB,CAAC;IAED;;;;;OAKG;IACH,gCAAgB,GAAhB,UAAiB,MAAM;QACrB,OAAO,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9E,CAAC;IAED;;;;OAIG;IACH,8BAAc,GAAd,UAAe,WAAW,EAAE,UAAU;QACpC,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;QAC3C,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE;YACzB,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;SAC3B;QACD,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,iBAAiB,CAC7C,IAAI,CAAC,eAAe,EACpB,CAAC,EACD,WAAW,EACX,IAAI,CAAC,MAAM,CACZ,CAAC;QACF,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IACH,YAAC;AAAD,CAAC,AAvGD,CAAoB,cAAc,GAuGjC;AAED,eAAe,KAAK,CAAC"}

188
node_modules/ol/geom/Polygon.d.ts generated vendored Normal file
View File

@@ -0,0 +1,188 @@
/**
* Create an approximation of a circle on the surface of a sphere.
* @param {import("../coordinate.js").Coordinate} center Center (`[lon, lat]` in degrees).
* @param {number} radius The great-circle distance from the center to
* the polygon vertices in meters.
* @param {number} [opt_n] Optional number of vertices for the resulting
* polygon. Default is `32`.
* @param {number} [opt_sphereRadius] Optional radius for the sphere (defaults to
* the Earth's mean radius using the WGS84 ellipsoid).
* @return {Polygon} The "circular" polygon.
* @api
*/
export function circular(center: import("../coordinate.js").Coordinate, radius: number, opt_n?: number | undefined, opt_sphereRadius?: number | undefined): Polygon;
/**
* Create a polygon from an extent. The layout used is `XY`.
* @param {import("../extent.js").Extent} extent The extent.
* @return {Polygon} The polygon.
* @api
*/
export function fromExtent(extent: import("../extent.js").Extent): Polygon;
/**
* Create a regular polygon from a circle.
* @param {import("./Circle.js").default} circle Circle geometry.
* @param {number} [opt_sides] Number of sides of the polygon. Default is 32.
* @param {number} [opt_angle] Start angle for the first vertex of the polygon in
* counter-clockwise radians. 0 means East. Default is 0.
* @return {Polygon} Polygon geometry.
* @api
*/
export function fromCircle(circle: import("./Circle.js").default, opt_sides?: number | undefined, opt_angle?: number | undefined): Polygon;
/**
* Modify the coordinates of a polygon to make it a regular polygon.
* @param {Polygon} polygon Polygon geometry.
* @param {import("../coordinate.js").Coordinate} center Center of the regular polygon.
* @param {number} radius Radius of the regular polygon.
* @param {number} [opt_angle] Start angle for the first vertex of the polygon in
* counter-clockwise radians. 0 means East. Default is 0.
*/
export function makeRegular(polygon: Polygon, center: import("../coordinate.js").Coordinate, radius: number, opt_angle?: number | undefined): void;
export default Polygon;
/**
* @classdesc
* Polygon geometry.
*
* @api
*/
declare class Polygon extends SimpleGeometry {
/**
* @param {!Array<Array<import("../coordinate.js").Coordinate>>|!Array<number>} coordinates
* Array of linear rings that define the polygon. The first linear ring of the
* array defines the outer-boundary or surface of the polygon. Each subsequent
* linear ring defines a hole in the surface of the polygon. A linear ring is
* an array of vertices' coordinates where the first coordinate and the last are
* equivalent. (For internal use, flat coordinates in combination with
* `opt_layout` and `opt_ends` are also accepted.)
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @param {Array<number>} [opt_ends] Ends (for internal use with flat coordinates).
*/
constructor(coordinates: Array<Array<import("../coordinate.js").Coordinate>> | Array<number>, opt_layout?: any, opt_ends?: number[] | undefined);
/**
* @type {Array<number>}
* @private
*/
private ends_;
/**
* @private
* @type {number}
*/
private flatInteriorPointRevision_;
/**
* @private
* @type {import("../coordinate.js").Coordinate}
*/
private flatInteriorPoint_;
/**
* @private
* @type {number}
*/
private maxDelta_;
/**
* @private
* @type {number}
*/
private maxDeltaRevision_;
/**
* @private
* @type {number}
*/
private orientedRevision_;
/**
* @private
* @type {Array<number>}
*/
private orientedFlatCoordinates_;
/**
* Append the passed linear ring to this polygon.
* @param {LinearRing} linearRing Linear ring.
* @api
*/
appendLinearRing(linearRing: LinearRing): void;
/**
* Make a complete copy of the geometry.
* @return {!Polygon} Clone.
* @api
*/
clone(): Polygon;
/**
* Return the area of the polygon on projected plane.
* @return {number} Area (on projected plane).
* @api
*/
getArea(): number;
/**
* Get the coordinate array for this geometry. This array has the structure
* of a GeoJSON coordinate array for polygons.
*
* @param {boolean} [opt_right] Orient coordinates according to the right-hand
* rule (counter-clockwise for exterior and clockwise for interior rings).
* If `false`, coordinates will be oriented according to the left-hand rule
* (clockwise for exterior and counter-clockwise for interior rings).
* By default, coordinate orientation will depend on how the geometry was
* constructed.
* @return {Array<Array<import("../coordinate.js").Coordinate>>} Coordinates.
* @api
*/
getCoordinates(opt_right?: boolean | undefined): Array<Array<import("../coordinate.js").Coordinate>>;
/**
* @return {Array<number>} Ends.
*/
getEnds(): Array<number>;
/**
* @return {Array<number>} Interior point.
*/
getFlatInteriorPoint(): Array<number>;
/**
* Return an interior point of the polygon.
* @return {Point} Interior point as XYM coordinate, where M is the
* length of the horizontal intersection that the point belongs to.
* @api
*/
getInteriorPoint(): Point;
/**
* Return the number of rings of the polygon, this includes the exterior
* ring and any interior rings.
*
* @return {number} Number of rings.
* @api
*/
getLinearRingCount(): number;
/**
* Return the Nth linear ring of the polygon geometry. Return `null` if the
* given index is out of range.
* The exterior linear ring is available at index `0` and the interior rings
* at index `1` and beyond.
*
* @param {number} index Index.
* @return {LinearRing|null} Linear ring.
* @api
*/
getLinearRing(index: number): LinearRing | null;
/**
* Return the linear rings of the polygon.
* @return {Array<LinearRing>} Linear rings.
* @api
*/
getLinearRings(): Array<LinearRing>;
/**
* @return {Array<number>} Oriented flat coordinates.
*/
getOrientedFlatCoordinates(): Array<number>;
/**
* @param {number} squaredTolerance Squared tolerance.
* @return {Polygon} Simplified Polygon.
* @protected
*/
protected getSimplifiedGeometryInternal(squaredTolerance: number): Polygon;
/**
* Set the coordinates of the polygon.
* @param {!Array<Array<import("../coordinate.js").Coordinate>>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api
*/
setCoordinates(coordinates: Array<Array<import("../coordinate.js").Coordinate>>, opt_layout?: any): void;
}
import SimpleGeometry from "./SimpleGeometry.js";
import LinearRing from "./LinearRing.js";
import Point from "./Point.js";
//# sourceMappingURL=Polygon.d.ts.map

1
node_modules/ol/geom/Polygon.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"Polygon.d.ts","sourceRoot":"","sources":["../src/geom/Polygon.js"],"names":[],"mappings":"AA4ZA;;;;;;;;;;;GAWG;AACH,iCAVW,OAAO,kBAAkB,EAAE,UAAU,UACrC,MAAM,sEAML,OAAO,CAiBlB;AAED;;;;;GAKG;AACH,mCAJW,OAAO,cAAc,EAAE,MAAM,GAC5B,OAAO,CAuBlB;AAED;;;;;;;;GAQG;AACH,mCAPW,OAAO,aAAa,EAAE,OAAO,mEAI5B,OAAO,CAqBlB;AAED;;;;;;;GAOG;AACH,qCANW,OAAO,UACP,OAAO,kBAAkB,EAAE,UAAU,UACrC,MAAM,wCAgBhB;;AAhfD;;;;;GAKG;AACH;IACE;;;;;;;;;;OAUG;IACH,yBAVY,MAAM,MAAM,OAAO,kBAAkB,EAAE,UAAU,CAAC,CAAC,GAAE,MAAM,MAAM,CAAC,qDAqE7E;IAxDC;;;OAGG;IACH,cAAe;IAEf;;;OAGG;IACH,mCAAoC;IAEpC;;;OAGG;IACH,2BAA8B;IAE9B;;;OAGG;IACH,kBAAmB;IAEnB;;;OAGG;IACH,0BAA2B;IAE3B;;;OAGG;IACH,0BAA2B;IAE3B;;;OAGG;IACH,iCAAoC;IAkBtC;;;;OAIG;IACH,6BAHW,UAAU,QAWpB;IAED;;;;OAIG;IACH,SAHa,OAAO,CAWnB;IAuDD;;;;OAIG;IACH,WAHY,MAAM,CAUjB;IAED;;;;;;;;;;;;OAYG;IACH,iDAHY,MAAM,MAAM,OAAO,kBAAkB,EAAE,UAAU,CAAC,CAAC,CAa9D;IAED;;OAEG;IACH,WAFY,MAAM,MAAM,CAAC,CAIxB;IAED;;OAEG;IACH,wBAFY,MAAM,MAAM,CAAC,CAgBxB;IAED;;;;;OAKG;IACH,oBAJY,KAAK,CAMhB;IAED;;;;;;OAMG;IACH,sBAHY,MAAM,CAKjB;IAED;;;;;;;;;OASG;IACH,qBAJW,MAAM,GACL,UAAU,GAAC,IAAI,CAc1B;IAED;;;;OAIG;IACH,kBAHY,MAAM,UAAU,CAAC,CAmB5B;IAED;;OAEG;IACH,8BAFY,MAAM,MAAM,CAAC,CAmBxB;IAED;;;;OAIG;IACH,0DAJW,MAAM,GACL,OAAO,CAqBlB;IA2BD;;;;;OAKG;IACH,4BAJY,MAAM,MAAM,OAAO,kBAAkB,EAAE,UAAU,CAAC,CAAC,0BAkB9D;CACF"}

419
node_modules/ol/geom/Polygon.js generated vendored Normal file
View File

@@ -0,0 +1,419 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/geom/Polygon
*/
import GeometryLayout from './GeometryLayout.js';
import LinearRing from './LinearRing.js';
import Point from './Point.js';
import SimpleGeometry from './SimpleGeometry.js';
import { arrayMaxSquaredDelta, assignClosestArrayPoint } from './flat/closest.js';
import { closestSquaredDistanceXY, getCenter } from '../extent.js';
import { deflateCoordinatesArray } from './flat/deflate.js';
import { extend } from '../array.js';
import { getInteriorPointOfArray } from './flat/interiorpoint.js';
import { inflateCoordinatesArray } from './flat/inflate.js';
import { intersectsLinearRingArray } from './flat/intersectsextent.js';
import { linearRingsAreOriented, orientLinearRings } from './flat/orient.js';
import { linearRings as linearRingsArea } from './flat/area.js';
import { linearRingsContainsXY } from './flat/contains.js';
import { modulo } from '../math.js';
import { quantizeArray } from './flat/simplify.js';
import { offset as sphereOffset } from '../sphere.js';
/**
* @classdesc
* Polygon geometry.
*
* @api
*/
var Polygon = /** @class */ (function (_super) {
__extends(Polygon, _super);
/**
* @param {!Array<Array<import("../coordinate.js").Coordinate>>|!Array<number>} coordinates
* Array of linear rings that define the polygon. The first linear ring of the
* array defines the outer-boundary or surface of the polygon. Each subsequent
* linear ring defines a hole in the surface of the polygon. A linear ring is
* an array of vertices' coordinates where the first coordinate and the last are
* equivalent. (For internal use, flat coordinates in combination with
* `opt_layout` and `opt_ends` are also accepted.)
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @param {Array<number>} [opt_ends] Ends (for internal use with flat coordinates).
*/
function Polygon(coordinates, opt_layout, opt_ends) {
var _this = _super.call(this) || this;
/**
* @type {Array<number>}
* @private
*/
_this.ends_ = [];
/**
* @private
* @type {number}
*/
_this.flatInteriorPointRevision_ = -1;
/**
* @private
* @type {import("../coordinate.js").Coordinate}
*/
_this.flatInteriorPoint_ = null;
/**
* @private
* @type {number}
*/
_this.maxDelta_ = -1;
/**
* @private
* @type {number}
*/
_this.maxDeltaRevision_ = -1;
/**
* @private
* @type {number}
*/
_this.orientedRevision_ = -1;
/**
* @private
* @type {Array<number>}
*/
_this.orientedFlatCoordinates_ = null;
if (opt_layout !== undefined && opt_ends) {
_this.setFlatCoordinates(opt_layout,
/** @type {Array<number>} */ (coordinates));
_this.ends_ = opt_ends;
}
else {
_this.setCoordinates(
/** @type {Array<Array<import("../coordinate.js").Coordinate>>} */ (coordinates), opt_layout);
}
return _this;
}
/**
* Append the passed linear ring to this polygon.
* @param {LinearRing} linearRing Linear ring.
* @api
*/
Polygon.prototype.appendLinearRing = function (linearRing) {
if (!this.flatCoordinates) {
this.flatCoordinates = linearRing.getFlatCoordinates().slice();
}
else {
extend(this.flatCoordinates, linearRing.getFlatCoordinates());
}
this.ends_.push(this.flatCoordinates.length);
this.changed();
};
/**
* Make a complete copy of the geometry.
* @return {!Polygon} Clone.
* @api
*/
Polygon.prototype.clone = function () {
var polygon = new Polygon(this.flatCoordinates.slice(), this.layout, this.ends_.slice());
polygon.applyProperties(this);
return polygon;
};
/**
* @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.
*/
Polygon.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
return minSquaredDistance;
}
if (this.maxDeltaRevision_ != this.getRevision()) {
this.maxDelta_ = Math.sqrt(arrayMaxSquaredDelta(this.flatCoordinates, 0, this.ends_, this.stride, 0));
this.maxDeltaRevision_ = this.getRevision();
}
return assignClosestArrayPoint(this.flatCoordinates, 0, this.ends_, this.stride, this.maxDelta_, true, x, y, closestPoint, minSquaredDistance);
};
/**
* @param {number} x X.
* @param {number} y Y.
* @return {boolean} Contains (x, y).
*/
Polygon.prototype.containsXY = function (x, y) {
return linearRingsContainsXY(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, x, y);
};
/**
* Return the area of the polygon on projected plane.
* @return {number} Area (on projected plane).
* @api
*/
Polygon.prototype.getArea = function () {
return linearRingsArea(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride);
};
/**
* Get the coordinate array for this geometry. This array has the structure
* of a GeoJSON coordinate array for polygons.
*
* @param {boolean} [opt_right] Orient coordinates according to the right-hand
* rule (counter-clockwise for exterior and clockwise for interior rings).
* If `false`, coordinates will be oriented according to the left-hand rule
* (clockwise for exterior and counter-clockwise for interior rings).
* By default, coordinate orientation will depend on how the geometry was
* constructed.
* @return {Array<Array<import("../coordinate.js").Coordinate>>} Coordinates.
* @api
*/
Polygon.prototype.getCoordinates = function (opt_right) {
var flatCoordinates;
if (opt_right !== undefined) {
flatCoordinates = this.getOrientedFlatCoordinates().slice();
orientLinearRings(flatCoordinates, 0, this.ends_, this.stride, opt_right);
}
else {
flatCoordinates = this.flatCoordinates;
}
return inflateCoordinatesArray(flatCoordinates, 0, this.ends_, this.stride);
};
/**
* @return {Array<number>} Ends.
*/
Polygon.prototype.getEnds = function () {
return this.ends_;
};
/**
* @return {Array<number>} Interior point.
*/
Polygon.prototype.getFlatInteriorPoint = function () {
if (this.flatInteriorPointRevision_ != this.getRevision()) {
var flatCenter = getCenter(this.getExtent());
this.flatInteriorPoint_ = getInteriorPointOfArray(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, flatCenter, 0);
this.flatInteriorPointRevision_ = this.getRevision();
}
return this.flatInteriorPoint_;
};
/**
* Return an interior point of the polygon.
* @return {Point} Interior point as XYM coordinate, where M is the
* length of the horizontal intersection that the point belongs to.
* @api
*/
Polygon.prototype.getInteriorPoint = function () {
return new Point(this.getFlatInteriorPoint(), GeometryLayout.XYM);
};
/**
* Return the number of rings of the polygon, this includes the exterior
* ring and any interior rings.
*
* @return {number} Number of rings.
* @api
*/
Polygon.prototype.getLinearRingCount = function () {
return this.ends_.length;
};
/**
* Return the Nth linear ring of the polygon geometry. Return `null` if the
* given index is out of range.
* The exterior linear ring is available at index `0` and the interior rings
* at index `1` and beyond.
*
* @param {number} index Index.
* @return {LinearRing|null} Linear ring.
* @api
*/
Polygon.prototype.getLinearRing = function (index) {
if (index < 0 || this.ends_.length <= index) {
return null;
}
return new LinearRing(this.flatCoordinates.slice(index === 0 ? 0 : this.ends_[index - 1], this.ends_[index]), this.layout);
};
/**
* Return the linear rings of the polygon.
* @return {Array<LinearRing>} Linear rings.
* @api
*/
Polygon.prototype.getLinearRings = function () {
var layout = this.layout;
var flatCoordinates = this.flatCoordinates;
var ends = this.ends_;
var linearRings = [];
var offset = 0;
for (var i = 0, ii = ends.length; i < ii; ++i) {
var end = ends[i];
var linearRing = new LinearRing(flatCoordinates.slice(offset, end), layout);
linearRings.push(linearRing);
offset = end;
}
return linearRings;
};
/**
* @return {Array<number>} Oriented flat coordinates.
*/
Polygon.prototype.getOrientedFlatCoordinates = function () {
if (this.orientedRevision_ != this.getRevision()) {
var flatCoordinates = this.flatCoordinates;
if (linearRingsAreOriented(flatCoordinates, 0, this.ends_, this.stride)) {
this.orientedFlatCoordinates_ = flatCoordinates;
}
else {
this.orientedFlatCoordinates_ = flatCoordinates.slice();
this.orientedFlatCoordinates_.length = orientLinearRings(this.orientedFlatCoordinates_, 0, this.ends_, this.stride);
}
this.orientedRevision_ = this.getRevision();
}
return this.orientedFlatCoordinates_;
};
/**
* @param {number} squaredTolerance Squared tolerance.
* @return {Polygon} Simplified Polygon.
* @protected
*/
Polygon.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {
var simplifiedFlatCoordinates = [];
var simplifiedEnds = [];
simplifiedFlatCoordinates.length = quantizeArray(this.flatCoordinates, 0, this.ends_, this.stride, Math.sqrt(squaredTolerance), simplifiedFlatCoordinates, 0, simplifiedEnds);
return new Polygon(simplifiedFlatCoordinates, GeometryLayout.XY, simplifiedEnds);
};
/**
* Get the type of this geometry.
* @return {import("./Geometry.js").Type} Geometry type.
* @api
*/
Polygon.prototype.getType = function () {
return 'Polygon';
};
/**
* 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
*/
Polygon.prototype.intersectsExtent = function (extent) {
return intersectsLinearRingArray(this.getOrientedFlatCoordinates(), 0, this.ends_, this.stride, extent);
};
/**
* Set the coordinates of the polygon.
* @param {!Array<Array<import("../coordinate.js").Coordinate>>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
* @api
*/
Polygon.prototype.setCoordinates = function (coordinates, opt_layout) {
this.setLayout(opt_layout, coordinates, 2);
if (!this.flatCoordinates) {
this.flatCoordinates = [];
}
var ends = deflateCoordinatesArray(this.flatCoordinates, 0, coordinates, this.stride, this.ends_);
this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];
this.changed();
};
return Polygon;
}(SimpleGeometry));
export default Polygon;
/**
* Create an approximation of a circle on the surface of a sphere.
* @param {import("../coordinate.js").Coordinate} center Center (`[lon, lat]` in degrees).
* @param {number} radius The great-circle distance from the center to
* the polygon vertices in meters.
* @param {number} [opt_n] Optional number of vertices for the resulting
* polygon. Default is `32`.
* @param {number} [opt_sphereRadius] Optional radius for the sphere (defaults to
* the Earth's mean radius using the WGS84 ellipsoid).
* @return {Polygon} The "circular" polygon.
* @api
*/
export function circular(center, radius, opt_n, opt_sphereRadius) {
var n = opt_n ? opt_n : 32;
/** @type {Array<number>} */
var flatCoordinates = [];
for (var i = 0; i < n; ++i) {
extend(flatCoordinates, sphereOffset(center, radius, (2 * Math.PI * i) / n, opt_sphereRadius));
}
flatCoordinates.push(flatCoordinates[0], flatCoordinates[1]);
return new Polygon(flatCoordinates, GeometryLayout.XY, [
flatCoordinates.length,
]);
}
/**
* Create a polygon from an extent. The layout used is `XY`.
* @param {import("../extent.js").Extent} extent The extent.
* @return {Polygon} The polygon.
* @api
*/
export function fromExtent(extent) {
var minX = extent[0];
var minY = extent[1];
var maxX = extent[2];
var maxY = extent[3];
var flatCoordinates = [
minX,
minY,
minX,
maxY,
maxX,
maxY,
maxX,
minY,
minX,
minY,
];
return new Polygon(flatCoordinates, GeometryLayout.XY, [
flatCoordinates.length,
]);
}
/**
* Create a regular polygon from a circle.
* @param {import("./Circle.js").default} circle Circle geometry.
* @param {number} [opt_sides] Number of sides of the polygon. Default is 32.
* @param {number} [opt_angle] Start angle for the first vertex of the polygon in
* counter-clockwise radians. 0 means East. Default is 0.
* @return {Polygon} Polygon geometry.
* @api
*/
export function fromCircle(circle, opt_sides, opt_angle) {
var sides = opt_sides ? opt_sides : 32;
var stride = circle.getStride();
var layout = circle.getLayout();
var center = circle.getCenter();
var arrayLength = stride * (sides + 1);
var flatCoordinates = new Array(arrayLength);
for (var i = 0; i < arrayLength; i += stride) {
flatCoordinates[i] = 0;
flatCoordinates[i + 1] = 0;
for (var j = 2; j < stride; j++) {
flatCoordinates[i + j] = center[j];
}
}
var ends = [flatCoordinates.length];
var polygon = new Polygon(flatCoordinates, layout, ends);
makeRegular(polygon, center, circle.getRadius(), opt_angle);
return polygon;
}
/**
* Modify the coordinates of a polygon to make it a regular polygon.
* @param {Polygon} polygon Polygon geometry.
* @param {import("../coordinate.js").Coordinate} center Center of the regular polygon.
* @param {number} radius Radius of the regular polygon.
* @param {number} [opt_angle] Start angle for the first vertex of the polygon in
* counter-clockwise radians. 0 means East. Default is 0.
*/
export function makeRegular(polygon, center, radius, opt_angle) {
var flatCoordinates = polygon.getFlatCoordinates();
var stride = polygon.getStride();
var sides = flatCoordinates.length / stride - 1;
var startAngle = opt_angle ? opt_angle : 0;
for (var i = 0; i <= sides; ++i) {
var offset = i * stride;
var angle = startAngle + (modulo(i, sides) * 2 * Math.PI) / sides;
flatCoordinates[offset] = center[0] + radius * Math.cos(angle);
flatCoordinates[offset + 1] = center[1] + radius * Math.sin(angle);
}
polygon.changed();
}
//# sourceMappingURL=Polygon.js.map

1
node_modules/ol/geom/Polygon.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

101
node_modules/ol/geom/SimpleGeometry.d.ts generated vendored Normal file
View File

@@ -0,0 +1,101 @@
/**
* @param {import("./GeometryLayout.js").default} layout Layout.
* @return {number} Stride.
*/
export function getStrideForLayout(layout: any): number;
/**
* @param {SimpleGeometry} simpleGeometry Simple geometry.
* @param {import("../transform.js").Transform} transform Transform.
* @param {Array<number>} [opt_dest] Destination.
* @return {Array<number>} Transformed flat coordinates.
*/
export function transformGeom2D(simpleGeometry: SimpleGeometry, transform: import("../transform.js").Transform, opt_dest?: number[] | undefined): Array<number>;
export default SimpleGeometry;
/**
* @classdesc
* Abstract base class; only used for creating subclasses; do not instantiate
* in apps, as cannot be rendered.
*
* @abstract
* @api
*/
declare class SimpleGeometry extends Geometry {
/**
* @protected
* @type {import("./GeometryLayout.js").default}
*/
protected layout: any;
/**
* @protected
* @type {number}
*/
protected stride: number;
/**
* @protected
* @type {Array<number>}
*/
protected flatCoordinates: Array<number>;
/**
* @abstract
* @return {Array<*> | null} Coordinates.
*/
getCoordinates(): Array<any> | null;
/**
* Return the first coordinate of the geometry.
* @return {import("../coordinate.js").Coordinate} First coordinate.
* @api
*/
getFirstCoordinate(): import("../coordinate.js").Coordinate;
/**
* @return {Array<number>} Flat coordinates.
*/
getFlatCoordinates(): Array<number>;
/**
* Return the last coordinate of the geometry.
* @return {import("../coordinate.js").Coordinate} Last point.
* @api
*/
getLastCoordinate(): import("../coordinate.js").Coordinate;
/**
* Return the {@link module:ol/geom/GeometryLayout layout} of the geometry.
* @return {import("./GeometryLayout.js").default} Layout.
* @api
*/
getLayout(): any;
/**
* Create a simplified version of this geometry using the Douglas Peucker algorithm.
* @param {number} squaredTolerance Squared tolerance.
* @return {SimpleGeometry} Simplified geometry.
*/
getSimplifiedGeometry(squaredTolerance: number): SimpleGeometry;
/**
* @param {number} squaredTolerance Squared tolerance.
* @return {SimpleGeometry} Simplified geometry.
* @protected
*/
protected getSimplifiedGeometryInternal(squaredTolerance: number): SimpleGeometry;
/**
* @return {number} Stride.
*/
getStride(): number;
/**
* @param {import("./GeometryLayout.js").default} layout Layout.
* @param {Array<number>} flatCoordinates Flat coordinates.
*/
setFlatCoordinates(layout: any, flatCoordinates: Array<number>): void;
/**
* @abstract
* @param {!Array<*>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/
setCoordinates(coordinates: Array<any>, opt_layout?: any): void;
/**
* @param {import("./GeometryLayout.js").default|undefined} layout Layout.
* @param {Array<*>} coordinates Coordinates.
* @param {number} nesting Nesting.
* @protected
*/
protected setLayout(layout: any | undefined, coordinates: Array<any>, nesting: number): void;
}
import Geometry from "./Geometry.js";
//# sourceMappingURL=SimpleGeometry.d.ts.map

1
node_modules/ol/geom/SimpleGeometry.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"SimpleGeometry.d.ts","sourceRoot":"","sources":["../src/geom/SimpleGeometry.js"],"names":[],"mappings":"AA2TA;;;GAGG;AACH,iDAFY,MAAM,CAYjB;AAED;;;;;GAKG;AACH,gDALW,cAAc,aACd,OAAO,iBAAiB,EAAE,SAAS,oCAElC,MAAM,MAAM,CAAC,CAiBxB;;AAvVD;;;;;;;GAOG;AACH;IAII;;;OAGG;IACH,sBAA+B;IAE/B;;;OAGG;IACH,kBAFU,MAAM,CAED;IAEf;;;OAGG;IACH,2BAFU,MAAM,MAAM,CAAC,CAEI;IAkB7B;;;OAGG;IACH,kBAFY,UAAQ,GAAG,IAAI,CAI1B;IAED;;;;OAIG;IACH,sBAHY,OAAO,kBAAkB,EAAE,UAAU,CAKhD;IAED;;OAEG;IACH,sBAFY,MAAM,MAAM,CAAC,CAIxB;IAED;;;;OAIG;IACH,qBAHY,OAAO,kBAAkB,EAAE,UAAU,CAOhD;IAED;;;;OAIG;IACH,iBAEC;IAED;;;;OAIG;IACH,wCAHW,MAAM,GACL,cAAc,CAgCzB;IAED;;;;OAIG;IACH,0DAJW,MAAM,GACL,cAAc,CAKzB;IAED;;OAEG;IACH,aAFY,MAAM,CAIjB;IAED;;;OAGG;IACH,iDAFW,MAAM,MAAM,CAAC,QAMvB;IAED;;;;OAIG;IACH,4BAHY,UAAQ,0BAKnB;IAED;;;;;OAKG;IACH,4BALW,MAAsC,SAAS,eAC/C,UAAQ,WACR,MAAM,QAuBhB;CAoGF"}

314
node_modules/ol/geom/SimpleGeometry.js generated vendored Normal file
View File

@@ -0,0 +1,314 @@
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
/**
* @module ol/geom/SimpleGeometry
*/
import Geometry from './Geometry.js';
import GeometryLayout from './GeometryLayout.js';
import { abstract } from '../util.js';
import { createOrUpdateFromFlatCoordinates, getCenter } from '../extent.js';
import { rotate, scale, transform2D, translate } from './flat/transform.js';
/**
* @classdesc
* Abstract base class; only used for creating subclasses; do not instantiate
* in apps, as cannot be rendered.
*
* @abstract
* @api
*/
var SimpleGeometry = /** @class */ (function (_super) {
__extends(SimpleGeometry, _super);
function SimpleGeometry() {
var _this = _super.call(this) || this;
/**
* @protected
* @type {import("./GeometryLayout.js").default}
*/
_this.layout = GeometryLayout.XY;
/**
* @protected
* @type {number}
*/
_this.stride = 2;
/**
* @protected
* @type {Array<number>}
*/
_this.flatCoordinates = null;
return _this;
}
/**
* @param {import("../extent.js").Extent} extent Extent.
* @protected
* @return {import("../extent.js").Extent} extent Extent.
*/
SimpleGeometry.prototype.computeExtent = function (extent) {
return createOrUpdateFromFlatCoordinates(this.flatCoordinates, 0, this.flatCoordinates.length, this.stride, extent);
};
/**
* @abstract
* @return {Array<*> | null} Coordinates.
*/
SimpleGeometry.prototype.getCoordinates = function () {
return abstract();
};
/**
* Return the first coordinate of the geometry.
* @return {import("../coordinate.js").Coordinate} First coordinate.
* @api
*/
SimpleGeometry.prototype.getFirstCoordinate = function () {
return this.flatCoordinates.slice(0, this.stride);
};
/**
* @return {Array<number>} Flat coordinates.
*/
SimpleGeometry.prototype.getFlatCoordinates = function () {
return this.flatCoordinates;
};
/**
* Return the last coordinate of the geometry.
* @return {import("../coordinate.js").Coordinate} Last point.
* @api
*/
SimpleGeometry.prototype.getLastCoordinate = function () {
return this.flatCoordinates.slice(this.flatCoordinates.length - this.stride);
};
/**
* Return the {@link module:ol/geom/GeometryLayout layout} of the geometry.
* @return {import("./GeometryLayout.js").default} Layout.
* @api
*/
SimpleGeometry.prototype.getLayout = function () {
return this.layout;
};
/**
* Create a simplified version of this geometry using the Douglas Peucker algorithm.
* @param {number} squaredTolerance Squared tolerance.
* @return {SimpleGeometry} Simplified geometry.
*/
SimpleGeometry.prototype.getSimplifiedGeometry = function (squaredTolerance) {
if (this.simplifiedGeometryRevision !== this.getRevision()) {
this.simplifiedGeometryMaxMinSquaredTolerance = 0;
this.simplifiedGeometryRevision = this.getRevision();
}
// If squaredTolerance is negative or if we know that simplification will not
// have any effect then just return this.
if (squaredTolerance < 0 ||
(this.simplifiedGeometryMaxMinSquaredTolerance !== 0 &&
squaredTolerance <= this.simplifiedGeometryMaxMinSquaredTolerance)) {
return this;
}
var simplifiedGeometry = this.getSimplifiedGeometryInternal(squaredTolerance);
var simplifiedFlatCoordinates = simplifiedGeometry.getFlatCoordinates();
if (simplifiedFlatCoordinates.length < this.flatCoordinates.length) {
return simplifiedGeometry;
}
else {
// Simplification did not actually remove any coordinates. We now know
// that any calls to getSimplifiedGeometry with a squaredTolerance less
// than or equal to the current squaredTolerance will also not have any
// effect. This allows us to short circuit simplification (saving CPU
// cycles) and prevents the cache of simplified geometries from filling
// up with useless identical copies of this geometry (saving memory).
this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;
return this;
}
};
/**
* @param {number} squaredTolerance Squared tolerance.
* @return {SimpleGeometry} Simplified geometry.
* @protected
*/
SimpleGeometry.prototype.getSimplifiedGeometryInternal = function (squaredTolerance) {
return this;
};
/**
* @return {number} Stride.
*/
SimpleGeometry.prototype.getStride = function () {
return this.stride;
};
/**
* @param {import("./GeometryLayout.js").default} layout Layout.
* @param {Array<number>} flatCoordinates Flat coordinates.
*/
SimpleGeometry.prototype.setFlatCoordinates = function (layout, flatCoordinates) {
this.stride = getStrideForLayout(layout);
this.layout = layout;
this.flatCoordinates = flatCoordinates;
};
/**
* @abstract
* @param {!Array<*>} coordinates Coordinates.
* @param {import("./GeometryLayout.js").default} [opt_layout] Layout.
*/
SimpleGeometry.prototype.setCoordinates = function (coordinates, opt_layout) {
abstract();
};
/**
* @param {import("./GeometryLayout.js").default|undefined} layout Layout.
* @param {Array<*>} coordinates Coordinates.
* @param {number} nesting Nesting.
* @protected
*/
SimpleGeometry.prototype.setLayout = function (layout, coordinates, nesting) {
/** @type {number} */
var stride;
if (layout) {
stride = getStrideForLayout(layout);
}
else {
for (var i = 0; i < nesting; ++i) {
if (coordinates.length === 0) {
this.layout = GeometryLayout.XY;
this.stride = 2;
return;
}
else {
coordinates = /** @type {Array} */ (coordinates[0]);
}
}
stride = coordinates.length;
layout = getLayoutForStride(stride);
}
this.layout = layout;
this.stride = stride;
};
/**
* 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
*/
SimpleGeometry.prototype.applyTransform = function (transformFn) {
if (this.flatCoordinates) {
transformFn(this.flatCoordinates, this.flatCoordinates, this.stride);
this.changed();
}
};
/**
* Rotate the geometry around a given coordinate. This modifies the geometry
* coordinates in place.
* @param {number} angle Rotation angle in counter-clockwise radians.
* @param {import("../coordinate.js").Coordinate} anchor The rotation center.
* @api
*/
SimpleGeometry.prototype.rotate = function (angle, anchor) {
var flatCoordinates = this.getFlatCoordinates();
if (flatCoordinates) {
var stride = this.getStride();
rotate(flatCoordinates, 0, flatCoordinates.length, stride, angle, anchor, flatCoordinates);
this.changed();
}
};
/**
* 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 {import("../coordinate.js").Coordinate} [opt_anchor] The scale origin (defaults to the center
* of the geometry extent).
* @api
*/
SimpleGeometry.prototype.scale = function (sx, opt_sy, opt_anchor) {
var sy = opt_sy;
if (sy === undefined) {
sy = sx;
}
var anchor = opt_anchor;
if (!anchor) {
anchor = getCenter(this.getExtent());
}
var flatCoordinates = this.getFlatCoordinates();
if (flatCoordinates) {
var stride = this.getStride();
scale(flatCoordinates, 0, flatCoordinates.length, stride, sx, sy, anchor, flatCoordinates);
this.changed();
}
};
/**
* 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
*/
SimpleGeometry.prototype.translate = function (deltaX, deltaY) {
var flatCoordinates = this.getFlatCoordinates();
if (flatCoordinates) {
var stride = this.getStride();
translate(flatCoordinates, 0, flatCoordinates.length, stride, deltaX, deltaY, flatCoordinates);
this.changed();
}
};
return SimpleGeometry;
}(Geometry));
/**
* @param {number} stride Stride.
* @return {import("./GeometryLayout.js").default} layout Layout.
*/
function getLayoutForStride(stride) {
var layout;
if (stride == 2) {
layout = GeometryLayout.XY;
}
else if (stride == 3) {
layout = GeometryLayout.XYZ;
}
else if (stride == 4) {
layout = GeometryLayout.XYZM;
}
return /** @type {import("./GeometryLayout.js").default} */ (layout);
}
/**
* @param {import("./GeometryLayout.js").default} layout Layout.
* @return {number} Stride.
*/
export function getStrideForLayout(layout) {
var stride;
if (layout == GeometryLayout.XY) {
stride = 2;
}
else if (layout == GeometryLayout.XYZ || layout == GeometryLayout.XYM) {
stride = 3;
}
else if (layout == GeometryLayout.XYZM) {
stride = 4;
}
return /** @type {number} */ (stride);
}
/**
* @param {SimpleGeometry} simpleGeometry Simple geometry.
* @param {import("../transform.js").Transform} transform Transform.
* @param {Array<number>} [opt_dest] Destination.
* @return {Array<number>} Transformed flat coordinates.
*/
export function transformGeom2D(simpleGeometry, transform, opt_dest) {
var flatCoordinates = simpleGeometry.getFlatCoordinates();
if (!flatCoordinates) {
return null;
}
else {
var stride = simpleGeometry.getStride();
return transform2D(flatCoordinates, 0, flatCoordinates.length, stride, transform, opt_dest);
}
}
export default SimpleGeometry;
//# sourceMappingURL=SimpleGeometry.js.map

1
node_modules/ol/geom/SimpleGeometry.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

28
node_modules/ol/geom/flat/area.d.ts generated vendored Normal file
View File

@@ -0,0 +1,28 @@
/**
* @module ol/geom/flat/area
*/
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @return {number} Area.
*/
export function linearRing(flatCoordinates: Array<number>, offset: number, end: number, stride: number): number;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @return {number} Area.
*/
export function linearRings(flatCoordinates: Array<number>, offset: number, ends: Array<number>, stride: number): number;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Endss.
* @param {number} stride Stride.
* @return {number} Area.
*/
export function linearRingss(flatCoordinates: Array<number>, offset: number, endss: Array<Array<number>>, stride: number): number;
//# sourceMappingURL=area.d.ts.map

1
node_modules/ol/geom/flat/area.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"area.d.ts","sourceRoot":"","sources":["../../src/geom/flat/area.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;GAMG;AACH,4CANW,MAAM,MAAM,CAAC,UACb,MAAM,OACN,MAAM,UACN,MAAM,GACL,MAAM,CAcjB;AAED;;;;;;GAMG;AACH,6CANW,MAAM,MAAM,CAAC,UACb,MAAM,QACN,MAAM,MAAM,CAAC,UACb,MAAM,GACL,MAAM,CAUjB;AAED;;;;;;GAMG;AACH,8CANW,MAAM,MAAM,CAAC,UACb,MAAM,SACN,MAAM,MAAM,MAAM,CAAC,CAAC,UACpB,MAAM,GACL,MAAM,CAUjB"}

56
node_modules/ol/geom/flat/area.js generated vendored Normal file
View File

@@ -0,0 +1,56 @@
/**
* @module ol/geom/flat/area
*/
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @return {number} Area.
*/
export function linearRing(flatCoordinates, offset, end, stride) {
var twiceArea = 0;
var x1 = flatCoordinates[end - stride];
var y1 = flatCoordinates[end - stride + 1];
for (; offset < end; offset += stride) {
var x2 = flatCoordinates[offset];
var y2 = flatCoordinates[offset + 1];
twiceArea += y1 * x2 - x1 * y2;
x1 = x2;
y1 = y2;
}
return twiceArea / 2;
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @return {number} Area.
*/
export function linearRings(flatCoordinates, offset, ends, stride) {
var area = 0;
for (var i = 0, ii = ends.length; i < ii; ++i) {
var end = ends[i];
area += linearRing(flatCoordinates, offset, end, stride);
offset = end;
}
return area;
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Endss.
* @param {number} stride Stride.
* @return {number} Area.
*/
export function linearRingss(flatCoordinates, offset, endss, stride) {
var area = 0;
for (var i = 0, ii = endss.length; i < ii; ++i) {
var ends = endss[i];
area += linearRings(flatCoordinates, offset, ends, stride);
offset = ends[ends.length - 1];
}
return area;
}
//# sourceMappingURL=area.js.map

1
node_modules/ol/geom/flat/area.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"area.js","sourceRoot":"","sources":["../../src/geom/flat/area.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;GAMG;AACH,MAAM,UAAU,U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AC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE;QAC9C,IAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,IAAI,IAAI,WAAW,CAAC,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;QAC3D,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;KAChC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}

9
node_modules/ol/geom/flat/center.d.ts generated vendored Normal file
View File

@@ -0,0 +1,9 @@
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Endss.
* @param {number} stride Stride.
* @return {Array<number>} Flat centers.
*/
export function linearRingss(flatCoordinates: Array<number>, offset: number, endss: Array<Array<number>>, stride: number): Array<number>;
//# sourceMappingURL=center.d.ts.map

1
node_modules/ol/geom/flat/center.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"center.d.ts","sourceRoot":"","sources":["../../src/geom/flat/center.js"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,8CANW,MAAM,MAAM,CAAC,UACb,MAAM,SACN,MAAM,MAAM,MAAM,CAAC,CAAC,UACpB,MAAM,GACL,MAAM,MAAM,CAAC,CAiBxB"}

23
node_modules/ol/geom/flat/center.js generated vendored Normal file
View File

@@ -0,0 +1,23 @@
/**
* @module ol/geom/flat/center
*/
import { createEmpty, createOrUpdateFromFlatCoordinates } from '../../extent.js';
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Endss.
* @param {number} stride Stride.
* @return {Array<number>} Flat centers.
*/
export function linearRingss(flatCoordinates, offset, endss, stride) {
var flatCenters = [];
var extent = createEmpty();
for (var i = 0, ii = endss.length; i < ii; ++i) {
var ends = endss[i];
extent = createOrUpdateFromFlatCoordinates(flatCoordinates, offset, ends[0], stride);
flatCenters.push((extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2);
offset = ends[ends.length - 1];
}
return flatCenters;
}
//# sourceMappingURL=center.js.map

1
node_modules/ol/geom/flat/center.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"center.js","sourceRoot":"","sources":["../../src/geom/flat/center.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAC,WAAW,EAAE,iCAAiC,EAAC,MAAM,iBAAiB,CAAC;AAE/E;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,eAAe,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IACjE,IAAM,WAAW,GAAG,EAAE,CAAC;IACvB,IAAI,MAAM,GAAG,WAAW,EAAE,CAAC;IAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE;QAC9C,IAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,MAAM,GAAG,iCAAiC,CACxC,eAAe,EACf,MAAM,EACN,IAAI,CAAC,CAAC,CAAC,EACP,MAAM,CACP,CAAC;QACF,WAAW,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAC3E,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;KAChC;IACD,OAAO,WAAW,CAAC;AACrB,CAAC"}

75
node_modules/ol/geom/flat/closest.d.ts generated vendored Normal file
View File

@@ -0,0 +1,75 @@
/**
* Return the squared of the largest distance between any pair of consecutive
* coordinates.
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {number} max Max squared delta.
* @return {number} Max squared delta.
*/
export function maxSquaredDelta(flatCoordinates: Array<number>, offset: number, end: number, stride: number, max: number): number;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {number} max Max squared delta.
* @return {number} Max squared delta.
*/
export function arrayMaxSquaredDelta(flatCoordinates: Array<number>, offset: number, ends: Array<number>, stride: number, max: number): number;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Endss.
* @param {number} stride Stride.
* @param {number} max Max squared delta.
* @return {number} Max squared delta.
*/
export function multiArrayMaxSquaredDelta(flatCoordinates: Array<number>, offset: number, endss: Array<Array<number>>, stride: number, max: number): number;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {number} maxDelta Max delta.
* @param {boolean} isRing Is ring.
* @param {number} x X.
* @param {number} y Y.
* @param {Array<number>} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance.
* @param {Array<number>} [opt_tmpPoint] Temporary point object.
* @return {number} Minimum squared distance.
*/
export function assignClosestPoint(flatCoordinates: Array<number>, offset: number, end: number, stride: number, maxDelta: number, isRing: boolean, x: number, y: number, closestPoint: Array<number>, minSquaredDistance: number, opt_tmpPoint?: number[] | undefined): number;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {number} maxDelta Max delta.
* @param {boolean} isRing Is ring.
* @param {number} x X.
* @param {number} y Y.
* @param {Array<number>} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance.
* @param {Array<number>} [opt_tmpPoint] Temporary point object.
* @return {number} Minimum squared distance.
*/
export function assignClosestArrayPoint(flatCoordinates: Array<number>, offset: number, ends: Array<number>, stride: number, maxDelta: number, isRing: boolean, x: number, y: number, closestPoint: Array<number>, minSquaredDistance: number, opt_tmpPoint?: number[] | undefined): number;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Endss.
* @param {number} stride Stride.
* @param {number} maxDelta Max delta.
* @param {boolean} isRing Is ring.
* @param {number} x X.
* @param {number} y Y.
* @param {Array<number>} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance.
* @param {Array<number>} [opt_tmpPoint] Temporary point object.
* @return {number} Minimum squared distance.
*/
export function assignClosestMultiArrayPoint(flatCoordinates: Array<number>, offset: number, endss: Array<Array<number>>, stride: number, maxDelta: number, isRing: boolean, x: number, y: number, closestPoint: Array<number>, minSquaredDistance: number, opt_tmpPoint?: number[] | undefined): number;
//# sourceMappingURL=closest.d.ts.map

1
node_modules/ol/geom/flat/closest.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"closest.d.ts","sourceRoot":"","sources":["../../src/geom/flat/closest.js"],"names":[],"mappings":"AAyDA;;;;;;;;;GASG;AACH,iDAPW,MAAM,MAAM,CAAC,UACb,MAAM,OACN,MAAM,UACN,MAAM,OACN,MAAM,GACL,MAAM,CAgBjB;AAED;;;;;;;GAOG;AACH,sDAPW,MAAM,MAAM,CAAC,UACb,MAAM,QACN,MAAM,MAAM,CAAC,UACb,MAAM,OACN,MAAM,GACL,MAAM,CAejB;AAED;;;;;;;GAOG;AACH,2DAPW,MAAM,MAAM,CAAC,UACb,MAAM,SACN,MAAM,MAAM,MAAM,CAAC,CAAC,UACpB,MAAM,OACN,MAAM,GACL,MAAM,CAejB;AAED;;;;;;;;;;;;;GAaG;AACH,oDAbW,MAAM,MAAM,CAAC,UACb,MAAM,OACN,MAAM,UACN,MAAM,YACN,MAAM,UACN,OAAO,KACP,MAAM,KACN,MAAM,gBACN,MAAM,MAAM,CAAC,sBACb,MAAM,wCAEL,MAAM,CAmGjB;AAED;;;;;;;;;;;;;GAaG;AACH,yDAbW,MAAM,MAAM,CAAC,UACb,MAAM,QACN,MAAM,MAAM,CAAC,UACb,MAAM,YACN,MAAM,UACN,OAAO,KACP,MAAM,KACN,MAAM,gBACN,MAAM,MAAM,CAAC,sBACb,MAAM,wCAEL,MAAM,CAkCjB;AAED;;;;;;;;;;;;;GAaG;AACH,8DAbW,MAAM,MAAM,CAAC,UACb,MAAM,SACN,MAAM,MAAM,MAAM,CAAC,CAAC,UACpB,MAAM,YACN,MAAM,UACN,OAAO,KACP,MAAM,KACN,MAAM,gBACN,MAAM,MAAM,CAAC,sBACb,MAAM,wCAEL,MAAM,CAkCjB"}

228
node_modules/ol/geom/flat/closest.js generated vendored Normal file
View File

@@ -0,0 +1,228 @@
/**
* @module ol/geom/flat/closest
*/
import { lerp, squaredDistance as squaredDx } from '../../math.js';
/**
* Returns the point on the 2D line segment flatCoordinates[offset1] to
* flatCoordinates[offset2] that is closest to the point (x, y). Extra
* dimensions are linearly interpolated.
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset1 Offset 1.
* @param {number} offset2 Offset 2.
* @param {number} stride Stride.
* @param {number} x X.
* @param {number} y Y.
* @param {Array<number>} closestPoint Closest point.
*/
function assignClosest(flatCoordinates, offset1, offset2, stride, x, y, closestPoint) {
var x1 = flatCoordinates[offset1];
var y1 = flatCoordinates[offset1 + 1];
var dx = flatCoordinates[offset2] - x1;
var dy = flatCoordinates[offset2 + 1] - y1;
var offset;
if (dx === 0 && dy === 0) {
offset = offset1;
}
else {
var t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy);
if (t > 1) {
offset = offset2;
}
else if (t > 0) {
for (var i = 0; i < stride; ++i) {
closestPoint[i] = lerp(flatCoordinates[offset1 + i], flatCoordinates[offset2 + i], t);
}
closestPoint.length = stride;
return;
}
else {
offset = offset1;
}
}
for (var i = 0; i < stride; ++i) {
closestPoint[i] = flatCoordinates[offset + i];
}
closestPoint.length = stride;
}
/**
* Return the squared of the largest distance between any pair of consecutive
* coordinates.
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {number} max Max squared delta.
* @return {number} Max squared delta.
*/
export function maxSquaredDelta(flatCoordinates, offset, end, stride, max) {
var x1 = flatCoordinates[offset];
var y1 = flatCoordinates[offset + 1];
for (offset += stride; offset < end; offset += stride) {
var x2 = flatCoordinates[offset];
var y2 = flatCoordinates[offset + 1];
var squaredDelta = squaredDx(x1, y1, x2, y2);
if (squaredDelta > max) {
max = squaredDelta;
}
x1 = x2;
y1 = y2;
}
return max;
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {number} max Max squared delta.
* @return {number} Max squared delta.
*/
export function arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max) {
for (var i = 0, ii = ends.length; i < ii; ++i) {
var end = ends[i];
max = maxSquaredDelta(flatCoordinates, offset, end, stride, max);
offset = end;
}
return max;
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Endss.
* @param {number} stride Stride.
* @param {number} max Max squared delta.
* @return {number} Max squared delta.
*/
export function multiArrayMaxSquaredDelta(flatCoordinates, offset, endss, stride, max) {
for (var i = 0, ii = endss.length; i < ii; ++i) {
var ends = endss[i];
max = arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max);
offset = ends[ends.length - 1];
}
return max;
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {number} maxDelta Max delta.
* @param {boolean} isRing Is ring.
* @param {number} x X.
* @param {number} y Y.
* @param {Array<number>} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance.
* @param {Array<number>} [opt_tmpPoint] Temporary point object.
* @return {number} Minimum squared distance.
*/
export function assignClosestPoint(flatCoordinates, offset, end, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, opt_tmpPoint) {
if (offset == end) {
return minSquaredDistance;
}
var i, squaredDistance;
if (maxDelta === 0) {
// All points are identical, so just test the first point.
squaredDistance = squaredDx(x, y, flatCoordinates[offset], flatCoordinates[offset + 1]);
if (squaredDistance < minSquaredDistance) {
for (i = 0; i < stride; ++i) {
closestPoint[i] = flatCoordinates[offset + i];
}
closestPoint.length = stride;
return squaredDistance;
}
else {
return minSquaredDistance;
}
}
var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];
var index = offset + stride;
while (index < end) {
assignClosest(flatCoordinates, index - stride, index, stride, x, y, tmpPoint);
squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);
if (squaredDistance < minSquaredDistance) {
minSquaredDistance = squaredDistance;
for (i = 0; i < stride; ++i) {
closestPoint[i] = tmpPoint[i];
}
closestPoint.length = stride;
index += stride;
}
else {
// Skip ahead multiple points, because we know that all the skipped
// points cannot be any closer than the closest point we have found so
// far. We know this because we know how close the current point is, how
// close the closest point we have found so far is, and the maximum
// distance between consecutive points. For example, if we're currently
// at distance 10, the best we've found so far is 3, and that the maximum
// distance between consecutive points is 2, then we'll need to skip at
// least (10 - 3) / 2 == 3 (rounded down) points to have any chance of
// finding a closer point. We use Math.max(..., 1) to ensure that we
// always advance at least one point, to avoid an infinite loop.
index +=
stride *
Math.max(((Math.sqrt(squaredDistance) - Math.sqrt(minSquaredDistance)) /
maxDelta) |
0, 1);
}
}
if (isRing) {
// Check the closing segment.
assignClosest(flatCoordinates, end - stride, offset, stride, x, y, tmpPoint);
squaredDistance = squaredDx(x, y, tmpPoint[0], tmpPoint[1]);
if (squaredDistance < minSquaredDistance) {
minSquaredDistance = squaredDistance;
for (i = 0; i < stride; ++i) {
closestPoint[i] = tmpPoint[i];
}
closestPoint.length = stride;
}
}
return minSquaredDistance;
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {number} maxDelta Max delta.
* @param {boolean} isRing Is ring.
* @param {number} x X.
* @param {number} y Y.
* @param {Array<number>} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance.
* @param {Array<number>} [opt_tmpPoint] Temporary point object.
* @return {number} Minimum squared distance.
*/
export function assignClosestArrayPoint(flatCoordinates, offset, ends, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, opt_tmpPoint) {
var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];
for (var i = 0, ii = ends.length; i < ii; ++i) {
var end = ends[i];
minSquaredDistance = assignClosestPoint(flatCoordinates, offset, end, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint);
offset = end;
}
return minSquaredDistance;
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Endss.
* @param {number} stride Stride.
* @param {number} maxDelta Max delta.
* @param {boolean} isRing Is ring.
* @param {number} x X.
* @param {number} y Y.
* @param {Array<number>} closestPoint Closest point.
* @param {number} minSquaredDistance Minimum squared distance.
* @param {Array<number>} [opt_tmpPoint] Temporary point object.
* @return {number} Minimum squared distance.
*/
export function assignClosestMultiArrayPoint(flatCoordinates, offset, endss, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, opt_tmpPoint) {
var tmpPoint = opt_tmpPoint ? opt_tmpPoint : [NaN, NaN];
for (var i = 0, ii = endss.length; i < ii; ++i) {
var ends = endss[i];
minSquaredDistance = assignClosestArrayPoint(flatCoordinates, offset, ends, stride, maxDelta, isRing, x, y, closestPoint, minSquaredDistance, tmpPoint);
offset = ends[ends.length - 1];
}
return minSquaredDistance;
}
//# sourceMappingURL=closest.js.map

1
node_modules/ol/geom/flat/closest.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

40
node_modules/ol/geom/flat/contains.d.ts generated vendored Normal file
View File

@@ -0,0 +1,40 @@
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {import("../../extent.js").Extent} extent Extent.
* @return {boolean} Contains extent.
*/
export function linearRingContainsExtent(flatCoordinates: Array<number>, offset: number, end: number, stride: number, extent: import("../../extent.js").Extent): boolean;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {number} x X.
* @param {number} y Y.
* @return {boolean} Contains (x, y).
*/
export function linearRingContainsXY(flatCoordinates: Array<number>, offset: number, end: number, stride: number, x: number, y: number): boolean;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {number} x X.
* @param {number} y Y.
* @return {boolean} Contains (x, y).
*/
export function linearRingsContainsXY(flatCoordinates: Array<number>, offset: number, ends: Array<number>, stride: number, x: number, y: number): boolean;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Endss.
* @param {number} stride Stride.
* @param {number} x X.
* @param {number} y Y.
* @return {boolean} Contains (x, y).
*/
export function linearRingssContainsXY(flatCoordinates: Array<number>, offset: number, endss: Array<Array<number>>, stride: number, x: number, y: number): boolean;
//# sourceMappingURL=contains.d.ts.map

1
node_modules/ol/geom/flat/contains.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"contains.d.ts","sourceRoot":"","sources":["../../src/geom/flat/contains.js"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AACH,0DAPW,MAAM,MAAM,CAAC,UACb,MAAM,OACN,MAAM,UACN,MAAM,UACN,OAAO,iBAAiB,EAAE,MAAM,GAC/B,OAAO,CA2BlB;AAED;;;;;;;;GAQG;AACH,sDARW,MAAM,MAAM,CAAC,UACb,MAAM,OACN,MAAM,UACN,MAAM,KACN,MAAM,KACN,MAAM,GACL,OAAO,CAkClB;AAED;;;;;;;;GAQG;AACH,uDARW,MAAM,MAAM,CAAC,UACb,MAAM,QACN,MAAM,MAAM,CAAC,UACb,MAAM,KACN,MAAM,KACN,MAAM,GACL,OAAO,CAwBlB;AAED;;;;;;;;GAQG;AACH,wDARW,MAAM,MAAM,CAAC,UACb,MAAM,SACN,MAAM,MAAM,MAAM,CAAC,CAAC,UACpB,MAAM,KACN,MAAM,KACN,MAAM,GACL,OAAO,CAqBlB"}

105
node_modules/ol/geom/flat/contains.js generated vendored Normal file
View File

@@ -0,0 +1,105 @@
/**
* @module ol/geom/flat/contains
*/
import { forEachCorner } from '../../extent.js';
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {import("../../extent.js").Extent} extent Extent.
* @return {boolean} Contains extent.
*/
export function linearRingContainsExtent(flatCoordinates, offset, end, stride, extent) {
var outside = forEachCorner(extent,
/**
* @param {import("../../coordinate.js").Coordinate} coordinate Coordinate.
* @return {boolean} Contains (x, y).
*/
function (coordinate) {
return !linearRingContainsXY(flatCoordinates, offset, end, stride, coordinate[0], coordinate[1]);
});
return !outside;
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {number} x X.
* @param {number} y Y.
* @return {boolean} Contains (x, y).
*/
export function linearRingContainsXY(flatCoordinates, offset, end, stride, x, y) {
// https://geomalgorithms.com/a03-_inclusion.html
// Copyright 2000 softSurfer, 2012 Dan Sunday
// This code may be freely used and modified for any purpose
// providing that this copyright notice is included with it.
// SoftSurfer makes no warranty for this code, and cannot be held
// liable for any real or imagined damage resulting from its use.
// Users of this code must verify correctness for their application.
var wn = 0;
var x1 = flatCoordinates[end - stride];
var y1 = flatCoordinates[end - stride + 1];
for (; offset < end; offset += stride) {
var x2 = flatCoordinates[offset];
var y2 = flatCoordinates[offset + 1];
if (y1 <= y) {
if (y2 > y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) > 0) {
wn++;
}
}
else if (y2 <= y && (x2 - x1) * (y - y1) - (x - x1) * (y2 - y1) < 0) {
wn--;
}
x1 = x2;
y1 = y2;
}
return wn !== 0;
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {number} x X.
* @param {number} y Y.
* @return {boolean} Contains (x, y).
*/
export function linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y) {
if (ends.length === 0) {
return false;
}
if (!linearRingContainsXY(flatCoordinates, offset, ends[0], stride, x, y)) {
return false;
}
for (var i = 1, ii = ends.length; i < ii; ++i) {
if (linearRingContainsXY(flatCoordinates, ends[i - 1], ends[i], stride, x, y)) {
return false;
}
}
return true;
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Endss.
* @param {number} stride Stride.
* @param {number} x X.
* @param {number} y Y.
* @return {boolean} Contains (x, y).
*/
export function linearRingssContainsXY(flatCoordinates, offset, endss, stride, x, y) {
if (endss.length === 0) {
return false;
}
for (var i = 0, ii = endss.length; i < ii; ++i) {
var ends = endss[i];
if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {
return true;
}
offset = ends[ends.length - 1];
}
return false;
}
//# sourceMappingURL=contains.js.map

1
node_modules/ol/geom/flat/contains.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"contains.js","sourceRoot":"","sources":["../../src/geom/flat/contains.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE9C;;;;;;;GAOG;AACH,MAAM,UAAU,wBAAwB,CACtC,eAAe,EACf,MAAM,EACN,GAAG,EACH,MAAM,EACN,MAAM;IAEN,IAAM,OAAO,GAAG,aAAa,CAC3B,MAAM;IACN;;;OAGG;IACH,UAAU,UAAU;QAClB,OAAO,CAAC,oBAAoB,CAC1B,eAAe,EACf,MAAM,EACN,GAAG,EACH,MAAM,EACN,UAAU,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ACb;QACD,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;KAChC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}

38
node_modules/ol/geom/flat/deflate.d.ts generated vendored Normal file
View File

@@ -0,0 +1,38 @@
/**
* @module ol/geom/flat/deflate
*/
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {import("../../coordinate.js").Coordinate} coordinate Coordinate.
* @param {number} stride Stride.
* @return {number} offset Offset.
*/
export function deflateCoordinate(flatCoordinates: Array<number>, offset: number, coordinate: import("../../coordinate.js").Coordinate, stride: number): number;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<import("../../coordinate.js").Coordinate>} coordinates Coordinates.
* @param {number} stride Stride.
* @return {number} offset Offset.
*/
export function deflateCoordinates(flatCoordinates: Array<number>, offset: number, coordinates: Array<import("../../coordinate.js").Coordinate>, stride: number): number;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<import("../../coordinate.js").Coordinate>>} coordinatess Coordinatess.
* @param {number} stride Stride.
* @param {Array<number>} [opt_ends] Ends.
* @return {Array<number>} Ends.
*/
export function deflateCoordinatesArray(flatCoordinates: Array<number>, offset: number, coordinatess: Array<Array<import("../../coordinate.js").Coordinate>>, stride: number, opt_ends?: number[] | undefined): Array<number>;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<Array<import("../../coordinate.js").Coordinate>>>} coordinatesss Coordinatesss.
* @param {number} stride Stride.
* @param {Array<Array<number>>} [opt_endss] Endss.
* @return {Array<Array<number>>} Endss.
*/
export function deflateMultiCoordinatesArray(flatCoordinates: Array<number>, offset: number, coordinatesss: Array<Array<Array<import("../../coordinate.js").Coordinate>>>, stride: number, opt_endss?: number[][] | undefined): Array<Array<number>>;
//# sourceMappingURL=deflate.d.ts.map

1
node_modules/ol/geom/flat/deflate.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"deflate.d.ts","sourceRoot":"","sources":["../../src/geom/flat/deflate.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;GAMG;AACH,mDANW,MAAM,MAAM,CAAC,UACb,MAAM,cACN,OAAO,qBAAqB,EAAE,UAAU,UACxC,MAAM,GACL,MAAM,CAOjB;AAED;;;;;;GAMG;AACH,oDANW,MAAM,MAAM,CAAC,UACb,MAAM,eACN,MAAM,OAAO,qBAAqB,EAAE,UAAU,CAAC,UAC/C,MAAM,GACL,MAAM,CAejB;AAED;;;;;;;GAOG;AACH,yDAPW,MAAM,MAAM,CAAC,UACb,MAAM,gBACN,MAAM,MAAM,OAAO,qBAAqB,EAAE,UAAU,CAAC,CAAC,UACtD,MAAM,oCAEL,MAAM,MAAM,CAAC,CAuBxB;AAED;;;;;;;GAOG;AACH,8DAPW,MAAM,MAAM,CAAC,UACb,MAAM,iBACN,MAAM,MAAM,MAAM,OAAO,qBAAqB,EAAE,UAAU,CAAC,CAAC,CAAC,UAC7D,MAAM,uCAEL,MAAM,MAAM,MAAM,CAAC,CAAC,CAwB/B"}

71
node_modules/ol/geom/flat/deflate.js generated vendored Normal file
View File

@@ -0,0 +1,71 @@
/**
* @module ol/geom/flat/deflate
*/
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {import("../../coordinate.js").Coordinate} coordinate Coordinate.
* @param {number} stride Stride.
* @return {number} offset Offset.
*/
export function deflateCoordinate(flatCoordinates, offset, coordinate, stride) {
for (var i = 0, ii = coordinate.length; i < ii; ++i) {
flatCoordinates[offset++] = coordinate[i];
}
return offset;
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<import("../../coordinate.js").Coordinate>} coordinates Coordinates.
* @param {number} stride Stride.
* @return {number} offset Offset.
*/
export function deflateCoordinates(flatCoordinates, offset, coordinates, stride) {
for (var i = 0, ii = coordinates.length; i < ii; ++i) {
var coordinate = coordinates[i];
for (var j = 0; j < stride; ++j) {
flatCoordinates[offset++] = coordinate[j];
}
}
return offset;
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<import("../../coordinate.js").Coordinate>>} coordinatess Coordinatess.
* @param {number} stride Stride.
* @param {Array<number>} [opt_ends] Ends.
* @return {Array<number>} Ends.
*/
export function deflateCoordinatesArray(flatCoordinates, offset, coordinatess, stride, opt_ends) {
var ends = opt_ends ? opt_ends : [];
var i = 0;
for (var j = 0, jj = coordinatess.length; j < jj; ++j) {
var end = deflateCoordinates(flatCoordinates, offset, coordinatess[j], stride);
ends[i++] = end;
offset = end;
}
ends.length = i;
return ends;
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<Array<import("../../coordinate.js").Coordinate>>>} coordinatesss Coordinatesss.
* @param {number} stride Stride.
* @param {Array<Array<number>>} [opt_endss] Endss.
* @return {Array<Array<number>>} Endss.
*/
export function deflateMultiCoordinatesArray(flatCoordinates, offset, coordinatesss, stride, opt_endss) {
var endss = opt_endss ? opt_endss : [];
var i = 0;
for (var j = 0, jj = coordinatesss.length; j < jj; ++j) {
var ends = deflateCoordinatesArray(flatCoordinates, offset, coordinatesss[j], stride, endss[i]);
endss[i++] = ends;
offset = ends[ends.length - 1];
}
endss.length = i;
return endss;
}
//# sourceMappingURL=deflate.js.map

1
node_modules/ol/geom/flat/deflate.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"deflate.js","sourceRoot":"","sources":["../../src/geom/flat/deflate.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,eAAe,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAC3E,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,GAAG,EAA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AOG;AACH,MAAM,UAAU,4BAA4B,CAC1C,eAAe,EACf,MAAM,EACN,aAAa,EACb,MAAM,EACN,SAAS;IAET,IAAM,KAAK,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;IACzC,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,aAAa,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE;QACtD,IAAM,IAAI,GAAG,uBAAuB,CAClC,eAAe,EACf,MAAM,EACN,aAAa,CAAC,CAAC,CAAC,EAChB,MAAM,EACN,KAAK,CAAC,CAAC,CAAC,CACT,CAAC;QACF,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;QAClB,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;KAChC;IACD,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;IACjB,OAAO,KAAK,CAAC;AACf,CAAC"}

14
node_modules/ol/geom/flat/flip.d.ts generated vendored Normal file
View File

@@ -0,0 +1,14 @@
/**
* @module ol/geom/flat/flip
*/
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {Array<number>} [opt_dest] Destination.
* @param {number} [opt_destOffset] Destination offset.
* @return {Array<number>} Flat coordinates.
*/
export function flipXY(flatCoordinates: Array<number>, offset: number, end: number, stride: number, opt_dest?: number[] | undefined, opt_destOffset?: number | undefined): Array<number>;
//# sourceMappingURL=flip.d.ts.map

1
node_modules/ol/geom/flat/flip.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"flip.d.ts","sourceRoot":"","sources":["../../src/geom/flat/flip.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;GAQG;AACH,wCARW,MAAM,MAAM,CAAC,UACb,MAAM,OACN,MAAM,UACN,MAAM,yEAGL,MAAM,MAAM,CAAC,CA6BxB"}

35
node_modules/ol/geom/flat/flip.js generated vendored Normal file
View File

@@ -0,0 +1,35 @@
/**
* @module ol/geom/flat/flip
*/
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {Array<number>} [opt_dest] Destination.
* @param {number} [opt_destOffset] Destination offset.
* @return {Array<number>} Flat coordinates.
*/
export function flipXY(flatCoordinates, offset, end, stride, opt_dest, opt_destOffset) {
var dest, destOffset;
if (opt_dest !== undefined) {
dest = opt_dest;
destOffset = opt_destOffset !== undefined ? opt_destOffset : 0;
}
else {
dest = [];
destOffset = 0;
}
var j = offset;
while (j < end) {
var x = flatCoordinates[j++];
dest[destOffset++] = flatCoordinates[j++];
dest[destOffset++] = x;
for (var k = 2; k < stride; ++k) {
dest[destOffset++] = flatCoordinates[j++];
}
}
dest.length = destOffset;
return dest;
}
//# sourceMappingURL=flip.js.map

1
node_modules/ol/geom/flat/flip.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"flip.js","sourceRoot":"","sources":["../../src/geom/flat/flip.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;GAQG;AACH,MAAM,UAAU,MAAM,CACpB,eAAe,EACf,MAAM,EACN,GAAG,EACH,MAAM,EACN,QAAQ,EACR,cAAc;IAEd,IAAI,IAAI,EAAE,UAAU,CAAC;IACrB,IAAI,QAAQ,KAAK,SAAS,EAAE;QAC1B,IAAI,GAAG,QAAQ,CAAC;QAChB,UAAU,GAAG,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;KAChE;SAAM;QACL,IAAI,GAAG,EAAE,CAAC;QACV,UAAU,GAAG,CAAC,CAAC;KAChB;IACD,IAAI,CAAC,GAAG,MAAM,CAAC;IACf,OAAO,CAAC,GAAG,GAAG,EAAE;QACd,IAAM,CAAC,GAAG,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC;QAC/B,IAAI,CAAC,UAAU,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC;QAC1C,IAAI,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC;QACvB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,EAAE,CAAC,EAAE;YAC/B,IAAI,CAAC,UAAU,EAAE,CAAC,GAAG,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC;SAC3C;KACF;IACD,IAAI,CAAC,MAAM,GAAG,UAAU,CAAC;IACzB,OAAO,IAAI,CAAC;AACd,CAAC"}

32
node_modules/ol/geom/flat/geodesic.d.ts generated vendored Normal file
View File

@@ -0,0 +1,32 @@
/**
* Generate a great-circle arcs between two lat/lon points.
* @param {number} lon1 Longitude 1 in degrees.
* @param {number} lat1 Latitude 1 in degrees.
* @param {number} lon2 Longitude 2 in degrees.
* @param {number} lat2 Latitude 2 in degrees.
* @param {import("../../proj/Projection.js").default} projection Projection.
* @param {number} squaredTolerance Squared tolerance.
* @return {Array<number>} Flat coordinates.
*/
export function greatCircleArc(lon1: number, lat1: number, lon2: number, lat2: number, projection: import("../../proj/Projection.js").default, squaredTolerance: number): Array<number>;
/**
* Generate a meridian (line at constant longitude).
* @param {number} lon Longitude.
* @param {number} lat1 Latitude 1.
* @param {number} lat2 Latitude 2.
* @param {import("../../proj/Projection.js").default} projection Projection.
* @param {number} squaredTolerance Squared tolerance.
* @return {Array<number>} Flat coordinates.
*/
export function meridian(lon: number, lat1: number, lat2: number, projection: import("../../proj/Projection.js").default, squaredTolerance: number): Array<number>;
/**
* Generate a parallel (line at constant latitude).
* @param {number} lat Latitude.
* @param {number} lon1 Longitude 1.
* @param {number} lon2 Longitude 2.
* @param {import("../../proj/Projection.js").default} projection Projection.
* @param {number} squaredTolerance Squared tolerance.
* @return {Array<number>} Flat coordinates.
*/
export function parallel(lat: number, lon1: number, lon2: number, projection: import("../../proj/Projection.js").default, squaredTolerance: number): Array<number>;
//# sourceMappingURL=geodesic.d.ts.map

1
node_modules/ol/geom/flat/geodesic.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"geodesic.d.ts","sourceRoot":"","sources":["../../src/geom/flat/geodesic.js"],"names":[],"mappings":"AAgFA;;;;;;;;;GASG;AACH,qCARW,MAAM,QACN,MAAM,QACN,MAAM,QACN,MAAM,cACN,OAAO,0BAA0B,EAAE,OAAO,oBAC1C,MAAM,GACL,MAAM,MAAM,CAAC,CA+CxB;AAED;;;;;;;;GAQG;AACH,8BAPW,MAAM,QACN,MAAM,QACN,MAAM,cACN,OAAO,0BAA0B,EAAE,OAAO,oBAC1C,MAAM,GACL,MAAM,MAAM,CAAC,CAexB;AAED;;;;;;;;GAQG;AACH,8BAPW,MAAM,QACN,MAAM,QACN,MAAM,cACN,OAAO,0BAA0B,EAAE,OAAO,oBAC1C,MAAM,GACL,MAAM,MAAM,CAAC,CAexB"}

150
node_modules/ol/geom/flat/geodesic.js generated vendored Normal file
View File

@@ -0,0 +1,150 @@
/**
* @module ol/geom/flat/geodesic
*/
import { get as getProjection, getTransform } from '../../proj.js';
import { squaredSegmentDistance, toDegrees, toRadians } from '../../math.js';
/**
* @param {function(number): import("../../coordinate.js").Coordinate} interpolate Interpolate function.
* @param {import("../../proj.js").TransformFunction} transform Transform from longitude/latitude to
* projected coordinates.
* @param {number} squaredTolerance Squared tolerance.
* @return {Array<number>} Flat coordinates.
*/
function line(interpolate, transform, squaredTolerance) {
// FIXME reduce garbage generation
// FIXME optimize stack operations
/** @type {Array<number>} */
var flatCoordinates = [];
var geoA = interpolate(0);
var geoB = interpolate(1);
var a = transform(geoA);
var b = transform(geoB);
/** @type {Array<import("../../coordinate.js").Coordinate>} */
var geoStack = [geoB, geoA];
/** @type {Array<import("../../coordinate.js").Coordinate>} */
var stack = [b, a];
/** @type {Array<number>} */
var fractionStack = [1, 0];
/** @type {!Object<string, boolean>} */
var fractions = {};
var maxIterations = 1e5;
var geoM, m, fracA, fracB, fracM, key;
while (--maxIterations > 0 && fractionStack.length > 0) {
// Pop the a coordinate off the stack
fracA = fractionStack.pop();
geoA = geoStack.pop();
a = stack.pop();
// Add the a coordinate if it has not been added yet
key = fracA.toString();
if (!(key in fractions)) {
flatCoordinates.push(a[0], a[1]);
fractions[key] = true;
}
// Pop the b coordinate off the stack
fracB = fractionStack.pop();
geoB = geoStack.pop();
b = stack.pop();
// Find the m point between the a and b coordinates
fracM = (fracA + fracB) / 2;
geoM = interpolate(fracM);
m = transform(geoM);
if (squaredSegmentDistance(m[0], m[1], a[0], a[1], b[0], b[1]) <
squaredTolerance) {
// If the m point is sufficiently close to the straight line, then we
// discard it. Just use the b coordinate and move on to the next line
// segment.
flatCoordinates.push(b[0], b[1]);
key = fracB.toString();
fractions[key] = true;
}
else {
// Otherwise, we need to subdivide the current line segment. Split it
// into two and push the two line segments onto the stack.
fractionStack.push(fracB, fracM, fracM, fracA);
stack.push(b, m, m, a);
geoStack.push(geoB, geoM, geoM, geoA);
}
}
return flatCoordinates;
}
/**
* Generate a great-circle arcs between two lat/lon points.
* @param {number} lon1 Longitude 1 in degrees.
* @param {number} lat1 Latitude 1 in degrees.
* @param {number} lon2 Longitude 2 in degrees.
* @param {number} lat2 Latitude 2 in degrees.
* @param {import("../../proj/Projection.js").default} projection Projection.
* @param {number} squaredTolerance Squared tolerance.
* @return {Array<number>} Flat coordinates.
*/
export function greatCircleArc(lon1, lat1, lon2, lat2, projection, squaredTolerance) {
var geoProjection = getProjection('EPSG:4326');
var cosLat1 = Math.cos(toRadians(lat1));
var sinLat1 = Math.sin(toRadians(lat1));
var cosLat2 = Math.cos(toRadians(lat2));
var sinLat2 = Math.sin(toRadians(lat2));
var cosDeltaLon = Math.cos(toRadians(lon2 - lon1));
var sinDeltaLon = Math.sin(toRadians(lon2 - lon1));
var d = sinLat1 * sinLat2 + cosLat1 * cosLat2 * cosDeltaLon;
return line(
/**
* @param {number} frac Fraction.
* @return {import("../../coordinate.js").Coordinate} Coordinate.
*/
function (frac) {
if (1 <= d) {
return [lon2, lat2];
}
var D = frac * Math.acos(d);
var cosD = Math.cos(D);
var sinD = Math.sin(D);
var y = sinDeltaLon * cosLat2;
var x = cosLat1 * sinLat2 - sinLat1 * cosLat2 * cosDeltaLon;
var theta = Math.atan2(y, x);
var lat = Math.asin(sinLat1 * cosD + cosLat1 * sinD * Math.cos(theta));
var lon = toRadians(lon1) +
Math.atan2(Math.sin(theta) * sinD * cosLat1, cosD - sinLat1 * Math.sin(lat));
return [toDegrees(lon), toDegrees(lat)];
}, getTransform(geoProjection, projection), squaredTolerance);
}
/**
* Generate a meridian (line at constant longitude).
* @param {number} lon Longitude.
* @param {number} lat1 Latitude 1.
* @param {number} lat2 Latitude 2.
* @param {import("../../proj/Projection.js").default} projection Projection.
* @param {number} squaredTolerance Squared tolerance.
* @return {Array<number>} Flat coordinates.
*/
export function meridian(lon, lat1, lat2, projection, squaredTolerance) {
var epsg4326Projection = getProjection('EPSG:4326');
return line(
/**
* @param {number} frac Fraction.
* @return {import("../../coordinate.js").Coordinate} Coordinate.
*/
function (frac) {
return [lon, lat1 + (lat2 - lat1) * frac];
}, getTransform(epsg4326Projection, projection), squaredTolerance);
}
/**
* Generate a parallel (line at constant latitude).
* @param {number} lat Latitude.
* @param {number} lon1 Longitude 1.
* @param {number} lon2 Longitude 2.
* @param {import("../../proj/Projection.js").default} projection Projection.
* @param {number} squaredTolerance Squared tolerance.
* @return {Array<number>} Flat coordinates.
*/
export function parallel(lat, lon1, lon2, projection, squaredTolerance) {
var epsg4326Projection = getProjection('EPSG:4326');
return line(
/**
* @param {number} frac Fraction.
* @return {import("../../coordinate.js").Coordinate} Coordinate.
*/
function (frac) {
return [lon1 + (lon2 - lon1) * frac, lat];
}, getTransform(epsg4326Projection, projection), squaredTolerance);
}
//# sourceMappingURL=geodesic.js.map

1
node_modules/ol/geom/flat/geodesic.js.map generated vendored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,CAAC,EAC5C,gBAAgB,CACjB,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,gBAAgB;IACpE,IAAM,kBAAkB,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;IACtD,OAAO,IAAI;IACT;;;OAGG;IACH,UAAU,IAAI;QACZ,OAAO,CAAC,IAAI,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,CAAC,CAAC;IAC5C,CAAC,EACD,YAAY,CAAC,kBAAkB,EAAE,UAAU,CAAC,EAC5C,gBAAgB,CACjB,CAAC;AACJ,CAAC"}

32
node_modules/ol/geom/flat/inflate.d.ts generated vendored Normal file
View File

@@ -0,0 +1,32 @@
/**
* @module ol/geom/flat/inflate
*/
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {Array<import("../../coordinate.js").Coordinate>} [opt_coordinates] Coordinates.
* @return {Array<import("../../coordinate.js").Coordinate>} Coordinates.
*/
export function inflateCoordinates(flatCoordinates: Array<number>, offset: number, end: number, stride: number, opt_coordinates?: import("../../coordinate.js").Coordinate[] | undefined): Array<import("../../coordinate.js").Coordinate>;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {Array<Array<import("../../coordinate.js").Coordinate>>} [opt_coordinatess] Coordinatess.
* @return {Array<Array<import("../../coordinate.js").Coordinate>>} Coordinatess.
*/
export function inflateCoordinatesArray(flatCoordinates: Array<number>, offset: number, ends: Array<number>, stride: number, opt_coordinatess?: import("../../coordinate.js").Coordinate[][] | undefined): Array<Array<import("../../coordinate.js").Coordinate>>;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Endss.
* @param {number} stride Stride.
* @param {Array<Array<Array<import("../../coordinate.js").Coordinate>>>} [opt_coordinatesss]
* Coordinatesss.
* @return {Array<Array<Array<import("../../coordinate.js").Coordinate>>>} Coordinatesss.
*/
export function inflateMultiCoordinatesArray(flatCoordinates: Array<number>, offset: number, endss: Array<Array<number>>, stride: number, opt_coordinatesss?: import("../../coordinate.js").Coordinate[][][] | undefined): Array<Array<Array<import("../../coordinate.js").Coordinate>>>;
//# sourceMappingURL=inflate.d.ts.map

1
node_modules/ol/geom/flat/inflate.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"inflate.d.ts","sourceRoot":"","sources":["../../src/geom/flat/inflate.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;GAOG;AACH,oDAPW,MAAM,MAAM,CAAC,UACb,MAAM,OACN,MAAM,UACN,MAAM,6EAEL,MAAM,OAAO,qBAAqB,EAAE,UAAU,CAAC,CAgB1D;AAED;;;;;;;GAOG;AACH,yDAPW,MAAM,MAAM,CAAC,UACb,MAAM,QACN,MAAM,MAAM,CAAC,UACb,MAAM,gFAEL,MAAM,MAAM,OAAO,qBAAqB,EAAE,UAAU,CAAC,CAAC,CAwBjE;AAED;;;;;;;;GAQG;AACH,8DARW,MAAM,MAAM,CAAC,UACb,MAAM,SACN,MAAM,MAAM,MAAM,CAAC,CAAC,UACpB,MAAM,mFAGL,MAAM,MAAM,MAAM,OAAO,qBAAqB,EAAE,UAAU,CAAC,CAAC,CAAC,CAyBxE"}

60
node_modules/ol/geom/flat/inflate.js generated vendored Normal file
View File

@@ -0,0 +1,60 @@
/**
* @module ol/geom/flat/inflate
*/
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {Array<import("../../coordinate.js").Coordinate>} [opt_coordinates] Coordinates.
* @return {Array<import("../../coordinate.js").Coordinate>} Coordinates.
*/
export function inflateCoordinates(flatCoordinates, offset, end, stride, opt_coordinates) {
var coordinates = opt_coordinates !== undefined ? opt_coordinates : [];
var i = 0;
for (var j = offset; j < end; j += stride) {
coordinates[i++] = flatCoordinates.slice(j, j + stride);
}
coordinates.length = i;
return coordinates;
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {Array<Array<import("../../coordinate.js").Coordinate>>} [opt_coordinatess] Coordinatess.
* @return {Array<Array<import("../../coordinate.js").Coordinate>>} Coordinatess.
*/
export function inflateCoordinatesArray(flatCoordinates, offset, ends, stride, opt_coordinatess) {
var coordinatess = opt_coordinatess !== undefined ? opt_coordinatess : [];
var i = 0;
for (var j = 0, jj = ends.length; j < jj; ++j) {
var end = ends[j];
coordinatess[i++] = inflateCoordinates(flatCoordinates, offset, end, stride, coordinatess[i]);
offset = end;
}
coordinatess.length = i;
return coordinatess;
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Endss.
* @param {number} stride Stride.
* @param {Array<Array<Array<import("../../coordinate.js").Coordinate>>>} [opt_coordinatesss]
* Coordinatesss.
* @return {Array<Array<Array<import("../../coordinate.js").Coordinate>>>} Coordinatesss.
*/
export function inflateMultiCoordinatesArray(flatCoordinates, offset, endss, stride, opt_coordinatesss) {
var coordinatesss = opt_coordinatesss !== undefined ? opt_coordinatesss : [];
var i = 0;
for (var j = 0, jj = endss.length; j < jj; ++j) {
var ends = endss[j];
coordinatesss[i++] = inflateCoordinatesArray(flatCoordinates, offset, ends, stride, coordinatesss[i]);
offset = ends[ends.length - 1];
}
coordinatesss.length = i;
return coordinatesss;
}
//# sourceMappingURL=inflate.js.map

1
node_modules/ol/geom/flat/inflate.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"inflate.js","sourceRoot":"","sources":["../../src/geom/flat/inflate.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;GAOG;AACH,MAAM,UAAU,kBAAkB,CACh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AEjB,IAAM,aAAa,GACjB,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3D,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE;QAC9C,IAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,aAAa,CAAC,CAAC,EAAE,CAAC,GAAG,uBAAuB,CAC1C,eAAe,EACf,MAAM,EACN,IAAI,EACJ,MAAM,EACN,aAAa,CAAC,CAAC,CAAC,CACjB,CAAC;QACF,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;KAChC;IACD,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;IACzB,OAAO,aAAa,CAAC;AACvB,CAAC"}

25
node_modules/ol/geom/flat/interiorpoint.d.ts generated vendored Normal file
View File

@@ -0,0 +1,25 @@
/**
* Calculates a point that is likely to lie in the interior of the linear rings.
* Inspired by JTS's com.vividsolutions.jts.geom.Geometry#getInteriorPoint.
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {Array<number>} flatCenters Flat centers.
* @param {number} flatCentersOffset Flat center offset.
* @param {Array<number>} [opt_dest] Destination.
* @return {Array<number>} Destination point as XYM coordinate, where M is the
* length of the horizontal intersection that the point belongs to.
*/
export function getInteriorPointOfArray(flatCoordinates: Array<number>, offset: number, ends: Array<number>, stride: number, flatCenters: Array<number>, flatCentersOffset: number, opt_dest?: number[] | undefined): Array<number>;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Endss.
* @param {number} stride Stride.
* @param {Array<number>} flatCenters Flat centers.
* @return {Array<number>} Interior points as XYM coordinates, where M is the
* length of the horizontal intersection that the point belongs to.
*/
export function getInteriorPointsOfMultiArray(flatCoordinates: Array<number>, offset: number, endss: Array<Array<number>>, stride: number, flatCenters: Array<number>): Array<number>;
//# sourceMappingURL=interiorpoint.d.ts.map

1
node_modules/ol/geom/flat/interiorpoint.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"interiorpoint.d.ts","sourceRoot":"","sources":["../../src/geom/flat/interiorpoint.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;GAYG;AACH,yDAVW,MAAM,MAAM,CAAC,UACb,MAAM,QACN,MAAM,MAAM,CAAC,UACb,MAAM,eACN,MAAM,MAAM,CAAC,qBACb,MAAM,oCAEL,MAAM,MAAM,CAAC,CA6DxB;AAED;;;;;;;;GAQG;AACH,+DARW,MAAM,MAAM,CAAC,UACb,MAAM,SACN,MAAM,MAAM,MAAM,CAAC,CAAC,UACpB,MAAM,eACN,MAAM,MAAM,CAAC,GACZ,MAAM,MAAM,CAAC,CAyBxB"}

89
node_modules/ol/geom/flat/interiorpoint.js generated vendored Normal file
View File

@@ -0,0 +1,89 @@
/**
* @module ol/geom/flat/interiorpoint
*/
import { linearRingsContainsXY } from './contains.js';
import { numberSafeCompareFunction } from '../../array.js';
/**
* Calculates a point that is likely to lie in the interior of the linear rings.
* Inspired by JTS's com.vividsolutions.jts.geom.Geometry#getInteriorPoint.
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {Array<number>} flatCenters Flat centers.
* @param {number} flatCentersOffset Flat center offset.
* @param {Array<number>} [opt_dest] Destination.
* @return {Array<number>} Destination point as XYM coordinate, where M is the
* length of the horizontal intersection that the point belongs to.
*/
export function getInteriorPointOfArray(flatCoordinates, offset, ends, stride, flatCenters, flatCentersOffset, opt_dest) {
var i, ii, x, x1, x2, y1, y2;
var y = flatCenters[flatCentersOffset + 1];
/** @type {Array<number>} */
var intersections = [];
// Calculate intersections with the horizontal line
for (var r = 0, rr = ends.length; r < rr; ++r) {
var end = ends[r];
x1 = flatCoordinates[end - stride];
y1 = flatCoordinates[end - stride + 1];
for (i = offset; i < end; i += stride) {
x2 = flatCoordinates[i];
y2 = flatCoordinates[i + 1];
if ((y <= y1 && y2 <= y) || (y1 <= y && y <= y2)) {
x = ((y - y1) / (y2 - y1)) * (x2 - x1) + x1;
intersections.push(x);
}
x1 = x2;
y1 = y2;
}
}
// Find the longest segment of the horizontal line that has its center point
// inside the linear ring.
var pointX = NaN;
var maxSegmentLength = -Infinity;
intersections.sort(numberSafeCompareFunction);
x1 = intersections[0];
for (i = 1, ii = intersections.length; i < ii; ++i) {
x2 = intersections[i];
var segmentLength = Math.abs(x2 - x1);
if (segmentLength > maxSegmentLength) {
x = (x1 + x2) / 2;
if (linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, y)) {
pointX = x;
maxSegmentLength = segmentLength;
}
}
x1 = x2;
}
if (isNaN(pointX)) {
// There is no horizontal line that has its center point inside the linear
// ring. Use the center of the the linear ring's extent.
pointX = flatCenters[flatCentersOffset];
}
if (opt_dest) {
opt_dest.push(pointX, y, maxSegmentLength);
return opt_dest;
}
else {
return [pointX, y, maxSegmentLength];
}
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Endss.
* @param {number} stride Stride.
* @param {Array<number>} flatCenters Flat centers.
* @return {Array<number>} Interior points as XYM coordinates, where M is the
* length of the horizontal intersection that the point belongs to.
*/
export function getInteriorPointsOfMultiArray(flatCoordinates, offset, endss, stride, flatCenters) {
var interiorPoints = [];
for (var i = 0, ii = endss.length; i < ii; ++i) {
var ends = endss[i];
interiorPoints = getInteriorPointOfArray(flatCoordinates, offset, ends, stride, flatCenters, 2 * i, interiorPoints);
offset = ends[ends.length - 1];
}
return interiorPoints;
}
//# sourceMappingURL=interiorpoint.js.map

1
node_modules/ol/geom/flat/interiorpoint.js.map generated vendored Normal file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E,gBAAgB,CAAC,CAAC;QAC3C,OAAO,QAAQ,CAAC;KACjB;SAAM;QACL,OAAO,CAAC,MAAM,EAAE,CAAC,EAAE,gBAAgB,CAAC,CAAC;KACtC;AACH,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,6BAA6B,CAC3C,eAAe,EACf,MAAM,EACN,KAAK,EACL,MAAM,EACN,WAAW;IAEX,IAAI,cAAc,GAAG,EAAE,CAAC;IACxB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE;QAC9C,IAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,cAAc,GAAG,uBAAuB,CACtC,eAAe,EACf,MAAM,EACN,IAAI,EACJ,MAAM,EACN,WAAW,EACX,CAAC,GAAG,CAAC,EACL,cAAc,CACf,CAAC;QACF,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;KAChC;IACD,OAAO,cAAc,CAAC;AACxB,CAAC"}

33
node_modules/ol/geom/flat/interpolate.d.ts generated vendored Normal file
View File

@@ -0,0 +1,33 @@
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {number} fraction Fraction.
* @param {Array<number>} [opt_dest] Destination.
* @param {number} [opt_dimension] Destination dimension (default is `2`)
* @return {Array<number>} Destination.
*/
export function interpolatePoint(flatCoordinates: Array<number>, offset: number, end: number, stride: number, fraction: number, opt_dest?: number[] | undefined, opt_dimension?: number | undefined): Array<number>;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {number} m M.
* @param {boolean} extrapolate Extrapolate.
* @return {import("../../coordinate.js").Coordinate|null} Coordinate.
*/
export function lineStringCoordinateAtM(flatCoordinates: Array<number>, offset: number, end: number, stride: number, m: number, extrapolate: boolean): import("../../coordinate.js").Coordinate | null;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {number} m M.
* @param {boolean} extrapolate Extrapolate.
* @param {boolean} interpolate Interpolate.
* @return {import("../../coordinate.js").Coordinate|null} Coordinate.
*/
export function lineStringsCoordinateAtM(flatCoordinates: Array<number>, offset: number, ends: Array<number>, stride: number, m: number, extrapolate: boolean, interpolate: boolean): import("../../coordinate.js").Coordinate | null;
//# sourceMappingURL=interpolate.d.ts.map

1
node_modules/ol/geom/flat/interpolate.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"interpolate.d.ts","sourceRoot":"","sources":["../../src/geom/flat/interpolate.js"],"names":[],"mappings":"AAMA;;;;;;;;;GASG;AACH,kDATW,MAAM,MAAM,CAAC,UACb,MAAM,OACN,MAAM,UACN,MAAM,YACN,MAAM,wEAGL,MAAM,MAAM,CAAC,CAqDxB;AAED;;;;;;;;GAQG;AACH,yDARW,MAAM,MAAM,CAAC,UACb,MAAM,OACN,MAAM,UACN,MAAM,KACN,MAAM,eACN,OAAO,GACN,OAAO,qBAAqB,EAAE,UAAU,GAAC,IAAI,CA+DxD;AAED;;;;;;;;;GASG;AACH,0DATW,MAAM,MAAM,CAAC,UACb,MAAM,QACN,MAAM,MAAM,CAAC,UACb,MAAM,KACN,MAAM,eACN,OAAO,eACP,OAAO,GACN,OAAO,qBAAqB,EAAE,UAAU,GAAC,IAAI,CA4DxD"}

175
node_modules/ol/geom/flat/interpolate.js generated vendored Normal file
View File

@@ -0,0 +1,175 @@
/**
* @module ol/geom/flat/interpolate
*/
import { binarySearch } from '../../array.js';
import { lerp } from '../../math.js';
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {number} fraction Fraction.
* @param {Array<number>} [opt_dest] Destination.
* @param {number} [opt_dimension] Destination dimension (default is `2`)
* @return {Array<number>} Destination.
*/
export function interpolatePoint(flatCoordinates, offset, end, stride, fraction, opt_dest, opt_dimension) {
var o, t;
var n = (end - offset) / stride;
if (n === 1) {
o = offset;
}
else if (n === 2) {
o = offset;
t = fraction;
}
else if (n !== 0) {
var x1 = flatCoordinates[offset];
var y1 = flatCoordinates[offset + 1];
var length_1 = 0;
var cumulativeLengths = [0];
for (var i = offset + stride; i < end; i += stride) {
var x2 = flatCoordinates[i];
var y2 = flatCoordinates[i + 1];
length_1 += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
cumulativeLengths.push(length_1);
x1 = x2;
y1 = y2;
}
var target = fraction * length_1;
var index = binarySearch(cumulativeLengths, target);
if (index < 0) {
t =
(target - cumulativeLengths[-index - 2]) /
(cumulativeLengths[-index - 1] - cumulativeLengths[-index - 2]);
o = offset + (-index - 2) * stride;
}
else {
o = offset + index * stride;
}
}
var dimension = opt_dimension > 1 ? opt_dimension : 2;
var dest = opt_dest ? opt_dest : new Array(dimension);
for (var i = 0; i < dimension; ++i) {
dest[i] =
o === undefined
? NaN
: t === undefined
? flatCoordinates[o + i]
: lerp(flatCoordinates[o + i], flatCoordinates[o + stride + i], t);
}
return dest;
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {number} m M.
* @param {boolean} extrapolate Extrapolate.
* @return {import("../../coordinate.js").Coordinate|null} Coordinate.
*/
export function lineStringCoordinateAtM(flatCoordinates, offset, end, stride, m, extrapolate) {
if (end == offset) {
return null;
}
var coordinate;
if (m < flatCoordinates[offset + stride - 1]) {
if (extrapolate) {
coordinate = flatCoordinates.slice(offset, offset + stride);
coordinate[stride - 1] = m;
return coordinate;
}
else {
return null;
}
}
else if (flatCoordinates[end - 1] < m) {
if (extrapolate) {
coordinate = flatCoordinates.slice(end - stride, end);
coordinate[stride - 1] = m;
return coordinate;
}
else {
return null;
}
}
// FIXME use O(1) search
if (m == flatCoordinates[offset + stride - 1]) {
return flatCoordinates.slice(offset, offset + stride);
}
var lo = offset / stride;
var hi = end / stride;
while (lo < hi) {
var mid = (lo + hi) >> 1;
if (m < flatCoordinates[(mid + 1) * stride - 1]) {
hi = mid;
}
else {
lo = mid + 1;
}
}
var m0 = flatCoordinates[lo * stride - 1];
if (m == m0) {
return flatCoordinates.slice((lo - 1) * stride, (lo - 1) * stride + stride);
}
var m1 = flatCoordinates[(lo + 1) * stride - 1];
var t = (m - m0) / (m1 - m0);
coordinate = [];
for (var i = 0; i < stride - 1; ++i) {
coordinate.push(lerp(flatCoordinates[(lo - 1) * stride + i], flatCoordinates[lo * stride + i], t));
}
coordinate.push(m);
return coordinate;
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {number} m M.
* @param {boolean} extrapolate Extrapolate.
* @param {boolean} interpolate Interpolate.
* @return {import("../../coordinate.js").Coordinate|null} Coordinate.
*/
export function lineStringsCoordinateAtM(flatCoordinates, offset, ends, stride, m, extrapolate, interpolate) {
if (interpolate) {
return lineStringCoordinateAtM(flatCoordinates, offset, ends[ends.length - 1], stride, m, extrapolate);
}
var coordinate;
if (m < flatCoordinates[stride - 1]) {
if (extrapolate) {
coordinate = flatCoordinates.slice(0, stride);
coordinate[stride - 1] = m;
return coordinate;
}
else {
return null;
}
}
if (flatCoordinates[flatCoordinates.length - 1] < m) {
if (extrapolate) {
coordinate = flatCoordinates.slice(flatCoordinates.length - stride);
coordinate[stride - 1] = m;
return coordinate;
}
else {
return null;
}
}
for (var i = 0, ii = ends.length; i < ii; ++i) {
var end = ends[i];
if (offset == end) {
continue;
}
if (m < flatCoordinates[offset + stride - 1]) {
return null;
}
else if (m <= flatCoordinates[end - 1]) {
return lineStringCoordinateAtM(flatCoordinates, offset, end, stride, m, false);
}
offset = end;
}
return null;
}
//# sourceMappingURL=interpolate.js.map

1
node_modules/ol/geom/flat/interpolate.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

46
node_modules/ol/geom/flat/intersectsextent.d.ts generated vendored Normal file
View File

@@ -0,0 +1,46 @@
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {import("../../extent.js").Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
export function intersectsLineString(flatCoordinates: Array<number>, offset: number, end: number, stride: number, extent: import("../../extent.js").Extent): boolean;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {import("../../extent.js").Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
export function intersectsLineStringArray(flatCoordinates: Array<number>, offset: number, ends: Array<number>, stride: number, extent: import("../../extent.js").Extent): boolean;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {import("../../extent.js").Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
export function intersectsLinearRing(flatCoordinates: Array<number>, offset: number, end: number, stride: number, extent: import("../../extent.js").Extent): boolean;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {import("../../extent.js").Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
export function intersectsLinearRingArray(flatCoordinates: Array<number>, offset: number, ends: Array<number>, stride: number, extent: import("../../extent.js").Extent): boolean;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Endss.
* @param {number} stride Stride.
* @param {import("../../extent.js").Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
export function intersectsLinearRingMultiArray(flatCoordinates: Array<number>, offset: number, endss: Array<Array<number>>, stride: number, extent: import("../../extent.js").Extent): boolean;
//# sourceMappingURL=intersectsextent.d.ts.map

1
node_modules/ol/geom/flat/intersectsextent.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"intersectsextent.d.ts","sourceRoot":"","sources":["../../src/geom/flat/intersectsextent.js"],"names":[],"mappings":"AAaA;;;;;;;GAOG;AACH,sDAPW,MAAM,MAAM,CAAC,UACb,MAAM,OACN,MAAM,UACN,MAAM,UACN,OAAO,iBAAiB,EAAE,MAAM,GAC/B,OAAO,CA2ClB;AAED;;;;;;;GAOG;AACH,2DAPW,MAAM,MAAM,CAAC,UACb,MAAM,QACN,MAAM,MAAM,CAAC,UACb,MAAM,UACN,OAAO,iBAAiB,EAAE,MAAM,GAC/B,OAAO,CAkBlB;AAED;;;;;;;GAOG;AACH,sDAPW,MAAM,MAAM,CAAC,UACb,MAAM,OACN,MAAM,UACN,MAAM,UACN,OAAO,iBAAiB,EAAE,MAAM,GAC/B,OAAO,CA6DlB;AAED;;;;;;;GAOG;AACH,2DAPW,MAAM,MAAM,CAAC,UACb,MAAM,QACN,MAAM,MAAM,CAAC,UACb,MAAM,UACN,OAAO,iBAAiB,EAAE,MAAM,GAC/B,OAAO,CAuClB;AAED;;;;;;;GAOG;AACH,gEAPW,MAAM,MAAM,CAAC,UACb,MAAM,SACN,MAAM,MAAM,MAAM,CAAC,CAAC,UACpB,MAAM,UACN,OAAO,iBAAiB,EAAE,MAAM,GAC/B,OAAO,CAmBlB"}

125
node_modules/ol/geom/flat/intersectsextent.js generated vendored Normal file
View File

@@ -0,0 +1,125 @@
/**
* @module ol/geom/flat/intersectsextent
*/
import { containsExtent, createEmpty, extendFlatCoordinates, intersects, intersectsSegment, } from '../../extent.js';
import { forEach as forEachSegment } from './segments.js';
import { linearRingContainsExtent, linearRingContainsXY } from './contains.js';
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {import("../../extent.js").Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
export function intersectsLineString(flatCoordinates, offset, end, stride, extent) {
var coordinatesExtent = extendFlatCoordinates(createEmpty(), flatCoordinates, offset, end, stride);
if (!intersects(extent, coordinatesExtent)) {
return false;
}
if (containsExtent(extent, coordinatesExtent)) {
return true;
}
if (coordinatesExtent[0] >= extent[0] && coordinatesExtent[2] <= extent[2]) {
return true;
}
if (coordinatesExtent[1] >= extent[1] && coordinatesExtent[3] <= extent[3]) {
return true;
}
return forEachSegment(flatCoordinates, offset, end, stride,
/**
* @param {import("../../coordinate.js").Coordinate} point1 Start point.
* @param {import("../../coordinate.js").Coordinate} point2 End point.
* @return {boolean} `true` if the segment and the extent intersect,
* `false` otherwise.
*/
function (point1, point2) {
return intersectsSegment(extent, point1, point2);
});
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {import("../../extent.js").Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
export function intersectsLineStringArray(flatCoordinates, offset, ends, stride, extent) {
for (var i = 0, ii = ends.length; i < ii; ++i) {
if (intersectsLineString(flatCoordinates, offset, ends[i], stride, extent)) {
return true;
}
offset = ends[i];
}
return false;
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @param {import("../../extent.js").Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
export function intersectsLinearRing(flatCoordinates, offset, end, stride, extent) {
if (intersectsLineString(flatCoordinates, offset, end, stride, extent)) {
return true;
}
if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[0], extent[1])) {
return true;
}
if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[0], extent[3])) {
return true;
}
if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[2], extent[1])) {
return true;
}
if (linearRingContainsXY(flatCoordinates, offset, end, stride, extent[2], extent[3])) {
return true;
}
return false;
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {import("../../extent.js").Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
export function intersectsLinearRingArray(flatCoordinates, offset, ends, stride, extent) {
if (!intersectsLinearRing(flatCoordinates, offset, ends[0], stride, extent)) {
return false;
}
if (ends.length === 1) {
return true;
}
for (var i = 1, ii = ends.length; i < ii; ++i) {
if (linearRingContainsExtent(flatCoordinates, ends[i - 1], ends[i], stride, extent)) {
if (!intersectsLineString(flatCoordinates, ends[i - 1], ends[i], stride, extent)) {
return false;
}
}
}
return true;
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Endss.
* @param {number} stride Stride.
* @param {import("../../extent.js").Extent} extent Extent.
* @return {boolean} True if the geometry and the extent intersect.
*/
export function intersectsLinearRingMultiArray(flatCoordinates, offset, endss, stride, extent) {
for (var i = 0, ii = endss.length; i < ii; ++i) {
var ends = endss[i];
if (intersectsLinearRingArray(flatCoordinates, offset, ends, stride, extent)) {
return true;
}
offset = ends[ends.length - 1];
}
return false;
}
//# sourceMappingURL=intersectsextent.js.map

1
node_modules/ol/geom/flat/intersectsextent.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"intersectsextent.js","sourceRoot":"","sources":["../../src/geom/flat/intersectsextent.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,cAAc,EACd,WAAW,EACX,qBAAqB,EACrB,UAAU,EACV,iBAAiB,GAClB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,eAAe,CAAC;AACxD,OAAO,EAAC,wBAAwB,EAAE,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAE7E;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAClC,eAAe,EACf,MAAM,EACN,GAAG,EACH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AE;QACrB,OAAO,IAAI,CAAC;KACb;IACD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE;QAC7C,IACE,wBAAwB,CACtB,eAAe,EACf,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,EACX,IAAI,CAAC,CAAC,CAAC,EACP,MAAM,EACN,MAAM,CACP,EACD;YACA,IACE,CAAC,oBAAoB,CACnB,eAAe,EACf,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,EACX,IAAI,CAAC,CAAC,CAAC,EACP,MAAM,EACN,MAAM,CACP,EACD;gBACA,OAAO,KAAK,CAAC;aACd;SACF;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,8BAA8B,CAC5C,eAAe,EACf,MAAM,EACN,KAAK,EACL,MAAM,EACN,MAAM;IAEN,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE;QAC9C,IAAM,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtB,IACE,yBAAyB,CAAC,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EACxE;YACA,OAAO,IAAI,CAAC;SACb;QACD,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;KAChC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}

20
node_modules/ol/geom/flat/length.d.ts generated vendored Normal file
View File

@@ -0,0 +1,20 @@
/**
* @module ol/geom/flat/length
*/
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @return {number} Length.
*/
export function lineStringLength(flatCoordinates: Array<number>, offset: number, end: number, stride: number): number;
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @return {number} Perimeter.
*/
export function linearRingLength(flatCoordinates: Array<number>, offset: number, end: number, stride: number): number;
//# sourceMappingURL=length.d.ts.map

1
node_modules/ol/geom/flat/length.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"length.d.ts","sourceRoot":"","sources":["../../src/geom/flat/length.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;GAMG;AACH,kDANW,MAAM,MAAM,CAAC,UACb,MAAM,OACN,MAAM,UACN,MAAM,GACL,MAAM,CAcjB;AAED;;;;;;GAMG;AACH,kDANW,MAAM,MAAM,CAAC,UACb,MAAM,OACN,MAAM,UACN,MAAM,GACL,MAAM,CAQjB"}

38
node_modules/ol/geom/flat/length.js generated vendored Normal file
View File

@@ -0,0 +1,38 @@
/**
* @module ol/geom/flat/length
*/
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @return {number} Length.
*/
export function lineStringLength(flatCoordinates, offset, end, stride) {
var x1 = flatCoordinates[offset];
var y1 = flatCoordinates[offset + 1];
var length = 0;
for (var i = offset + stride; i < end; i += stride) {
var x2 = flatCoordinates[i];
var y2 = flatCoordinates[i + 1];
length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
x1 = x2;
y1 = y2;
}
return length;
}
/**
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @return {number} Perimeter.
*/
export function linearRingLength(flatCoordinates, offset, end, stride) {
var perimeter = lineStringLength(flatCoordinates, offset, end, stride);
var dx = flatCoordinates[end - stride] - flatCoordinates[offset];
var dy = flatCoordinates[end - stride + 1] - flatCoordinates[offset + 1];
perimeter += Math.sqrt(dx * dx + dy * dy);
return perimeter;
}
//# sourceMappingURL=length.js.map

1
node_modules/ol/geom/flat/length.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"length.js","sourceRoot":"","sources":["../../src/geom/flat/length.js"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,eAAe,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;IACnE,IAAI,EAAE,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;IACjC,IAAI,EAAE,GAAG,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACrC,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,IAAI,CAAC,GAAG,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,IAAI,MAAM,EAAE;QAClD,IAAM,EAAE,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;QAC9B,IAAM,EAAE,GAAG,eAAe,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QAClC,MAAM,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;QACnE,EAAE,GAAG,EAAE,CAAC;QACR,EAAE,GAAG,EAAE,CAAC;KACT;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,eAAe,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM;IACnE,IAAI,SAAS,GAAG,gBAAgB,CAAC,eAAe,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;IACvE,IAAM,EAAE,GAAG,eAAe,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;IACnE,IAAM,EAAE,GAAG,eAAe,CAAC,GAAG,GAAG,MAAM,GAAG,CAAC,CAAC,GAAG,eAAe,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAC3E,SAAS,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;IAC1C,OAAO,SAAS,CAAC;AACnB,CAAC"}

76
node_modules/ol/geom/flat/orient.d.ts generated vendored Normal file
View File

@@ -0,0 +1,76 @@
/**
* Is the linear ring oriented clockwise in a coordinate system with a bottom-left
* coordinate origin? For a coordinate system with a top-left coordinate origin,
* the ring's orientation is clockwise when this function returns false.
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @return {boolean} Is clockwise.
*/
export function linearRingIsClockwise(flatCoordinates: Array<number>, offset: number, end: number, stride: number): boolean;
/**
* Determines if linear rings are oriented. By default, left-hand orientation
* is tested (first ring must be clockwise, remaining rings counter-clockwise).
* To test for right-hand orientation, use the `opt_right` argument.
*
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<number>} ends Array of end indexes.
* @param {number} stride Stride.
* @param {boolean} [opt_right] Test for right-hand orientation
* (counter-clockwise exterior ring and clockwise interior rings).
* @return {boolean} Rings are correctly oriented.
*/
export function linearRingsAreOriented(flatCoordinates: Array<number>, offset: number, ends: Array<number>, stride: number, opt_right?: boolean | undefined): boolean;
/**
* Determines if linear rings are oriented. By default, left-hand orientation
* is tested (first ring must be clockwise, remaining rings counter-clockwise).
* To test for right-hand orientation, use the `opt_right` argument.
*
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Array of array of end indexes.
* @param {number} stride Stride.
* @param {boolean} [opt_right] Test for right-hand orientation
* (counter-clockwise exterior ring and clockwise interior rings).
* @return {boolean} Rings are correctly oriented.
*/
export function linearRingssAreOriented(flatCoordinates: Array<number>, offset: number, endss: Array<Array<number>>, stride: number, opt_right?: boolean | undefined): boolean;
/**
* Orient coordinates in a flat array of linear rings. By default, rings
* are oriented following the left-hand rule (clockwise for exterior and
* counter-clockwise for interior rings). To orient according to the
* right-hand rule, use the `opt_right` argument.
*
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {boolean} [opt_right] Follow the right-hand rule for orientation.
* @return {number} End.
*/
export function orientLinearRings(flatCoordinates: Array<number>, offset: number, ends: Array<number>, stride: number, opt_right?: boolean | undefined): number;
/**
* Orient coordinates in a flat array of linear rings. By default, rings
* are oriented following the left-hand rule (clockwise for exterior and
* counter-clockwise for interior rings). To orient according to the
* right-hand rule, use the `opt_right` argument.
*
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Array of array of end indexes.
* @param {number} stride Stride.
* @param {boolean} [opt_right] Follow the right-hand rule for orientation.
* @return {number} End.
*/
export function orientLinearRingsArray(flatCoordinates: Array<number>, offset: number, endss: Array<Array<number>>, stride: number, opt_right?: boolean | undefined): number;
/**
* Return a two-dimensional endss
* @param {Array<number>} flatCoordinates Flat coordinates
* @param {Array<number>} ends Linear ring end indexes
* @return {Array<Array<number>>} Two dimensional endss array that can
* be used to contruct a MultiPolygon
*/
export function inflateEnds(flatCoordinates: Array<number>, ends: Array<number>): Array<Array<number>>;
//# sourceMappingURL=orient.d.ts.map

1
node_modules/ol/geom/flat/orient.d.ts.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"orient.d.ts","sourceRoot":"","sources":["../../src/geom/flat/orient.js"],"names":[],"mappings":"AAKA;;;;;;;;;GASG;AACH,uDANW,MAAM,MAAM,CAAC,UACb,MAAM,OACN,MAAM,UACN,MAAM,GACL,OAAO,CAgBlB;AAED;;;;;;;;;;;;GAYG;AACH,wDARW,MAAM,MAAM,CAAC,UACb,MAAM,QACN,MAAM,MAAM,CAAC,UACb,MAAM,oCAGL,OAAO,CA8BlB;AAED;;;;;;;;;;;;GAYG;AACH,yDARW,MAAM,MAAM,CAAC,UACb,MAAM,SACN,MAAM,MAAM,MAAM,CAAC,CAAC,UACpB,MAAM,oCAGL,OAAO,CAqBlB;AAED;;;;;;;;;;;;GAYG;AACH,mDAPW,MAAM,MAAM,CAAC,UACb,MAAM,QACN,MAAM,MAAM,CAAC,UACb,MAAM,oCAEL,MAAM,CA4BjB;AAED;;;;;;;;;;;;GAYG;AACH,wDAPW,MAAM,MAAM,CAAC,UACb,MAAM,SACN,MAAM,MAAM,MAAM,CAAC,CAAC,UACpB,MAAM,oCAEL,MAAM,CAmBjB;AAED;;;;;;GAMG;AACH,6CALW,MAAM,MAAM,CAAC,QACb,MAAM,MAAM,CAAC,GACZ,MAAM,MAAM,MAAM,CAAC,CAAC,CAsB/B"}

162
node_modules/ol/geom/flat/orient.js generated vendored Normal file
View File

@@ -0,0 +1,162 @@
/**
* @module ol/geom/flat/orient
*/
import { coordinates as reverseCoordinates } from './reverse.js';
/**
* Is the linear ring oriented clockwise in a coordinate system with a bottom-left
* coordinate origin? For a coordinate system with a top-left coordinate origin,
* the ring's orientation is clockwise when this function returns false.
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {number} end End.
* @param {number} stride Stride.
* @return {boolean} Is clockwise.
*/
export function linearRingIsClockwise(flatCoordinates, offset, end, stride) {
// https://stackoverflow.com/q/1165647/clockwise-method#1165943
// https://github.com/OSGeo/gdal/blob/master/gdal/ogr/ogrlinearring.cpp
var edge = 0;
var x1 = flatCoordinates[end - stride];
var y1 = flatCoordinates[end - stride + 1];
for (; offset < end; offset += stride) {
var x2 = flatCoordinates[offset];
var y2 = flatCoordinates[offset + 1];
edge += (x2 - x1) * (y2 + y1);
x1 = x2;
y1 = y2;
}
return edge === 0 ? undefined : edge > 0;
}
/**
* Determines if linear rings are oriented. By default, left-hand orientation
* is tested (first ring must be clockwise, remaining rings counter-clockwise).
* To test for right-hand orientation, use the `opt_right` argument.
*
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<number>} ends Array of end indexes.
* @param {number} stride Stride.
* @param {boolean} [opt_right] Test for right-hand orientation
* (counter-clockwise exterior ring and clockwise interior rings).
* @return {boolean} Rings are correctly oriented.
*/
export function linearRingsAreOriented(flatCoordinates, offset, ends, stride, opt_right) {
var right = opt_right !== undefined ? opt_right : false;
for (var i = 0, ii = ends.length; i < ii; ++i) {
var end = ends[i];
var isClockwise = linearRingIsClockwise(flatCoordinates, offset, end, stride);
if (i === 0) {
if ((right && isClockwise) || (!right && !isClockwise)) {
return false;
}
}
else {
if ((right && !isClockwise) || (!right && isClockwise)) {
return false;
}
}
offset = end;
}
return true;
}
/**
* Determines if linear rings are oriented. By default, left-hand orientation
* is tested (first ring must be clockwise, remaining rings counter-clockwise).
* To test for right-hand orientation, use the `opt_right` argument.
*
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Array of array of end indexes.
* @param {number} stride Stride.
* @param {boolean} [opt_right] Test for right-hand orientation
* (counter-clockwise exterior ring and clockwise interior rings).
* @return {boolean} Rings are correctly oriented.
*/
export function linearRingssAreOriented(flatCoordinates, offset, endss, stride, opt_right) {
for (var i = 0, ii = endss.length; i < ii; ++i) {
var ends = endss[i];
if (!linearRingsAreOriented(flatCoordinates, offset, ends, stride, opt_right)) {
return false;
}
if (ends.length) {
offset = ends[ends.length - 1];
}
}
return true;
}
/**
* Orient coordinates in a flat array of linear rings. By default, rings
* are oriented following the left-hand rule (clockwise for exterior and
* counter-clockwise for interior rings). To orient according to the
* right-hand rule, use the `opt_right` argument.
*
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<number>} ends Ends.
* @param {number} stride Stride.
* @param {boolean} [opt_right] Follow the right-hand rule for orientation.
* @return {number} End.
*/
export function orientLinearRings(flatCoordinates, offset, ends, stride, opt_right) {
var right = opt_right !== undefined ? opt_right : false;
for (var i = 0, ii = ends.length; i < ii; ++i) {
var end = ends[i];
var isClockwise = linearRingIsClockwise(flatCoordinates, offset, end, stride);
var reverse = i === 0
? (right && isClockwise) || (!right && !isClockwise)
: (right && !isClockwise) || (!right && isClockwise);
if (reverse) {
reverseCoordinates(flatCoordinates, offset, end, stride);
}
offset = end;
}
return offset;
}
/**
* Orient coordinates in a flat array of linear rings. By default, rings
* are oriented following the left-hand rule (clockwise for exterior and
* counter-clockwise for interior rings). To orient according to the
* right-hand rule, use the `opt_right` argument.
*
* @param {Array<number>} flatCoordinates Flat coordinates.
* @param {number} offset Offset.
* @param {Array<Array<number>>} endss Array of array of end indexes.
* @param {number} stride Stride.
* @param {boolean} [opt_right] Follow the right-hand rule for orientation.
* @return {number} End.
*/
export function orientLinearRingsArray(flatCoordinates, offset, endss, stride, opt_right) {
for (var i = 0, ii = endss.length; i < ii; ++i) {
offset = orientLinearRings(flatCoordinates, offset, endss[i], stride, opt_right);
}
return offset;
}
/**
* Return a two-dimensional endss
* @param {Array<number>} flatCoordinates Flat coordinates
* @param {Array<number>} ends Linear ring end indexes
* @return {Array<Array<number>>} Two dimensional endss array that can
* be used to contruct a MultiPolygon
*/
export function inflateEnds(flatCoordinates, ends) {
var endss = [];
var offset = 0;
var prevEndIndex = 0;
for (var i = 0, ii = ends.length; i < ii; ++i) {
var end = ends[i];
// classifies an array of rings into polygons with outer rings and holes
if (!linearRingIsClockwise(flatCoordinates, offset, end, 2)) {
endss.push(ends.slice(prevEndIndex, i + 1));
}
else {
if (endss.length === 0) {
continue;
}
endss[endss.length - 1].push(ends[prevEndIndex]);
}
prevEndIndex = i + 1;
offset = end;
}
return endss;
}
//# sourceMappingURL=orient.js.map

1
node_modules/ol/geom/flat/orient.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"orient.js","sourceRoot":"","sources":["../../src/geom/flat/orient.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAC,WAAW,IAAI,kBAAkB,EAAC,MAAM,cAAc,CAAC;A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