UNPKG

kepler.gl

Version:

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

222 lines (217 loc) 33.9 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); var _typeof = require("@babel/runtime/helpers/typeof"); Object.defineProperty(exports, "__esModule", { value: true }); exports.propertiesV1 = exports.propertiesV0 = exports.fieldPropertiesV1 = exports.fieldPropertiesV0 = exports["default"] = exports.datasetSchema = exports.FieldSchema = exports.DatasetSchema = void 0; var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); 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 _lodash = _interopRequireDefault(require("lodash.pick")); var _window = require("global/window"); var arrow = _interopRequireWildcard(require("apache-arrow")); var _constants = require("@kepler.gl/constants"); var _versions = require("./versions"); var _schema = _interopRequireDefault(require("./schema")); var _commonUtils = require("@kepler.gl/common-utils"); var _utils = require("@kepler.gl/utils"); 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 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; } 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; })(); } // SPDX-License-Identifier: MIT // Copyright contributors to the kepler.gl project // version v0 var fieldPropertiesV0 = exports.fieldPropertiesV0 = { name: null, type: null }; var fieldPropertiesV1 = exports.fieldPropertiesV1 = { name: null, type: null, format: null, analyzerType: null, metadata: null }; var FieldSchema = exports.FieldSchema = /*#__PURE__*/function (_Schema) { function FieldSchema() { (0, _classCallCheck2["default"])(this, FieldSchema); return _callSuper(this, FieldSchema, arguments); } (0, _inherits2["default"])(FieldSchema, _Schema); return (0, _createClass2["default"])(FieldSchema, [{ key: "save", value: function save(fields) { var _this = this; return (0, _defineProperty2["default"])({}, this.key, fields.map(function (f) { return _this.savePropertiesOrApplySchema(f)[_this.key]; })); } }, { key: "load", value: function load(fields) { return (0, _defineProperty2["default"])({}, this.key, fields); } }]); }(_schema["default"]); var propertiesV0 = exports.propertiesV0 = { id: null, label: null, color: null, allData: null, fields: new FieldSchema({ key: 'fields', version: _versions.VERSIONS.v0, properties: fieldPropertiesV0 }) }; var propertiesV1 = exports.propertiesV1 = _objectSpread(_objectSpread({}, propertiesV0), {}, { fields: new FieldSchema({ key: 'fields', version: _versions.VERSIONS.v1, properties: fieldPropertiesV1 }), type: null, metadata: null, disableDataOperation: null }); /** * TODO Consider moving this cast to ArrowDataContainer? * Prepare a data container for export as part of json / html files. * 1) Arrow tables can store Timestamps as BigInts, so convert numbers to ISOStrings compatible with Kepler.gl's TIMESTAMP. * 2) Geoarrow binary buffers converted to hex wkb * @param dataContainer A data container to flatten. * @returns Row based data. */ var getAllDataForSaving = function getAllDataForSaving(dataContainer) { var allData = dataContainer.flattenData(); if (dataContainer instanceof _utils.ArrowDataContainer) { var numColumns = dataContainer.numColumns(); var _loop = function _loop(columnIndex) { var column = dataContainer.getColumn(columnIndex); var field = dataContainer.getField(columnIndex); if (arrow.DataType.isTimestamp(column.type) || arrow.DataType.isDate(column.type) || arrow.DataType.isTime(column.type)) { allData.forEach(function (row) { row[columnIndex] = new Date(row[columnIndex]).toISOString(); }); } else if ((field === null || field === void 0 ? void 0 : field.type) === _constants.ALL_FIELD_TYPES.geoarrow) { var formatter = _utils.FIELD_DISPLAY_FORMAT[_constants.ALL_FIELD_TYPES.geoarrow]; allData.forEach(function (row) { row[columnIndex] = formatter(row[columnIndex], field); }); } }; for (var columnIndex = 0; columnIndex < numColumns; ++columnIndex) { _loop(columnIndex); } } return allData; }; /** * Transforms fields for saving as part of json / html files. * @param fields The array of fields from a Kepler table. * @returns The transformed fields array with GeoArrow types updated to GeoJSON. */ var getFieldsForSaving = function getFieldsForSaving(fields) { return fields.map(function (field) { if (field.type === _constants.ALL_FIELD_TYPES.geoarrow) { // geoarrow binary data is transformed to hex wkb in getAllDataForSaving, so update the field accordingly return { name: field.name, type: _constants.ALL_FIELD_TYPES.geojson, format: '', analyzerType: 'GEOMETRY' }; } return field; }); }; var DatasetSchema = exports.DatasetSchema = /*#__PURE__*/function (_Schema2) { function DatasetSchema() { var _this2; (0, _classCallCheck2["default"])(this, DatasetSchema); for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } _this2 = _callSuper(this, DatasetSchema, [].concat(args)); (0, _defineProperty2["default"])(_this2, "key", 'dataset'); return _this2; } (0, _inherits2["default"])(DatasetSchema, _Schema2); return (0, _createClass2["default"])(DatasetSchema, [{ key: "save", value: function save(dataset) { var datasetFlattened = dataset.dataContainer ? _objectSpread(_objectSpread({}, dataset), {}, { allData: getAllDataForSaving(dataset.dataContainer), fields: getFieldsForSaving(dataset.fields), // we use flattenData to save arrow tables, // but once flattened it's not an arrow file anymore. metadata: _objectSpread(_objectSpread({}, dataset.metadata), dataset.metadata.format === _constants.DATASET_FORMATS.arrow ? { format: _constants.DATASET_FORMATS.row } : {}) }) : dataset; return this.savePropertiesOrApplySchema(datasetFlattened)[this.key]; } }, { key: "load", value: function load(dataset) { var fields = dataset.fields, allData = dataset.allData; var updatedFields = fields; // recalculate field type // because we have updated type-analyzer // we need to add format to each field var needCalculateMeta = fields[0] && (!Object.prototype.hasOwnProperty.call(fields[0], 'format') || !Object.prototype.hasOwnProperty.call(fields[0], 'analyzerType')); if (needCalculateMeta) { var fieldOrder = fields.map(function (f) { return f.name; }); var sampleData = (0, _commonUtils.getSampleForTypeAnalyze)({ fields: fieldOrder, rows: allData }); var meta = (0, _commonUtils.getFieldsFromData)(sampleData, fieldOrder); updatedFields = meta.map(function (f, i) { return _objectSpread(_objectSpread({}, (0, _lodash["default"])(meta[i], ['name', 'type', 'format'])), {}, { analyzerType: meta[i].analyzerType }); }); updatedFields.forEach(function (f, i) { if (fields[i].type !== f.type) { // if newly detected field type is different from saved type // we log it but won't update it, cause we don't want to break people's map _window.console.warn("detect ".concat(f.name, " type is now ").concat(f.type, " instead of ").concat(fields[i].type)); } }); } // get format of all fields return _objectSpread(_objectSpread({ data: { fields: updatedFields, rows: dataset.allData }, info: (0, _lodash["default"])(dataset, ['id', 'label', 'color', 'type']) }, dataset.metadata ? { metadata: dataset.metadata } : {}), dataset.disableDataOperation ? { disableDataOperation: dataset.disableDataOperation } : {}); } }]); }(_schema["default"]); var datasetSchema = exports.datasetSchema = (0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, _versions.VERSIONS.v0, new DatasetSchema({ key: 'dataset', version: _versions.VERSIONS.v0, properties: propertiesV0 })), _versions.VERSIONS.v1, new DatasetSchema({ key: 'dataset', version: _versions.VERSIONS.v1, properties: propertiesV1 })); var _default = exports["default"] = datasetSchema; //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfbG9kYXNoIiwiX2ludGVyb3BSZXF1aXJlRGVmYXVsdCIsInJlcXVpcmUiLCJfd2luZG93IiwiYXJyb3ciLCJfaW50ZXJvcFJlcXVpcmVXaWxkY2FyZCIsIl9jb25zdGFudHMiLCJfdmVyc2lvbnMiLCJfc2NoZW1hIiwiX2NvbW1vblV0aWxzIiwiX3V0aWxzIiwiX2dldFJlcXVpcmVXaWxkY2FyZENhY2hlIiwiZSIsIldlYWtNYXAiLCJyIiwidCIsIl9fZXNNb2R1bGUiLCJfdHlwZW9mIiwiaGFzIiwiZ2V0IiwibiIsIl9fcHJvdG9fXyIsImEiLCJPYmplY3QiLCJkZWZpbmVQcm9wZXJ0eSIsImdldE93blByb3BlcnR5RGVzY3JpcHRvciIsInUiLCJoYXNPd25Qcm9wZXJ0eSIsImNhbGwiLCJpIiwic2V0Iiwib3duS2V5cyIsImtleXMiLCJnZXRPd25Qcm9wZXJ0eVN5bWJvbHMiLCJvIiwiZmlsdGVyIiwiZW51bWVyYWJsZSIsInB1c2giLCJhcHBseSIsIl9vYmplY3RTcHJlYWQiLCJhcmd1bWVudHMiLCJsZW5ndGgiLCJmb3JFYWNoIiwiX2RlZmluZVByb3BlcnR5MiIsImdldE93blByb3BlcnR5RGVzY3JpcHRvcnMiLCJkZWZpbmVQcm9wZ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