s2-geometry.js/tests/ids.js

10 lines
304 B
JavaScript
Raw Permalink Normal View History

2016-07-28 00:41:04 +00:00
'use strict';
var S2 = require('../src/s2geometry').S2;
var cellId = S2.fromFacePosLevel(4, '032212303102210');
var hilbertQuadkey = S2.toHilbertQuadkey('9749618446378729472');
console.log(cellId, '9749618446378729472' === cellId);
console.log(hilbertQuadkey, '4/032212303102210' === hilbertQuadkey);