UNPKG

kepler.gl

Version:

kepler.gl is a webgl based application to visualize large scale location data in the browser

223 lines (213 loc) 38.5 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); var _typeof = require("@babel/runtime/helpers/typeof"); Object.defineProperty(exports, "__esModule", { value: true }); exports.GeoArrowScatterplotLayer = void 0; var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")); var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")); var _typed = require("@deck.gl/core/typed"); var _typed2 = require("@deck.gl/layers/typed"); var ga = _interopRequireWildcard(require("@geoarrow/geoarrow-js")); var _constants = require("@kepler.gl/constants"); var _utils = require("../utils/utils"); var _picking = require("../utils/picking"); var _validate = require("../utils/validate"); function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; } function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); } function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // SPDX-License-Identifier: MIT // Copyright contributors to the kepler.gl project // deck.gl-community // SPDX-License-Identifier: MIT // Copyright (c) vis.gl contributors /** All properties supported by GeoArrowScatterplotLayer */ /** Properties added by GeoArrowScatterplotLayer */ // Remove data and getPosition from the upstream default props var _ScatterplotLayer$def = _typed2.ScatterplotLayer.defaultProps, _data = _ScatterplotLayer$def.data, _getPosition = _ScatterplotLayer$def.getPosition, _upstreamDefaultProps = (0, _objectWithoutProperties2["default"])(_ScatterplotLayer$def, ["data", "getPosition"]); // Default props added by us var ourDefaultProps = { _validate: true }; // @ts-expect-error var defaultProps = _objectSpread(_objectSpread({}, _upstreamDefaultProps), ourDefaultProps); var GeoArrowScatterplotLayer = exports.GeoArrowScatterplotLayer = /*#__PURE__*/function (_CompositeLayer) { function GeoArrowScatterplotLayer() { (0, _classCallCheck2["default"])(this, GeoArrowScatterplotLayer); return _callSuper(this, GeoArrowScatterplotLayer, arguments); } (0, _inherits2["default"])(GeoArrowScatterplotLayer, _CompositeLayer); return (0, _createClass2["default"])(GeoArrowScatterplotLayer, [{ key: "getPickingInfo", value: function getPickingInfo(params) { return (0, _picking.getPickingInfo)(params, this.props.data); } }, { key: "renderLayers", value: function renderLayers() { var table = this.props.data; if (this.props.getPosition !== undefined) { var geometryColumn = this.props.getPosition; if (geometryColumn !== undefined && ga.vector.isPointVector(geometryColumn)) { return this._renderLayersPoint(geometryColumn); } if (geometryColumn !== undefined && ga.vector.isMultiPointVector(geometryColumn)) { return this._renderLayersMultiPoint(geometryColumn); } throw new Error('getPosition should pass in an arrow Vector of Point or MultiPoint type'); } else { var pointVector = (0, _utils.getGeometryVector)(table, _constants.GEOARROW_EXTENSIONS.POINT); if (pointVector !== null) { return this._renderLayersPoint(pointVector); } var multiPointVector = (0, _utils.getGeometryVector)(table, _constants.GEOARROW_EXTENSIONS.MULTIPOINT); if (multiPointVector !== null) { return this._renderLayersMultiPoint(multiPointVector); } } throw new Error('getPosition not GeoArrow point or multipoint'); } }, { key: "_renderLayersPoint", value: function _renderLayersPoint(geometryColumn) { var table = this.props.data; if (this.props._validate) { (0, _typed.assert)(ga.vector.isPointVector(geometryColumn)); (0, _validate.validateAccessors)(this.props, table); } // Exclude manually-set accessors var _extractAccessorsFrom = (0, _utils.extractAccessorsFromProps)(this.props, ['getPosition']), _extractAccessorsFrom2 = (0, _slicedToArray2["default"])(_extractAccessorsFrom, 2), accessors = _extractAccessorsFrom2[0], otherProps = _extractAccessorsFrom2[1]; var tableOffsets = (0, _picking.computeChunkOffsets)(table.data); var layers = []; for (var recordBatchIdx = 0; recordBatchIdx < table.batches.length; recordBatchIdx++) { var geometryData = geometryColumn.data[recordBatchIdx]; var flatCoordsData = ga.child.getPointChild(geometryData); var flatCoordinateArray = flatCoordsData.values; // @ts-expect-error how to properly retrieve batch offset? var batchOffset = geometryColumn._offsets[recordBatchIdx]; var props = _objectSpread(_objectSpread(_objectSpread({}, ourDefaultProps), otherProps), {}, { // used for picking purposes recordBatchIdx: recordBatchIdx, tableOffsets: tableOffsets, id: "".concat(this.props.id, "-geoarrow-scatterplot-").concat(recordBatchIdx), data: { // @ts-expect-error data: table.batches[recordBatchIdx], length: geometryData.length, attributes: { getPosition: { value: flatCoordinateArray, size: geometryData.type.listSize } } } }); for (var _i = 0, _Object$entries = Object.entries(accessors); _i < _Object$entries.length; _i++) { var _Object$entries$_i = (0, _slicedToArray2["default"])(_Object$entries[_i], 2), propName = _Object$entries$_i[0], propInput = _Object$entries$_i[1]; (0, _utils.assignAccessor)({ props: props, propName: propName, propInput: propInput, chunkIdx: recordBatchIdx, batchOffset: batchOffset }); } var layer = new _typed2.ScatterplotLayer(_objectSpread(_objectSpread({}, this.getSubLayerProps(props)), {}, { // preserve binded accessors, as they are overwriten back by pass-through accessors from extensions getFiltered: props.getFiltered, getFilterValue: props.getFilterValue })); layers.push(layer); } return layers; } }, { key: "_renderLayersMultiPoint", value: function _renderLayersMultiPoint(geometryColumn) { var table = this.props.data; // TODO: validate that if nested, accessor props have the same nesting // structure as the main geometry column. if (this.props._validate) { (0, _typed.assert)(ga.vector.isMultiPointVector(geometryColumn)); (0, _validate.validateAccessors)(this.props, table); } // Exclude manually-set accessors var _extractAccessorsFrom3 = (0, _utils.extractAccessorsFromProps)(this.props, ['getPosition']), _extractAccessorsFrom4 = (0, _slicedToArray2["default"])(_extractAccessorsFrom3, 2), accessors = _extractAccessorsFrom4[0], otherProps = _extractAccessorsFrom4[1]; var tableOffsets = (0, _picking.computeChunkOffsets)(table.data); var layers = []; for (var recordBatchIdx = 0; recordBatchIdx < table.batches.length; recordBatchIdx++) { var multiPointData = geometryColumn.data[recordBatchIdx]; var pointData = ga.child.getMultiPointChild(multiPointData); var geomOffsets = multiPointData.valueOffsets; var flatCoordsData = ga.child.getPointChild(pointData); var flatCoordinateArray = flatCoordsData.values; // @ts-expect-error how to properly retrieve batch offset? var batchOffset = geometryColumn._offsets[recordBatchIdx]; var props = _objectSpread(_objectSpread(_objectSpread({}, ourDefaultProps), otherProps), {}, { // used for picking purposes recordBatchIdx: recordBatchIdx, tableOffsets: tableOffsets, id: "".concat(this.props.id, "-geoarrow-scatterplot-").concat(recordBatchIdx), data: { // @ts-expect-error data: table.batches[recordBatchIdx], // Map from expanded multi-geometry index to original index // Used both in picking and for function callbacks invertedGeomOffsets: (0, _utils.invertOffsets)(geomOffsets), // Note: this needs to be the length one level down. length: pointData.length, attributes: { getPosition: { value: flatCoordinateArray, size: pointData.type.listSize } } } }); for (var _i2 = 0, _Object$entries2 = Object.entries(accessors); _i2 < _Object$entries2.length; _i2++) { var _Object$entries2$_i = (0, _slicedToArray2["default"])(_Object$entries2[_i2], 2), propName = _Object$entries2$_i[0], propInput = _Object$entries2$_i[1]; (0, _utils.assignAccessor)({ props: props, propName: propName, propInput: propInput, chunkIdx: recordBatchIdx, geomCoordOffsets: geomOffsets, batchOffset: batchOffset }); } var layer = new _typed2.ScatterplotLayer(_objectSpread(_objectSpread({}, this.getSubLayerProps(props)), {}, { // preserve binded accessors, as they are overwriten back by pass-through accessors from extensions getFiltered: props.getFiltered, getFilterValue: props.getFilterValue })); layers.push(layer); } return layers; } }]); }(_typed.CompositeLayer); (0, _defineProperty2["default"])(GeoArrowScatterplotLayer, "defaultProps", defaultProps); (0, _defineProperty2["default"])(GeoArrowScatterplotLayer, "layerName", 'GeoArrowScatterplotLayer'); //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfdHlwZWQiLCJyZXF1aXJlIiwiX3R5cGVkMiIsImdhIiwiX2ludGVyb3BSZXF1aXJlV2lsZGNhcmQiLCJfY29uc3RhbnRzIiwiX3V0aWxzIiwiX3BpY2tpbmciLCJfdmFsaWRhdGUiLCJfZ2V0UmVxdWlyZVdpbGRjYXJkQ2FjaGUiLCJlIiwiV2Vha01hcCIsInIiLCJ0IiwiX19lc01vZH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xuICAgICAgICAvLyB1c2VkIGZvciBwaWNraW5nIHB1cnBvc2VzXG4gICAgICAgIHJlY29yZEJhdGNoSWR4LFxuICAgICAgICB0YWJsZU9mZnNldHMsXG5cbiAgICAgICAgaWQ6IGAke3RoaXMucHJvcHMuaWR9LWdlb2Fycm93LXNjYXR0ZXJwbG90LSR7cmVjb3JkQmF0Y2hJZHh9YCxcbiAgICAgICAgZGF0YToge1xuICAgICAgICAgIC8vIEB0cy1leHBlY3QtZXJyb3JcbiAgICAgICAgICBkYXRhOiB0YWJsZS5iYXRjaGVzW3JlY29yZEJhdGNoSWR4XSxcbiAgICAgICAgICBsZW5ndGg6IGdlb21ldHJ5RGF0YS5sZW5ndGgsXG4gICAgICAgICAgYXR0cmlidXRlczoge1xuICAgICAgICAgICAgZ2V0UG9zaXRpb246IHtcbiAgICAgICAgICAgICAgdmFsdWU6IGZsYXRDb29yZGluYXRlQXJyYXksXG4gICAgICAgICAgICAgIHNpemU6IGdlb21ldHJ5RGF0YS50eXBlLmxpc3RTaXplXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9O1xuXG4gICAgICBmb3IgKGNvbnN0IFtwcm9wTmFtZSwgcHJvcElucHV0XSBvZiBPYmplY3QuZW50cmllcyhhY2Nlc3NvcnMpKSB7XG4gICAgICAgIGFzc2lnbkFjY2Vzc29yKHtcbiAgICAgICAgICBwcm9wcyxcbiAgICAgICAgICBwcm9wTmFtZSxcbiAgICAgICAgICBwcm9wSW5wdXQsXG4gICAgICAgICAgY2h1bmtJZHg6IHJlY29yZEJhdGNoSWR4LFxuICAgICAgICAgIGJhdGNoT2Zmc2V0XG4gICAgICAgIH0pO1xuICAgICAgfVxuXG4gICAgICBjb25zdCBsYXllciA9IG5ldyBTY2F0dGVycGxvdExheWVyKHtcbiAgICAgICAgLi4udGhpcy5nZXRTdWJMYXllclByb3BzKHByb3BzKSxcbiAgICAgICAgLy8gcHJlc2VydmUgYmluZGVkIGFjY2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