nodes2ts 1.1.9 → 3.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/.eslintignore +3 -0
- package/.eslintrc.cjs +11 -0
- package/.github/workflows/lint.js.yml +22 -0
- package/.github/workflows/node.js.yml +22 -0
- package/.mocharc.js +7 -0
- package/README.md +22 -5
- package/dist/Interval.d.ts +7 -8
- package/dist/Interval.js +12 -12
- package/dist/Interval.js.map +1 -1
- package/dist/MutableInteger.js +5 -4
- package/dist/MutableInteger.js.map +1 -1
- package/dist/Platform.d.ts +15 -0
- package/dist/Platform.js +53 -0
- package/dist/Platform.js.map +1 -0
- package/dist/R1Interval.d.ts +8 -9
- package/dist/R1Interval.js +59 -78
- package/dist/R1Interval.js.map +1 -1
- package/dist/R2Vector.d.ts +12 -13
- package/dist/R2Vector.js +65 -85
- package/dist/R2Vector.js.map +1 -1
- package/dist/S1Angle.d.ts +38 -5
- package/dist/S1Angle.js +89 -37
- package/dist/S1Angle.js.map +1 -1
- package/dist/S1ChordAngle.d.ts +166 -0
- package/dist/S1ChordAngle.js +318 -0
- package/dist/S1ChordAngle.js.map +1 -0
- package/dist/S1Interval.d.ts +11 -12
- package/dist/S1Interval.js +134 -140
- package/dist/S1Interval.js.map +1 -1
- package/dist/S2.d.ts +8 -5
- package/dist/S2.js +91 -108
- package/dist/S2.js.map +1 -1
- package/dist/S2Cap.d.ts +33 -25
- package/dist/S2Cap.js +199 -203
- package/dist/S2Cap.js.map +1 -1
- package/dist/S2Cell.d.ts +15 -13
- package/dist/S2Cell.js +196 -206
- package/dist/S2Cell.js.map +1 -1
- package/dist/S2CellId.d.ts +37 -14
- package/dist/S2CellId.js +407 -359
- package/dist/S2CellId.js.map +1 -1
- package/dist/S2CellUnion.d.ts +1 -2
- package/dist/S2CellUnion.js +137 -133
- package/dist/S2CellUnion.js.map +1 -1
- package/dist/S2EdgeUtil.js +14 -17
- package/dist/S2EdgeUtil.js.map +1 -1
- package/dist/S2LatLng.d.ts +15 -11
- package/dist/S2LatLng.js +100 -114
- package/dist/S2LatLng.js.map +1 -1
- package/dist/S2LatLngRect.d.ts +8 -4
- package/dist/S2LatLngRect.js +215 -197
- package/dist/S2LatLngRect.js.map +1 -1
- package/dist/S2Metric.d.ts +4 -5
- package/dist/S2Metric.js +30 -27
- package/dist/S2Metric.js.map +1 -1
- package/dist/S2Point.d.ts +48 -14
- package/dist/S2Point.js +156 -109
- package/dist/S2Point.js.map +1 -1
- package/dist/S2Projections.d.ts +43 -9
- package/dist/S2Projections.js +226 -47
- package/dist/S2Projections.js.map +1 -1
- package/dist/S2Region.js +2 -1
- package/dist/S2Region.js.map +1 -1
- package/dist/S2RegionCoverer.d.ts +21 -6
- package/dist/S2RegionCoverer.js +144 -109
- package/dist/S2RegionCoverer.js.map +1 -1
- package/dist/export.d.ts +0 -1
- package/dist/export.js +42 -32
- package/dist/export.js.map +1 -1
- package/dist/utils/preconditions.d.ts +2 -0
- package/dist/utils/preconditions.js +16 -0
- package/dist/utils/preconditions.js.map +1 -0
- package/package.json +28 -34
- package/.npmignore +0 -8
- package/.nyc_output/1eb1f420a13c15f529aac41a40bcaa21.json +0 -1
- package/.nyc_output/5ff62256eb1c111254ba0b469fb547da.json +0 -1
- package/.nyc_output/949d6e8c2061067f3bdfd27dfff5ba83.json +0 -1
- package/coverage/Interval.ts.html +0 -203
- package/coverage/MutableInteger.ts.html +0 -77
- package/coverage/R1Interval.ts.html +0 -647
- package/coverage/R2Vector.ts.html +0 -587
- package/coverage/S1Angle.ts.html +0 -344
- package/coverage/S1Interval.ts.html +0 -1349
- package/coverage/S2.ts.html +0 -1178
- package/coverage/S2Cap.ts.html +0 -1433
- package/coverage/S2Cell.ts.html +0 -1415
- package/coverage/S2CellId.ts.html +0 -3329
- package/coverage/S2EdgeUtil.ts.html +0 -2534
- package/coverage/S2LatLng.ts.html +0 -848
- package/coverage/S2LatLngRect.ts.html +0 -2222
- package/coverage/S2Point.ts.html +0 -758
- package/coverage/S2Projections.ts.html +0 -518
- package/coverage/base.css +0 -212
- package/coverage/decimal.ts.html +0 -68
- package/coverage/index.html +0 -288
- package/coverage/prettify.css +0 -1
- package/coverage/prettify.js +0 -1
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +0 -158
- package/dist/decimal.d.ts +0 -3
- package/dist/decimal.js +0 -4
- package/dist/decimal.js.map +0 -1
- package/dist/decimal_augmentation.d.ts +0 -24
- package/dist/decimal_augmentation.js +0 -2
- package/dist/decimal_augmentation.js.map +0 -1
package/dist/S2Cap.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/*
|
|
2
3
|
* Copyright 2005 Google Inc.
|
|
3
4
|
*
|
|
@@ -13,16 +14,18 @@
|
|
|
13
14
|
* See the License for the specific language governing permissions and
|
|
14
15
|
* limitations under the License.
|
|
15
16
|
*/
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.S2Cap = void 0;
|
|
19
|
+
const S2_1 = require("./S2");
|
|
20
|
+
const S2Point_1 = require("./S2Point");
|
|
21
|
+
const S1Angle_1 = require("./S1Angle");
|
|
22
|
+
const S2LatLngRect_1 = require("./S2LatLngRect");
|
|
23
|
+
const S2LatLng_1 = require("./S2LatLng");
|
|
24
|
+
const R1Interval_1 = require("./R1Interval");
|
|
25
|
+
const S1Interval_1 = require("./S1Interval");
|
|
26
|
+
const S1ChordAngle_1 = require("./S1ChordAngle");
|
|
27
|
+
const Platform_1 = require("./Platform");
|
|
28
|
+
const Long = require("long");
|
|
26
29
|
/**
|
|
27
30
|
* This class represents a spherical cap, i.e. a portion of a sphere cut off by
|
|
28
31
|
* a plane. The cap is defined by its axis and height. This representation has
|
|
@@ -37,192 +40,196 @@ var decimal_1 = require('./decimal');
|
|
|
37
40
|
* h = 1 - cos(theta) = 2 sin^2(theta/2) d^2 = 2 h = a^2 + h^2
|
|
38
41
|
*
|
|
39
42
|
*/
|
|
40
|
-
|
|
43
|
+
class S2Cap {
|
|
41
44
|
/**
|
|
42
45
|
* Create a cap given its axis and the cap height, i.e. the maximum projected
|
|
43
46
|
* distance along the cap axis from the cap center. 'axis' should be a
|
|
44
47
|
* unit-length vector.
|
|
45
48
|
*/
|
|
46
|
-
|
|
49
|
+
constructor(axis, radius) {
|
|
47
50
|
this.axis = axis;
|
|
48
|
-
this.
|
|
51
|
+
this.radius = radius;
|
|
49
52
|
// assert (isValid());
|
|
50
53
|
}
|
|
54
|
+
static fromAxisChord(center, radius) {
|
|
55
|
+
return new S2Cap(center, radius);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Create a cap given its axis and the cap height, i.e. the maximum projected distance along the
|
|
59
|
+
* cap axis from the cap center. 'axis' should be a unit-length vector.
|
|
60
|
+
*/
|
|
61
|
+
static fromAxisHeight(axis, height) {
|
|
62
|
+
// assert (S2.isUnitLength(axis));
|
|
63
|
+
return new S2Cap(axis, S1ChordAngle_1.S1ChordAngle.fromLength2(2 * height));
|
|
64
|
+
}
|
|
51
65
|
/**
|
|
52
66
|
* Create a cap given its axis and the cap opening angle, i.e. maximum angle
|
|
53
67
|
* between the axis and a point on the cap. 'axis' should be a unit-length
|
|
54
68
|
* vector, and 'angle' should be between 0 and 180 degrees.
|
|
55
69
|
*/
|
|
56
|
-
|
|
57
|
-
// The
|
|
58
|
-
// very accurate for angles close to zero (where cos(angle) is almost 1).
|
|
59
|
-
// Computing it as 2*(sin(angle/2)**2) gives much better precision.
|
|
70
|
+
static fromAxisAngle(axis, angle) {
|
|
71
|
+
// The "min" calculation below is necessary to handle S1Angle.INFINITY.
|
|
60
72
|
// assert (S2.isUnitLength(axis));
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
return new S2Cap(axis, d.pow(2).times(2));
|
|
64
|
-
};
|
|
73
|
+
return this.fromAxisChord(axis, S1ChordAngle_1.S1ChordAngle.fromS1Angle(S1Angle_1.S1Angle.radians(Math.min(angle.radians, S2_1.S2.M_PI))));
|
|
74
|
+
}
|
|
65
75
|
/**
|
|
66
|
-
* Create a cap given its axis and its area in steradians. 'axis' should be a
|
|
67
|
-
*
|
|
76
|
+
* Create a cap given its axis and its area in steradians. 'axis' should be a unit-length vector,
|
|
77
|
+
* and 'area' should be between 0 and 4 * M_PI.
|
|
68
78
|
*/
|
|
69
|
-
|
|
70
|
-
var area = S2_1.S2.toDecimal(_area);
|
|
79
|
+
static fromAxisArea(axis, area) {
|
|
71
80
|
// assert (S2.isUnitLength(axis));
|
|
72
|
-
return new S2Cap(axis,
|
|
73
|
-
}
|
|
81
|
+
return new S2Cap(axis, S1ChordAngle_1.S1ChordAngle.fromLength2(area / S2_1.S2.M_PI));
|
|
82
|
+
}
|
|
74
83
|
/** Return an empty cap, i.e. a cap that contains no points. */
|
|
75
|
-
|
|
76
|
-
return new S2Cap(
|
|
77
|
-
}
|
|
84
|
+
static empty() {
|
|
85
|
+
return new S2Cap(S2Point_1.S2Point.X_POS, S1ChordAngle_1.S1ChordAngle.NEGATIVE);
|
|
86
|
+
}
|
|
78
87
|
/** Return a full cap, i.e. a cap that contains all points. */
|
|
79
|
-
|
|
80
|
-
return new S2Cap(
|
|
81
|
-
}
|
|
82
|
-
|
|
88
|
+
static full() {
|
|
89
|
+
return new S2Cap(S2Point_1.S2Point.X_POS, S1ChordAngle_1.S1ChordAngle.STRAIGHT);
|
|
90
|
+
}
|
|
91
|
+
getCapBound() {
|
|
83
92
|
return this;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
return
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
93
|
+
}
|
|
94
|
+
height() {
|
|
95
|
+
return 0.5 * this.radius.getLength2();
|
|
96
|
+
}
|
|
97
|
+
area() {
|
|
98
|
+
return 2 * S2_1.S2.M_PI * Math.max(0.0, this.height());
|
|
99
|
+
}
|
|
91
100
|
/**
|
|
92
|
-
*
|
|
93
|
-
*
|
|
101
|
+
* Returns the cap radius as an S1Angle. Since the cap angle is stored internally as an
|
|
102
|
+
* S1ChordAngle, this method requires a trigonometric operation and may yield a slightly different
|
|
103
|
+
* result than the value passed to {@link #fromAxisAngle(S2Point, S1Angle)}.
|
|
94
104
|
*/
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
// follows from the relationship h = 1 - cos(theta) = 2 sin^2(theta/2).
|
|
99
|
-
if (this.isEmpty()) {
|
|
100
|
-
return new S1Angle_1.S1Angle(-1);
|
|
101
|
-
}
|
|
102
|
-
return new S1Angle_1.S1Angle(decimal_1.Decimal.asin(this.height.times(0.5).sqrt())
|
|
103
|
-
.times(2));
|
|
104
|
-
};
|
|
105
|
+
angle() {
|
|
106
|
+
return this.radius.toAngle();
|
|
107
|
+
}
|
|
105
108
|
/**
|
|
106
|
-
*
|
|
107
|
-
*
|
|
109
|
+
* Returns true if the axis is {@link S2#isUnitLength unit length}, and the angle is less than Pi.
|
|
110
|
+
*
|
|
111
|
+
* <p>Negative angles or heights are valid, and represent empty caps.
|
|
108
112
|
*/
|
|
109
|
-
|
|
110
|
-
return S2_1.S2.isUnitLength(this.axis) && this.
|
|
111
|
-
}
|
|
113
|
+
isValid() {
|
|
114
|
+
return S2_1.S2.isUnitLength(this.axis) && this.radius.getLength2() <= 4;
|
|
115
|
+
}
|
|
112
116
|
/** Return true if the cap is empty, i.e. it contains no points. */
|
|
113
|
-
|
|
114
|
-
return this.
|
|
115
|
-
}
|
|
117
|
+
isEmpty() {
|
|
118
|
+
return this.radius.isNegative();
|
|
119
|
+
}
|
|
116
120
|
/** Return true if the cap is full, i.e. it contains all points. */
|
|
117
|
-
|
|
118
|
-
return
|
|
119
|
-
}
|
|
121
|
+
isFull() {
|
|
122
|
+
return S1ChordAngle_1.S1ChordAngle.STRAIGHT.equals(this.radius);
|
|
123
|
+
}
|
|
120
124
|
/**
|
|
121
|
-
* Return the complement of the interior of the cap. A cap and its complement
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
+
* Return the complement of the interior of the cap. A cap and its complement have the same
|
|
126
|
+
* boundary but do not share any interior points. The complement operator is not a bijection,
|
|
127
|
+
* since the complement of a singleton cap (containing a single point) is the same as the
|
|
128
|
+
* complement of an empty cap.
|
|
125
129
|
*/
|
|
126
|
-
|
|
130
|
+
complement() {
|
|
127
131
|
// The complement of a full cap is an empty cap, not a singleton.
|
|
128
|
-
// Also make sure that the complement of an empty cap
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
+
// Also make sure that the complement of an empty cap is full.
|
|
133
|
+
if (this.isFull()) {
|
|
134
|
+
return S2Cap.empty();
|
|
135
|
+
}
|
|
136
|
+
if (this.isEmpty()) {
|
|
137
|
+
return S2Cap.full();
|
|
138
|
+
}
|
|
139
|
+
return S2Cap.fromAxisChord(S2Point_1.S2Point.neg(this.axis), S1ChordAngle_1.S1ChordAngle.fromLength2(4 - this.radius.getLength2()));
|
|
140
|
+
}
|
|
132
141
|
/**
|
|
133
142
|
* Return true if and only if this cap contains the given other cap (in a set
|
|
134
143
|
* containment sense, e.g. every cap contains the empty cap).
|
|
135
144
|
*/
|
|
136
|
-
|
|
145
|
+
containsCap(other) {
|
|
137
146
|
if (this.isFull() || other.isEmpty()) {
|
|
138
147
|
return true;
|
|
139
148
|
}
|
|
140
|
-
|
|
141
|
-
|
|
149
|
+
else {
|
|
150
|
+
const axialDistance = S1ChordAngle_1.S1ChordAngle.fromS2Point(this.axis, other.axis);
|
|
151
|
+
return this.radius.compareTo(S1ChordAngle_1.S1ChordAngle.add(axialDistance, other.radius)) >= 0;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
142
154
|
/**
|
|
143
|
-
* Return true if and only if the interior of this cap intersects the given
|
|
144
|
-
*
|
|
145
|
-
* this cap is used.)
|
|
155
|
+
* Return true if and only if the interior of this cap intersects the given other cap. (This
|
|
156
|
+
* relationship is not symmetric, since only the interior of this cap is used.)
|
|
146
157
|
*/
|
|
147
|
-
|
|
158
|
+
interiorIntersects(other) {
|
|
148
159
|
// Interior(X) intersects Y if and only if Complement(Interior(X))
|
|
149
160
|
// does not contain Y.
|
|
150
161
|
return !this.complement().containsCap(other);
|
|
151
|
-
}
|
|
162
|
+
}
|
|
152
163
|
/**
|
|
153
|
-
* Return true if and only if the given point is contained in the interior of
|
|
154
|
-
*
|
|
155
|
-
* unit-length vector.
|
|
164
|
+
* Return true if and only if the given point is contained in the interior of the region (i.e. the
|
|
165
|
+
* region excluding its boundary). 'p' should be a unit-length vector.
|
|
156
166
|
*/
|
|
157
|
-
|
|
167
|
+
interiorContains(p) {
|
|
158
168
|
// assert (S2.isUnitLength(p));
|
|
159
|
-
return this.isFull() ||
|
|
160
|
-
}
|
|
169
|
+
return this.isFull() || S1ChordAngle_1.S1ChordAngle.fromS2Point(this.axis, p).compareTo(this.radius) < 0;
|
|
170
|
+
}
|
|
161
171
|
/**
|
|
162
|
-
* Increase the cap
|
|
163
|
-
* is
|
|
164
|
-
*
|
|
172
|
+
* Increase the cap radius if necessary to include the given point. If the cap is empty the axis
|
|
173
|
+
* is set to the given point, but otherwise it is left unchanged.
|
|
174
|
+
*
|
|
175
|
+
* @param p must be {@link S2#isUnitLength unit length}
|
|
165
176
|
*/
|
|
166
|
-
|
|
167
|
-
// Compute the squared chord length, then convert it into a height.
|
|
177
|
+
addPoint(p) {
|
|
168
178
|
// assert (S2.isUnitLength(p));
|
|
169
179
|
if (this.isEmpty()) {
|
|
170
|
-
return new S2Cap(p,
|
|
180
|
+
return new S2Cap(p, S1ChordAngle_1.S1ChordAngle.ZERO);
|
|
171
181
|
}
|
|
172
182
|
else {
|
|
173
|
-
//
|
|
174
|
-
//
|
|
175
|
-
//
|
|
176
|
-
|
|
177
|
-
var newHeight = decimal_1.Decimal.max(this.height, S2Cap.ROUND_UP.times(0.5).times(dist2));
|
|
178
|
-
return new S2Cap(this.axis, newHeight);
|
|
183
|
+
// After adding p to this cap, we require that the result contains p. However we don't need to
|
|
184
|
+
// do anything special to achieve this because contains() does exactly the same distance
|
|
185
|
+
// calculation that we do here.
|
|
186
|
+
return new S2Cap(this.axis, S1ChordAngle_1.S1ChordAngle.fromLength2(Math.max(this.radius.getLength2(), this.axis.getDistance2(p))));
|
|
179
187
|
}
|
|
180
|
-
}
|
|
188
|
+
}
|
|
181
189
|
// Increase the cap height if necessary to include "other". If the current
|
|
182
190
|
// cap is empty it is set to the given other cap.
|
|
183
|
-
|
|
191
|
+
addCap(other) {
|
|
184
192
|
if (this.isEmpty()) {
|
|
185
|
-
return
|
|
193
|
+
return other;
|
|
194
|
+
}
|
|
195
|
+
else if (other.isEmpty()) {
|
|
196
|
+
return this;
|
|
186
197
|
}
|
|
187
198
|
else {
|
|
188
|
-
//
|
|
189
|
-
//
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
return new S2Cap(this.axis, 2); //Full cap
|
|
194
|
-
}
|
|
195
|
-
else {
|
|
196
|
-
var d = angle.times(0.5).sin();
|
|
197
|
-
var newHeight = decimal_1.Decimal.max(this.height, S2Cap.ROUND_UP.times(2).times(d.pow(2)));
|
|
198
|
-
return new S2Cap(this.axis, newHeight);
|
|
199
|
-
}
|
|
199
|
+
// We round up the distance to ensure that the cap is actually contained.
|
|
200
|
+
// TODO(user): Do some error analysis in order to guarantee this.
|
|
201
|
+
const dist = S1ChordAngle_1.S1ChordAngle.add(S1ChordAngle_1.S1ChordAngle.fromS2Point(this.axis, other.axis), other.radius);
|
|
202
|
+
const roundedUp = dist.plusError(S2_1.S2.DBL_EPSILON * dist.getLength2());
|
|
203
|
+
return new S2Cap(this.axis, S1ChordAngle_1.S1ChordAngle.max(this.radius, roundedUp));
|
|
200
204
|
}
|
|
201
|
-
}
|
|
205
|
+
}
|
|
202
206
|
// //////////////////////////////////////////////////////////////////////
|
|
203
207
|
// S2Region interface (see {@code S2Region} for details):
|
|
204
|
-
|
|
208
|
+
getRectBound() {
|
|
205
209
|
if (this.isEmpty()) {
|
|
206
210
|
return S2LatLngRect_1.S2LatLngRect.empty();
|
|
207
211
|
}
|
|
212
|
+
if (this.isFull()) {
|
|
213
|
+
return S2LatLngRect_1.S2LatLngRect.full();
|
|
214
|
+
}
|
|
208
215
|
// Convert the axis to a (lat,lng) pair, and compute the cap angle.
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
lng[0] =
|
|
215
|
-
lng[1] = S2_1.S2.
|
|
216
|
+
const axisLatLng = S2LatLng_1.S2LatLng.fromPoint(this.axis);
|
|
217
|
+
const capAngle = this.angle().radians;
|
|
218
|
+
let allLongitudes = false;
|
|
219
|
+
const lat = [];
|
|
220
|
+
const lng = [];
|
|
221
|
+
lng[0] = -S2_1.S2.M_PI;
|
|
222
|
+
lng[1] = S2_1.S2.M_PI;
|
|
216
223
|
// Check whether cap includes the south pole.
|
|
217
|
-
lat[0] = axisLatLng.
|
|
218
|
-
if (lat[0]
|
|
219
|
-
lat[0] =
|
|
224
|
+
lat[0] = axisLatLng.lat().radians - capAngle;
|
|
225
|
+
if (lat[0] <= -S2_1.S2.M_PI_2) {
|
|
226
|
+
lat[0] = -S2_1.S2.M_PI_2;
|
|
220
227
|
allLongitudes = true;
|
|
221
228
|
}
|
|
222
229
|
// Check whether cap includes the north pole.
|
|
223
|
-
lat[1] = axisLatLng.
|
|
224
|
-
if (lat[1]
|
|
225
|
-
lat[1] = S2_1.S2.
|
|
230
|
+
lat[1] = axisLatLng.lat().radians + capAngle;
|
|
231
|
+
if (lat[1] >= S2_1.S2.M_PI_2) {
|
|
232
|
+
lat[1] = S2_1.S2.M_PI_2;
|
|
226
233
|
allLongitudes = true;
|
|
227
234
|
}
|
|
228
235
|
if (!allLongitudes) {
|
|
@@ -234,64 +241,43 @@ var S2Cap = (function () {
|
|
|
234
241
|
// we have sin(a)/sin(A) = sin(c)/sin(C), or sin(A) = sin(a)/sin(c).
|
|
235
242
|
// Here "a" is the cap angle, and "c" is the colatitude (90 degrees
|
|
236
243
|
// minus the latitude). This formula also works for negative latitudes.
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
if (sinA.lte(sinC)) {
|
|
244
|
-
var angleA = decimal_1.Decimal.asin(sinA.dividedBy(sinC));
|
|
245
|
-
lng[0] = S2_1.S2.IEEEremainder(axisLatLng.lngRadians.minus(angleA), 2 * S2_1.S2.M_PI);
|
|
246
|
-
lng[1] = S2_1.S2.IEEEremainder(axisLatLng.lngRadians.plus(angleA), 2 * S2_1.S2.M_PI);
|
|
244
|
+
const sinA = S1ChordAngle_1.S1ChordAngle.sin(this.radius);
|
|
245
|
+
const sinC = Math.cos(axisLatLng.lat().radians);
|
|
246
|
+
if (sinA <= sinC) {
|
|
247
|
+
const angleA = Math.asin(sinA / sinC);
|
|
248
|
+
lng[0] = Platform_1.Platform.IEEEremainder(axisLatLng.lng().radians - angleA, 2 * S2_1.S2.M_PI);
|
|
249
|
+
lng[1] = Platform_1.Platform.IEEEremainder(axisLatLng.lng().radians + angleA, 2 * S2_1.S2.M_PI);
|
|
247
250
|
}
|
|
248
251
|
}
|
|
249
252
|
return new S2LatLngRect_1.S2LatLngRect(new R1Interval_1.R1Interval(lat[0], lat[1]), new S1Interval_1.S1Interval(lng[0], lng[1]));
|
|
250
|
-
}
|
|
251
|
-
S2Cap.prototype.containsC = function (cell) {
|
|
252
|
-
// If the cap does not contain all cell vertices, return false.
|
|
253
|
-
// We check the vertices before taking the Complement() because we can't
|
|
254
|
-
// accurately represent the complement of a very small cap (a height
|
|
255
|
-
// of 2-epsilon is rounded off to 2).
|
|
256
|
-
var vertices = new Array(4);
|
|
257
|
-
for (var k = 0; k < 4; ++k) {
|
|
258
|
-
vertices[k] = cell.getVertex(k);
|
|
259
|
-
if (!this.contains(vertices[k])) {
|
|
260
|
-
return false;
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
// Otherwise, return true if the complement of the cap does not intersect
|
|
264
|
-
// the cell. (This test is slightly conservative, because technically we
|
|
265
|
-
// want Complement().InteriorIntersects() here.)
|
|
266
|
-
return !this.complement().intersects(cell, vertices);
|
|
267
|
-
};
|
|
253
|
+
}
|
|
268
254
|
// public mayIntersectC(cell:S2Cell):boolean {
|
|
269
255
|
// const toRet = this._mayIntersectC(cell);
|
|
270
256
|
// console.log("intersects? ",toRet, cell.id.pos().toString(16), cell.level);
|
|
271
257
|
// return toRet;
|
|
272
258
|
// }
|
|
273
|
-
|
|
259
|
+
mayIntersectC(cell) {
|
|
274
260
|
// If the cap contains any cell vertex, return true.
|
|
275
|
-
|
|
276
|
-
for (
|
|
261
|
+
const vertices = new Array(4);
|
|
262
|
+
for (let k = 0; k < 4; ++k) {
|
|
277
263
|
vertices[k] = cell.getVertex(k);
|
|
278
264
|
if (this.contains(vertices[k])) {
|
|
279
265
|
return true;
|
|
280
266
|
}
|
|
281
267
|
}
|
|
282
268
|
return this.intersects(cell, vertices);
|
|
283
|
-
}
|
|
269
|
+
}
|
|
284
270
|
/**
|
|
285
271
|
* Return true if the cap intersects 'cell', given that the cap vertices have
|
|
286
272
|
* alrady been checked.
|
|
287
273
|
*/
|
|
288
|
-
|
|
274
|
+
intersects(cell, vertices) {
|
|
289
275
|
// Return true if this cap intersects any point of 'cell' excluding its
|
|
290
276
|
// vertices (which are assumed to already have been checked).
|
|
291
277
|
// If the cap is a hemisphere or larger, the cell and the complement of the
|
|
292
278
|
// cap are both convex. Therefore since no vertex of the cell is contained,
|
|
293
279
|
// no other interior point of the cell is contained either.
|
|
294
|
-
if (this.
|
|
280
|
+
if (this.radius.compareTo(S1ChordAngle_1.S1ChordAngle.RIGHT) >= 0) {
|
|
295
281
|
return false;
|
|
296
282
|
}
|
|
297
283
|
// We need to check for empty caps due to the axis check just below.
|
|
@@ -306,14 +292,11 @@ var S2Cap = (function () {
|
|
|
306
292
|
// At this point we know that the cell does not contain the cap axis,
|
|
307
293
|
// and the cap does not contain any cell vertex. The only way that they
|
|
308
294
|
// can intersect is if the cap intersects the interior of some edge.
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
var edge = cell.getEdgeRaw(k);
|
|
315
|
-
var dot = this.axis.dotProd(edge);
|
|
316
|
-
if (dot.gt(0)) {
|
|
295
|
+
const sin2Angle = S1ChordAngle_1.S1ChordAngle.sin2(this.radius);
|
|
296
|
+
for (let k = 0; k < 4; ++k) {
|
|
297
|
+
const edge = cell.getEdgeRaw(k);
|
|
298
|
+
const dot = this.axis.dotProd(edge);
|
|
299
|
+
if (dot > 0) {
|
|
317
300
|
// The axis is in the interior half-space defined by the edge. We don't
|
|
318
301
|
// need to consider these edges, since if the cap intersects this edge
|
|
319
302
|
// then it also intersects the edge on the opposite side of the cell
|
|
@@ -321,28 +304,41 @@ var S2Cap = (function () {
|
|
|
321
304
|
continue;
|
|
322
305
|
}
|
|
323
306
|
// The Norm2() factor is necessary because "edge" is not normalized.
|
|
324
|
-
if (dot
|
|
325
|
-
// if (cell.id.pos().toString(16) === '77c040000000000') {
|
|
326
|
-
// console.log("DIOCaAN", k, dot.toString(), sin2Angle.toString(), sin2Angle.times(edge.norm2()).toString());
|
|
327
|
-
// }
|
|
307
|
+
if (dot * dot > sin2Angle * edge.norm2()) {
|
|
328
308
|
return false; // Entire cap is on the exterior side of this edge.
|
|
329
309
|
}
|
|
330
310
|
// Otherwise, the great circle containing this edge intersects
|
|
331
311
|
// the interior of the cap. We just need to check whether the point
|
|
332
312
|
// of closest approach occurs between the two edge endpoints.
|
|
333
|
-
|
|
334
|
-
if (dir.dotProd(vertices[k]).
|
|
335
|
-
&& dir.dotProd(vertices[(k + 1) & 3]).gt(0)) {
|
|
313
|
+
const dir = S2Point_1.S2Point.crossProd(edge, this.axis);
|
|
314
|
+
if (dir.dotProd(vertices[k]) < 0 && dir.dotProd(vertices[(k + 1) & 3]) > 0) {
|
|
336
315
|
return true;
|
|
337
316
|
}
|
|
338
317
|
}
|
|
339
318
|
return false;
|
|
340
|
-
}
|
|
341
|
-
|
|
319
|
+
}
|
|
320
|
+
contains(p) {
|
|
342
321
|
// The point 'p' should be a unit-length vector.
|
|
343
322
|
// assert (S2.isUnitLength(p));
|
|
344
|
-
return
|
|
345
|
-
}
|
|
323
|
+
return S1ChordAngle_1.S1ChordAngle.fromS2Point(this.axis, p).compareTo(this.radius) <= 0;
|
|
324
|
+
}
|
|
325
|
+
containsC(cell) {
|
|
326
|
+
// If the cap does not contain all cell vertices, return false.
|
|
327
|
+
// We check the vertices before taking the Complement() because we can't
|
|
328
|
+
// accurately represent the complement of a very small cap (a height
|
|
329
|
+
// of 2-epsilon is rounded off to 2).
|
|
330
|
+
const vertices = [];
|
|
331
|
+
for (let k = 0; k < 4; ++k) {
|
|
332
|
+
vertices[k] = cell.getVertex(k);
|
|
333
|
+
if (!this.contains(vertices[k])) {
|
|
334
|
+
return false;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
// Otherwise, return true if the complement of the cap does not intersect
|
|
338
|
+
// the cell. (This test is slightly conservative, because technically we
|
|
339
|
+
// want Complement().InteriorIntersects() here.)
|
|
340
|
+
return !this.complement().intersects(cell, vertices);
|
|
341
|
+
}
|
|
346
342
|
//
|
|
347
343
|
// /** Return true if two caps are identical. */
|
|
348
344
|
// public equals(that:Object ):boolean {
|
|
@@ -377,27 +373,27 @@ var S2Cap = (function () {
|
|
|
377
373
|
* Return true if the cap axis and height differ by at most "max_error" from
|
|
378
374
|
* the given cap "other".
|
|
379
375
|
*/
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|| (
|
|
385
|
-
|| (
|
|
386
|
-
|| (
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
376
|
+
approxEquals(other, maxError = 1e-14) {
|
|
377
|
+
const r2 = this.radius.getLength2();
|
|
378
|
+
const otherR2 = other.radius.getLength2();
|
|
379
|
+
return (S2_1.S2.approxEqualsPointError(this.axis, other.axis, maxError) && Math.abs(r2 - otherR2) <= maxError)
|
|
380
|
+
|| (this.isEmpty() && otherR2 <= maxError)
|
|
381
|
+
|| (other.isEmpty() && r2 <= maxError)
|
|
382
|
+
|| (this.isFull() && otherR2 >= 2 - maxError)
|
|
383
|
+
|| (other.isFull() && r2 >= 2 - maxError);
|
|
384
|
+
}
|
|
385
|
+
toString() {
|
|
386
|
+
return "[Point = " + this.axis + " Radius = " + this.radius + "]";
|
|
387
|
+
}
|
|
388
|
+
toGEOJSON() {
|
|
392
389
|
return this.getRectBound().toGEOJSON();
|
|
393
|
-
}
|
|
394
|
-
|
|
395
|
-
* Multiply a positive number by this constant to ensure that the result of a
|
|
396
|
-
* floating point operation is at least as large as the true
|
|
397
|
-
* infinite-precision result.
|
|
398
|
-
*/
|
|
399
|
-
S2Cap.ROUND_UP = S2_1.S2.toDecimal(1).dividedBy(new Long(1).shiftLeft(52).toString()).plus(1);
|
|
400
|
-
return S2Cap;
|
|
401
|
-
}());
|
|
390
|
+
}
|
|
391
|
+
}
|
|
402
392
|
exports.S2Cap = S2Cap;
|
|
393
|
+
/**
|
|
394
|
+
* Multiply a positive number by this constant to ensure that the result of a
|
|
395
|
+
* floating point operation is at least as large as the true
|
|
396
|
+
* infinite-precision result.
|
|
397
|
+
*/
|
|
398
|
+
S2Cap.ROUND_UP = 1 / new Long(1).shiftLeft(52).toNumber() + 1;
|
|
403
399
|
//# sourceMappingURL=S2Cap.js.map
|
package/dist/S2Cap.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"S2Cap.js","sourceRoot":"","sources":["../src/S2Cap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAIH,mBAAiB,MAAM,CAAC,CAAA;AACxB,wBAAsB,WAAW,CAAC,CAAA;AAClC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