diff --git a/src/model/covering.ts b/src/model/covering.ts index b6d855f..77940b0 100644 --- a/src/model/covering.ts +++ b/src/model/covering.ts @@ -11,8 +11,8 @@ export class Covering { const ranges: GeohashRange[] = []; for (const outerRange of this.cellIds) { const hashRange = new GeohashRange( - outerRange.rangeMin().id as Long, - outerRange.rangeMax().id as Long, + outerRange.rangeMin().id, + outerRange.rangeMax().id, ); ranges.push(...hashRange.trySplit(hashKeyLength)); } diff --git a/src/s2/s2-manager.ts b/src/s2/s2-manager.ts index 1e4aac1..0c27f0d 100644 --- a/src/s2/s2-manager.ts +++ b/src/s2/s2-manager.ts @@ -21,7 +21,7 @@ export const generateGeohash = (geoPoint: GeoPoint): Long => { const latLng = S2LatLng.fromDegrees(geoPoint.latitude, geoPoint.longitude); const cell = S2Cell.fromLatLng(latLng); const cellId = cell.id; - return cellId.id as Long; + return cellId.id; }; export const generateHashKey = (geohash: Long, hashKeyLength: number): Long => {