@deck.gl/geo-layers 8.8.0-beta.3 → 8.8.0

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 (84) hide show
  1. package/dist/dist.dev.js +1642 -1628
  2. package/dist/es5/geohash-layer/geohash-layer.js.map +1 -1
  3. package/dist/es5/h3-layers/h3-cluster-layer.js +7 -0
  4. package/dist/es5/h3-layers/h3-cluster-layer.js.map +1 -1
  5. package/dist/es5/h3-layers/h3-hexagon-layer.js +3 -0
  6. package/dist/es5/h3-layers/h3-hexagon-layer.js.map +1 -1
  7. package/dist/es5/index.js +8 -0
  8. package/dist/es5/index.js.map +1 -1
  9. package/dist/es5/mvt-layer/mvt-layer.js.map +1 -1
  10. package/dist/es5/quadkey-layer/quadkey-layer.js.map +1 -1
  11. package/dist/es5/s2-layer/s2-layer.js.map +1 -1
  12. package/dist/es5/terrain-layer/terrain-layer.js.map +1 -1
  13. package/dist/es5/tile-3d-layer/tile-3d-layer.js.map +1 -1
  14. package/dist/es5/trips-layer/trips-layer.js.map +1 -1
  15. package/dist/esm/geohash-layer/geohash-layer.js.map +1 -1
  16. package/dist/esm/h3-layers/h3-cluster-layer.js +5 -0
  17. package/dist/esm/h3-layers/h3-cluster-layer.js.map +1 -1
  18. package/dist/esm/h3-layers/h3-hexagon-layer.js +4 -0
  19. package/dist/esm/h3-layers/h3-hexagon-layer.js.map +1 -1
  20. package/dist/esm/index.js +1 -0
  21. package/dist/esm/index.js.map +1 -1
  22. package/dist/esm/mvt-layer/mvt-layer.js.map +1 -1
  23. package/dist/esm/quadkey-layer/quadkey-layer.js.map +1 -1
  24. package/dist/esm/s2-layer/s2-layer.js.map +1 -1
  25. package/dist/esm/terrain-layer/terrain-layer.js.map +1 -1
  26. package/dist/esm/tile-3d-layer/tile-3d-layer.js.map +1 -1
  27. package/dist/esm/trips-layer/trips-layer.js.map +1 -1
  28. package/dist.min.js +1 -1
  29. package/package.json +2 -2
  30. package/src/geohash-layer/geohash-layer.ts +1 -0
  31. package/src/h3-layers/h3-cluster-layer.ts +5 -0
  32. package/src/h3-layers/h3-hexagon-layer.ts +5 -9
  33. package/src/index.ts +2 -0
  34. package/src/mvt-layer/mvt-layer.ts +1 -0
  35. package/src/quadkey-layer/quadkey-layer.ts +1 -0
  36. package/src/s2-layer/s2-layer.ts +1 -0
  37. package/src/terrain-layer/terrain-layer.ts +1 -0
  38. package/src/tile-3d-layer/tile-3d-layer.ts +1 -0
  39. package/src/trips-layer/trips-layer.ts +1 -0
  40. package/typed/geo-cell-layer/GeoCellLayer.js +49 -0
  41. package/typed/geohash-layer/geohash-layer.d.ts +1 -0
  42. package/typed/geohash-layer/geohash-layer.d.ts.map +1 -1
  43. package/typed/great-circle-layer/great-circle-layer.js +29 -0
  44. package/typed/h3-layers/h3-cluster-layer.d.ts +1 -0
  45. package/typed/h3-layers/h3-cluster-layer.d.ts.map +1 -1
  46. package/typed/h3-layers/h3-cluster-layer.js +33 -0
  47. package/typed/h3-layers/h3-hexagon-layer.d.ts +2 -9
  48. package/typed/h3-layers/h3-hexagon-layer.d.ts.map +1 -1
  49. package/typed/h3-layers/h3-hexagon-layer.js +251 -0
  50. package/typed/index.d.ts +2 -0
  51. package/typed/index.d.ts.map +1 -1
  52. package/typed/index.js +33 -0
  53. package/typed/mesh-layer/mesh-layer-fragment.glsl.js +55 -0
  54. package/typed/mesh-layer/mesh-layer-vertex.glsl.js +80 -0
  55. package/typed/mesh-layer/mesh-layer.js +110 -0
  56. package/typed/mvt-layer/coordinate-transform.js +41 -0
  57. package/typed/mvt-layer/find-index-binary.js +96 -0
  58. package/typed/mvt-layer/mvt-layer.d.ts +1 -0
  59. package/typed/mvt-layer/mvt-layer.d.ts.map +1 -1
  60. package/typed/mvt-layer/mvt-layer.js +297 -0
  61. package/typed/quadkey-layer/quadkey-layer.d.ts +1 -0
  62. package/typed/quadkey-layer/quadkey-layer.d.ts.map +1 -1
  63. package/typed/quadkey-layer/quadkey-layer.js +18 -0
  64. package/typed/quadkey-layer/quadkey-utils.js +26 -0
  65. package/typed/s2-layer/s2-geometry.js +123 -0
  66. package/typed/s2-layer/s2-layer.d.ts +1 -0
  67. package/typed/s2-layer/s2-layer.d.ts.map +1 -1
  68. package/typed/s2-layer/s2-layer.js +37 -0
  69. package/typed/s2-layer/s2-utils.js +88 -0
  70. package/typed/terrain-layer/terrain-layer.d.ts +1 -0
  71. package/typed/terrain-layer/terrain-layer.d.ts.map +1 -1
  72. package/typed/terrain-layer/terrain-layer.js +226 -0
  73. package/typed/tile-3d-layer/tile-3d-layer.d.ts +1 -0
  74. package/typed/tile-3d-layer/tile-3d-layer.d.ts.map +1 -1
  75. package/typed/tile-3d-layer/tile-3d-layer.js +294 -0
  76. package/typed/tile-layer/tile-2d-header.js +113 -0
  77. package/typed/tile-layer/tile-2d-traversal.js +181 -0
  78. package/typed/tile-layer/tile-layer.js +192 -0
  79. package/typed/tile-layer/tileset-2d.js +399 -0
  80. package/typed/tile-layer/types.js +1 -0
  81. package/typed/tile-layer/utils.js +197 -0
  82. package/typed/trips-layer/trips-layer.d.ts +1 -0
  83. package/typed/trips-layer/trips-layer.d.ts.map +1 -1
  84. package/typed/trips-layer/trips-layer.js +92 -0
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@deck.gl/geo-layers",
3
3
  "description": "deck.gl layers supporting geospatial use cases and GIS formats",
