S2 class

Constructors

S2({required int face, required List<int> ij, required int level})

Properties

face int
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
ij List<int>
getter/setter pair
level int
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getCornerLatLngs() List<LatLng>
Get 4 corner LatLngs of the S2 Cell
getFaceAndQuads() List
Get face and quads of the S2 Cell
getLatLng() LatLng
Convert S2 Cell to LatLng
getNeighbors() List<S2>
Get 4 neighboring S2 Cells
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toHilbertQuadkey() String
Convert S2 Cell to Hilbert Quadkey
toString() String
String representation of the S2 Cell
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

facePosLevelToId(int faceN, String posS, int? levelN) BigInt
61 (60 bits of data, 1 bit lsb marker) Convert face, position, and level to S2 Cell ID
fromFaceIJ(int face, List<int> ij, int level) S2
Create S2 Cell from face, ij, and level
fromHilbertQuadKey(String hilbertQuadkey) S2
Convert Hilbert Quadkey to S2 Cell
fromLatLng(LatLng latLng, int level) S2
Convert LatLng to S2 Cell
idToKey(BigInt id) String
Convert S2 Cell ID to quadkey
idToLatLng(BigInt id) LatLng
Convert S2 Cell ID to LatLng
keyToId(String key) BigInt
Convert quadkey to S2 Cell ID
keyToLatLng(String key) LatLng
Convert quadkey to LatLng
latLngToId(double lat, double lng, {int level = 15}) BigInt
Convert LatLng to S2 Cell ID
latLngToKey(double lat, double lng, int level) String
Convert LatLng to quadkey
latLngToNeighborKeys(double lat, double lng, int level) List<String>
Convert LatLng to neighboring Hilbert Quadkeys
latLngToXYZ(LatLng latLng) List<double>
Convert lat,lng to 3D point (x, y, z)
nextKey(String key) String
Calculate the next Hilbert QuadKey
prevKey(String key) String
Calculate the previous Hilbert QuadKey
stepKey(String key, int num) String
Stepping operation for quadkey
xyzToLatLng(List<double> xyz) LatLng
Convert 3D point (x, y, z) to lat,lng

Constants

faceBITS → const int
Constants
maxLEVEL → const int
posBITS → const int