• Home
  • Raw
  • Download

Lines Matching refs:S2CellId

32   private S2CellId getCellId(double latDegrees, double lngDegrees) {  in getCellId()
33 S2CellId id = S2CellId.fromLatLng(S2LatLng.fromDegrees(latDegrees, lngDegrees)); in getCellId()
41 S2CellId id = new S2CellId(); in testBasic()
46 id = S2CellId.fromFacePosLevel(3, 0x12345678, S2CellId.MAX_LEVEL - 4); in testBasic()
50 assertEquals(id.level(), S2CellId.MAX_LEVEL - 4); in testBasic()
71 assertEquals(id.childBegin(S2CellId.MAX_LEVEL), id.rangeMin()); in testBasic()
72 assertEquals(id.childEnd(S2CellId.MAX_LEVEL), id.rangeMax().next()); in testBasic()
75 assertEquals(S2CellId.begin(0).prevWrap(), S2CellId.end(0).prev()); in testBasic()
77 assertEquals(S2CellId.begin(S2CellId.MAX_LEVEL).prevWrap(), in testBasic()
78 S2CellId.fromFacePosLevel(5, ~0L >>> S2CellId.FACE_BITS, S2CellId.MAX_LEVEL)); in testBasic()
80 assertEquals(S2CellId.end(4).prev().nextWrap(), S2CellId.begin(4)); in testBasic()
81 assertEquals(S2CellId.end(S2CellId.MAX_LEVEL).prev().nextWrap(), in testBasic()
82 S2CellId.fromFacePosLevel(0, 0, S2CellId.MAX_LEVEL)); in testBasic()
93 S2CellId id = getRandomCellId(S2CellId.MAX_LEVEL); in testInverses()
94 assertTrue(id.isLeaf() && id.level() == S2CellId.MAX_LEVEL); in testInverses()
96 assertEquals(S2CellId.fromLatLng(center).id(), id.id()); in testInverses()
102 assertEquals("000000000000010a", new S2CellId(266).toToken()); in testToToken()
103 assertEquals("80855c", new S2CellId(-9185834709882503168L).toToken()); in testToToken()
111 S2CellId id = getRandomCellId(); in testTokens()
117 assertEquals(S2CellId.fromToken(token), id); in testTokens()
120 String token = S2CellId.none().toToken(); in testTokens()
121 assertEquals(S2CellId.fromToken(token), S2CellId.none()); in testTokens()
127 S2CellId parent, ArrayList<S2CellId> cells, Map<S2CellId, S2CellId> parentMap) { in expandCell() argument
139 for (S2CellId child = parent.childBegin(); !child.equals(parent.childEnd()); in expandCell()
157 Map<S2CellId, S2CellId> parentMap = new HashMap<S2CellId, S2CellId>(); in testContainment()
158 ArrayList<S2CellId> cells = new ArrayList<S2CellId>(); in testContainment()
160 expandCell(S2CellId.fromFacePosLevel(face, 0, 0), cells, parentMap); in testContainment()
165 for (S2CellId id = cells.get(j); id != cells.get(i); id = parentMap.get(id)) { in testContainment()
189 S2CellId end = S2CellId.end(MAX_WALK_LEVEL); in testContinuity()
190 S2CellId id = S2CellId.begin(MAX_WALK_LEVEL); in testContinuity()
215 double maxDist = 0.5 * S2Projections.MAX_DIAG.getValue(S2CellId.MAX_LEVEL); in testCoverage()
219 S2Point q = S2CellId.fromPoint(p).toPointRaw(); in testCoverage()
225 public void testAllNeighbors(S2CellId id, int level) { in testAllNeighbors()
226 assertTrue(level >= id.level() && level < S2CellId.MAX_LEVEL); in testAllNeighbors()
232 ArrayList<S2CellId> all = new ArrayList<S2CellId>(); in testAllNeighbors()
233 ArrayList<S2CellId> expected = new ArrayList<S2CellId>(); in testAllNeighbors()
235 S2CellId end = id.childEnd(level + 1); in testAllNeighbors()
236 for (S2CellId c = id.childBegin(level + 1); !c.equals(end); c = c.next()) { in testAllNeighbors()
243 Set<S2CellId> allSet = new HashSet<S2CellId>(all); in testAllNeighbors()
244 Set<S2CellId> expectedSet = new HashSet<S2CellId>(expected); in testAllNeighbors()
253 S2CellId faceNbrs[] = new S2CellId[4]; in testNeighbors()
254 S2CellId.fromFacePosLevel(1, 0, 0).getEdgeNeighbors(faceNbrs); in testNeighbors()
261 ArrayList<S2CellId> nbrs = new ArrayList<S2CellId>(); in testNeighbors()
262 S2CellId.fromPoint(new S2Point(0, 0, 1)).getVertexNeighbors(5, nbrs); in testNeighbors()
265 assertEquals(nbrs.get(i), S2CellId.fromFaceIJ( in testNeighbors()
271 S2CellId id = S2CellId.fromFacePosLevel(0, 0, S2CellId.MAX_LEVEL); in testNeighbors()
275 assertEquals(nbrs.get(0), S2CellId.fromFacePosLevel(0, 0, 0)); in testNeighbors()
276 assertEquals(nbrs.get(1), S2CellId.fromFacePosLevel(4, 0, 0)); in testNeighbors()
277 assertEquals(nbrs.get(2), S2CellId.fromFacePosLevel(5, 0, 0)); in testNeighbors()
282 S2CellId id1 = getRandomCellId(); in testNeighbors()
289 int maxDiff = Math.min(6, S2CellId.MAX_LEVEL - id1.level() - 1); in testNeighbors()