4
4
  "license": "MIT",
5
- "version": "8.8.0-beta.3",
5
+ "version": "8.8.0",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
@@ -54,5 +54,5 @@
54
54
  "@loaders.gl/core": "^3.0.0",
55
55
  "@luma.gl/core": "^8.0.0"
56
56
  },
57
- "gitHead": "bb459e1b4a4e3674ee9832d775d39211541d17b4"
57
+ "gitHead": "4fda19a4ca2f02bcb756eca0f20c6534ab744be3"
58
58
  }
@@ -18,6 +18,7 @@ type GeohashLayerProps<DataT = any> = {
18
18
  getGeohash?: AccessorFunction<DataT, string>;
19
19
  };
20
20
 
21
+ /** Render filled and/or stroked polygons based on the [Geohash](https://en.wikipedia.org/wiki/Geohash) geospatial indexing system. */
21
22
  export default class GeohashLayer<DataT = any, ExtraProps = {}> extends GeoCellLayer<
22
23
  DataT,
23
24
  Required<GeohashLayerProps> & ExtraProps
@@ -1,6 +1,7 @@
1
1
  import {h3SetToMultiPolygon, H3IndexInput} from 'h3-js';
2
2
 
3
3
  import {AccessorFunction, createIterable, UpdateParameters, DefaultProps} from '@deck.gl/core';
4
+ import {H3HexagonLayer} from '@deck.gl/geo-layers';
4
5
  import GeoCellLayer, {GeoCellLayerProps} from '../geo-cell-layer/GeoCellLayer';
5
6
 
