nodes2ts 3.0.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +102 -15
- package/dist/export.cjs +5331 -0
- package/dist/export.cjs.map +1 -0
- package/dist/export.d.cts +1838 -0
- package/dist/export.d.ts +1828 -20
- package/dist/export.js +5280 -62
- package/dist/export.js.map +1 -1
- package/package.json +34 -55
- package/.eslintignore +0 -3
- package/.eslintrc.cjs +0 -11
- package/.github/workflows/lint.js.yml +0 -22
- package/.github/workflows/node.js.yml +0 -22
- package/.mocharc.js +0 -7
- package/dist/Interval.d.ts +0 -24
- package/dist/Interval.js +0 -23
- package/dist/Interval.js.map +0 -1
- package/dist/MutableInteger.d.ts +0 -4
- package/dist/MutableInteger.js +0 -10
- package/dist/MutableInteger.js.map +0 -1
- package/dist/Platform.d.ts +0 -15
- package/dist/Platform.js +0 -53
- package/dist/Platform.js.map +0 -1
- package/dist/R1Interval.d.ts +0 -76
- package/dist/R1Interval.js +0 -158
- package/dist/R1Interval.js.map +0 -1
- package/dist/R2Vector.d.ts +0 -34
- package/dist/R2Vector.js +0 -131
- package/dist/R2Vector.js.map +0 -1
- package/dist/S1Angle.d.ts +0 -60
- package/dist/S1Angle.js +0 -133
- package/dist/S1Angle.js.map +0 -1
- package/dist/S1ChordAngle.d.ts +0 -166
- package/dist/S1ChordAngle.js +0 -318
- package/dist/S1ChordAngle.js.map +0 -1
- package/dist/S1Interval.d.ts +0 -109
- package/dist/S1Interval.js +0 -398
- package/dist/S1Interval.js.map +0 -1
- package/dist/S2.d.ts +0 -96
- package/dist/S2.js +0 -231
- package/dist/S2.js.map +0 -1
- package/dist/S2Cap.d.ts +0 -122
- package/dist/S2Cap.js +0 -399
- package/dist/S2Cap.js.map +0 -1
- package/dist/S2Cell.d.ts +0 -106
- package/dist/S2Cell.js +0 -358
- package/dist/S2Cell.js.map +0 -1
- package/dist/S2CellId.d.ts +0 -290
- package/dist/S2CellId.js +0 -983
- package/dist/S2CellId.js.map +0 -1
- package/dist/S2CellUnion.d.ts +0 -179
- package/dist/S2CellUnion.js +0 -523
- package/dist/S2CellUnion.js.map +0 -1
- package/dist/S2EdgeUtil.d.ts +0 -17
- package/dist/S2EdgeUtil.js +0 -785
- package/dist/S2EdgeUtil.js.map +0 -1
- package/dist/S2LatLng.d.ts +0 -77
- package/dist/S2LatLng.js +0 -186
- package/dist/S2LatLng.js.map +0 -1
- package/dist/S2LatLngRect.d.ts +0 -190
- package/dist/S2LatLngRect.js +0 -624
- package/dist/S2LatLngRect.js.map +0 -1
- package/dist/S2Metric.d.ts +0 -38
- package/dist/S2Metric.js +0 -79
- package/dist/S2Metric.js.map +0 -1
- package/dist/S2Point.d.ts +0 -78
- package/dist/S2Point.js +0 -250
- package/dist/S2Point.js.map +0 -1
- package/dist/S2Projections.d.ts +0 -102
- package/dist/S2Projections.js +0 -331
- package/dist/S2Projections.js.map +0 -1
- package/dist/S2Region.d.ts +0 -31
- package/dist/S2Region.js +0 -18
- package/dist/S2Region.js.map +0 -1
- package/dist/S2RegionCoverer.d.ts +0 -186
- package/dist/S2RegionCoverer.js +0 -471
- package/dist/S2RegionCoverer.js.map +0 -1
- package/dist/utils/preconditions.d.ts +0 -2
- package/dist/utils/preconditions.js +0 -16
- package/dist/utils/preconditions.js.map +0 -1
package/dist/S2EdgeUtil.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"S2EdgeUtil.js","sourceRoot":"","sources":["../src/S2EdgeUtil.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAGH,uCAAkC;AAClC,6BAAwB;AACxB,uCAAkC;AAElC;;;;;GAKG;AACH,MAAa,UAAU;IACvB,QAAQ;IACR,iFAAiF;IACjF,+EAA+E;IAC/E,6EAA6E;IAC7E,0EAA0E;IAC1E,8EAA8E;IAC9E,iFAAiF;IACjF,kFAAkF;IAClF,yEAAyE;IACzE,6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2
|
-
import { S2Point } from "./S2Point";
|
|
3
|
-
/**
|
|
4
|
-
* This class represents a point on the unit sphere as a pair of
|
|
5
|
-
* latitude-longitude coordinates. Like the rest of the "geometry" package, the
|
|
6
|
-
* intent is to represent spherical geometry as a mathematical abstraction, so
|
|
7
|
-
* functions that are specifically related to the Earth's geometry (e.g.
|
|
8
|
-
* easting/northing conversions) should be put elsewhere.
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
export declare class S2LatLng {
|
|
12
|
-
/**
|
|
13
|
-
* Approximate "effective" radius of the Earth in meters.
|
|
14
|
-
*/
|
|
15
|
-
static EARTH_RADIUS_METERS: number;
|
|
16
|
-
/** The center point the lat/lng coordinate system. */
|
|
17
|
-
static CENTER: S2LatLng;
|
|
18
|
-
latRadians: number;
|
|
19
|
-
lngRadians: number;
|
|
20
|
-
constructor(latRadians: number, lngRadians: number);
|
|
21
|
-
get latDegrees(): number;
|
|
22
|
-
get lngDegrees(): number;
|
|
23
|
-
/** Convert an S2LatLng to the equivalent unit-length vector (S2Point). */
|
|
24
|
-
toPoint(): S2Point;
|
|
25
|
-
/**
|
|
26
|
-
* Returns a new S2LatLng based on this instance for which {@link #isValid()}
|
|
27
|
-
* will be {@code true}.
|
|
28
|
-
* <ul>
|
|
29
|
-
* <li>Latitude is clipped to the range {@code [-90, 90]}
|
|
30
|
-
* <li>Longitude is normalized to be in the range {@code [-180, 180]}
|
|
31
|
-
* </ul>
|
|
32
|
-
* <p>If the current point is valid then the returned point will have the same
|
|
33
|
-
* coordinates.
|
|
34
|
-
*/
|
|
35
|
-
normalized(): S2LatLng;
|
|
36
|
-
static fromDegrees(latDegrees: number, lngDegrees: number): S2LatLng;
|
|
37
|
-
static fromRadians(latRadians: number, lngRadians: number): S2LatLng;
|
|
38
|
-
static fromPoint(p: S2Point): S2LatLng;
|
|
39
|
-
/** Returns the latitude of this point as a new S1Angle. */
|
|
40
|
-
lat(): S1Angle;
|
|
41
|
-
/** Returns the longitude of this point as a new S1Angle. */
|
|
42
|
-
lng(): S1Angle;
|
|
43
|
-
/**
|
|
44
|
-
* Return true if the latitude is between -90 and 90 degrees inclusive and the
|
|
45
|
-
* longitude is between -180 and 180 degrees inclusive.
|
|
46
|
-
*/
|
|
47
|
-
isValid(): boolean;
|
|
48
|
-
/**
|
|
49
|
-
* Scales this point by the given scaling factor.
|
|
50
|
-
* Note that there is no guarantee that the new point will be <em>valid</em>.
|
|
51
|
-
*/
|
|
52
|
-
mul(m: number): S2LatLng;
|
|
53
|
-
static latitude(p: S2Point): S1Angle;
|
|
54
|
-
static longitude(p: S2Point): S1Angle;
|
|
55
|
-
equals(other: S2LatLng): boolean;
|
|
56
|
-
pointAtDistance(distanceInKM: number, bearingRadians: number): S2LatLng;
|
|
57
|
-
/**
|
|
58
|
-
* Generates n LatLngs given a distance in km and the number of points wanted.
|
|
59
|
-
* Generated points will be returned in a Clockwise order starting from North.
|
|
60
|
-
* @param _distanceInKm
|
|
61
|
-
* @param nPoints
|
|
62
|
-
* @returns {S2LatLng[]}
|
|
63
|
-
*/
|
|
64
|
-
pointsAtDistance(_distanceInKm: number, nPoints?: number): S2LatLng[];
|
|
65
|
-
getEarthDistance(other: S2LatLng): number;
|
|
66
|
-
getDistance(other: S2LatLng): S1Angle;
|
|
67
|
-
toString(): string;
|
|
68
|
-
toStringDegrees(): string;
|
|
69
|
-
toGEOJSON(): {
|
|
70
|
-
type: string;
|
|
71
|
-
geometry: {
|
|
72
|
-
type: string;
|
|
73
|
-
coordinates: number[];
|
|
74
|
-
};
|
|
75
|
-
properties: {};
|
|
76
|
-
};
|
|
77
|
-
}
|
package/dist/S2LatLng.js
DELETED
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*
|
|
3
|
-
* Copyright 2005 Google Inc.
|
|
4
|
-
*
|
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
-
* you may not use this file except in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
-
* See the License for the specific language governing permissions and
|
|
15
|
-
* limitations under the License.
|
|
16
|
-
*/
|
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.S2LatLng = void 0;
|
|
19
|
-
const S1Angle_1 = require("./S1Angle");
|
|
20
|
-
const S2Point_1 = require("./S2Point");
|
|
21
|
-
const S2_1 = require("./S2");
|
|
22
|
-
const Platform_1 = require("./Platform");
|
|
23
|
-
/**
|
|
24
|
-
* This class represents a point on the unit sphere as a pair of
|
|
25
|
-
* latitude-longitude coordinates. Like the rest of the "geometry" package, the
|
|
26
|
-
* intent is to represent spherical geometry as a mathematical abstraction, so
|
|
27
|
-
* functions that are specifically related to the Earth's geometry (e.g.
|
|
28
|
-
* easting/northing conversions) should be put elsewhere.
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
31
|
-
class S2LatLng {
|
|
32
|
-
constructor(latRadians, lngRadians) {
|
|
33
|
-
this.latRadians = latRadians;
|
|
34
|
-
this.lngRadians = lngRadians;
|
|
35
|
-
}
|
|
36
|
-
get latDegrees() {
|
|
37
|
-
return new S1Angle_1.S1Angle(this.latRadians).degrees();
|
|
38
|
-
}
|
|
39
|
-
get lngDegrees() {
|
|
40
|
-
return new S1Angle_1.S1Angle(this.lngRadians).degrees();
|
|
41
|
-
}
|
|
42
|
-
// Clamps the latitude to the range [-90, 90] degrees, and adds or subtracts
|
|
43
|
-
// a multiple of 360 degrees to the longitude if necessary to reduce it to
|
|
44
|
-
// the range [-180, 180].
|
|
45
|
-
/** Convert an S2LatLng to the equivalent unit-length vector (S2Point). */
|
|
46
|
-
toPoint() {
|
|
47
|
-
const phi = this.latRadians;
|
|
48
|
-
const theta = this.lngRadians;
|
|
49
|
-
const cosphi = Math.cos(phi);
|
|
50
|
-
return new S2Point_1.S2Point(Math.cos(theta) * (cosphi), Math.sin(theta) * (cosphi), Math.sin(phi));
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Returns a new S2LatLng based on this instance for which {@link #isValid()}
|
|
54
|
-
* will be {@code true}.
|
|
55
|
-
* <ul>
|
|
56
|
-
* <li>Latitude is clipped to the range {@code [-90, 90]}
|
|
57
|
-
* <li>Longitude is normalized to be in the range {@code [-180, 180]}
|
|
58
|
-
* </ul>
|
|
59
|
-
* <p>If the current point is valid then the returned point will have the same
|
|
60
|
-
* coordinates.
|
|
61
|
-
*/
|
|
62
|
-
normalized() {
|
|
63
|
-
// drem(x, 2 * S2.M_PI) reduces its argument to the range
|
|
64
|
-
// [-S2.M_PI, Math.atan2PI] inclusive, which is what we want here.
|
|
65
|
-
return new S2LatLng(Math.max(-S2_1.S2.M_PI_2, Math.min(S2_1.S2.M_PI_2, this.latRadians)), Platform_1.Platform.IEEEremainder(this.lngRadians, 2 * (S2_1.S2.M_PI)));
|
|
66
|
-
}
|
|
67
|
-
static fromDegrees(latDegrees, lngDegrees) {
|
|
68
|
-
return new S2LatLng(S1Angle_1.S1Angle.degrees(latDegrees).radians, S1Angle_1.S1Angle.degrees(lngDegrees).radians);
|
|
69
|
-
}
|
|
70
|
-
static fromRadians(latRadians, lngRadians) {
|
|
71
|
-
return new S2LatLng(latRadians, lngRadians);
|
|
72
|
-
}
|
|
73
|
-
static fromPoint(p) {
|
|
74
|
-
return new S2LatLng(S2LatLng.latitude(p).radians, S2LatLng.longitude(p).radians);
|
|
75
|
-
}
|
|
76
|
-
/** Returns the latitude of this point as a new S1Angle. */
|
|
77
|
-
lat() {
|
|
78
|
-
return S1Angle_1.S1Angle.radians(this.latRadians);
|
|
79
|
-
}
|
|
80
|
-
/** Returns the longitude of this point as a new S1Angle. */
|
|
81
|
-
lng() {
|
|
82
|
-
return S1Angle_1.S1Angle.radians(this.lngRadians);
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Return true if the latitude is between -90 and 90 degrees inclusive and the
|
|
86
|
-
* longitude is between -180 and 180 degrees inclusive.
|
|
87
|
-
*/
|
|
88
|
-
isValid() {
|
|
89
|
-
return Math.abs(this.latRadians) <= (S2_1.S2.M_PI_2) &&
|
|
90
|
-
Math.abs(this.lngRadians) <= (S2_1.S2.M_PI);
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Scales this point by the given scaling factor.
|
|
94
|
-
* Note that there is no guarantee that the new point will be <em>valid</em>.
|
|
95
|
-
*/
|
|
96
|
-
mul(m) {
|
|
97
|
-
return new S2LatLng(this.latRadians * (m), this.lngRadians * (m));
|
|
98
|
-
}
|
|
99
|
-
static latitude(p) {
|
|
100
|
-
// We use atan2 rather than asin because the input vector is not necessarily
|
|
101
|
-
// unit length, and atan2 is much more accurate than asin near the poles.
|
|
102
|
-
return new S1Angle_1.S1Angle(Math.atan2(p.z, Math.sqrt(p.x * p.x + p.y * p.y)));
|
|
103
|
-
}
|
|
104
|
-
static longitude(p) {
|
|
105
|
-
// Note that atan2(0, 0) is defined to be zero.
|
|
106
|
-
return new S1Angle_1.S1Angle(Math.atan2(p.y, p.x));
|
|
107
|
-
}
|
|
108
|
-
equals(other) {
|
|
109
|
-
return other.latRadians === this.latRadians && other.lngRadians === this.lngRadians;
|
|
110
|
-
}
|
|
111
|
-
pointAtDistance(distanceInKM, bearingRadians) {
|
|
112
|
-
const distanceInM = distanceInKM * 1000;
|
|
113
|
-
const distanceToRadius = distanceInM / (S2LatLng.EARTH_RADIUS_METERS);
|
|
114
|
-
const newLat = Math.asin(Math.sin(this.latRadians) * Math.cos(distanceToRadius)
|
|
115
|
-
+ (Math.cos(this.latRadians) * Math.sin(distanceToRadius) * Math.cos(bearingRadians)));
|
|
116
|
-
const newLng = this.lngRadians + Math.atan2(Math.sin(bearingRadians)
|
|
117
|
-
* (Math.sin(distanceToRadius))
|
|
118
|
-
* (Math.cos(this.latRadians)), Math.cos(distanceToRadius) - (Math.sin(this.latRadians) * Math.sin(newLat)));
|
|
119
|
-
return new S2LatLng(newLat, newLng);
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* Generates n LatLngs given a distance in km and the number of points wanted.
|
|
123
|
-
* Generated points will be returned in a Clockwise order starting from North.
|
|
124
|
-
* @param _distanceInKm
|
|
125
|
-
* @param nPoints
|
|
126
|
-
* @returns {S2LatLng[]}
|
|
127
|
-
*/
|
|
128
|
-
pointsAtDistance(_distanceInKm, nPoints = 4) {
|
|
129
|
-
return [...new Array(nPoints)] // create an array filled of undefined!
|
|
130
|
-
.map((p, idx) => 360 / nPoints * idx)
|
|
131
|
-
.map(bearingDegree => S1Angle_1.S1Angle.degrees(bearingDegree).radians)
|
|
132
|
-
.map(bearingRadians => this.pointAtDistance(_distanceInKm, bearingRadians));
|
|
133
|
-
}
|
|
134
|
-
getEarthDistance(other) {
|
|
135
|
-
return this.getDistance(other).radians * (S2LatLng.EARTH_RADIUS_METERS);
|
|
136
|
-
}
|
|
137
|
-
getDistance(other) {
|
|
138
|
-
// This implements the Haversine formula, which is numerically stable for
|
|
139
|
-
// small distances but only gets about 8 digits of precision for very large
|
|
140
|
-
// distances (e.g. antipodal points). Note that 8 digits is still accurate
|
|
141
|
-
// to within about 10cm for a sphere the size of the Earth.
|
|
142
|
-
//
|
|
143
|
-
// This could be fixed with another sin() and cos() below, but at that point
|
|
144
|
-
// you might as well just convert both arguments to S2Points and compute the
|
|
145
|
-
// distance that way (which gives about 15 digits of accuracy for all
|
|
146
|
-
// distances).
|
|
147
|
-
const lat1 = this.latRadians;
|
|
148
|
-
const lat2 = other.latRadians;
|
|
149
|
-
const lng1 = this.lngRadians;
|
|
150
|
-
const lng2 = other.lngRadians;
|
|
151
|
-
const dLat = Math.sin(0.5 * (lat2 - lat1));
|
|
152
|
-
const dLng = Math.sin(0.5 * (lng2 - lng1));
|
|
153
|
-
const x = dLat * dLat + dLng * dLng * Math.cos(lat1) * Math.cos(lat2);
|
|
154
|
-
return S1Angle_1.S1Angle.radians(2 * Math.asin(Math.sqrt(Math.min(1.0, x))));
|
|
155
|
-
// Return the distance (measured along the surface of the sphere) to the
|
|
156
|
-
// given S2LatLng. This is mathematically equivalent to:
|
|
157
|
-
//
|
|
158
|
-
// S1Angle::FromRadians(ToPoint().Angle(o.ToPoint())
|
|
159
|
-
//
|
|
160
|
-
// but this implementation is slightly more efficient.
|
|
161
|
-
}
|
|
162
|
-
toString() {
|
|
163
|
-
return "(" + this.latRadians + ", " + this.lngRadians + ")";
|
|
164
|
-
}
|
|
165
|
-
toStringDegrees() {
|
|
166
|
-
return "(" + this.latDegrees + ", " + this.lngDegrees + ")";
|
|
167
|
-
}
|
|
168
|
-
toGEOJSON() {
|
|
169
|
-
return {
|
|
170
|
-
type: 'Feature',
|
|
171
|
-
geometry: {
|
|
172
|
-
type: "Point",
|
|
173
|
-
coordinates: [this.lngDegrees, this.latDegrees]
|
|
174
|
-
},
|
|
175
|
-
properties: {}
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
exports.S2LatLng = S2LatLng;
|
|
180
|
-
/**
|
|
181
|
-
* Approximate "effective" radius of the Earth in meters.
|
|
182
|
-
*/
|
|
183
|
-
S2LatLng.EARTH_RADIUS_METERS = 6367000.0;
|
|
184
|
-
/** The center point the lat/lng coordinate system. */
|
|
185
|
-
S2LatLng.CENTER = new S2LatLng(0.0, 0.0);
|
|
186
|
-
//# sourceMappingURL=S2LatLng.js.map
|
package/dist/S2LatLng.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"S2LatLng.js","sourceRoot":"","sources":["../src/S2LatLng.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,uCAAkC;AAClC,uCAAkC;AAClC,6BAAwB;AACxB,yCAAsC;AACtC;;;;;;;GAOG;A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
|
-
import { R1Interval } from "./R1Interval";
|
|
3
|
-
import { S2LatLng } from "./S2LatLng";
|
|
4
|
-
import { S2Region } from "./S2Region";
|
|
5
|
-
import { S2Point } from "./S2Point";
|
|
6
|
-
import { S1Angle } from "./S1Angle";
|
|
7
|
-
import { S2Cell } from "./S2Cell";
|
|
8
|
-
import { S2Cap } from "./S2Cap";
|
|
9
|
-
export declare class S2LatLngRect implements S2Region {
|
|
10
|
-
lat: R1Interval;
|
|
11
|
-
lng: S1Interval;
|
|
12
|
-
constructor(lat: R1Interval, lng: S1Interval);
|
|
13
|
-
static fromLatLng(lo: S2LatLng, hi: S2LatLng): S2LatLngRect;
|
|
14
|
-
/** The canonical empty rectangle */
|
|
15
|
-
static empty(): S2LatLngRect;
|
|
16
|
-
/** The canonical full rectangle. */
|
|
17
|
-
static full(): S2LatLngRect;
|
|
18
|
-
/** The full allowable range of latitudes. */
|
|
19
|
-
static fullLat(): R1Interval;
|
|
20
|
-
/**
|
|
21
|
-
* Construct a rectangle from a center point (in lat-lng space) and size in
|
|
22
|
-
* each dimension. If size.lng is greater than 360 degrees it is clamped,
|
|
23
|
-
* and latitudes greater than +/- 90 degrees are also clamped. So for example,
|
|
24
|
-
* FromCenterSize((80,170),(20,20)) -> (lo=(60,150),hi=(90,-170)).
|
|
25
|
-
*/
|
|
26
|
-
static fromCenterSize(center: S2LatLng, size: S2LatLng): S2LatLngRect;
|
|
27
|
-
/** Convenience method to construct a rectangle containing a single point. */
|
|
28
|
-
static fromPoint(p: S2LatLng): S2LatLngRect;
|
|
29
|
-
/**
|
|
30
|
-
* Convenience method to construct the minimal bounding rectangle containing
|
|
31
|
-
* the two given points. This is equivalent to starting with an empty
|
|
32
|
-
* rectangle and calling AddPoint() twice. Note that it is different than the
|
|
33
|
-
* S2LatLngRect(lo, hi) constructor, where the first point is always used as
|
|
34
|
-
* the lower-left corner of the resulting rectangle.
|
|
35
|
-
*/
|
|
36
|
-
static fromPointPair(p1: S2LatLng, p2: S2LatLng): S2LatLngRect;
|
|
37
|
-
/**
|
|
38
|
-
* Return a latitude-longitude rectangle that contains the edge from "a" to
|
|
39
|
-
* "b". Both points must be unit-length. Note that the bounding rectangle of
|
|
40
|
-
* an edge can be larger than the bounding rectangle of its endpoints.
|
|
41
|
-
*/
|
|
42
|
-
static fromEdge(a: S2Point, b: S2Point): S2LatLngRect;
|
|
43
|
-
/**
|
|
44
|
-
* Return true if the rectangle is valid, which essentially just means that
|
|
45
|
-
* the latitude bounds do not exceed Pi/2 in absolute value and the longitude
|
|
46
|
-
* bounds do not exceed Pi in absolute value.
|
|
47
|
-
*
|
|
48
|
-
*/
|
|
49
|
-
isValid(): boolean;
|
|
50
|
-
lo(): S2LatLng;
|
|
51
|
-
hi(): S2LatLng;
|
|
52
|
-
latLo(): S1Angle;
|
|
53
|
-
latHi(): S1Angle;
|
|
54
|
-
lngLo(): S1Angle;
|
|
55
|
-
lngHi(): S1Angle;
|
|
56
|
-
/**
|
|
57
|
-
* Return true if the rectangle is empty, i.e. it contains no points at all.
|
|
58
|
-
*/
|
|
59
|
-
isEmpty(): boolean;
|
|
60
|
-
isFull(): boolean;
|
|
61
|
-
/**
|
|
62
|
-
* Return true if lng_.lo() > lng_.hi(), i.e. the rectangle crosses the 180
|
|
63
|
-
* degree latitude line.
|
|
64
|
-
*/
|
|
65
|
-
isInverted(): boolean;
|
|
66
|
-
/** Return the k-th vertex of the rectangle (k = 0,1,2,3) in CCW order. */
|
|
67
|
-
getVertex(k: number): S2LatLng;
|
|
68
|
-
/**
|
|
69
|
-
* Return the center of the rectangle in latitude-longitude space (in general
|
|
70
|
-
* this is not the center of the region on the sphere).
|
|
71
|
-
*/
|
|
72
|
-
getCenter(): S2LatLng;
|
|
73
|
-
/**
|
|
74
|
-
* Return the minimum distance (measured along the surface of the sphere)
|
|
75
|
-
* from a given point to the rectangle (both its boundary and its interior).
|
|
76
|
-
* The latLng must be valid.
|
|
77
|
-
*/
|
|
78
|
-
getDistanceLL(p: S2LatLng): S1Angle;
|
|
79
|
-
/**
|
|
80
|
-
* Return the minimum distance (measured along the surface of the sphere) to
|
|
81
|
-
* the given S2LatLngRect. Both S2LatLngRects must be non-empty.
|
|
82
|
-
*/
|
|
83
|
-
getDistanceLLR(other: S2LatLngRect): S1Angle;
|
|
84
|
-
/**
|
|
85
|
-
* Return the width and height of this rectangle in latitude-longitude space.
|
|
86
|
-
* Empty rectangles have a negative width and height.
|
|
87
|
-
*/
|
|
88
|
-
getSize(): S2LatLng;
|
|
89
|
-
/**
|
|
90
|
-
* More efficient version of Contains() that accepts a S2LatLng rather than an
|
|
91
|
-
* S2Point.
|
|
92
|
-
*/
|
|
93
|
-
containsLL(ll: S2LatLng): boolean;
|
|
94
|
-
/**
|
|
95
|
-
* Return true if and only if the given point is contained in the interior of
|
|
96
|
-
* the region (i.e. the region excluding its boundary). The point 'p' does not
|
|
97
|
-
* need to be normalized.
|
|
98
|
-
*/
|
|
99
|
-
interiorContainsP(p: S2Point): boolean;
|
|
100
|
-
/**
|
|
101
|
-
* More efficient version of InteriorContains() that accepts a S2LatLng rather
|
|
102
|
-
* than an S2Point.
|
|
103
|
-
*/
|
|
104
|
-
interiorContainsLL(ll: S2LatLng): boolean;
|
|
105
|
-
/**
|
|
106
|
-
* Return true if and only if the rectangle contains the given other
|
|
107
|
-
* rectangle.
|
|
108
|
-
*/
|
|
109
|
-
containsLLR(other: S2LatLngRect): boolean;
|
|
110
|
-
/**
|
|
111
|
-
* Return true if and only if the interior of this rectangle contains all
|
|
112
|
-
* points of the given other rectangle (including its boundary).
|
|
113
|
-
*/
|
|
114
|
-
interiorContainsLLR(other: S2LatLngRect): boolean;
|
|
115
|
-
/** Return true if this rectangle and the given other rectangle have any
|
|
116
|
-
points in common. */
|
|
117
|
-
intersectsLLR(other: S2LatLngRect): boolean;
|
|
118
|
-
/**
|
|
119
|
-
* Returns true if this rectangle intersects the given cell. (This is an exact
|
|
120
|
-
* test and may be fairly expensive, see also MayIntersect below.)
|
|
121
|
-
*/
|
|
122
|
-
intersects(cell: S2Cell): boolean;
|
|
123
|
-
/**
|
|
124
|
-
* Return true if and only if the interior of this rectangle intersects any
|
|
125
|
-
* point (including the boundary) of the given other rectangle.
|
|
126
|
-
*/
|
|
127
|
-
interiorIntersects(other: S2LatLngRect): boolean;
|
|
128
|
-
addPoint(p: S2Point): S2LatLngRect;
|
|
129
|
-
addPointLL(ll: S2LatLng): S2LatLngRect;
|
|
130
|
-
/**
|
|
131
|
-
* Return a rectangle that contains all points whose latitude distance from
|
|
132
|
-
* this rectangle is at most margin.lat, and whose longitude distance from
|
|
133
|
-
* this rectangle is at most margin.lng. In particular, latitudes are
|
|
134
|
-
* clamped while longitudes are wrapped. Note that any expansion of an empty
|
|
135
|
-
* interval remains empty, and both components of the given margin must be
|
|
136
|
-
* non-negative.
|
|
137
|
-
*
|
|
138
|
-
* NOTE: If you are trying to grow a rectangle by a certain *distance* on the
|
|
139
|
-
* sphere (e.g. 5km), use the ConvolveWithCap() method instead.
|
|
140
|
-
*/
|
|
141
|
-
expanded(margin: S2LatLng): S2LatLngRect;
|
|
142
|
-
polarClosure(): S2LatLngRect;
|
|
143
|
-
/**
|
|
144
|
-
* Return the smallest rectangle containing the union of this rectangle and
|
|
145
|
-
* the given rectangle.
|
|
146
|
-
*/
|
|
147
|
-
union(other: S2LatLngRect): S2LatLngRect;
|
|
148
|
-
/**
|
|
149
|
-
* Return the smallest rectangle containing the intersection of this rectangle
|
|
150
|
-
* and the given rectangle. Note that the region of intersection may consist
|
|
151
|
-
* of two disjoint rectangles, in which case a single rectangle spanning both
|
|
152
|
-
* of them is returned.
|
|
153
|
-
*/
|
|
154
|
-
intersection(other: S2LatLngRect): S2LatLngRect;
|
|
155
|
-
/** Return the surface area of this rectangle on the unit sphere. */
|
|
156
|
-
area(): number;
|
|
157
|
-
/** Return true if two rectangles contains the same set of points. */
|
|
158
|
-
equals(that: any): boolean;
|
|
159
|
-
/**
|
|
160
|
-
* Return true if the latitude and longitude intervals of the two rectangles
|
|
161
|
-
* are the same up to the given tolerance (see r1interval.h and s1interval.h
|
|
162
|
-
* for details).
|
|
163
|
-
*/
|
|
164
|
-
approxEquals(other: S2LatLngRect, maxError?: number): boolean;
|
|
165
|
-
clone(): S2Region;
|
|
166
|
-
getCapBound(): S2Cap;
|
|
167
|
-
getRectBound(): S2LatLngRect;
|
|
168
|
-
containsC(cell: S2Cell): boolean;
|
|
169
|
-
/**
|
|
170
|
-
* This test is cheap but is NOT exact. Use Intersects() if you want a more
|
|
171
|
-
* accurate and more expensive test. Note that when this method is used by an
|
|
172
|
-
* S2RegionCoverer, the accuracy isn't all that important since if a cell may
|
|
173
|
-
* intersect the region then it is subdivided, and the accuracy of this method
|
|
174
|
-
* goes up as the cells get smaller.
|
|
175
|
-
*/
|
|
176
|
-
mayIntersectC(cell: S2Cell): boolean;
|
|
177
|
-
/** The point 'p' does not need to be normalized. */
|
|
178
|
-
containsP(p: S2Point): boolean;
|
|
179
|
-
/**
|
|
180
|
-
* Return true if the edge AB intersects the given edge of constant longitude.
|
|
181
|
-
*/
|
|
182
|
-
private static intersectsLngEdge;
|
|
183
|
-
/**
|
|
184
|
-
* Return true if the edge AB intersects the given edge of constant latitude.
|
|
185
|
-
*/
|
|
186
|
-
private static intersectsLatEdge;
|
|
187
|
-
allVertex(): S2LatLng[];
|
|
188
|
-
toGEOJSON(): any;
|
|
189
|
-
toString(): string;
|
|
190
|
-
}
|