@xylabs/geo 4.13.15 → 4.13.17
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.
- package/README.md +22 -31
- package/dist/neutral/GeoJson.spec.d.ts +2 -0
- package/dist/neutral/GeoJson.spec.d.ts.map +1 -0
- package/dist/neutral/index.d.ts +4 -90
- package/package.json +3 -3
- package/build/neutral/index.d.ts +0 -4
- /package/{build → dist}/neutral/GeoJson.d.ts +0 -0
- /package/{build → dist}/neutral/GeoJson.d.ts.map +0 -0
- /package/{build → dist}/neutral/LayerBase.d.ts +0 -0
- /package/{build → dist}/neutral/LayerBase.d.ts.map +0 -0
- /package/{build → dist}/neutral/index.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/boundingbox/index.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/boundingbox/index.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/boundingbox/to/boundary.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/boundingbox/to/boundary.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/boundingbox/to/center.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/boundingbox/to/center.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/boundingbox/to/index.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/boundingbox/to/index.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/boundingbox/to/polygon.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/boundingbox/to/polygon.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/constants.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/constants.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/index.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/index.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/tile/from/index.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/tile/from/index.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/tile/from/point.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/tile/from/point.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/tile/from/quadkey.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/tile/from/quadkey.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/tile/index.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/tile/index.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/tile/to/boundingbox.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/tile/to/boundingbox.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/tile/to/children.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/tile/to/children.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/tile/to/geoJson.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/tile/to/geoJson.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/tile/to/index.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/tile/to/index.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/tile/to/parent.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/tile/to/parent.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/tile/to/point.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/tile/to/point.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/tile/to/quadkey.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/tile/to/quadkey.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/tile/to/siblings.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/tile/to/siblings.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/tiles/equal.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/tiles/equal.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/tiles/from/boundingbox.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/tiles/from/boundingbox.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/tiles/from/index.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/tiles/from/index.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/tiles/hasSiblings.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/tiles/hasSiblings.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/tiles/hasTile.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/tiles/hasTile.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/tiles/index.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/tiles/index.d.ts.map +0 -0
- /package/{build → dist}/neutral/mercator/types.d.ts +0 -0
- /package/{build → dist}/neutral/mercator/types.d.ts.map +0 -0
package/README.md
CHANGED
|
@@ -1,63 +1,54 @@
|
|
|
1
|
-
|
|
1
|
+
# @xylabs/geo
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
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
|
-
|
|
17
|
+
Base functionality used throughout XY Labs TypeScript/JavaScript libraries
|
|
26
18
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
```sh
|
|
30
|
-
npm i --save @xylabs/geo
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
Using yarn:
|
|
19
|
+
## Documentation
|
|
34
20
|
|
|
35
|
-
|
|
36
|
-
yarn add @xylabs/geo
|
|
37
|
-
```
|
|
21
|
+
Coming Soon!
|
|
38
22
|
|
|
39
|
-
|
|
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
|
|
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 @@
|
|
|
1
|
+
{"version":3,"file":"GeoJson.spec.d.ts","sourceRoot":"","sources":["../../src/GeoJson.spec.ts"],"names":[],"mappings":""}
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,90 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
//# sourceMappingURL=GeoJson.d.ts.map
|
|
26
|
-
|
|
27
|
-
declare abstract class LayerBase<T extends MapBox.Layer> {
|
|
28
|
-
id: string;
|
|
29
|
-
source: string;
|
|
30
|
-
constructor(id: string, source: string);
|
|
31
|
-
update(map: MapBox.Map, show?: boolean): void;
|
|
32
|
-
abstract buildLayer(): T;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
type MercatorTile = number[];
|
|
36
|
-
type MercatorBoundary = MercatorLngLat[];
|
|
37
|
-
declare class MercatorBoundingBox extends MapBox.LngLatBounds {
|
|
38
|
-
}
|
|
39
|
-
declare class MercatorLngLat extends MapBox.LngLat {
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=types.d.ts.map
|
|
42
|
-
|
|
43
|
-
declare const boundingBoxToBoundary: (box: MercatorBoundingBox) => MercatorBoundary;
|
|
44
|
-
|
|
45
|
-
declare const boundingBoxToCenter: (boundingBox: MercatorBoundingBox, decimal?: number) => number[];
|
|
46
|
-
|
|
47
|
-
declare const boundingBoxToPolygon: (box: MercatorBoundingBox) => Polygon;
|
|
48
|
-
|
|
49
|
-
declare const d2r: number;
|
|
50
|
-
declare const r2d: number;
|
|
51
|
-
//# sourceMappingURL=constants.d.ts.map
|
|
52
|
-
|
|
53
|
-
declare const tileFromPoint: (point: MercatorLngLat, z: number) => number[];
|
|
54
|
-
//# sourceMappingURL=point.d.ts.map
|
|
55
|
-
|
|
56
|
-
declare const tileFromQuadkey: (quadkey: string) => number[];
|
|
57
|
-
//# sourceMappingURL=quadkey.d.ts.map
|
|
58
|
-
|
|
59
|
-
declare const tileToBoundingBox: (tile: MercatorTile) => MercatorBoundingBox;
|
|
60
|
-
//# sourceMappingURL=boundingbox.d.ts.map
|
|
61
|
-
|
|
62
|
-
declare const tileToChildren: (tile: MercatorTile) => number[][];
|
|
63
|
-
//# sourceMappingURL=children.d.ts.map
|
|
64
|
-
|
|
65
|
-
declare const tileToGeoJson: (tile: MercatorTile) => Polygon;
|
|
66
|
-
//# sourceMappingURL=geoJson.d.ts.map
|
|
67
|
-
|
|
68
|
-
declare const tileToParent: (tile: MercatorTile) => MercatorTile;
|
|
69
|
-
//# sourceMappingURL=parent.d.ts.map
|
|
70
|
-
|
|
71
|
-
declare const tileToPoint: (tile: MercatorTile) => MercatorLngLat;
|
|
72
|
-
//# sourceMappingURL=point.d.ts.map
|
|
73
|
-
|
|
74
|
-
declare const tileToQuadkey: (tile: MercatorTile) => string;
|
|
75
|
-
//# sourceMappingURL=quadkey.d.ts.map
|
|
76
|
-
|
|
77
|
-
declare const tileToSiblings: (tile: MercatorTile) => MercatorTile[];
|
|
78
|
-
//# sourceMappingURL=siblings.d.ts.map
|
|
79
|
-
|
|
80
|
-
declare const tilesEqual: (tile1: MercatorTile, tile2: MercatorTile) => boolean;
|
|
81
|
-
|
|
82
|
-
declare const tilesFromBoundingBox: (box: MercatorBoundingBox, zoom: number) => MercatorTile[];
|
|
83
|
-
//# sourceMappingURL=boundingbox.d.ts.map
|
|
84
|
-
|
|
85
|
-
declare const hasSiblings: (tiles: MercatorTile[], tile: MercatorTile) => boolean;
|
|
86
|
-
|
|
87
|
-
declare const tilesHasTile: (tiles: MercatorTile[], tile: MercatorTile) => boolean;
|
|
88
|
-
|
|
89
|
-
export { GeoJson, LayerBase, MercatorBoundingBox, MercatorLngLat, boundingBoxToBoundary, boundingBoxToCenter, boundingBoxToPolygon, d2r, hasSiblings, r2d, tileFromPoint, tileFromQuadkey, tileToBoundingBox, tileToChildren, tileToGeoJson, tileToParent, tileToPoint, tileToQuadkey, tileToSiblings, tilesEqual, tilesFromBoundingBox, tilesHasTile };
|
|
90
|
-
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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xylabs/geo",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.17",
|
|
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.
|
|
43
|
-
"@xylabs/tsconfig": "^7.0.0-rc.
|
|
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
|
},
|
package/build/neutral/index.d.ts
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|