google / s2-geometry-library-java

Automatically exported from code.google.com/p/s2-geometry-library-java
Apache License 2.0
538 stars 230 forks source link

Create cell by mentioning level #13

Closed sivalearn12 closed 3 years ago

sivalearn12 commented 6 years ago

Hi, i want to create the cell by mentioning the level.

S2Cell cell = new S2Cell(S2LatLng.fromDegrees(0.5, 14.3).toPoint());

S2CellId cellid = cell.id();

cellid.level() // its coming as 30.. is it possible to change the level to 12.

eengle commented 3 years ago

'cellid.parent(12)' should do the trick.