@xylabs/geo 4.13.14 → 4.13.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/README.md +22 -31
  2. package/dist/neutral/GeoJson.d.ts +25 -0
  3. package/dist/neutral/GeoJson.d.ts.map +1 -0
  4. package/dist/neutral/GeoJson.spec.d.ts +2 -0
  5. package/dist/neutral/GeoJson.spec.d.ts.map +1 -0
  6. package/dist/neutral/LayerBase.d.ts +9 -0
  7. package/dist/neutral/LayerBase.d.ts.map +1 -0
  8. package/dist/neutral/index.d.ts +4 -77
  9. package/dist/neutral/index.d.ts.map +1 -0
  10. package/dist/neutral/mercator/boundingbox/index.d.ts +2 -0
  11. package/dist/neutral/mercator/boundingbox/index.d.ts.map +1 -0
  12. package/dist/neutral/mercator/boundingbox/to/boundary.d.ts +3 -0
  13. package/dist/neutral/mercator/boundingbox/to/boundary.d.ts.map +1 -0
  14. package/dist/neutral/mercator/boundingbox/to/center.d.ts +3 -0
  15. package/dist/neutral/mercator/boundingbox/to/center.d.ts.map +1 -0
  16. package/dist/neutral/mercator/boundingbox/to/index.d.ts +4 -0
  17. package/dist/neutral/mercator/boundingbox/to/index.d.ts.map +1 -0
  18. package/dist/neutral/mercator/boundingbox/to/polygon.d.ts +4 -0
  19. package/dist/neutral/mercator/boundingbox/to/polygon.d.ts.map +1 -0
  20. package/dist/neutral/mercator/constants.d.ts +4 -0
  21. package/dist/neutral/mercator/constants.d.ts.map +1 -0
  22. package/dist/neutral/mercator/index.d.ts +6 -0
  23. package/dist/neutral/mercator/index.d.ts.map +1 -0
  24. package/dist/neutral/mercator/tile/from/index.d.ts +3 -0
  25. package/dist/neutral/mercator/tile/from/index.d.ts.map +1 -0
  26. package/dist/neutral/mercator/tile/from/point.d.ts +4 -0
  27. package/dist/neutral/mercator/tile/from/point.d.ts.map +1 -0
  28. package/dist/neutral/mercator/tile/from/quadkey.d.ts +3 -0
  29. package/dist/neutral/mercator/tile/from/quadkey.d.ts.map +1 -0
  30. package/dist/neutral/mercator/tile/index.d.ts +3 -0
  31. package/dist/neutral/mercator/tile/index.d.ts.map +1 -0
  32. package/dist/neutral/mercator/tile/to/boundingbox.d.ts +5 -0
  33. package/dist/neutral/mercator/tile/to/boundingbox.d.ts.map +1 -0
  34. package/dist/neutral/mercator/tile/to/children.d.ts +4 -0
  35. package/dist/neutral/mercator/tile/to/children.d.ts.map +1 -0
  36. package/dist/neutral/mercator/tile/to/geoJson.d.ts +5 -0
  37. package/dist/neutral/mercator/tile/to/geoJson.d.ts.map +1 -0
  38. package/dist/neutral/mercator/tile/to/index.d.ts +8 -0
  39. package/dist/neutral/mercator/tile/to/index.d.ts.map +1 -0
  40. package/dist/neutral/mercator/tile/to/parent.d.ts +4 -0
  41. package/dist/neutral/mercator/tile/to/parent.d.ts.map +1 -0
  42. package/dist/neutral/mercator/tile/to/point.d.ts +4 -0
  43. package/dist/neutral/mercator/tile/to/point.d.ts.map +1 -0
  44. package/dist/neutral/mercator/tile/to/quadkey.d.ts +4 -0
  45. package/dist/neutral/mercator/tile/to/quadkey.d.ts.map +1 -0
  46. package/dist/neutral/mercator/tile/to/siblings.d.ts +4 -0
  47. package/dist/neutral/mercator/tile/to/siblings.d.ts.map +1 -0
  48. package/dist/neutral/mercator/tiles/equal.d.ts +3 -0
  49. package/dist/neutral/mercator/tiles/equal.d.ts.map +1 -0
  50. package/dist/neutral/mercator/tiles/from/boundingbox.d.ts +4 -0
  51. package/dist/neutral/mercator/tiles/from/boundingbox.d.ts.map +1 -0
  52. package/dist/neutral/mercator/tiles/from/index.d.ts +2 -0
  53. package/dist/neutral/mercator/tiles/from/index.d.ts.map +1 -0
  54. package/dist/neutral/mercator/tiles/hasSiblings.d.ts +3 -0
  55. package/dist/neutral/mercator/tiles/hasSiblings.d.ts.map +1 -0
  56. package/dist/neutral/mercator/tiles/hasTile.d.ts +3 -0
  57. package/dist/neutral/mercator/tiles/hasTile.d.ts.map +1 -0
  58. package/dist/neutral/mercator/tiles/index.d.ts +6 -0
  59. package/dist/neutral/mercator/tiles/index.d.ts.map +1 -0
  60. package/dist/neutral/mercator/types.d.ts +10 -0
  61. package/dist/neutral/mercator/types.d.ts.map +1 -0
  62. package/package.json +3 -3