6
7
  const defaultProps: DefaultProps<H3ClusterLayerProps> = {
@@ -28,6 +29,10 @@ export default class H3ClusterLayer<DataT = any, ExtraProps = {}> extends GeoCel
28
29
  static layerName = 'H3ClusterLayer';
29
30
  static defaultProps = defaultProps;
30
31
 
32
+ initializeState(): void {
33
+ H3HexagonLayer._checkH3Lib();
34
+ }
35
+
31
36
  updateState({props, changeFlags}: UpdateParameters<this>): void {
32
37
  if (
33
38
  changeFlags.dataChanged ||
@@ -143,15 +143,7 @@ type _H3HexagonLayerProps<DataT> = {
143
143
  };
144
144
 
145
145
  /**
146
- * A subclass of HexagonLayer that uses H3 hexagonIds in data objects
147
- * rather than centroid lat/longs. The shape of each hexagon is determined
148
- * based on a single "center" hexagon, which can be selected by passing in
149
- * a center lat/lon pair. If not provided, the map center will be used.
150
- *
151
- * Also sets the `hexagonId` field in the onHover/onClick callback's info
152
- * objects. Since this is calculated using math, hexagonId will be present
153
- * even when no corresponding hexagon is in the data set. You can check
154
- * index !== -1 to see if picking matches an actual object.
146
+ * Render hexagons from the [H3](https://h3geo.org/) geospatial indexing system.
155
147
  */
156
148
  export default class H3HexagonLayer<DataT = any, ExtraPropsT = {}> extends CompositeLayer<
157
149
  ExtraPropsT & Required<_H3HexagonLayerProps<DataT> & Required<PolygonLayerProps<DataT>>>
@@ -159,7 +151,11 @@ export default class H3HexagonLayer<DataT = any, ExtraPropsT = {}> extends Compo
159
151
  static defaultProps = defaultProps;
160
152
  static layerName = 'H3HexagonLayer';
161
153
 
154
+ // See `main/bundle.ts`
155
+ static _checkH3Lib = () => {};
156
+
162
157
  initializeState() {
158
+ H3HexagonLayer._checkH3Lib();
163
159
  this.state = {
164
160
  edgeLengthKM: 0,
165
161
  resolution: -1
package/src/index.ts CHANGED
@@ -31,6 +31,7 @@ export {default as TerrainLayer} from './terrain-layer/terrain-layer';
31
31
  export {default as MVTLayer} from './mvt-layer/mvt-layer';
32
32
  export {default as GeohashLayer} from './geohash-layer/geohash-layer';
33
33
 
34
+ export {default as _GeoCellLayer} from './geo-cell-layer/GeoCellLayer';
34
35
  export {getURLFromTemplate as _getURLFromTemplate} from './tile-layer/utils';
35
36
  export {default as _Tileset2D} from './tile-layer/tileset-2d';
36
37
  export {default as _Tile2DHeader} from './tile-layer/tile-2d-header';
@@ -47,3 +48,4 @@ export type {TileLoadProps as _TileLoadProps} from './tile-layer/types';
47
48
  export type {TerrainLayerProps} from './terrain-layer/terrain-layer';
48
49
  export type {Tile3DLayerProps} from './tile-3d-layer/tile-3d-layer';
49
50
  export type {MVTLayerProps} from './mvt-layer/mvt-layer';
51
+ export type {GeoCellLayerProps as _GeoCellLayerProps} from './geo-cell-layer/GeoCellLayer';
@@ -85,6 +85,7 @@ export type _MVTLayerProps = {
85
85
 
86
86
  type ContentWGS84Cache = {_contentWGS84?: Feature[]};
87
87
 
88
+ /** Render data formatted as [Mapbox Vector Tiles](https://docs.mapbox.com/vector-tiles/specification/). */
88
89
  export default class MVTLayer<DataT extends Feature = Feature, ExtraProps = {}> extends TileLayer<
89
90
  ParsedMvtTile,
90
91
  Required<_MVTLayerProps> & ExtraProps
@@ -19,6 +19,7 @@ type _QuadkeyLayerProps<DataT> = {
19
19
  getQuadkey?: AccessorFunction<DataT, string>;
20
20
  };
21
21
 
22
+ /** Render filled and/or stroked polygons based on the [Quadkey](https://towardsdatascience.com/geospatial-indexing-with-quadkeys-d933dff01496) geospatial indexing system. */
22
23
  export default class QuadkeyLayer<DataT = any, ExtraProps = {}> extends GeoCellLayer<
23
24
  DataT,
24
25
  Required<_QuadkeyLayerProps<DataT>> & ExtraProps
@@ -39,6 +39,7 @@ type _S2LayerProps<DataT> = {
39
39
  getS2Token?: AccessorFunction<DataT, string>;
40
40
  };
41
41
 
42
+ /** Render filled and/or stroked polygons based on the [S2](http://s2geometry.io/) geospatial indexing system. */
42
43
  export default class S2Layer<DataT = any, ExtraProps = {}> extends GeoCellLayer<
43
44
  DataT,
44
45
  Required<_S2LayerProps<DataT>> & ExtraProps
@@ -125,6 +125,7 @@ type _TerrainLayerProps = {
125
125
  material?: Material;
126
126
  };
127
127
 
128
+ /** Render mesh surfaces from height map images. */
128
129
  export default class TerrainLayer<ExtraPropsT = {}> extends CompositeLayer<
129
130
  ExtraPropsT & Required<_TerrainLayerProps & Required<TileLayerProps<MeshAndTexture>>>
130
131
  > {
@@ -75,6 +75,7 @@ type _Tile3DLayerProps<DataT> = {
75
75
  _getMeshColor?: (tile: Tile3D) => Color;
76
76
  };
77
77
 
78
+ /** Render 3d tiles data formatted according to the [3D Tiles Specification](https://www.opengeospatial.org/standards/3DTiles) and [`ESRI I3S`](https://github.com/Esri/i3s-spec) */
78
79
  export default class Tile3DLayer<DataT = any, ExtraPropsT = {}> extends CompositeLayer<
79
80
  ExtraPropsT & Required<_Tile3DLayerProps<DataT>>
80
81
  > {
@@ -55,6 +55,7 @@ type _TripsLayerProps<DataT = any> = {
55
55
  getTimestamps?: AccessorFunction<DataT, NumericArray>;
56
56
  };
57
57
 
58
+ /** Render animated paths that represent vehicle trips. */
58
59
  export default class TripsLayer<DataT = any, ExtraProps = {}> extends PathLayer<
59
60
  DataT,
60
61
  Required<_TripsLayerProps> & ExtraProps
@@ -0,0 +1,49 @@
1
+ import { CompositeLayer } from '@deck.gl/core';
2
+ import { PolygonLayer } from '@deck.gl/layers';
3
+ const defaultProps = {
4
+ ...PolygonLayer.defaultProps
5
+ };
6
+ export default class GeoCellLayer extends CompositeLayer {
7
+ /** Implement to generate props to create geometry. */
8
+ indexToBounds() {
9
+ return null;
10
+ }
11
+ renderLayers() {
12
+ // Rendering props underlying layer
13
+ const { elevationScale, extruded, wireframe, filled, stroked, lineWidthUnits, lineWidthScale, lineWidthMinPixels, lineWidthMaxPixels, lineJointRounded, lineMiterLimit, lineDashJustified, getElevation, getFillColor, getLineColor, getLineWidth } = this.props;
14
+ // Accessor props for underlying layers
15
+ const { updateTriggers, material, transitions } = this.props;
16
+ // Filled Polygon Layer
17
+ const CellLayer = this.getSubLayerClass('cell', PolygonLayer);
18
+ return new CellLayer({
19
+ filled,
20
+ wireframe,
21
+ extruded,
22
+ elevationScale,
23
+ stroked,
24
+ lineWidthUnits,
25
+ lineWidthScale,
26
+ lineWidthMinPixels,
27
+ lineWidthMaxPixels,
28
+ lineJointRounded,
29
+ lineMiterLimit,
30
+ lineDashJustified,
31
+ material,
32
+ transitions,
33
+ getElevation,
34
+ getFillColor,
35
+ getLineColor,
36
+ getLineWidth
37
+ }, this.getSubLayerProps({
38
+ id: 'cell',
39
+ updateTriggers: updateTriggers && {
40
+ getElevation: updateTriggers.getElevation,
41
+ getFillColor: updateTriggers.getFillColor,
42
+ getLineColor: updateTriggers.getLineColor,
43
+ getLineWidth: updateTriggers.getLineWidth
44
+ }
45
+ }), this.indexToBounds());
46
+ }
47
+ }
48
+ GeoCellLayer.layerName = 'GeoCellLayer';
49
+ GeoCellLayer.defaultProps = defaultProps;
@@ -11,6 +11,7 @@ declare type GeohashLayerProps<DataT = any> = {
11
11
  */
12
12
  getGeohash?: AccessorFunction<DataT, string>;
13
13
  };
14
+ /** Render filled and/or stroked polygons based on the [Geohash](https://en.wikipedia.org/wiki/Geohash) geospatial indexing system. */
14
15
  export default class GeohashLayer<DataT = any, ExtraProps = {}> extends GeoCellLayer<DataT, Required<GeohashLayerProps> & ExtraProps> {
15
16
  static layerName: string;
16
17
  static defaultProps: any;
@@ -1 +1 @@
1
- {"version":3,"file":"geohash-layer.d.ts","sourceRoot":"","sources":["../../src/geohash-layer/geohash-layer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAC/C,OAAO,YAAY,MAAM,gCAAgC,CAAC;AAO1D;;GAEG;AACH,aAAK,iBAAiB,CAAC,KAAK,GAAG,GAAG,IAAI;IACpC;;;;OAIG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;CAC9C,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,YAAY,CAAC,KAAK,GAAG,GAAG,EAAE,UAAU,GAAG,EAAE,CAAE,SAAQ,YAAY,CAClF,KAAK,EACL,QAAQ,CAAC,iBAAiB,CAAC,GAAG,UAAU,CACzC;IACC,MAAM,CAAC,SAAS,SAAkB;IAClC,MAAM,CAAC,YAAY,EAAE,GAAG,CAAgB;IAExC,aAAa,IAAI,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,GAAG,IAAI;CAUvD"}
1
+ {"version":3,"file":"geohash-layer.d.ts","sourceRoot":"","sources":["../../src/geohash-layer/geohash-layer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAC/C,OAAO,YAAY,MAAM,gCAAgC,CAAC;AAO1D;;GAEG;AACH,aAAK,iBAAiB,CAAC,KAAK,GAAG,GAAG,IAAI;IACpC;;;;OAIG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;CAC9C,CAAC;AAEF,sIAAsI;AACtI,MAAM,CAAC,OAAO,OAAO,YAAY,CAAC,KAAK,GAAG,GAAG,EAAE,UAAU,GAAG,EAAE,CAAE,SAAQ,YAAY,CAClF,KAAK,EACL,QAAQ,CAAC,iBAAiB,CAAC,GAAG,UAAU,CACzC;IACC,MAAM,CAAC,SAAS,SAAkB;IAClC,MAAM,CAAC,YAAY,EAAE,GAAG,CAAgB;IAExC,aAAa,IAAI,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,GAAG,IAAI;CAUvD"}
@@ -0,0 +1,29 @@
1
+ // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
2
+ //
3
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ // of this software and associated documentation files (the "Software"), to deal
5
+ // in the Software without restriction, including without limitation the rights
6
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ // copies of the Software, and to permit persons to whom the Software is
8
+ // furnished to do so, subject to the following conditions:
9
+ //
10
+ // The above copyright notice and this permission notice shall be included in
11
+ // all copies or substantial portions of the Software.
12
+ //
13
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ // THE SOFTWARE.
20
+ import { ArcLayer } from '@deck.gl/layers';
21
+ // This layer has been merged into the core ArcLayer
22
+ // Keeping for backward-compatibility
23
+ export default class GreatCircleLayer extends ArcLayer {
24
+ }
25
+ GreatCircleLayer.layerName = 'GreatCircleLayer';
26
+ GreatCircleLayer.defaultProps = {
27
+ getHeight: { type: 'accessor', value: 0 },
28
+ greatCircle: true
29
+ };
@@ -15,6 +15,7 @@ declare type _H3ClusterLayerProps<DataT> = {
15
15
  export default class H3ClusterLayer<DataT = any, ExtraProps = {}> extends GeoCellLayer<DataT, Required<_H3ClusterLayerProps<DataT>> & ExtraProps> {
16
16
  static layerName: string;
17
17
  static defaultProps: DefaultProps<H3ClusterLayerProps<any>>;
18
+ initializeState(): void;
18
19
  updateState({ props, changeFlags }: UpdateParameters<this>): void;
19
20
  indexToBounds(): Partial<GeoCellLayer['props']>;
20
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"h3-cluster-layer.d.ts","sourceRoot":"","sources":["../../src/h3-layers/h3-cluster-layer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,YAAY,EAAC,MAAM,OAAO,CAAC;AAExD,OAAO,EAAC,gBAAgB,EAAkB,gBAAgB,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AAC/F,OAAO,YAAY,EAAE,EAAC,iBAAiB,EAAC,MAAM,gCAAgC,CAAC;AAM/E,kDAAkD;AAClD,oBAAY,mBAAmB,CAAC,KAAK,GAAG,GAAG,IAAI,oBAAoB,CAAC,KAAK,CAAC,GACxE,iBAAiB,CAAC,KAAK,CAAC,CAAC;AAE3B,0CAA0C;AAC1C,aAAK,oBAAoB,CAAC,KAAK,IAAI;IACjC;;;;OAIG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;CACvD,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,cAAc,CAAC,KAAK,GAAG,GAAG,EAAE,UAAU,GAAG,EAAE,CAAE,SAAQ,YAAY,CACpF,KAAK,EACL,QAAQ,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,GAAG,UAAU,CACnD;IACC,MAAM,CAAC,SAAS,SAAoB;IACpC,MAAM,CAAC,YAAY,yCAAgB;IAEnC,WAAW,CAAC,EAAC,KAAK,EAAE,WAAW,EAAC,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,IAAI;IAuB/D,aAAa,IAAI,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;CAMhD"}
1
+ {"version":3,"file":"h3-cluster-layer.d.ts","sourceRoot":"","sources":["../../src/h3-layers/h3-cluster-layer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,YAAY,EAAC,MAAM,OAAO,CAAC;AAExD,OAAO,EAAC,gBAAgB,EAAkB,gBAAgB,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AAE/F,OAAO,YAAY,EAAE,EAAC,iBAAiB,EAAC,MAAM,gCAAgC,CAAC;AAM/E,kDAAkD;AAClD,oBAAY,mBAAmB,CAAC,KAAK,GAAG,GAAG,IAAI,oBAAoB,CAAC,KAAK,CAAC,GACxE,iBAAiB,CAAC,KAAK,CAAC,CAAC;AAE3B,0CAA0C;AAC1C,aAAK,oBAAoB,CAAC,KAAK,IAAI;IACjC;;;;OAIG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC,KAAK,EAAE,YAAY,EAAE,CAAC,CAAC;CACvD,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,cAAc,CAAC,KAAK,GAAG,GAAG,EAAE,UAAU,GAAG,EAAE,CAAE,SAAQ,YAAY,CACpF,KAAK,EACL,QAAQ,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,GAAG,UAAU,CACnD;IACC,MAAM,CAAC,SAAS,SAAoB;IACpC,MAAM,CAAC,YAAY,yCAAgB;IAEnC,eAAe,IAAI,IAAI;IAIvB,WAAW,CAAC,EAAC,KAAK,EAAE,WAAW,EAAC,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,IAAI;IAuB/D,aAAa,IAAI,OAAO,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;CAMhD"}
@@ -0,0 +1,33 @@
1
+ import { h3SetToMultiPolygon } from 'h3-js';
2
+ import { createIterable } from '@deck.gl/core';
3
+ import GeoCellLayer from '../geo-cell-layer/GeoCellLayer';
4
+ const defaultProps = {
5
+ getHexagons: { type: 'accessor', value: d => d.hexagons }
6
+ };
7
+ export default class H3ClusterLayer extends GeoCellLayer {
8
+ updateState({ props, oldProps, changeFlags }) {
9
+ if (changeFlags.dataChanged ||
10
+ (changeFlags.updateTriggers && changeFlags.updateTriggers.getHexagons)) {
11
+ const { data, getHexagons } = props;
12
+ const polygons = [];
13
+ const { iterable, objectInfo } = createIterable(data);
14
+ for (const object of iterable) {
15
+ objectInfo.index++;
16
+ const hexagons = getHexagons(object, objectInfo);
17
+ const multiPolygon = h3SetToMultiPolygon(hexagons, true);
18
+ for (const polygon of multiPolygon) {
19
+ polygons.push(this.getSubLayerRow({ polygon }, object, objectInfo.index));
20
+ }
21
+ }
22
+ this.setState({ polygons });
23
+ }
24
+ }
25
+ indexToBounds() {
26
+ return {
27
+ data: this.state.polygons,
28
+ getPolygon: d => d.polygon
29
+ };
30
+ }
31
+ }
32
+ H3ClusterLayer.defaultProps = defaultProps;
33
+ H3ClusterLayer.layerName = 'H3ClusterLayer';
@@ -34,19 +34,12 @@ declare type _H3HexagonLayerProps<DataT> = {
34
34
  extruded?: boolean;
35
35
  };
36
36
  /**
37
- * A subclass of HexagonLayer that uses H3 hexagonIds in data objects
38
- * rather than centroid lat/longs. The shape of each hexagon is determined
39
- * based on a single "center" hexagon, which can be selected by passing in
40
- * a center lat/lon pair. If not provided, the map center will be used.
41
- *
42
- * Also sets the `hexagonId` field in the onHover/onClick callback's info
43
- * objects. Since this is calculated using math, hexagonId will be present
44
- * even when no corresponding hexagon is in the data set. You can check
45
- * index !== -1 to see if picking matches an actual object.
37
+ * Render hexagons from the [H3](https://h3geo.org/) geospatial indexing system.
46
38
  */
47
39
  export default class H3HexagonLayer<DataT = any, ExtraPropsT = {}> extends CompositeLayer<ExtraPropsT & Required<_H3HexagonLayerProps<DataT> & Required<PolygonLayerProps<DataT>>>> {
48
40
  static defaultProps: DefaultProps<H3HexagonLayerProps<any>>;
49
41
  static layerName: string;
42
+ static _checkH3Lib: () => void;
50
43
  initializeState(): void;
51
44
  state: {
52
45
  centerHex?: H3Index;
@@ -1 +1 @@
1
- {"version":3,"file":"h3-hexagon-layer.d.ts","sourceRoot":"","sources":["../../src/h3-layers/h3-hexagon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iB,CAAC,EAAC,WAAW,EAAC,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,OAAO;IAMjE,WAAW,CAAC,EAAC,KAAK,EAAE,WAAW,EAAC,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,IAAI;IAa/D,OAAO,CAAC,qBAAqB;IAgC7B,OAAO,CAAC,uBAAuB;IAe/B,OAAO,CAAC,eAAe;IAuCvB,YAAY,IAAI,KAAK,GAAG,IAAI,GAAG,UAAU;IAIzC,OAAO,CAAC,gBAAgB;IAsDxB,OAAO,CAAC,mBAAmB;IA0B3B,OAAO,CAAC,kBAAkB;CAuB3B"}
@@ -0,0 +1,251 @@
1
+ import { h3ToGeoBoundary, h3GetResolution, h3ToGeo, geoToH3, h3IsPentagon, h3Distance, edgeLength, UNITS } from 'h3-js';
2
+ import { lerp } from '@math.gl/core';
3
+ import { CompositeLayer, createIterable } from '@deck.gl/core';
4
+ import { ColumnLayer, PolygonLayer } from '@deck.gl/layers';
5
+ // There is a cost to updating the instanced geometries when using highPrecision: false
6
+ // This constant defines the distance between two hexagons that leads to "significant
7
+ // distortion." Smaller value makes the column layer more sensitive to viewport change.
8
+ const UPDATE_THRESHOLD_KM = 10;
9
+ // normalize longitudes w.r.t center (refLng), when not provided first vertex
10
+ export function normalizeLongitudes(vertices, refLng) {
11
+ refLng = refLng === undefined ? vertices[0][0] : refLng;
12
+ for (const pt of vertices) {
13
+ const deltaLng = pt[0] - refLng;
14
+ if (deltaLng > 180) {
15
+ pt[0] -= 360;
16
+ }
17
+ else if (deltaLng < -180) {
18
+ pt[0] += 360;
19
+ }
20
+ }
21
+ }
22
+ // scale polygon vertices w.r.t center (hexId)
23
+ export function scalePolygon(hexId, vertices, factor) {
24
+ const [lat, lng] = h3ToGeo(hexId);
25
+ const actualCount = vertices.length;
26
+ // normalize with respect to center
27
+ normalizeLongitudes(vertices, lng);
28
+ // `h3ToGeoBoundary` returns same array object for first and last vertex (closed polygon),
29
+ // if so skip scaling the last vertex
30
+ const vertexCount = vertices[0] === vertices[actualCount - 1] ? actualCount - 1 : actualCount;
31
+ for (let i = 0; i < vertexCount; i++) {
32
+ vertices[i][0] = lerp(lng, vertices[i][0], factor);
33
+ vertices[i][1] = lerp(lat, vertices[i][1], factor);
34
+ }
35
+ }
36
+ function getHexagonCentroid(getHexagon, object, objectInfo) {
37
+ const hexagonId = getHexagon(object, objectInfo);
38
+ const [lat, lng] = h3ToGeo(hexagonId);
39
+ return [lng, lat];
40
+ }
41
+ function h3ToPolygon(hexId, coverage = 1, flatten) {
42
+ const vertices = h3ToGeoBoundary(hexId, true);
43
+ if (coverage !== 1) {
44
+ // scale and normalize vertices w.r.t to center
45
+ scalePolygon(hexId, vertices, coverage);
46
+ }
47
+ else {
48
+ // normalize w.r.t to start vertex
49
+ normalizeLongitudes(vertices);
50
+ }
51
+ if (flatten) {
52
+ const positions = new Float64Array(vertices.length * 2);
53
+ let i = 0;
54
+ for (const pt of vertices) {
55
+ positions[i++] = pt[0];
56
+ positions[i++] = pt[1];
57
+ }
58
+ return positions;
59
+ }
60
+ return vertices;
61
+ }
62
+ function mergeTriggers(getHexagon, coverage) {
63
+ let trigger;
64
+ if (getHexagon === undefined || getHexagon === null) {
65
+ trigger = coverage;
66
+ }
67
+ else if (typeof getHexagon === 'object') {
68
+ trigger = { ...getHexagon, coverage };
69
+ }
70
+ else {
71
+ trigger = { getHexagon, coverage };
72
+ }
73
+ return trigger;
74
+ }
75
+ const defaultProps = {
76
+ ...PolygonLayer.defaultProps,
77
+ highPrecision: 'auto',
78
+ coverage: { type: 'number', min: 0, max: 1, value: 1 },
79
+ centerHexagon: null,
80
+ getHexagon: { type: 'accessor', value: x => x.hexagon },
81
+ extruded: true
82
+ };
83
+ // not supported
84
+ delete defaultProps.getLineDashArray;
85
+ /**
86
+ * A subclass of HexagonLayer that uses H3 hexagonIds in data objects
87
+ * rather than centroid lat/longs. The shape of each hexagon is determined
88
+ * based on a single "center" hexagon, which can be selected by passing in
89
+ * a center lat/lon pair. If not provided, the map center will be used.
90
+ *
91
+ * Also sets the `hexagonId` field in the onHover/onClick callback's info
92
+ * objects. Since this is calculated using math, hexagonId will be present
93
+ * even when no corresponding hexagon is in the data set. You can check
94
+ * index !== -1 to see if picking matches an actual object.
95
+ */
96
+ export default class H3HexagonLayer extends CompositeLayer {
97
+ shouldUpdateState({ changeFlags }) {
98
+ return this._shouldUseHighPrecision()
99
+ ? changeFlags.propsOrDataChanged
100
+ : changeFlags.somethingChanged;
101
+ }
102
+ updateState({ props, oldProps, changeFlags }) {
103
+ if (props.highPrecision !== true &&
104
+ (changeFlags.dataChanged ||
105
+ (changeFlags.updateTriggers && changeFlags.updateTriggers.getHexagon))) {
106
+ const dataProps = this._calculateH3DataProps(props);
107
+ this.setState(dataProps);
108
+ }
109
+ this._updateVertices(this.context.viewport);
110
+ }
111
+ _calculateH3DataProps(props) {
112
+ let resolution = -1;
113
+ let hasPentagon = false;
114
+ let hasMultipleRes = false;
115
+ const { iterable, objectInfo } = createIterable(props.data);
116
+ for (const object of iterable) {
117
+ objectInfo.index++;
118
+ const hexId = props.getHexagon(object, objectInfo);
119
+ // Take the resolution of the first hex
120
+ const hexResolution = h3GetResolution(hexId);
121
+ if (resolution < 0) {
122
+ resolution = hexResolution;
123
+ if (!props.highPrecision)
124
+ break;
125
+ }
126
+ else if (resolution !== hexResolution) {
127
+ hasMultipleRes = true;
128
+ break;
129
+ }
130
+ if (h3IsPentagon(hexId)) {
131
+ hasPentagon = true;
132
+ break;
133
+ }
134
+ }
135
+ return {
136
+ resolution,
137
+ edgeLengthKM: resolution >= 0 ? edgeLength(resolution, UNITS.km) : 0,
138
+ hasMultipleRes,
139
+ hasPentagon
140
+ };
141
+ }
142
+ _shouldUseHighPrecision() {
143
+ if (this.props.highPrecision === 'auto') {
144
+ const { resolution, hasPentagon, hasMultipleRes } = this.state;
145
+ const { viewport } = this.context;
146
+ return (viewport.resolution || hasMultipleRes || hasPentagon || (resolution >= 0 && resolution <= 5));
147
+ }
148
+ return this.props.highPrecision;
149
+ }
150
+ _updateVertices(viewport) {
151
+ if (this._shouldUseHighPrecision()) {
152
+ return;
153
+ }
154
+ const { resolution, edgeLengthKM, centerHex } = this.state;
155
+ if (resolution < 0) {
156
+ return;
157
+ }
158
+ const hex = this.props.centerHexagon || geoToH3(viewport.latitude, viewport.longitude, resolution);
159
+ if (centerHex === hex) {
160
+ return;
161
+ }
162
+ if (centerHex) {
163
+ const distance = h3Distance(centerHex, hex);
164
+ // h3Distance returns a negative number if the distance could not be computed
165
+ // due to the two indexes very far apart or on opposite sides of a pentagon.
166
+ if (distance >= 0 && distance * edgeLengthKM < UPDATE_THRESHOLD_KM) {
167
+ return;
168
+ }
169
+ }
170
+ const { unitsPerMeter } = viewport.distanceScales;
171
+ let vertices = h3ToPolygon(hex);
172
+ const [centerLat, centerLng] = h3ToGeo(hex);
173
+ const [centerX, centerY] = viewport.projectFlat([centerLng, centerLat]);
174
+ vertices = vertices.map(p => {
175
+ const worldPosition = viewport.projectFlat(p);
176
+ return [
177
+ (worldPosition[0] - centerX) / unitsPerMeter[0],
178
+ (worldPosition[1] - centerY) / unitsPerMeter[1]
179
+ ];
180
+ });
181
+ this.setState({ centerHex: hex, vertices });
182
+ }
183
+ renderLayers() {
184
+ return this._shouldUseHighPrecision() ? this._renderPolygonLayer() : this._renderColumnLayer();
185
+ }
186
+ _getForwardProps() {
187
+ const { elevationScale, material, coverage, extruded, wireframe, stroked, filled, lineWidthUnits, lineWidthScale, lineWidthMinPixels, lineWidthMaxPixels, getFillColor, getElevation, getLineColor, getLineWidth, transitions, updateTriggers } = this.props;
188
+ return {
189
+ elevationScale,
190
+ extruded,
191
+ coverage,
192
+ wireframe,
193
+ stroked,
194
+ filled,
195
+ lineWidthUnits,
196
+ lineWidthScale,
197
+ lineWidthMinPixels,
198
+ lineWidthMaxPixels,
199
+ material,
200
+ getElevation,
201
+ getFillColor,
202
+ getLineColor,
203
+ getLineWidth,
204
+ transitions,
205
+ updateTriggers: {
206
+ getFillColor: updateTriggers.getFillColor,
207
+ getElevation: updateTriggers.getElevation,
208
+ getLineColor: updateTriggers.getLineColor,
209
+ getLineWidth: updateTriggers.getLineWidth
210
+ }
211
+ };
212
+ }
213
+ _renderPolygonLayer() {
214
+ const { data, getHexagon, updateTriggers, coverage } = this.props;
215
+ const SubLayerClass = this.getSubLayerClass('hexagon-cell-hifi', PolygonLayer);
216
+ const forwardProps = this._getForwardProps();
217
+ forwardProps.updateTriggers.getPolygon = mergeTriggers(updateTriggers.getHexagon, coverage);
218
+ return new SubLayerClass(forwardProps, this.getSubLayerProps({
219
+ id: 'hexagon-cell-hifi',
220
+ updateTriggers: forwardProps.updateTriggers
221
+ }), {
222
+ data,
223
+ _normalize: false,
224
+ _windingOrder: 'CCW',
225
+ positionFormat: 'XY',
226
+ getPolygon: (object, objectInfo) => {
227
+ const hexagonId = getHexagon(object, objectInfo);
228
+ return h3ToPolygon(hexagonId, coverage, true);
229
+ }
230
+ });
231
+ }
232
+ _renderColumnLayer() {
233
+ const { data, getHexagon, updateTriggers } = this.props;
234
+ const SubLayerClass = this.getSubLayerClass('hexagon-cell', ColumnLayer);
235
+ const forwardProps = this._getForwardProps();
236
+ forwardProps.updateTriggers.getPosition = updateTriggers.getHexagon;
237
+ return new SubLayerClass(forwardProps, this.getSubLayerProps({
238
+ id: 'hexagon-cell',
239
+ flatShading: true,
240
+ updateTriggers: forwardProps.updateTriggers
241
+ }), {
242
+ data,
243
+ diskResolution: 6,
244
+ radius: 1,
245
+ vertices: this.state.vertices,
246
+ getPosition: getHexagonCentroid.bind(null, getHexagon)
247
+ });
248
+ }
249
+ }
250
+ H3HexagonLayer.defaultProps = defaultProps;
251
+ H3HexagonLayer.layerName = 'H3HexagonLayer';
package/typed/index.d.ts CHANGED
@@ -9,6 +9,7 @@ export { default as Tile3DLayer } from './tile-3d-layer/tile-3d-layer';
9
9
  export { default as TerrainLayer } from './terrain-layer/terrain-layer';
10
10
  export { default as MVTLayer } from './mvt-layer/mvt-layer';
11
11
  export { default as GeohashLayer } from './geohash-layer/geohash-layer';
12
+ export { default as _GeoCellLayer } from './geo-cell-layer/GeoCellLayer';
12
13
  export { getURLFromTemplate as _getURLFromTemplate } from './tile-layer/utils';
13
14
  export { default as _Tileset2D } from './tile-layer/tileset-2d';
14
15
  export { default as _Tile2DHeader } from './tile-layer/tile-2d-header';
@@ -23,4 +24,5 @@ export type { TileLoadProps as _TileLoadProps } from './tile-layer/types';
23
24
  export type { TerrainLayerProps } from './terrain-layer/terrain-layer';
24
25
  export type { Tile3DLayerProps } from './tile-3d-layer/tile-3d-layer';
25
26
  export type { MVTLayerProps } from './mvt-layer/mvt-layer';
27
+ export type { GeoCellLayerProps as _GeoCellLayerProps } from './geo-cell-layer/GeoCellLayer';
26
28
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAC,OAAO,IAAI,OAAO,EAAC,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAC,OAAO,IAAI,cAAc,EAAC,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAC,OAAO,IAAI,WAAW,EAAC,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAC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,kBAAkB,EAAC,MAAM,+BAA+B,CAAC"}
package/typed/index.js ADDED
@@ -0,0 +1,33 @@
1
+ // Copyright (c) 2015 - 2017 Uber Technologies, Inc.
2
+ //
3
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ // of this software and associated documentation files (the "Software"), to deal
5
+ // in the Software without restriction, including without limitation the rights
6
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ // copies of the Software, and to permit persons to whom the Software is
8
+ // furnished to do so, subject to the following conditions:
9
+ //
10
+ // The above copyright notice and this permission notice shall be included in
11
+ // all copies or substantial portions of the Software.
12
+ //
13
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ // THE SOFTWARE.
20
+ /* eslint-disable max-len */
21
+ export { default as GreatCircleLayer } from './great-circle-layer/great-circle-layer';
22
+ export { default as S2Layer } from './s2-layer/s2-layer';
23
+ export { default as QuadkeyLayer } from './quadkey-layer/quadkey-layer';
24
+ export { default as TileLayer } from './tile-layer/tile-layer';
25
+ export { default as TripsLayer } from './trips-layer/trips-layer';
26
+ export { default as H3ClusterLayer } from './h3-layers/h3-cluster-layer';
27
+ export { default as H3HexagonLayer } from './h3-layers/h3-hexagon-layer';
28
+ export { default as Tile3DLayer } from './tile-3d-layer/tile-3d-layer';
29
+ export { default as TerrainLayer } from './terrain-layer/terrain-layer';
30
+ export { default as MVTLayer } from './mvt-layer/mvt-layer';
31
+ export { getURLFromTemplate as _getURLFromTemplate } from './tile-layer/utils';
32
+ export { default as _Tileset2D } from './tile-layer/tileset-2d';
33
+ export { default as _Tile2DHeader } from './tile-layer/tile-2d-header';