package/README.md CHANGED
@@ -1,63 +1,54 @@
1
- [![logo][]](https://xylabs.com)
1
+ # @xylabs/geo
2
2
 
3
- # @xylabs/hex
3
+ [![logo][]](https://xylabs.com)
4
4
 
5
+ [![main-build][]][main-build-link]
5
6
  [![npm-badge][]][npm-link]
6
7
  [![npm-downloads-badge][]][npm-link]
7
8
  [![jsdelivr-badge][]][jsdelivr-link]
8
9
  [![npm-license-badge][]](LICENSE)
10
+ [![codacy-badge][]][codacy-link]
11
+ [![codeclimate-badge][]][codeclimate-link]
12
+ [![snyk-badge][]][snyk-link]
9
13
  [![socket-badge][]][socket-link]
10
14
 
11
- > XY Labs Geo Helpers
12
-
13
- ## Table of Contents
14
-
15
- - [Description](#description)
16
- - [Install](#install)
17
- - [Maintainers](#maintainers)
18
- - [License](#license)
19
- - [Credits](#credits)
20
-
21
- ## Description
22
-
23
- Various Geo helper functions
15
+ Version: 4.13.15
24
16
 
25
- ## Install
17
+ Base functionality used throughout XY Labs TypeScript/JavaScript libraries
26
18
 
27
- Using npm:
28
-
29
- ```sh
30
- npm i --save @xylabs/geo
31
- ```
32
-
33
- Using yarn:
19
+ ## Documentation
34
20
 
35
- ```sh
36
- yarn add @xylabs/geo
37
- ```
21
+ Coming Soon!
38
22
 
39
- ## Documentation
40
- [Developer Reference](https://xylabs.github.io/sdk-js)
23
+ Part of [sdk-js](https://www.npmjs.com/package/@xyo-network/sdk-js)
41
24
 
42
25
  ## Maintainers
43
26
 
44
27
  - [Arie Trouw](https://github.com/arietrouw) ([arietrouw.com](https://arietrouw.com))
45
- - [Joel Carter](https://github.com/JoelBCarter)
46
28
  - [Matt Jones](https://github.com/jonesmac)
29
+ - [Joel Carter](https://github.com/JoelBCarter)
47
30
  - [Jordan Trouw](https://github.com/jordantrouw)
48
31
 
49
32
  ## License
50
33
 
51
- See the [LICENSE](LICENSE) file for license details
34
+ > See the [LICENSE](LICENSE) file for license details
52
35
 
53
36
  ## Credits
54
37
 
55
- [Made with 🔥and ❄️ by XY Labs](https://xylabs.com)
38
+ [Made with 🔥 and ❄️ by XYLabs](https://xylabs.com)
56
39
 
57
40
  [logo]: https://cdn.xy.company/img/brand/XYPersistentCompany_Logo_Icon_Colored.svg
58
41
 
42
+ [main-build]: https://github.com/xylabs/sdk-js/actions/workflows/build.yml/badge.svg
43
+ [main-build-link]: https://github.com/xylabs/sdk-js/actions/workflows/build.yml
59
44
  [npm-badge]: https://img.shields.io/npm/v/@xylabs/geo.svg
60
45
  [npm-link]: https://www.npmjs.com/package/@xylabs/geo
46
+ [codacy-badge]: https://app.codacy.com/project/badge/Grade/c8e15e14f37741c18cfb47ac7245c698
47
+ [codacy-link]: https://www.codacy.com/gh/xylabs/sdk-js/dashboard?utm_source=github.com&utm_medium=referral&utm_content=xylabs/sdk-js&utm_campaign=Badge_Grade
48
+ [codeclimate-badge]: https://api.codeclimate.com/v1/badges/c5eb068f806f0b047ea7/maintainability
49
+ [codeclimate-link]: https://codeclimate.com/github/xylabs/sdk-js/maintainability
50
+ [snyk-badge]: https://snyk.io/test/github/xylabs/sdk-js/badge.svg?targetFile=package.json
51
+ [snyk-link]: https://snyk.io/test/github/xylabs/sdk-js?targetFile=package.json
61
52
 
62
53
  [npm-downloads-badge]: https://img.shields.io/npm/dw/@xylabs/geo
63
54
  [npm-license-badge]: https://img.shields.io/npm/l/@xylabs/geo
@@ -0,0 +1,25 @@
1
+ import type { Feature, FeatureCollection, Geometry, Point, Polygon } from 'geojson';
2
+ import MapBox from 'mapbox-gl';
3
+ declare class GeoJson {
4
+ private _lngLat?;
5
+ private _point?;
6
+ private _polygon?;
7
+ private _zoom?;
8
+ private quadkey;
9
+ constructor(quadkey: string);
10
+ static featureCollection(features: Feature[]): FeatureCollection;
11
+ static featuresSource(data: FeatureCollection): MapBox.GeoJSONSourceSpecification;
12
+ static geometryFeature(geometry: Geometry): Feature;
13
+ center(): MapBox.LngLat;
14
+ point(): Point;
15
+ pointFeature(): Feature;
16
+ pointFeatureCollection(): FeatureCollection;
17
+ pointSource(): MapBox.GeoJSONSourceSpecification;
18
+ polygon(): Polygon;
19
+ polygonFeature(): Feature;
20
+ polygonFeatureCollection(): FeatureCollection;
21
+ polygonSource(): MapBox.GeoJSONSourceSpecification;
22
+ zoom(): number;
23
+ }
24
+ export { GeoJson };
25
+ //# sourceMappingURL=GeoJson.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GeoJson.d.ts","sourceRoot":"","sources":["../../src/GeoJson.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EACrD,MAAM,SAAS,CAAA;AAChB,OAAO,MAAM,MAAM,WAAW,CAAA;AAM9B,cAAM,OAAO;IACX,OAAO,CAAC,OAAO,CAAC,CAAe;IAC/B,OAAO,CAAC,MAAM,CAAC,CAAO;IACtB,OAAO,CAAC,QAAQ,CAAC,CAAS;IAC1B,OAAO,CAAC,KAAK,CAAC,CAAQ;IAEtB,OAAO,CAAC,OAAO,CAAQ;gBAEX,OAAO,EAAE,MAAM;IAI3B,MAAM,CAAC,iBAAiB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,iBAAiB;IAOhE,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,iBAAiB,GAAG,MAAM,CAAC,0BAA0B;IAOjF,MAAM,CAAC,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO;IAQnD,MAAM,IAAI,MAAM,CAAC,MAAM;IAUvB,KAAK,IAAI,KAAK;IAUd,YAAY,IAAI,OAAO;IAIvB,sBAAsB,IAAI,iBAAiB;IAI3C,WAAW,IAAI,MAAM,CAAC,0BAA0B;IAOhD,OAAO,IAAI,OAAO;IAOlB,cAAc,IAAI,OAAO;IAIzB,wBAAwB,IAAI,iBAAiB;IAI7C,aAAa,IAAI,MAAM,CAAC,0BAA0B;IAIlD,IAAI,IAAI,MAAM;CAIf;AAED,OAAO,EAAE,OAAO,EAAE,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=GeoJson.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GeoJson.spec.d.ts","sourceRoot":"","sources":["../../src/GeoJson.spec.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import type MapBox from 'mapbox-gl';
2
+ export declare abstract class LayerBase<T extends MapBox.Layer> {
3
+ id: string;
4
+ source: string;
5
+ constructor(id: string, source: string);
6
+ update(map: MapBox.Map, show?: boolean): void;
7
+ abstract buildLayer(): T;
8
+ }
9
+ //# sourceMappingURL=LayerBase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayerBase.d.ts","sourceRoot":"","sources":["../../src/LayerBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,WAAW,CAAA;AAEnC,8BAAsB,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,KAAK;IACpD,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;gBAEF,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAKtC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,IAAI,UAAO;IASnC,QAAQ,CAAC,UAAU,IAAI,CAAC;CACzB"}
@@ -1,77 +1,4 @@
1
- import { Feature, FeatureCollection, Geometry, Point, Polygon } from 'geojson';
2
- import MapBox from 'mapbox-gl';
3
-
4
- declare class GeoJson {
5
- private _lngLat?;
6
- private _point?;
7
- private _polygon?;
8
- private _zoom?;
9
- private quadkey;
10
- constructor(quadkey: string);
11
- static featureCollection(features: Feature[]): FeatureCollection;
12
- static featuresSource(data: FeatureCollection): MapBox.GeoJSONSourceSpecification;
13
- static geometryFeature(geometry: Geometry): Feature;
14
- center(): MapBox.LngLat;
15
- point(): Point;
16
- pointFeature(): Feature;
17
- pointFeatureCollection(): FeatureCollection;
18
- pointSource(): MapBox.GeoJSONSourceSpecification;
19
- polygon(): Polygon;
20
- polygonFeature(): Feature;
21
- polygonFeatureCollection(): FeatureCollection;
22
- polygonSource(): MapBox.GeoJSONSourceSpecification;
23
- zoom(): number;
24
- }
25
-
26
- declare abstract class LayerBase<T extends MapBox.Layer> {
27
- id: string;
28
- source: string;
29
- constructor(id: string, source: string);
30
- update(map: MapBox.Map, show?: boolean): void;
31
- abstract buildLayer(): T;
32
- }
33
-
34
- type MercatorTile = number[];
35
- type MercatorBoundary = MercatorLngLat[];
36
- declare class MercatorBoundingBox extends MapBox.LngLatBounds {
37
- }
38
- declare class MercatorLngLat extends MapBox.LngLat {
39
- }
40
-
41
- declare const boundingBoxToBoundary: (box: MercatorBoundingBox) => MercatorBoundary;
42
-
43
- declare const boundingBoxToCenter: (boundingBox: MercatorBoundingBox, decimal?: number) => number[];
44
-
45
- declare const boundingBoxToPolygon: (box: MercatorBoundingBox) => Polygon;
46
-
47
- declare const d2r: number;
48
- declare const r2d: number;
49
-
50
- declare const tileFromPoint: (point: MercatorLngLat, z: number) => number[];
51
-
52
- declare const tileFromQuadkey: (quadkey: string) => number[];
53
-
54
- declare const tileToBoundingBox: (tile: MercatorTile) => MercatorBoundingBox;
55
-
56
- declare const tileToChildren: (tile: MercatorTile) => number[][];
57
-
58
- declare const tileToGeoJson: (tile: MercatorTile) => Polygon;
59
-
60
- declare const tileToParent: (tile: MercatorTile) => MercatorTile;
61
-
62
- declare const tileToPoint: (tile: MercatorTile) => MercatorLngLat;
63
-
64
- declare const tileToQuadkey: (tile: MercatorTile) => string;
65
-
66
- declare const tileToSiblings: (tile: MercatorTile) => MercatorTile[];
67
-
68
- declare const tilesEqual: (tile1: MercatorTile, tile2: MercatorTile) => boolean;
69
-
70
- declare const tilesFromBoundingBox: (box: MercatorBoundingBox, zoom: number) => MercatorTile[];
71
-
72
- declare const hasSiblings: (tiles: MercatorTile[], tile: MercatorTile) => boolean;
73
-
74
- declare const tilesHasTile: (tiles: MercatorTile[], tile: MercatorTile) => boolean;
75
-
76
- export { GeoJson, LayerBase, MercatorBoundingBox, MercatorLngLat, boundingBoxToBoundary, boundingBoxToCenter, boundingBoxToPolygon, d2r, hasSiblings, r2d, tileFromPoint, tileFromQuadkey, tileToBoundingBox, tileToChildren, tileToGeoJson, tileToParent, tileToPoint, tileToQuadkey, tileToSiblings, tilesEqual, tilesFromBoundingBox, tilesHasTile };
77
- export type { MercatorBoundary, MercatorTile };
1
+ export * from './GeoJson.ts';
2
+ export * from './LayerBase.ts';
3
+ export * from './mercator/index.ts';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,qBAAqB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './to/index.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mercator/boundingbox/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { MercatorBoundary, MercatorBoundingBox } from '../../types.ts';
2
+ export declare const boundingBoxToBoundary: (box: MercatorBoundingBox) => MercatorBoundary;
3
+ //# sourceMappingURL=boundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boundary.d.ts","sourceRoot":"","sources":["../../../../../src/mercator/boundingbox/to/boundary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAE3E,eAAO,MAAM,qBAAqB,GAAI,KAAK,mBAAmB,KAAG,gBAEhE,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { MercatorBoundingBox } from '../../types.ts';
2
+ export declare const boundingBoxToCenter: (boundingBox: MercatorBoundingBox, decimal?: number) => number[];
3
+ //# sourceMappingURL=center.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"center.d.ts","sourceRoot":"","sources":["../../../../../src/mercator/boundingbox/to/center.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAEzD,eAAO,MAAM,mBAAmB,GAAI,aAAa,mBAAmB,EAAE,gBAAW,aAYhF,CAAA"}
@@ -0,0 +1,4 @@
1
+ export { boundingBoxToBoundary } from './boundary.ts';
2
+ export { boundingBoxToCenter } from './center.ts';
3
+ export { boundingBoxToPolygon } from './polygon.ts';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/mercator/boundingbox/to/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { Polygon } from 'geojson';
2
+ import type { MercatorBoundingBox } from '../../types.ts';
3
+ export declare const boundingBoxToPolygon: (box: MercatorBoundingBox) => Polygon;
4
+ //# sourceMappingURL=polygon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"polygon.d.ts","sourceRoot":"","sources":["../../../../../src/mercator/boundingbox/to/polygon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEtC,OAAO,KAAK,EAAE,mBAAmB,EAAkB,MAAM,gBAAgB,CAAA;AAGzE,eAAO,MAAM,oBAAoB,GAAI,KAAK,mBAAmB,KAAG,OAM/D,CAAA"}
@@ -0,0 +1,4 @@
1
+ declare const d2r: number;
2
+ declare const r2d: number;
3
+ export { d2r, r2d };
4
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/mercator/constants.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,GAAG,QAAgB,CAAA;AACzB,QAAA,MAAM,GAAG,QAAgB,CAAA;AAEzB,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,CAAA"}
@@ -0,0 +1,6 @@
1
+ export * from './boundingbox/index.ts';
2
+ export * from './constants.ts';
3
+ export * from './tile/index.ts';
4
+ export * from './tiles/index.ts';
5
+ export * from './types.ts';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/mercator/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAA;AACtC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { tileFromPoint } from './point.ts';
2
+ export { tileFromQuadkey } from './quadkey.ts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/mercator/tile/from/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { MercatorLngLat } from '../../types.ts';
2
+ declare const tileFromPoint: (point: MercatorLngLat, z: number) => number[];
3
+ export { tileFromPoint };
4
+ //# sourceMappingURL=point.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../../../../src/mercator/tile/from/point.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAcpD,QAAA,MAAM,aAAa,GAAI,OAAO,cAAc,EAAE,GAAG,MAAM,aAWtD,CAAA;AAED,OAAO,EAAE,aAAa,EAAE,CAAA"}
@@ -0,0 +1,3 @@
1
+ declare const tileFromQuadkey: (quadkey: string) => number[];
2
+ export { tileFromQuadkey };
3
+ //# sourceMappingURL=quadkey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quadkey.d.ts","sourceRoot":"","sources":["../../../../../src/mercator/tile/from/quadkey.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,eAAe,GAAI,SAAS,MAAM,aAgBvC,CAAA;AAED,OAAO,EAAE,eAAe,EAAE,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './from/index.ts';
2
+ export * from './to/index.ts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mercator/tile/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA"}
@@ -0,0 +1,5 @@
1
+ import type { MercatorTile } from '../../types.ts';
2
+ import { MercatorBoundingBox } from '../../types.ts';
3
+ declare const tileToBoundingBox: (tile: MercatorTile) => MercatorBoundingBox;
4
+ export { tileToBoundingBox };
5
+ //# sourceMappingURL=boundingbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boundingbox.d.ts","sourceRoot":"","sources":["../../../../../src/mercator/tile/to/boundingbox.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAA;AAWpD,QAAA,MAAM,iBAAiB,GAAI,MAAM,YAAY,KAAG,mBAM/C,CAAA;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { MercatorTile } from '../../types.ts';
2
+ declare const tileToChildren: (tile: MercatorTile) => number[][];
3
+ export { tileToChildren };
4
+ //# sourceMappingURL=children.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"children.d.ts","sourceRoot":"","sources":["../../../../../src/mercator/tile/to/children.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,QAAA,MAAM,cAAc,GAAI,MAAM,YAAY,eAOzC,CAAA;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
@@ -0,0 +1,5 @@
1
+ import type { Polygon } from 'geojson';
2
+ import type { MercatorTile } from '../../types.ts';
3
+ declare const tileToGeoJson: (tile: MercatorTile) => Polygon;
4
+ export { tileToGeoJson };
5
+ //# sourceMappingURL=geoJson.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geoJson.d.ts","sourceRoot":"","sources":["../../../../../src/mercator/tile/to/geoJson.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAY,MAAM,SAAS,CAAA;AAEhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAGlD,QAAA,MAAM,aAAa,GAAI,MAAM,YAAY,KAAG,OAe3C,CAAA;AAED,OAAO,EAAE,aAAa,EAAE,CAAA"}
@@ -0,0 +1,8 @@
1
+ export { tileToBoundingBox } from './boundingbox.ts';
2
+ export { tileToChildren } from './children.ts';
3
+ export { tileToGeoJson } from './geoJson.ts';
4
+ export { tileToParent } from './parent.ts';
5
+ export { tileToPoint } from './point.ts';
6
+ export { tileToQuadkey } from './quadkey.ts';
7
+ export { tileToSiblings } from './siblings.ts';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/mercator/tile/to/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { MercatorTile } from '../../types.ts';
2
+ declare const tileToParent: (tile: MercatorTile) => MercatorTile;
3
+ export { tileToParent };
4
+ //# sourceMappingURL=parent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parent.d.ts","sourceRoot":"","sources":["../../../../../src/mercator/tile/to/parent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,QAAA,MAAM,YAAY,GAAI,MAAM,YAAY,KAAG,YAE1C,CAAA;AAED,OAAO,EAAE,YAAY,EAAE,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { MercatorLngLat, MercatorTile } from '../../types.ts';
2
+ declare const tileToPoint: (tile: MercatorTile) => MercatorLngLat;
3
+ export { tileToPoint };
4
+ //# sourceMappingURL=point.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../../../../src/mercator/tile/to/point.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAGlE,QAAA,MAAM,WAAW,GAAI,MAAM,YAAY,KAAG,cAIzC,CAAA;AAED,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { MercatorTile } from '../../types.ts';
2
+ declare const tileToQuadkey: (tile: MercatorTile) => string;
3
+ export { tileToQuadkey };
4
+ //# sourceMappingURL=quadkey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quadkey.d.ts","sourceRoot":"","sources":["../../../../../src/mercator/tile/to/quadkey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAElD,QAAA,MAAM,aAAa,GAAI,MAAM,YAAY,KAAG,MAU3C,CAAA;AAED,OAAO,EAAE,aAAa,EAAE,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { MercatorTile } from '../../types.ts';
2
+ declare const tileToSiblings: (tile: MercatorTile) => MercatorTile[];
3
+ export { tileToSiblings };
4
+ //# sourceMappingURL=siblings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"siblings.d.ts","sourceRoot":"","sources":["../../../../../src/mercator/tile/to/siblings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAIlD,QAAA,MAAM,cAAc,GAAI,MAAM,YAAY,KAAG,YAAY,EAExD,CAAA;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { MercatorTile } from '../types.ts';
2
+ export declare const tilesEqual: (tile1: MercatorTile, tile2: MercatorTile) => boolean;
3
+ //# sourceMappingURL=equal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"equal.d.ts","sourceRoot":"","sources":["../../../../src/mercator/tiles/equal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,eAAO,MAAM,UAAU,GAAI,OAAO,YAAY,EAAE,OAAO,YAAY,YAElE,CAAA"}
@@ -0,0 +1,4 @@
1
+ import type { MercatorBoundingBox, MercatorTile } from '../../types.ts';
2
+ declare const tilesFromBoundingBox: (box: MercatorBoundingBox, zoom: number) => MercatorTile[];
3
+ export { tilesFromBoundingBox };
4
+ //# sourceMappingURL=boundingbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boundingbox.d.ts","sourceRoot":"","sources":["../../../../../src/mercator/tiles/from/boundingbox.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAEvE,QAAA,MAAM,oBAAoB,GAAI,KAAK,mBAAmB,EAAE,MAAM,MAAM,KAAG,YAAY,EA+BlF,CAAA;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { tilesFromBoundingBox } from './boundingbox.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/mercator/tiles/from/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { MercatorTile } from '../types.ts';
2
+ export declare const hasSiblings: (tiles: MercatorTile[], tile: MercatorTile) => boolean;
3
+ //# sourceMappingURL=hasSiblings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hasSiblings.d.ts","sourceRoot":"","sources":["../../../../src/mercator/tiles/hasSiblings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG/C,eAAO,MAAM,WAAW,GAAI,OAAO,YAAY,EAAE,EAAE,MAAM,YAAY,YAMpE,CAAA"}
@@ -0,0 +1,3 @@
1
+ import type { MercatorTile } from '../types.ts';
2
+ export declare const tilesHasTile: (tiles: MercatorTile[], tile: MercatorTile) => boolean;
3
+ //# sourceMappingURL=hasTile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hasTile.d.ts","sourceRoot":"","sources":["../../../../src/mercator/tiles/hasTile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAG/C,eAAO,MAAM,YAAY,GAAI,OAAO,YAAY,EAAE,EAAE,MAAM,YAAY,YAKrE,CAAA"}
@@ -0,0 +1,6 @@
1
+ export * from './equal.ts';
2
+ export * from './from/index.ts';
3
+ export * from './hasSiblings.ts';
4
+ export * from './hasTile.ts';
5
+ export * from './hasTile.ts';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mercator/tiles/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA"}
@@ -0,0 +1,10 @@
1
+ import MapBox from 'mapbox-gl';
2
+ type MercatorTile = number[];
3
+ type MercatorBoundary = MercatorLngLat[];
4
+ declare class MercatorBoundingBox extends MapBox.LngLatBounds {
5
+ }
6
+ declare class MercatorLngLat extends MapBox.LngLat {
7
+ }
8
+ export { MercatorBoundingBox, MercatorLngLat };
9
+ export type { MercatorBoundary, MercatorTile };
10
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/mercator/types.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAA;AAE9B,KAAK,YAAY,GAAG,MAAM,EAAE,CAAA;AAC5B,KAAK,gBAAgB,GAAG,cAAc,EAAE,CAAA;AACxC,cAAM,mBAAoB,SAAQ,MAAM,CAAC,YAAY;CAAG;AACxD,cAAM,cAAe,SAAQ,MAAM,CAAC,MAAM;CAAG;AAE7C,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,CAAA;AAC9C,YAAY,EAAE,gBAAgB,EAAE,YAAY,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/geo",
3
- "version": "4.13.14",
3
+ "version": "4.13.16",
4
4
  "description": "Base functionality used throughout XY Labs TypeScript/JavaScript libraries",
5
5
  "keywords": [
6
6
  "xylabs",
@@ -39,8 +39,8 @@
39
39
  "mapbox-gl": "^3.13.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.12",
43
- "@xylabs/tsconfig": "^7.0.0-rc.12",
42
+ "@xylabs/ts-scripts-yarn3": "^7.0.0-rc.27",
43
+ "@xylabs/tsconfig": "^7.0.0-rc.27",
44
44
  "typescript": "^5.8.3",
45
45
  "vitest": "^3.2.4"
46
46
  },