Initial commit
This commit is contained in:
6
node_modules/@maplibre/mlt/dist/vector/constant/int32ConstVector.d.ts
generated
vendored
Normal file
6
node_modules/@maplibre/mlt/dist/vector/constant/int32ConstVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import type BitVector from "../flat/bitVector";
|
||||
import Vector from "../vector";
|
||||
export declare class Int32ConstVector extends Vector<Int32Array | Uint32Array, number> {
|
||||
constructor(name: string, value: number, sizeOrNullabilityBuffer: number | BitVector, isSigned: boolean);
|
||||
protected getValueFromBuffer(_index: number): number;
|
||||
}
|
||||
10
node_modules/@maplibre/mlt/dist/vector/constant/int32ConstVector.js
generated
vendored
Normal file
10
node_modules/@maplibre/mlt/dist/vector/constant/int32ConstVector.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import Vector from "../vector";
|
||||
export class Int32ConstVector extends Vector {
|
||||
constructor(name, value, sizeOrNullabilityBuffer, isSigned) {
|
||||
super(name, isSigned ? Int32Array.of(value) : Uint32Array.of(value), sizeOrNullabilityBuffer);
|
||||
}
|
||||
getValueFromBuffer(_index) {
|
||||
return this.dataBuffer[0];
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=int32ConstVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/constant/int32ConstVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/constant/int32ConstVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"int32ConstVector.js","sourceRoot":"","sources":["../../../src/vector/constant/int32ConstVector.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,OAAO,gBAAiB,SAAQ,MAAwC;IAC1E,YAAmB,IAAY,EAAE,KAAa,EAAE,uBAA2C,EAAE,QAAiB;QAC1G,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,uBAAuB,CAAC,CAAC;IAClG,CAAC;IAES,kBAAkB,CAAC,MAAc;QACvC,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC;CACJ","sourcesContent":["import type BitVector from \"../flat/bitVector\";\nimport Vector from \"../vector\";\n\nexport class Int32ConstVector extends Vector<Int32Array | Uint32Array, number> {\n public constructor(name: string, value: number, sizeOrNullabilityBuffer: number | BitVector, isSigned: boolean) {\n super(name, isSigned ? Int32Array.of(value) : Uint32Array.of(value), sizeOrNullabilityBuffer);\n }\n\n protected getValueFromBuffer(_index: number): number {\n return this.dataBuffer[0];\n }\n}\n"]}
|
||||
6
node_modules/@maplibre/mlt/dist/vector/constant/int64ConstVector.d.ts
generated
vendored
Normal file
6
node_modules/@maplibre/mlt/dist/vector/constant/int64ConstVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import type BitVector from "../flat/bitVector";
|
||||
import Vector from "../vector";
|
||||
export declare class Int64ConstVector extends Vector<BigInt64Array | BigUint64Array, bigint> {
|
||||
constructor(name: string, value: bigint, sizeOrNullabilityBuffer: number | BitVector, isSigned: boolean);
|
||||
protected getValueFromBuffer(_index: number): bigint;
|
||||
}
|
||||
10
node_modules/@maplibre/mlt/dist/vector/constant/int64ConstVector.js
generated
vendored
Normal file
10
node_modules/@maplibre/mlt/dist/vector/constant/int64ConstVector.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import Vector from "../vector";
|
||||
export class Int64ConstVector extends Vector {
|
||||
constructor(name, value, sizeOrNullabilityBuffer, isSigned) {
|
||||
super(name, isSigned ? BigInt64Array.of(value) : BigUint64Array.of(value), sizeOrNullabilityBuffer);
|
||||
}
|
||||
getValueFromBuffer(_index) {
|
||||
return this.dataBuffer[0];
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=int64ConstVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/constant/int64ConstVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/constant/int64ConstVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"int64ConstVector.js","sourceRoot":"","sources":["../../../src/vector/constant/int64ConstVector.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,OAAO,gBAAiB,SAAQ,MAA8C;IAChF,YAAmB,IAAY,EAAE,KAAa,EAAE,uBAA2C,EAAE,QAAiB;QAC1G,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,uBAAuB,CAAC,CAAC;IACxG,CAAC;IAES,kBAAkB,CAAC,MAAc;QACvC,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC;CACJ","sourcesContent":["import type BitVector from \"../flat/bitVector\";\nimport Vector from \"../vector\";\n\nexport class Int64ConstVector extends Vector<BigInt64Array | BigUint64Array, bigint> {\n public constructor(name: string, value: bigint, sizeOrNullabilityBuffer: number | BitVector, isSigned: boolean) {\n super(name, isSigned ? BigInt64Array.of(value) : BigUint64Array.of(value), sizeOrNullabilityBuffer);\n }\n\n protected getValueFromBuffer(_index: number): bigint {\n return this.dataBuffer[0];\n }\n}\n"]}
|
||||
7
node_modules/@maplibre/mlt/dist/vector/dictionary/stringDictionaryVector.d.ts
generated
vendored
Normal file
7
node_modules/@maplibre/mlt/dist/vector/dictionary/stringDictionaryVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { VariableSizeVector } from "../variableSizeVector";
|
||||
import type BitVector from "../flat/bitVector";
|
||||
export declare class StringDictionaryVector extends VariableSizeVector<Uint8Array, string> {
|
||||
private readonly indexBuffer;
|
||||
constructor(name: string, indexBuffer: Uint32Array, offsetBuffer: Uint32Array, dictionaryBuffer: Uint8Array, nullabilityBuffer?: BitVector);
|
||||
protected getValueFromBuffer(index: number): string;
|
||||
}
|
||||
16
node_modules/@maplibre/mlt/dist/vector/dictionary/stringDictionaryVector.js
generated
vendored
Normal file
16
node_modules/@maplibre/mlt/dist/vector/dictionary/stringDictionaryVector.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import { VariableSizeVector } from "../variableSizeVector";
|
||||
import { decodeString } from "../../decoding/decodingUtils";
|
||||
export class StringDictionaryVector extends VariableSizeVector {
|
||||
constructor(name, indexBuffer, offsetBuffer, dictionaryBuffer, nullabilityBuffer) {
|
||||
super(name, offsetBuffer, dictionaryBuffer, nullabilityBuffer ?? indexBuffer.length);
|
||||
this.indexBuffer = indexBuffer;
|
||||
this.indexBuffer = indexBuffer;
|
||||
}
|
||||
getValueFromBuffer(index) {
|
||||
const offset = this.indexBuffer[index];
|
||||
const start = this.offsetBuffer[offset];
|
||||
const end = this.offsetBuffer[offset + 1];
|
||||
return decodeString(this.dataBuffer, start, end);
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=stringDictionaryVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/dictionary/stringDictionaryVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/dictionary/stringDictionaryVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"stringDictionaryVector.js","sourceRoot":"","sources":["../../../src/vector/dictionary/stringDictionaryVector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,MAAM,OAAO,sBAAuB,SAAQ,kBAAsC;IAC9E,YACI,IAAY,EACK,WAAwB,EACzC,YAAyB,EACzB,gBAA4B,EAC5B,iBAA6B;QAE7B,KAAK,CAAC,IAAI,EAAE,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC;QALpE,gBAAW,GAAX,WAAW,CAAa;QAMzC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACnC,CAAC;IAES,kBAAkB,CAAC,KAAa;QACtC,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACvC,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QACxC,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC1C,OAAO,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;IACrD,CAAC;CACJ","sourcesContent":["import { VariableSizeVector } from \"../variableSizeVector\";\nimport type BitVector from \"../flat/bitVector\";\nimport { decodeString } from \"../../decoding/decodingUtils\";\n\nexport class StringDictionaryVector extends VariableSizeVector<Uint8Array, string> {\n constructor(\n name: string,\n private readonly indexBuffer: Uint32Array,\n offsetBuffer: Uint32Array,\n dictionaryBuffer: Uint8Array,\n nullabilityBuffer?: BitVector,\n ) {\n super(name, offsetBuffer, dictionaryBuffer, nullabilityBuffer ?? indexBuffer.length);\n this.indexBuffer = indexBuffer;\n }\n\n protected getValueFromBuffer(index: number): string {\n const offset = this.indexBuffer[index];\n const start = this.offsetBuffer[offset];\n const end = this.offsetBuffer[offset + 1];\n return decodeString(this.dataBuffer, start, end);\n }\n}\n"]}
|
||||
32
node_modules/@maplibre/mlt/dist/vector/featureTable.d.ts
generated
vendored
Normal file
32
node_modules/@maplibre/mlt/dist/vector/featureTable.d.ts
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
import type { Geometry, GeometryVector } from "./geometry/geometryVector";
|
||||
import type Vector from "./vector";
|
||||
import type { IdVector } from "./idVector";
|
||||
import type { GpuVector } from "./geometry/gpuVector";
|
||||
export interface Feature {
|
||||
id: number | bigint;
|
||||
geometry: Geometry;
|
||||
properties: {
|
||||
[key: string]: unknown;
|
||||
};
|
||||
}
|
||||
export default class FeatureTable {
|
||||
private readonly _name;
|
||||
private readonly _geometryVector;
|
||||
private readonly _idVector?;
|
||||
private readonly _propertyVectors?;
|
||||
private readonly _extent;
|
||||
private propertyVectorsMap;
|
||||
constructor(_name: string, _geometryVector: GeometryVector | GpuVector, _idVector?: IdVector, _propertyVectors?: Vector[], _extent?: number);
|
||||
get name(): string;
|
||||
get idVector(): IdVector;
|
||||
get geometryVector(): GeometryVector | GpuVector;
|
||||
get propertyVectors(): Vector[];
|
||||
getPropertyVector(name: string): Vector;
|
||||
get numFeatures(): number;
|
||||
get extent(): number;
|
||||
/**
|
||||
* Returns all features as an array
|
||||
*/
|
||||
getFeatures(): Feature[];
|
||||
private containsMaxSafeIntegerValues;
|
||||
}
|
||||
74
node_modules/@maplibre/mlt/dist/vector/featureTable.js
generated
vendored
Normal file
74
node_modules/@maplibre/mlt/dist/vector/featureTable.js
generated
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
import { Int32FlatVector } from "./flat/int32FlatVector";
|
||||
import { DoubleFlatVector } from "./flat/doubleFlatVector";
|
||||
import { Int32SequenceVector } from "./sequence/int32SequenceVector";
|
||||
import { Int32ConstVector } from "./constant/int32ConstVector";
|
||||
export default class FeatureTable {
|
||||
constructor(_name, _geometryVector, _idVector, _propertyVectors, _extent = 4096) {
|
||||
this._name = _name;
|
||||
this._geometryVector = _geometryVector;
|
||||
this._idVector = _idVector;
|
||||
this._propertyVectors = _propertyVectors;
|
||||
this._extent = _extent;
|
||||
}
|
||||
get name() {
|
||||
return this._name;
|
||||
}
|
||||
get idVector() {
|
||||
return this._idVector;
|
||||
}
|
||||
get geometryVector() {
|
||||
return this._geometryVector;
|
||||
}
|
||||
get propertyVectors() {
|
||||
return this._propertyVectors;
|
||||
}
|
||||
getPropertyVector(name) {
|
||||
if (!this.propertyVectorsMap) {
|
||||
this.propertyVectorsMap = new Map(this._propertyVectors.map((vector) => [vector.name, vector]));
|
||||
}
|
||||
return this.propertyVectorsMap.get(name);
|
||||
}
|
||||
get numFeatures() {
|
||||
return this.geometryVector.numGeometries;
|
||||
}
|
||||
get extent() {
|
||||
return this._extent;
|
||||
}
|
||||
/**
|
||||
* Returns all features as an array
|
||||
*/
|
||||
getFeatures() {
|
||||
const features = [];
|
||||
const geometries = this.geometryVector.getGeometries();
|
||||
for (let i = 0; i < this.numFeatures; i++) {
|
||||
let id;
|
||||
if (this.idVector) {
|
||||
const idValue = this.idVector.getValue(i);
|
||||
id = this.containsMaxSafeIntegerValues(this.idVector) && idValue !== null ? Number(idValue) : idValue;
|
||||
}
|
||||
const geometry = {
|
||||
coordinates: geometries[i],
|
||||
type: this.geometryVector.geometryType(i),
|
||||
};
|
||||
const properties = {};
|
||||
for (const propertyColumn of this.propertyVectors) {
|
||||
if (!propertyColumn)
|
||||
continue;
|
||||
const columnName = propertyColumn.name;
|
||||
const propertyValue = propertyColumn.getValue(i);
|
||||
if (propertyValue !== null) {
|
||||
properties[columnName] = propertyValue;
|
||||
}
|
||||
}
|
||||
features.push({ id, geometry, properties });
|
||||
}
|
||||
return features;
|
||||
}
|
||||
containsMaxSafeIntegerValues(idVector) {
|
||||
return (idVector instanceof Int32FlatVector ||
|
||||
idVector instanceof Int32ConstVector ||
|
||||
idVector instanceof Int32SequenceVector ||
|
||||
idVector instanceof DoubleFlatVector);
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=featureTable.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/featureTable.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/featureTable.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
27
node_modules/@maplibre/mlt/dist/vector/filter/flatSelectionVector.d.ts
generated
vendored
Normal file
27
node_modules/@maplibre/mlt/dist/vector/filter/flatSelectionVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
import type { SelectionVector } from "./selectionVector";
|
||||
/**
|
||||
* Array-based SelectionVector for non-sequential selections.
|
||||
* Stores indices explicitly, suitable for irregular patterns and frequent modifications.
|
||||
*/
|
||||
export declare class FlatSelectionVector implements SelectionVector {
|
||||
private _selectionVector;
|
||||
private _limit?;
|
||||
/**
|
||||
* @param _selectionVector
|
||||
* @param _limit In write mode the limit of a Buffer is the limit of how much data you can write into the buffer.
|
||||
* In write mode the limit is equal to the capacity of the Buffer.
|
||||
*/
|
||||
constructor(_selectionVector: number[], _limit?: number);
|
||||
/** @inheritdoc */
|
||||
getIndex(index: number): number;
|
||||
/** @inheritdoc */
|
||||
setIndex(index: number, value: number): void;
|
||||
/** @inheritdoc */
|
||||
setLimit(limit: number): void;
|
||||
/** @inheritdoc */
|
||||
selectionValues(): number[];
|
||||
/** @inheritdoc */
|
||||
get capacity(): number;
|
||||
/** @inheritdoc */
|
||||
get limit(): number;
|
||||
}
|
||||
52
node_modules/@maplibre/mlt/dist/vector/filter/flatSelectionVector.js
generated
vendored
Normal file
52
node_modules/@maplibre/mlt/dist/vector/filter/flatSelectionVector.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
/**
|
||||
* Array-based SelectionVector for non-sequential selections.
|
||||
* Stores indices explicitly, suitable for irregular patterns and frequent modifications.
|
||||
*/
|
||||
export class FlatSelectionVector {
|
||||
/**
|
||||
* @param _selectionVector
|
||||
* @param _limit In write mode the limit of a Buffer is the limit of how much data you can write into the buffer.
|
||||
* In write mode the limit is equal to the capacity of the Buffer.
|
||||
*/
|
||||
constructor(_selectionVector, _limit) {
|
||||
this._selectionVector = _selectionVector;
|
||||
this._limit = _limit;
|
||||
if (!this._limit) {
|
||||
this._limit = this._selectionVector.length;
|
||||
}
|
||||
}
|
||||
/** @inheritdoc */
|
||||
getIndex(index) {
|
||||
if (index >= this._limit || index < 0) {
|
||||
throw new RangeError("Index out of bounds");
|
||||
}
|
||||
return this._selectionVector[index];
|
||||
}
|
||||
/** @inheritdoc */
|
||||
setIndex(index, value) {
|
||||
if (index >= this._limit || index < 0) {
|
||||
throw new RangeError("Index out of bounds");
|
||||
}
|
||||
this._selectionVector[index] = value;
|
||||
}
|
||||
/** @inheritdoc */
|
||||
setLimit(limit) {
|
||||
if (limit < 0 || limit > this.capacity) {
|
||||
throw new RangeError("Limit out of bounds");
|
||||
}
|
||||
this._limit = limit;
|
||||
}
|
||||
/** @inheritdoc */
|
||||
selectionValues() {
|
||||
return this._selectionVector;
|
||||
}
|
||||
/** @inheritdoc */
|
||||
get capacity() {
|
||||
return this._selectionVector.length;
|
||||
}
|
||||
/** @inheritdoc */
|
||||
get limit() {
|
||||
return this._limit;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=flatSelectionVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/filter/flatSelectionVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/filter/flatSelectionVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"flatSelectionVector.js","sourceRoot":"","sources":["../../../src/vector/filter/flatSelectionVector.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IAC5B;;;;OAIG;IACH,YACY,gBAA0B,EAC1B,MAAe;QADf,qBAAgB,GAAhB,gBAAgB,CAAU;QAC1B,WAAM,GAAN,MAAM,CAAS;QAEvB,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACf,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC;QAC/C,CAAC;IACL,CAAC;IAED,kBAAkB;IAClB,QAAQ,CAAC,KAAa;QAClB,IAAI,KAAK,IAAI,IAAI,CAAC,MAAM,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;YACpC,MAAM,IAAI,UAAU,CAAC,qBAAqB,CAAC,CAAC;QAChD,CAAC;QAED,OAAO,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;IAED,kBAAkB;IAClB,QAAQ,CAAC,KAAa,EAAE,KAAa;QACjC,IAAI,KAAK,IAAI,IAAI,CAAC,MAAM,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;YACpC,MAAM,IAAI,UAAU,CAAC,qBAAqB,CAAC,CAAC;QAChD,CAAC;QAED,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;IACzC,CAAC;IAED,kBAAkB;IAClB,QAAQ,CAAC,KAAa;QAClB,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;YACrC,MAAM,IAAI,UAAU,CAAC,qBAAqB,CAAC,CAAC;QAChD,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;IAED,kBAAkB;IAClB,eAAe;QACX,OAAO,IAAI,CAAC,gBAAgB,CAAC;IACjC,CAAC;IAED,kBAAkB;IAClB,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC;IACxC,CAAC;IAED,kBAAkB;IAClB,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;CACJ","sourcesContent":["import type { SelectionVector } from \"./selectionVector\";\n\n/**\n * Array-based SelectionVector for non-sequential selections.\n * Stores indices explicitly, suitable for irregular patterns and frequent modifications.\n */\nexport class FlatSelectionVector implements SelectionVector {\n /**\n * @param _selectionVector\n * @param _limit In write mode the limit of a Buffer is the limit of how much data you can write into the buffer.\n * In write mode the limit is equal to the capacity of the Buffer.\n */\n constructor(\n private _selectionVector: number[],\n private _limit?: number,\n ) {\n if (!this._limit) {\n this._limit = this._selectionVector.length;\n }\n }\n\n /** @inheritdoc */\n getIndex(index: number): number {\n if (index >= this._limit || index < 0) {\n throw new RangeError(\"Index out of bounds\");\n }\n\n return this._selectionVector[index];\n }\n\n /** @inheritdoc */\n setIndex(index: number, value: number): void {\n if (index >= this._limit || index < 0) {\n throw new RangeError(\"Index out of bounds\");\n }\n\n this._selectionVector[index] = value;\n }\n\n /** @inheritdoc */\n setLimit(limit: number): void {\n if (limit < 0 || limit > this.capacity) {\n throw new RangeError(\"Limit out of bounds\");\n }\n this._limit = limit;\n }\n\n /** @inheritdoc */\n selectionValues(): number[] {\n return this._selectionVector;\n }\n\n /** @inheritdoc */\n get capacity() {\n return this._selectionVector.length;\n }\n\n /** @inheritdoc */\n get limit() {\n return this._limit;\n }\n}\n"]}
|
||||
8
node_modules/@maplibre/mlt/dist/vector/filter/selectionVector.d.ts
generated
vendored
Normal file
8
node_modules/@maplibre/mlt/dist/vector/filter/selectionVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
export interface SelectionVector {
|
||||
getIndex(index: number): number;
|
||||
setIndex(index: number, value: number): void;
|
||||
setLimit(limit: number): void;
|
||||
selectionValues(): number[];
|
||||
get limit(): any;
|
||||
get capacity(): any;
|
||||
}
|
||||
2
node_modules/@maplibre/mlt/dist/vector/filter/selectionVector.js
generated
vendored
Normal file
2
node_modules/@maplibre/mlt/dist/vector/filter/selectionVector.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=selectionVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/filter/selectionVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/filter/selectionVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"selectionVector.js","sourceRoot":"","sources":["../../../src/vector/filter/selectionVector.ts"],"names":[],"mappings":"","sourcesContent":["export interface SelectionVector {\n getIndex(index: number): number;\n setIndex(index: number, value: number): void;\n setLimit(limit: number): void;\n selectionValues(): number[];\n /* Index of the first element that should not be read or written.\n * It's not the last index that can be accessed, but rather the index that marks the end of\n * the valid data in the buffer */\n get limit();\n /* Total size of the buffer */\n get capacity();\n}\n"]}
|
||||
16
node_modules/@maplibre/mlt/dist/vector/filter/selectionVectorUtils.d.ts
generated
vendored
Normal file
16
node_modules/@maplibre/mlt/dist/vector/filter/selectionVectorUtils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import type { SelectionVector } from "./selectionVector";
|
||||
import type BitVector from "../flat/bitVector";
|
||||
import { SequenceSelectionVector } from "./sequenceSelectionVector";
|
||||
export declare function createSelectionVector(size: number): SequenceSelectionVector;
|
||||
/**
|
||||
* Creates a selection vector containing indices of non-null values.
|
||||
* @param size - The total number of elements to consider
|
||||
* @param nullabilityBuffer - Optional bit vector where 1=not null, 0=null. If undefined/null, all values are considered non-null.
|
||||
*/
|
||||
export declare function createNullableSelectionVector(size: number, nullabilityBuffer?: BitVector): SelectionVector;
|
||||
/**
|
||||
* Filters an existing selection vector to include only non-null values.
|
||||
* @param selectionVector - The input selection vector to filter
|
||||
* @param nullabilityBuffer - Optional bit vector where 1=not null, 0=null. If undefined/null, all values are considered non-null.
|
||||
*/
|
||||
export declare function updateNullableSelectionVector(selectionVector: SelectionVector, nullabilityBuffer?: BitVector): SelectionVector;
|
||||
37
node_modules/@maplibre/mlt/dist/vector/filter/selectionVectorUtils.js
generated
vendored
Normal file
37
node_modules/@maplibre/mlt/dist/vector/filter/selectionVectorUtils.js
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
import { FlatSelectionVector } from "./flatSelectionVector";
|
||||
import { SequenceSelectionVector } from "./sequenceSelectionVector";
|
||||
export function createSelectionVector(size) {
|
||||
return new SequenceSelectionVector(0, 1, size);
|
||||
}
|
||||
/**
|
||||
* Creates a selection vector containing indices of non-null values.
|
||||
* @param size - The total number of elements to consider
|
||||
* @param nullabilityBuffer - Optional bit vector where 1=not null, 0=null. If undefined/null, all values are considered non-null.
|
||||
*/
|
||||
export function createNullableSelectionVector(size, nullabilityBuffer) {
|
||||
const selectionVector = [];
|
||||
for (let i = 0; i < size; i++) {
|
||||
// Include index if no nullability buffer (all non-null) OR if bit is set (non-null)
|
||||
if (!nullabilityBuffer || nullabilityBuffer.get(i)) {
|
||||
selectionVector.push(i);
|
||||
}
|
||||
}
|
||||
return new FlatSelectionVector(selectionVector);
|
||||
}
|
||||
/**
|
||||
* Filters an existing selection vector to include only non-null values.
|
||||
* @param selectionVector - The input selection vector to filter
|
||||
* @param nullabilityBuffer - Optional bit vector where 1=not null, 0=null. If undefined/null, all values are considered non-null.
|
||||
*/
|
||||
export function updateNullableSelectionVector(selectionVector, nullabilityBuffer) {
|
||||
const filteredIndices = [];
|
||||
for (let i = 0; i < selectionVector.limit; i++) {
|
||||
const vectorIndex = selectionVector.getIndex(i);
|
||||
// Include index if no nullability buffer (all non-null) OR if bit is set (non-null)
|
||||
if (!nullabilityBuffer || nullabilityBuffer.get(vectorIndex)) {
|
||||
filteredIndices.push(vectorIndex);
|
||||
}
|
||||
}
|
||||
return new FlatSelectionVector(filteredIndices);
|
||||
}
|
||||
//# sourceMappingURL=selectionVectorUtils.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/filter/selectionVectorUtils.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/filter/selectionVectorUtils.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"selectionVectorUtils.js","sourceRoot":"","sources":["../../../src/vector/filter/selectionVectorUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,UAAU,qBAAqB,CAAC,IAAY;IAC9C,OAAO,IAAI,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC;AACnD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,6BAA6B,CAAC,IAAY,EAAE,iBAA6B;IACrF,MAAM,eAAe,GAAG,EAAE,CAAC;IAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;QAC5B,oFAAoF;QACpF,IAAI,CAAC,iBAAiB,IAAI,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;YACjD,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5B,CAAC;IACL,CAAC;IACD,OAAO,IAAI,mBAAmB,CAAC,eAAe,CAAC,CAAC;AACpD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,6BAA6B,CACzC,eAAgC,EAChC,iBAA6B;IAE7B,MAAM,eAAe,GAAG,EAAE,CAAC;IAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,eAAe,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;QAC7C,MAAM,WAAW,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QAChD,oFAAoF;QACpF,IAAI,CAAC,iBAAiB,IAAI,iBAAiB,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE,CAAC;YAC3D,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACtC,CAAC;IACL,CAAC;IACD,OAAO,IAAI,mBAAmB,CAAC,eAAe,CAAC,CAAC;AACpD,CAAC","sourcesContent":["import type { SelectionVector } from \"./selectionVector\";\nimport { FlatSelectionVector } from \"./flatSelectionVector\";\nimport type BitVector from \"../flat/bitVector\";\nimport { SequenceSelectionVector } from \"./sequenceSelectionVector\";\n\nexport function createSelectionVector(size: number) {\n return new SequenceSelectionVector(0, 1, size);\n}\n\n/**\n * Creates a selection vector containing indices of non-null values.\n * @param size - The total number of elements to consider\n * @param nullabilityBuffer - Optional bit vector where 1=not null, 0=null. If undefined/null, all values are considered non-null.\n */\nexport function createNullableSelectionVector(size: number, nullabilityBuffer?: BitVector): SelectionVector {\n const selectionVector = [];\n for (let i = 0; i < size; i++) {\n // Include index if no nullability buffer (all non-null) OR if bit is set (non-null)\n if (!nullabilityBuffer || nullabilityBuffer.get(i)) {\n selectionVector.push(i);\n }\n }\n return new FlatSelectionVector(selectionVector);\n}\n\n/**\n * Filters an existing selection vector to include only non-null values.\n * @param selectionVector - The input selection vector to filter\n * @param nullabilityBuffer - Optional bit vector where 1=not null, 0=null. If undefined/null, all values are considered non-null.\n */\nexport function updateNullableSelectionVector(\n selectionVector: SelectionVector,\n nullabilityBuffer?: BitVector,\n): SelectionVector {\n const filteredIndices = [];\n for (let i = 0; i < selectionVector.limit; i++) {\n const vectorIndex = selectionVector.getIndex(i);\n // Include index if no nullability buffer (all non-null) OR if bit is set (non-null)\n if (!nullabilityBuffer || nullabilityBuffer.get(vectorIndex)) {\n filteredIndices.push(vectorIndex);\n }\n }\n return new FlatSelectionVector(filteredIndices);\n}\n"]}
|
||||
26
node_modules/@maplibre/mlt/dist/vector/filter/sequenceSelectionVector.d.ts
generated
vendored
Normal file
26
node_modules/@maplibre/mlt/dist/vector/filter/sequenceSelectionVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
import type { SelectionVector } from "./selectionVector";
|
||||
/**
|
||||
* Memory-efficient SelectionVector for arithmetic sequences (base + index * delta).
|
||||
* Calculates values on-demand, only materializes when modified.
|
||||
*/
|
||||
export declare class SequenceSelectionVector implements SelectionVector {
|
||||
private readonly _baseValue;
|
||||
private readonly _delta;
|
||||
private _limit;
|
||||
private readonly _capacity;
|
||||
private _materializedArray;
|
||||
constructor(_baseValue: number, _delta: number, _limit: number, _capacity?: number);
|
||||
/** @inheritdoc */
|
||||
get limit(): number;
|
||||
/** @inheritdoc */
|
||||
get capacity(): number;
|
||||
/** @inheritdoc */
|
||||
selectionValues(): number[];
|
||||
private materialize;
|
||||
/** @inheritdoc */
|
||||
getIndex(index: number): number;
|
||||
/** @inheritdoc */
|
||||
setIndex(index: number, value: number): void;
|
||||
/** @inheritdoc */
|
||||
setLimit(limit: number): void;
|
||||
}
|
||||
63
node_modules/@maplibre/mlt/dist/vector/filter/sequenceSelectionVector.js
generated
vendored
Normal file
63
node_modules/@maplibre/mlt/dist/vector/filter/sequenceSelectionVector.js
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* Memory-efficient SelectionVector for arithmetic sequences (base + index * delta).
|
||||
* Calculates values on-demand, only materializes when modified.
|
||||
*/
|
||||
export class SequenceSelectionVector {
|
||||
constructor(_baseValue, _delta, _limit, _capacity = _limit) {
|
||||
this._baseValue = _baseValue;
|
||||
this._delta = _delta;
|
||||
this._limit = _limit;
|
||||
this._capacity = _capacity;
|
||||
this._materializedArray = null;
|
||||
}
|
||||
/** @inheritdoc */
|
||||
get limit() {
|
||||
return this._limit;
|
||||
}
|
||||
/** @inheritdoc */
|
||||
get capacity() {
|
||||
return this._capacity;
|
||||
}
|
||||
/** @inheritdoc */
|
||||
selectionValues() {
|
||||
if (!this._materializedArray) {
|
||||
this._materializedArray = this.materialize();
|
||||
}
|
||||
return this._materializedArray;
|
||||
}
|
||||
materialize() {
|
||||
const arr = new Array(this._capacity);
|
||||
for (let i = 0; i < this._capacity; i++) {
|
||||
arr[i] = this._baseValue + i * this._delta;
|
||||
}
|
||||
return arr;
|
||||
}
|
||||
/** @inheritdoc */
|
||||
getIndex(index) {
|
||||
if (index >= this._limit || index < 0) {
|
||||
throw new RangeError("Index out of bounds");
|
||||
}
|
||||
if (this._materializedArray) {
|
||||
return this._materializedArray[index];
|
||||
}
|
||||
return this._baseValue + index * this._delta;
|
||||
}
|
||||
/** @inheritdoc */
|
||||
setIndex(index, value) {
|
||||
if (index >= this._limit || index < 0) {
|
||||
throw new RangeError("Index out of bounds");
|
||||
}
|
||||
if (!this._materializedArray) {
|
||||
this._materializedArray = this.materialize();
|
||||
}
|
||||
this._materializedArray[index] = value;
|
||||
}
|
||||
/** @inheritdoc */
|
||||
setLimit(limit) {
|
||||
if (limit < 0 || limit > this.capacity) {
|
||||
throw new RangeError("Limit out of bounds");
|
||||
}
|
||||
this._limit = limit;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=sequenceSelectionVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/filter/sequenceSelectionVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/filter/sequenceSelectionVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"sequenceSelectionVector.js","sourceRoot":"","sources":["../../../src/vector/filter/sequenceSelectionVector.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,OAAO,uBAAuB;IAGhC,YACqB,UAAkB,EAClB,MAAc,EACvB,MAAc,EACL,YAAoB,MAAM;QAH1B,eAAU,GAAV,UAAU,CAAQ;QAClB,WAAM,GAAN,MAAM,CAAQ;QACvB,WAAM,GAAN,MAAM,CAAQ;QACL,cAAS,GAAT,SAAS,CAAiB;QANvC,uBAAkB,GAAoB,IAAI,CAAC;IAOhD,CAAC;IAEJ,kBAAkB;IAClB,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,kBAAkB;IAClB,IAAI,QAAQ;QACR,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED,kBAAkB;IAClB,eAAe;QACX,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAC3B,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QACjD,CAAC;QACD,OAAO,IAAI,CAAC,kBAAkB,CAAC;IACnC,CAAC;IAEO,WAAW;QACf,MAAM,GAAG,GAAG,IAAI,KAAK,CAAS,IAAI,CAAC,SAAS,CAAC,CAAC;QAC9C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,UAAU,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QAC/C,CAAC;QACD,OAAO,GAAG,CAAC;IACf,CAAC;IAED,kBAAkB;IAClB,QAAQ,CAAC,KAAa;QAClB,IAAI,KAAK,IAAI,IAAI,CAAC,MAAM,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;YACpC,MAAM,IAAI,UAAU,CAAC,qBAAqB,CAAC,CAAC;QAChD,CAAC;QACD,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAC1B,OAAO,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,IAAI,CAAC,UAAU,GAAG,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;IACjD,CAAC;IAED,kBAAkB;IAClB,QAAQ,CAAC,KAAa,EAAE,KAAa;QACjC,IAAI,KAAK,IAAI,IAAI,CAAC,MAAM,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;YACpC,MAAM,IAAI,UAAU,CAAC,qBAAqB,CAAC,CAAC;QAChD,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAC3B,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QACjD,CAAC;QACD,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC;IAC3C,CAAC;IAED,kBAAkB;IAClB,QAAQ,CAAC,KAAa;QAClB,IAAI,KAAK,GAAG,CAAC,IAAI,KAAK,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;YACrC,MAAM,IAAI,UAAU,CAAC,qBAAqB,CAAC,CAAC;QAChD,CAAC;QACD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACxB,CAAC;CACJ","sourcesContent":["import type { SelectionVector } from \"./selectionVector\";\n\n/**\n * Memory-efficient SelectionVector for arithmetic sequences (base + index * delta).\n * Calculates values on-demand, only materializes when modified.\n */\nexport class SequenceSelectionVector implements SelectionVector {\n private _materializedArray: number[] | null = null;\n\n constructor(\n private readonly _baseValue: number,\n private readonly _delta: number,\n private _limit: number,\n private readonly _capacity: number = _limit,\n ) {}\n\n /** @inheritdoc */\n get limit(): number {\n return this._limit;\n }\n\n /** @inheritdoc */\n get capacity(): number {\n return this._capacity;\n }\n\n /** @inheritdoc */\n selectionValues(): number[] {\n if (!this._materializedArray) {\n this._materializedArray = this.materialize();\n }\n return this._materializedArray;\n }\n\n private materialize(): number[] {\n const arr = new Array<number>(this._capacity);\n for (let i = 0; i < this._capacity; i++) {\n arr[i] = this._baseValue + i * this._delta;\n }\n return arr;\n }\n\n /** @inheritdoc */\n getIndex(index: number): number {\n if (index >= this._limit || index < 0) {\n throw new RangeError(\"Index out of bounds\");\n }\n if (this._materializedArray) {\n return this._materializedArray[index];\n }\n return this._baseValue + index * this._delta;\n }\n\n /** @inheritdoc */\n setIndex(index: number, value: number): void {\n if (index >= this._limit || index < 0) {\n throw new RangeError(\"Index out of bounds\");\n }\n if (!this._materializedArray) {\n this._materializedArray = this.materialize();\n }\n this._materializedArray[index] = value;\n }\n\n /** @inheritdoc */\n setLimit(limit: number): void {\n if (limit < 0 || limit > this.capacity) {\n throw new RangeError(\"Limit out of bounds\");\n }\n this._limit = limit;\n }\n}\n"]}
|
||||
3
node_modules/@maplibre/mlt/dist/vector/fixedSizeVector.d.ts
generated
vendored
Normal file
3
node_modules/@maplibre/mlt/dist/vector/fixedSizeVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import Vector from "./vector";
|
||||
export declare abstract class FixedSizeVector<T extends ArrayBufferView, K> extends Vector<T, K> {
|
||||
}
|
||||
4
node_modules/@maplibre/mlt/dist/vector/fixedSizeVector.js
generated
vendored
Normal file
4
node_modules/@maplibre/mlt/dist/vector/fixedSizeVector.js
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import Vector from "./vector";
|
||||
export class FixedSizeVector extends Vector {
|
||||
}
|
||||
//# sourceMappingURL=fixedSizeVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/fixedSizeVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/fixedSizeVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"fixedSizeVector.js","sourceRoot":"","sources":["../../src/vector/fixedSizeVector.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,OAAgB,eAA8C,SAAQ,MAAY;CAAG","sourcesContent":["import Vector from \"./vector\";\n\nexport abstract class FixedSizeVector<T extends ArrayBufferView, K> extends Vector<T, K> {}\n"]}
|
||||
14
node_modules/@maplibre/mlt/dist/vector/flat/bitVector.d.ts
generated
vendored
Normal file
14
node_modules/@maplibre/mlt/dist/vector/flat/bitVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
export default class BitVector {
|
||||
private readonly values;
|
||||
private readonly _size;
|
||||
/**
|
||||
* @param values The byte buffer containing the bit values in least-significant bit (LSB)
|
||||
* numbering
|
||||
*/
|
||||
constructor(values: Uint8Array, size: number);
|
||||
get(index: number): boolean;
|
||||
set(index: number, value: boolean): void;
|
||||
getInt(index: number): number;
|
||||
size(): number;
|
||||
getBuffer(): Uint8Array;
|
||||
}
|
||||
35
node_modules/@maplibre/mlt/dist/vector/flat/bitVector.js
generated
vendored
Normal file
35
node_modules/@maplibre/mlt/dist/vector/flat/bitVector.js
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
export default class BitVector {
|
||||
/**
|
||||
* @param values The byte buffer containing the bit values in least-significant bit (LSB)
|
||||
* numbering
|
||||
*/
|
||||
constructor(values, size) {
|
||||
this.values = values;
|
||||
this._size = size;
|
||||
}
|
||||
get(index) {
|
||||
const byteIndex = Math.floor(index / 8);
|
||||
const bitIndex = index % 8;
|
||||
const b = this.values[byteIndex];
|
||||
return ((b >> bitIndex) & 1) === 1;
|
||||
}
|
||||
set(index, value) {
|
||||
//TODO: refactor -> improve quick and dirty solution
|
||||
const byteIndex = Math.floor(index / 8);
|
||||
const bitIndex = index % 8;
|
||||
this.values[byteIndex] = this.values[byteIndex] | ((value ? 1 : 0) << bitIndex);
|
||||
}
|
||||
getInt(index) {
|
||||
const byteIndex = Math.floor(index / 8);
|
||||
const bitIndex = index % 8;
|
||||
const b = this.values[byteIndex];
|
||||
return (b >> bitIndex) & 1;
|
||||
}
|
||||
size() {
|
||||
return this._size;
|
||||
}
|
||||
getBuffer() {
|
||||
return this.values;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=bitVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/flat/bitVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/flat/bitVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"bitVector.js","sourceRoot":"","sources":["../../../src/vector/flat/bitVector.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,SAAS;IAI1B;;;OAGG;IACH,YAAY,MAAkB,EAAE,IAAY;QACxC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACtB,CAAC;IAED,GAAG,CAAC,KAAa;QACb,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QACxC,MAAM,QAAQ,GAAG,KAAK,GAAG,CAAC,CAAC;QAC3B,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACjC,OAAO,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC;IAED,GAAG,CAAC,KAAa,EAAE,KAAc;QAC7B,oDAAoD;QACpD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QACxC,MAAM,QAAQ,GAAG,KAAK,GAAG,CAAC,CAAC;QAC3B,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC;IACpF,CAAC;IAED,MAAM,CAAC,KAAa;QAChB,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QACxC,MAAM,QAAQ,GAAG,KAAK,GAAG,CAAC,CAAC;QAC3B,MAAM,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACjC,OAAO,CAAC,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;IAED,IAAI;QACA,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IAED,SAAS;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;CACJ","sourcesContent":["export default class BitVector {\n private readonly values: Uint8Array;\n private readonly _size: number;\n\n /**\n * @param values The byte buffer containing the bit values in least-significant bit (LSB)\n * numbering\n */\n constructor(values: Uint8Array, size: number) {\n this.values = values;\n this._size = size;\n }\n\n get(index: number): boolean {\n const byteIndex = Math.floor(index / 8);\n const bitIndex = index % 8;\n const b = this.values[byteIndex];\n return ((b >> bitIndex) & 1) === 1;\n }\n\n set(index: number, value: boolean): void {\n //TODO: refactor -> improve quick and dirty solution\n const byteIndex = Math.floor(index / 8);\n const bitIndex = index % 8;\n this.values[byteIndex] = this.values[byteIndex] | ((value ? 1 : 0) << bitIndex);\n }\n\n getInt(index: number): number {\n const byteIndex = Math.floor(index / 8);\n const bitIndex = index % 8;\n const b = this.values[byteIndex];\n return (b >> bitIndex) & 1;\n }\n\n size(): number {\n return this._size;\n }\n\n getBuffer(): Uint8Array {\n return this.values;\n }\n}\n"]}
|
||||
7
node_modules/@maplibre/mlt/dist/vector/flat/booleanFlatVector.d.ts
generated
vendored
Normal file
7
node_modules/@maplibre/mlt/dist/vector/flat/booleanFlatVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import type BitVector from "./bitVector";
|
||||
import Vector from "../vector";
|
||||
export declare class BooleanFlatVector extends Vector<Uint8Array, boolean> {
|
||||
private readonly dataVector;
|
||||
constructor(name: string, dataVector: BitVector, sizeOrNullabilityBuffer: number | BitVector);
|
||||
protected getValueFromBuffer(index: number): boolean;
|
||||
}
|
||||
11
node_modules/@maplibre/mlt/dist/vector/flat/booleanFlatVector.js
generated
vendored
Normal file
11
node_modules/@maplibre/mlt/dist/vector/flat/booleanFlatVector.js
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import Vector from "../vector";
|
||||
export class BooleanFlatVector extends Vector {
|
||||
constructor(name, dataVector, sizeOrNullabilityBuffer) {
|
||||
super(name, dataVector.getBuffer(), sizeOrNullabilityBuffer);
|
||||
this.dataVector = dataVector;
|
||||
}
|
||||
getValueFromBuffer(index) {
|
||||
return this.dataVector.get(index);
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=booleanFlatVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/flat/booleanFlatVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/flat/booleanFlatVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"booleanFlatVector.js","sourceRoot":"","sources":["../../../src/vector/flat/booleanFlatVector.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,OAAO,iBAAkB,SAAQ,MAA2B;IAG9D,YAAY,IAAY,EAAE,UAAqB,EAAE,uBAA2C;QACxF,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,SAAS,EAAE,EAAE,uBAAuB,CAAC,CAAC;QAC7D,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IACjC,CAAC;IAES,kBAAkB,CAAC,KAAa;QACtC,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC;CACJ","sourcesContent":["import type BitVector from \"./bitVector\";\nimport Vector from \"../vector\";\n\nexport class BooleanFlatVector extends Vector<Uint8Array, boolean> {\n private readonly dataVector: BitVector;\n\n constructor(name: string, dataVector: BitVector, sizeOrNullabilityBuffer: number | BitVector) {\n super(name, dataVector.getBuffer(), sizeOrNullabilityBuffer);\n this.dataVector = dataVector;\n }\n\n protected getValueFromBuffer(index: number): boolean {\n return this.dataVector.get(index);\n }\n}\n"]}
|
||||
4
node_modules/@maplibre/mlt/dist/vector/flat/doubleFlatVector.d.ts
generated
vendored
Normal file
4
node_modules/@maplibre/mlt/dist/vector/flat/doubleFlatVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import { FixedSizeVector } from "../fixedSizeVector";
|
||||
export declare class DoubleFlatVector extends FixedSizeVector<Float64Array, number> {
|
||||
protected getValueFromBuffer(index: number): number;
|
||||
}
|
||||
7
node_modules/@maplibre/mlt/dist/vector/flat/doubleFlatVector.js
generated
vendored
Normal file
7
node_modules/@maplibre/mlt/dist/vector/flat/doubleFlatVector.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { FixedSizeVector } from "../fixedSizeVector";
|
||||
export class DoubleFlatVector extends FixedSizeVector {
|
||||
getValueFromBuffer(index) {
|
||||
return this.dataBuffer[index];
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=doubleFlatVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/flat/doubleFlatVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/flat/doubleFlatVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"doubleFlatVector.js","sourceRoot":"","sources":["../../../src/vector/flat/doubleFlatVector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,OAAO,gBAAiB,SAAQ,eAAqC;IAC7D,kBAAkB,CAAC,KAAa;QACtC,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;CACJ","sourcesContent":["import { FixedSizeVector } from \"../fixedSizeVector\";\n\nexport class DoubleFlatVector extends FixedSizeVector<Float64Array, number> {\n protected getValueFromBuffer(index: number): number {\n return this.dataBuffer[index];\n }\n}\n"]}
|
||||
4
node_modules/@maplibre/mlt/dist/vector/flat/floatFlatVector.d.ts
generated
vendored
Normal file
4
node_modules/@maplibre/mlt/dist/vector/flat/floatFlatVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import { FixedSizeVector } from "../fixedSizeVector";
|
||||
export declare class FloatFlatVector extends FixedSizeVector<Float32Array, number> {
|
||||
protected getValueFromBuffer(index: number): number;
|
||||
}
|
||||
7
node_modules/@maplibre/mlt/dist/vector/flat/floatFlatVector.js
generated
vendored
Normal file
7
node_modules/@maplibre/mlt/dist/vector/flat/floatFlatVector.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { FixedSizeVector } from "../fixedSizeVector";
|
||||
export class FloatFlatVector extends FixedSizeVector {
|
||||
getValueFromBuffer(index) {
|
||||
return this.dataBuffer[index];
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=floatFlatVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/flat/floatFlatVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/flat/floatFlatVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"floatFlatVector.js","sourceRoot":"","sources":["../../../src/vector/flat/floatFlatVector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,OAAO,eAAgB,SAAQ,eAAqC;IAC5D,kBAAkB,CAAC,KAAa;QACtC,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;CACJ","sourcesContent":["import { FixedSizeVector } from \"../fixedSizeVector\";\n\nexport class FloatFlatVector extends FixedSizeVector<Float32Array, number> {\n protected getValueFromBuffer(index: number): number {\n return this.dataBuffer[index];\n }\n}\n"]}
|
||||
4
node_modules/@maplibre/mlt/dist/vector/flat/int32FlatVector.d.ts
generated
vendored
Normal file
4
node_modules/@maplibre/mlt/dist/vector/flat/int32FlatVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import { FixedSizeVector } from "../fixedSizeVector";
|
||||
export declare class Int32FlatVector extends FixedSizeVector<Int32Array | Uint32Array, number> {
|
||||
protected getValueFromBuffer(index: number): number;
|
||||
}
|
||||
7
node_modules/@maplibre/mlt/dist/vector/flat/int32FlatVector.js
generated
vendored
Normal file
7
node_modules/@maplibre/mlt/dist/vector/flat/int32FlatVector.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { FixedSizeVector } from "../fixedSizeVector";
|
||||
export class Int32FlatVector extends FixedSizeVector {
|
||||
getValueFromBuffer(index) {
|
||||
return this.dataBuffer[index];
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=int32FlatVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/flat/int32FlatVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/flat/int32FlatVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"int32FlatVector.js","sourceRoot":"","sources":["../../../src/vector/flat/int32FlatVector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,OAAO,eAAgB,SAAQ,eAAiD;IACxE,kBAAkB,CAAC,KAAa;QACtC,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;CACJ","sourcesContent":["import { FixedSizeVector } from \"../fixedSizeVector\";\n\nexport class Int32FlatVector extends FixedSizeVector<Int32Array | Uint32Array, number> {\n protected getValueFromBuffer(index: number): number {\n return this.dataBuffer[index];\n }\n}\n"]}
|
||||
4
node_modules/@maplibre/mlt/dist/vector/flat/int64FlatVector.d.ts
generated
vendored
Normal file
4
node_modules/@maplibre/mlt/dist/vector/flat/int64FlatVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
import { FixedSizeVector } from "../fixedSizeVector";
|
||||
export declare class Int64FlatVector extends FixedSizeVector<BigInt64Array | BigUint64Array, bigint> {
|
||||
protected getValueFromBuffer(index: number): bigint;
|
||||
}
|
||||
7
node_modules/@maplibre/mlt/dist/vector/flat/int64FlatVector.js
generated
vendored
Normal file
7
node_modules/@maplibre/mlt/dist/vector/flat/int64FlatVector.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
import { FixedSizeVector } from "../fixedSizeVector";
|
||||
export class Int64FlatVector extends FixedSizeVector {
|
||||
getValueFromBuffer(index) {
|
||||
return this.dataBuffer[index];
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=int64FlatVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/flat/int64FlatVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/flat/int64FlatVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"int64FlatVector.js","sourceRoot":"","sources":["../../../src/vector/flat/int64FlatVector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,OAAO,eAAgB,SAAQ,eAAuD;IAC9E,kBAAkB,CAAC,KAAa;QACtC,OAAO,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IAClC,CAAC;CACJ","sourcesContent":["import { FixedSizeVector } from \"../fixedSizeVector\";\n\nexport class Int64FlatVector extends FixedSizeVector<BigInt64Array | BigUint64Array, bigint> {\n protected getValueFromBuffer(index: number): bigint {\n return this.dataBuffer[index];\n }\n}\n"]}
|
||||
6
node_modules/@maplibre/mlt/dist/vector/flat/stringFlatVector.d.ts
generated
vendored
Normal file
6
node_modules/@maplibre/mlt/dist/vector/flat/stringFlatVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import { VariableSizeVector } from "../variableSizeVector";
|
||||
import type BitVector from "./bitVector";
|
||||
export declare class StringFlatVector extends VariableSizeVector<Uint8Array, string> {
|
||||
constructor(name: string, offsetBuffer: Uint32Array, dataBuffer: Uint8Array, nullabilityBuffer?: BitVector);
|
||||
protected getValueFromBuffer(index: number): string;
|
||||
}
|
||||
13
node_modules/@maplibre/mlt/dist/vector/flat/stringFlatVector.js
generated
vendored
Normal file
13
node_modules/@maplibre/mlt/dist/vector/flat/stringFlatVector.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { VariableSizeVector } from "../variableSizeVector";
|
||||
import { decodeString } from "../../decoding/decodingUtils";
|
||||
export class StringFlatVector extends VariableSizeVector {
|
||||
constructor(name, offsetBuffer, dataBuffer, nullabilityBuffer) {
|
||||
super(name, offsetBuffer, dataBuffer, nullabilityBuffer ?? offsetBuffer.length - 1);
|
||||
}
|
||||
getValueFromBuffer(index) {
|
||||
const start = this.offsetBuffer[index];
|
||||
const end = this.offsetBuffer[index + 1];
|
||||
return decodeString(this.dataBuffer, start, end);
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=stringFlatVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/flat/stringFlatVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/flat/stringFlatVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"stringFlatVector.js","sourceRoot":"","sources":["../../../src/vector/flat/stringFlatVector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,MAAM,OAAO,gBAAiB,SAAQ,kBAAsC;IACxE,YAAY,IAAY,EAAE,YAAyB,EAAE,UAAsB,EAAE,iBAA6B;QACtG,KAAK,CAAC,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,iBAAiB,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACxF,CAAC;IAES,kBAAkB,CAAC,KAAa;QACtC,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QACvC,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QACzC,OAAO,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;IACrD,CAAC;CACJ","sourcesContent":["import { VariableSizeVector } from \"../variableSizeVector\";\nimport type BitVector from \"./bitVector\";\nimport { decodeString } from \"../../decoding/decodingUtils\";\n\nexport class StringFlatVector extends VariableSizeVector<Uint8Array, string> {\n constructor(name: string, offsetBuffer: Uint32Array, dataBuffer: Uint8Array, nullabilityBuffer?: BitVector) {\n super(name, offsetBuffer, dataBuffer, nullabilityBuffer ?? offsetBuffer.length - 1);\n }\n\n protected getValueFromBuffer(index: number): string {\n const start = this.offsetBuffer[index];\n const end = this.offsetBuffer[index + 1];\n return decodeString(this.dataBuffer, start, end);\n }\n}\n"]}
|
||||
12
node_modules/@maplibre/mlt/dist/vector/fsst-dictionary/stringFsstDictionaryVector.d.ts
generated
vendored
Normal file
12
node_modules/@maplibre/mlt/dist/vector/fsst-dictionary/stringFsstDictionaryVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { VariableSizeVector } from "../variableSizeVector";
|
||||
import type BitVector from "../flat/bitVector";
|
||||
export declare class StringFsstDictionaryVector extends VariableSizeVector<Uint8Array, string> {
|
||||
private readonly indexBuffer;
|
||||
private readonly symbolOffsetBuffer;
|
||||
private readonly symbolTableBuffer;
|
||||
private symbolLengthBuffer;
|
||||
private decodedDictionary;
|
||||
constructor(name: string, indexBuffer: Uint32Array, offsetBuffer: Uint32Array, dictionaryBuffer: Uint8Array, symbolOffsetBuffer: Uint32Array, symbolTableBuffer: Uint8Array, nullabilityBuffer: BitVector);
|
||||
protected getValueFromBuffer(index: number): string;
|
||||
private offsetToLengthBuffer;
|
||||
}
|
||||
36
node_modules/@maplibre/mlt/dist/vector/fsst-dictionary/stringFsstDictionaryVector.js
generated
vendored
Normal file
36
node_modules/@maplibre/mlt/dist/vector/fsst-dictionary/stringFsstDictionaryVector.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
import { VariableSizeVector } from "../variableSizeVector";
|
||||
import { decodeFsst } from "../../decoding/fsstDecoder";
|
||||
import { decodeString } from "../../decoding/decodingUtils";
|
||||
export class StringFsstDictionaryVector extends VariableSizeVector {
|
||||
constructor(name, indexBuffer, offsetBuffer, dictionaryBuffer, symbolOffsetBuffer, symbolTableBuffer, nullabilityBuffer) {
|
||||
super(name, offsetBuffer, dictionaryBuffer, nullabilityBuffer);
|
||||
this.indexBuffer = indexBuffer;
|
||||
this.symbolOffsetBuffer = symbolOffsetBuffer;
|
||||
this.symbolTableBuffer = symbolTableBuffer;
|
||||
}
|
||||
getValueFromBuffer(index) {
|
||||
if (this.decodedDictionary == null) {
|
||||
if (this.symbolLengthBuffer == null) {
|
||||
// TODO: change FsstEncoder to take offsets instead of length to get rid of this conversion
|
||||
this.symbolLengthBuffer = this.offsetToLengthBuffer(this.symbolOffsetBuffer);
|
||||
}
|
||||
this.decodedDictionary = decodeFsst(this.symbolTableBuffer, this.symbolLengthBuffer, this.dataBuffer);
|
||||
}
|
||||
const offset = this.indexBuffer[index];
|
||||
const start = this.offsetBuffer[offset];
|
||||
const end = this.offsetBuffer[offset + 1];
|
||||
return decodeString(this.decodedDictionary, start, end);
|
||||
}
|
||||
// TODO: get rid of that conversion
|
||||
offsetToLengthBuffer(offsetBuffer) {
|
||||
const lengthBuffer = new Uint32Array(offsetBuffer.length - 1);
|
||||
let previousOffset = offsetBuffer[0];
|
||||
for (let i = 1; i < offsetBuffer.length; i++) {
|
||||
const offset = offsetBuffer[i];
|
||||
lengthBuffer[i - 1] = offset - previousOffset;
|
||||
previousOffset = offset;
|
||||
}
|
||||
return lengthBuffer;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=stringFsstDictionaryVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/fsst-dictionary/stringFsstDictionaryVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/fsst-dictionary/stringFsstDictionaryVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"stringFsstDictionaryVector.js","sourceRoot":"","sources":["../../../src/vector/fsst-dictionary/stringFsstDictionaryVector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,MAAM,OAAO,0BAA2B,SAAQ,kBAAsC;IAKlF,YACI,IAAY,EACK,WAAwB,EACzC,YAAyB,EACzB,gBAA4B,EACX,kBAA+B,EAC/B,iBAA6B,EAC9C,iBAA4B;QAE5B,KAAK,CAAC,IAAI,EAAE,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,CAAC,CAAC;QAP9C,gBAAW,GAAX,WAAW,CAAa;QAGxB,uBAAkB,GAAlB,kBAAkB,CAAa;QAC/B,sBAAiB,GAAjB,iBAAiB,CAAY;IAIlD,CAAC;IAES,kBAAkB,CAAC,KAAa;QACtC,IAAI,IAAI,CAAC,iBAAiB,IAAI,IAAI,EAAE,CAAC;YACjC,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI,EAAE,CAAC;gBAClC,2FAA2F;gBAC3F,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;YACjF,CAAC;YAED,IAAI,CAAC,iBAAiB,GAAG,UAAU,CAAC,IAAI,CAAC,iBAAiB,EAAE,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;QAC1G,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACvC,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QACxC,MAAM,GAAG,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC1C,OAAO,YAAY,CAAC,IAAI,CAAC,iBAAiB,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;IAC5D,CAAC;IAED,mCAAmC;IAC3B,oBAAoB,CAAC,YAAyB;QAClD,MAAM,YAAY,GAAG,IAAI,WAAW,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAC9D,IAAI,cAAc,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;QACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YAC3C,MAAM,MAAM,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;YAC/B,YAAY,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,MAAM,GAAG,cAAc,CAAC;YAC9C,cAAc,GAAG,MAAM,CAAC;QAC5B,CAAC;QAED,OAAO,YAAY,CAAC;IACxB,CAAC;CACJ","sourcesContent":["import { VariableSizeVector } from \"../variableSizeVector\";\nimport type BitVector from \"../flat/bitVector\";\nimport { decodeFsst } from \"../../decoding/fsstDecoder\";\nimport { decodeString } from \"../../decoding/decodingUtils\";\n\nexport class StringFsstDictionaryVector extends VariableSizeVector<Uint8Array, string> {\n // TODO: extend from StringVector\n private symbolLengthBuffer: Uint32Array;\n private decodedDictionary: Uint8Array;\n\n constructor(\n name: string,\n private readonly indexBuffer: Uint32Array,\n offsetBuffer: Uint32Array,\n dictionaryBuffer: Uint8Array,\n private readonly symbolOffsetBuffer: Uint32Array,\n private readonly symbolTableBuffer: Uint8Array,\n nullabilityBuffer: BitVector,\n ) {\n super(name, offsetBuffer, dictionaryBuffer, nullabilityBuffer);\n }\n\n protected getValueFromBuffer(index: number): string {\n if (this.decodedDictionary == null) {\n if (this.symbolLengthBuffer == null) {\n // TODO: change FsstEncoder to take offsets instead of length to get rid of this conversion\n this.symbolLengthBuffer = this.offsetToLengthBuffer(this.symbolOffsetBuffer);\n }\n\n this.decodedDictionary = decodeFsst(this.symbolTableBuffer, this.symbolLengthBuffer, this.dataBuffer);\n }\n\n const offset = this.indexBuffer[index];\n const start = this.offsetBuffer[offset];\n const end = this.offsetBuffer[offset + 1];\n return decodeString(this.decodedDictionary, start, end);\n }\n\n // TODO: get rid of that conversion\n private offsetToLengthBuffer(offsetBuffer: Uint32Array): Uint32Array {\n const lengthBuffer = new Uint32Array(offsetBuffer.length - 1);\n let previousOffset = offsetBuffer[0];\n for (let i = 1; i < offsetBuffer.length; i++) {\n const offset = offsetBuffer[i];\n lengthBuffer[i - 1] = offset - previousOffset;\n previousOffset = offset;\n }\n\n return lengthBuffer;\n }\n}\n"]}
|
||||
14
node_modules/@maplibre/mlt/dist/vector/geometry/constGeometryVector.d.ts
generated
vendored
Normal file
14
node_modules/@maplibre/mlt/dist/vector/geometry/constGeometryVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { GeometryVector, type MortonSettings } from "./geometryVector";
|
||||
import { VertexBufferType } from "./vertexBufferType";
|
||||
import type { TopologyVector } from "../../vector/geometry/topologyVector";
|
||||
export declare function createConstGeometryVector(numGeometries: number, geometryType: number, topologyVector: TopologyVector, vertexOffsets: Uint32Array | undefined, vertexBuffer: Int32Array | Uint32Array): ConstGeometryVector;
|
||||
export declare function createMortonEncodedConstGeometryVector(numGeometries: number, geometryType: number, topologyVector: TopologyVector, vertexOffsets: Uint32Array | undefined, vertexBuffer: Int32Array | Uint32Array, mortonInfo: MortonSettings): ConstGeometryVector;
|
||||
export declare class ConstGeometryVector extends GeometryVector {
|
||||
private readonly _numGeometries;
|
||||
private readonly _geometryType;
|
||||
constructor(_numGeometries: number, _geometryType: number, vertexBufferType: VertexBufferType, topologyVector: TopologyVector, vertexOffsets: Uint32Array | undefined, vertexBuffer: Int32Array | Uint32Array, mortonSettings?: MortonSettings);
|
||||
geometryType(_index: number): number;
|
||||
get numGeometries(): number;
|
||||
containsPolygonGeometry(): boolean;
|
||||
containsSingleGeometryType(): boolean;
|
||||
}
|
||||
29
node_modules/@maplibre/mlt/dist/vector/geometry/constGeometryVector.js
generated
vendored
Normal file
29
node_modules/@maplibre/mlt/dist/vector/geometry/constGeometryVector.js
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
import { GeometryVector } from "./geometryVector";
|
||||
import { GEOMETRY_TYPE } from "./geometryType";
|
||||
import { VertexBufferType } from "./vertexBufferType";
|
||||
export function createConstGeometryVector(numGeometries, geometryType, topologyVector, vertexOffsets, vertexBuffer) {
|
||||
return new ConstGeometryVector(numGeometries, geometryType, VertexBufferType.VEC_2, topologyVector, vertexOffsets, vertexBuffer);
|
||||
}
|
||||
export function createMortonEncodedConstGeometryVector(numGeometries, geometryType, topologyVector, vertexOffsets, vertexBuffer, mortonInfo) {
|
||||
return new ConstGeometryVector(numGeometries, geometryType, VertexBufferType.MORTON, topologyVector, vertexOffsets, vertexBuffer, mortonInfo);
|
||||
}
|
||||
export class ConstGeometryVector extends GeometryVector {
|
||||
constructor(_numGeometries, _geometryType, vertexBufferType, topologyVector, vertexOffsets, vertexBuffer, mortonSettings) {
|
||||
super(vertexBufferType, topologyVector, vertexOffsets, vertexBuffer, mortonSettings);
|
||||
this._numGeometries = _numGeometries;
|
||||
this._geometryType = _geometryType;
|
||||
}
|
||||
geometryType(_index) {
|
||||
return this._geometryType;
|
||||
}
|
||||
get numGeometries() {
|
||||
return this._numGeometries;
|
||||
}
|
||||
containsPolygonGeometry() {
|
||||
return this._geometryType === GEOMETRY_TYPE.POLYGON || this._geometryType === GEOMETRY_TYPE.MULTIPOLYGON;
|
||||
}
|
||||
containsSingleGeometryType() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=constGeometryVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/geometry/constGeometryVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/geometry/constGeometryVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"constGeometryVector.js","sourceRoot":"","sources":["../../../src/vector/geometry/constGeometryVector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,MAAM,UAAU,yBAAyB,CACrC,aAAqB,EACrB,YAAoB,EACpB,cAA8B,EAC9B,aAAsC,EACtC,YAAsC;IAEtC,OAAO,IAAI,mBAAmB,CAC1B,aAAa,EACb,YAAY,EACZ,gBAAgB,CAAC,KAAK,EACtB,cAAc,EACd,aAAa,EACb,YAAY,CACf,CAAC;AACN,CAAC;AAED,MAAM,UAAU,sCAAsC,CAClD,aAAqB,EACrB,YAAoB,EACpB,cAA8B,EAC9B,aAAsC,EACtC,YAAsC,EACtC,UAA0B;IAE1B,OAAO,IAAI,mBAAmB,CAC1B,aAAa,EACb,YAAY,EACZ,gBAAgB,CAAC,MAAM,EACvB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,UAAU,CACb,CAAC;AACN,CAAC;AAED,MAAM,OAAO,mBAAoB,SAAQ,cAAc;IACnD,YACqB,cAAsB,EACtB,aAAqB,EACtC,gBAAkC,EAClC,cAA8B,EAC9B,aAAsC,EACtC,YAAsC,EACtC,cAA+B;QAE/B,KAAK,CAAC,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;QARpE,mBAAc,GAAd,cAAc,CAAQ;QACtB,kBAAa,GAAb,aAAa,CAAQ;IAQ1C,CAAC;IAED,YAAY,CAAC,MAAc;QACvB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED,IAAI,aAAa;QACb,OAAO,IAAI,CAAC,cAAc,CAAC;IAC/B,CAAC;IAED,uBAAuB;QACnB,OAAO,IAAI,CAAC,aAAa,KAAK,aAAa,CAAC,OAAO,IAAI,IAAI,CAAC,aAAa,KAAK,aAAa,CAAC,YAAY,CAAC;IAC7G,CAAC;IAED,0BAA0B;QACtB,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ","sourcesContent":["import { GeometryVector, type MortonSettings } from \"./geometryVector\";\nimport { GEOMETRY_TYPE } from \"./geometryType\";\nimport { VertexBufferType } from \"./vertexBufferType\";\nimport type { TopologyVector } from \"../../vector/geometry/topologyVector\";\n\nexport function createConstGeometryVector(\n numGeometries: number,\n geometryType: number,\n topologyVector: TopologyVector,\n vertexOffsets: Uint32Array | undefined,\n vertexBuffer: Int32Array | Uint32Array,\n): ConstGeometryVector {\n return new ConstGeometryVector(\n numGeometries,\n geometryType,\n VertexBufferType.VEC_2,\n topologyVector,\n vertexOffsets,\n vertexBuffer,\n );\n}\n\nexport function createMortonEncodedConstGeometryVector(\n numGeometries: number,\n geometryType: number,\n topologyVector: TopologyVector,\n vertexOffsets: Uint32Array | undefined,\n vertexBuffer: Int32Array | Uint32Array,\n mortonInfo: MortonSettings,\n): ConstGeometryVector {\n return new ConstGeometryVector(\n numGeometries,\n geometryType,\n VertexBufferType.MORTON,\n topologyVector,\n vertexOffsets,\n vertexBuffer,\n mortonInfo,\n );\n}\n\nexport class ConstGeometryVector extends GeometryVector {\n constructor(\n private readonly _numGeometries: number,\n private readonly _geometryType: number,\n vertexBufferType: VertexBufferType,\n topologyVector: TopologyVector,\n vertexOffsets: Uint32Array | undefined,\n vertexBuffer: Int32Array | Uint32Array,\n mortonSettings?: MortonSettings,\n ) {\n super(vertexBufferType, topologyVector, vertexOffsets, vertexBuffer, mortonSettings);\n }\n\n geometryType(_index: number): number {\n return this._geometryType;\n }\n\n get numGeometries(): number {\n return this._numGeometries;\n }\n\n containsPolygonGeometry(): boolean {\n return this._geometryType === GEOMETRY_TYPE.POLYGON || this._geometryType === GEOMETRY_TYPE.MULTIPOLYGON;\n }\n\n containsSingleGeometryType(): boolean {\n return true;\n }\n}\n"]}
|
||||
11
node_modules/@maplibre/mlt/dist/vector/geometry/constGpuVector.d.ts
generated
vendored
Normal file
11
node_modules/@maplibre/mlt/dist/vector/geometry/constGpuVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
import { GpuVector } from "./gpuVector";
|
||||
import type { TopologyVector } from "./topologyVector";
|
||||
export declare function createConstGpuVector(numGeometries: number, geometryType: number, triangleOffsets: Uint32Array, indexBuffer: Uint32Array, vertexBuffer: Int32Array | Uint32Array, topologyVector?: TopologyVector): GpuVector;
|
||||
export declare class ConstGpuVector extends GpuVector {
|
||||
private readonly _numGeometries;
|
||||
private readonly _geometryType;
|
||||
constructor(_numGeometries: number, _geometryType: number, triangleOffsets: Uint32Array, indexBuffer: Uint32Array, vertexBuffer: Int32Array | Uint32Array, topologyVector?: TopologyVector);
|
||||
geometryType(_index: number): number;
|
||||
get numGeometries(): number;
|
||||
containsSingleGeometryType(): boolean;
|
||||
}
|
||||
22
node_modules/@maplibre/mlt/dist/vector/geometry/constGpuVector.js
generated
vendored
Normal file
22
node_modules/@maplibre/mlt/dist/vector/geometry/constGpuVector.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import { GpuVector } from "./gpuVector";
|
||||
export function createConstGpuVector(numGeometries, geometryType, triangleOffsets, indexBuffer, vertexBuffer, topologyVector) {
|
||||
return new ConstGpuVector(numGeometries, geometryType, triangleOffsets, indexBuffer, vertexBuffer, topologyVector);
|
||||
}
|
||||
//TODO: extend from GeometryVector -> make topology vector optional
|
||||
export class ConstGpuVector extends GpuVector {
|
||||
constructor(_numGeometries, _geometryType, triangleOffsets, indexBuffer, vertexBuffer, topologyVector) {
|
||||
super(triangleOffsets, indexBuffer, vertexBuffer, topologyVector);
|
||||
this._numGeometries = _numGeometries;
|
||||
this._geometryType = _geometryType;
|
||||
}
|
||||
geometryType(_index) {
|
||||
return this._geometryType;
|
||||
}
|
||||
get numGeometries() {
|
||||
return this._numGeometries;
|
||||
}
|
||||
containsSingleGeometryType() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=constGpuVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/geometry/constGpuVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/geometry/constGpuVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"constGpuVector.js","sourceRoot":"","sources":["../../../src/vector/geometry/constGpuVector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,MAAM,UAAU,oBAAoB,CAChC,aAAqB,EACrB,YAAoB,EACpB,eAA4B,EAC5B,WAAwB,EACxB,YAAsC,EACtC,cAA+B;IAE/B,OAAO,IAAI,cAAc,CAAC,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;AACvH,CAAC;AAED,mEAAmE;AACnE,MAAM,OAAO,cAAe,SAAQ,SAAS;IACzC,YACqB,cAAsB,EACtB,aAAqB,EACtC,eAA4B,EAC5B,WAAwB,EACxB,YAAsC,EACtC,cAA+B;QAE/B,KAAK,CAAC,eAAe,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;QAPjD,mBAAc,GAAd,cAAc,CAAQ;QACtB,kBAAa,GAAb,aAAa,CAAQ;IAO1C,CAAC;IAED,YAAY,CAAC,MAAc;QACvB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED,IAAI,aAAa;QACb,OAAO,IAAI,CAAC,cAAc,CAAC;IAC/B,CAAC;IAED,0BAA0B;QACtB,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ","sourcesContent":["import { GpuVector } from \"./gpuVector\";\nimport type { TopologyVector } from \"./topologyVector\";\n\nexport function createConstGpuVector(\n numGeometries: number,\n geometryType: number,\n triangleOffsets: Uint32Array,\n indexBuffer: Uint32Array,\n vertexBuffer: Int32Array | Uint32Array,\n topologyVector?: TopologyVector,\n): GpuVector {\n return new ConstGpuVector(numGeometries, geometryType, triangleOffsets, indexBuffer, vertexBuffer, topologyVector);\n}\n\n//TODO: extend from GeometryVector -> make topology vector optional\nexport class ConstGpuVector extends GpuVector {\n constructor(\n private readonly _numGeometries: number,\n private readonly _geometryType: number,\n triangleOffsets: Uint32Array,\n indexBuffer: Uint32Array,\n vertexBuffer: Int32Array | Uint32Array,\n topologyVector?: TopologyVector,\n ) {\n super(triangleOffsets, indexBuffer, vertexBuffer, topologyVector);\n }\n\n geometryType(_index: number): number {\n return this._geometryType;\n }\n\n get numGeometries(): number {\n return this._numGeometries;\n }\n\n containsSingleGeometryType(): boolean {\n return true;\n }\n}\n"]}
|
||||
13
node_modules/@maplibre/mlt/dist/vector/geometry/flatGeometryVector.d.ts
generated
vendored
Normal file
13
node_modules/@maplibre/mlt/dist/vector/geometry/flatGeometryVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { GeometryVector, type MortonSettings } from "./geometryVector";
|
||||
import { VertexBufferType } from "./vertexBufferType";
|
||||
import type { TopologyVector } from "../../vector/geometry/topologyVector";
|
||||
export declare function createFlatGeometryVector(geometryTypes: Uint32Array, topologyVector: TopologyVector, vertexOffsets: Uint32Array | undefined, vertexBuffer: Int32Array | Uint32Array): FlatGeometryVector;
|
||||
export declare function createFlatGeometryVectorMortonEncoded(geometryTypes: Uint32Array, topologyVector: TopologyVector, vertexOffsets: Uint32Array | undefined, vertexBuffer: Int32Array | Uint32Array, mortonInfo: MortonSettings): FlatGeometryVector;
|
||||
export declare class FlatGeometryVector extends GeometryVector {
|
||||
private readonly _geometryTypes;
|
||||
constructor(vertexBufferType: VertexBufferType, _geometryTypes: Uint32Array, topologyVector: TopologyVector, vertexOffsets: Uint32Array | undefined, vertexBuffer: Int32Array | Uint32Array, mortonSettings?: MortonSettings);
|
||||
geometryType(index: number): number;
|
||||
get numGeometries(): number;
|
||||
containsPolygonGeometry(): boolean;
|
||||
containsSingleGeometryType(): boolean;
|
||||
}
|
||||
33
node_modules/@maplibre/mlt/dist/vector/geometry/flatGeometryVector.js
generated
vendored
Normal file
33
node_modules/@maplibre/mlt/dist/vector/geometry/flatGeometryVector.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
import { GeometryVector } from "./geometryVector";
|
||||
import { GEOMETRY_TYPE } from "./geometryType";
|
||||
import { VertexBufferType } from "./vertexBufferType";
|
||||
export function createFlatGeometryVector(geometryTypes, topologyVector, vertexOffsets, vertexBuffer) {
|
||||
return new FlatGeometryVector(VertexBufferType.VEC_2, geometryTypes, topologyVector, vertexOffsets, vertexBuffer);
|
||||
}
|
||||
export function createFlatGeometryVectorMortonEncoded(geometryTypes, topologyVector, vertexOffsets, vertexBuffer, mortonInfo) {
|
||||
return new FlatGeometryVector(VertexBufferType.MORTON, geometryTypes, topologyVector, vertexOffsets, vertexBuffer, mortonInfo);
|
||||
}
|
||||
export class FlatGeometryVector extends GeometryVector {
|
||||
constructor(vertexBufferType, _geometryTypes, topologyVector, vertexOffsets, vertexBuffer, mortonSettings) {
|
||||
super(vertexBufferType, topologyVector, vertexOffsets, vertexBuffer, mortonSettings);
|
||||
this._geometryTypes = _geometryTypes;
|
||||
}
|
||||
geometryType(index) {
|
||||
return this._geometryTypes[index];
|
||||
}
|
||||
get numGeometries() {
|
||||
return this._geometryTypes.length;
|
||||
}
|
||||
containsPolygonGeometry() {
|
||||
for (let i = 0; i < this.numGeometries; i++) {
|
||||
if (this.geometryType(i) === GEOMETRY_TYPE.POLYGON || this.geometryType(i) === GEOMETRY_TYPE.MULTIPOLYGON) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
containsSingleGeometryType() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=flatGeometryVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/geometry/flatGeometryVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/geometry/flatGeometryVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"flatGeometryVector.js","sourceRoot":"","sources":["../../../src/vector/geometry/flatGeometryVector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAuB,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,MAAM,UAAU,wBAAwB,CACpC,aAA0B,EAC1B,cAA8B,EAC9B,aAAsC,EACtC,YAAsC;IAEtC,OAAO,IAAI,kBAAkB,CAAC,gBAAgB,CAAC,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC;AACtH,CAAC;AAED,MAAM,UAAU,qCAAqC,CACjD,aAA0B,EAC1B,cAA8B,EAC9B,aAAsC,EACtC,YAAsC,EACtC,UAA0B;IAE1B,OAAO,IAAI,kBAAkB,CACzB,gBAAgB,CAAC,MAAM,EACvB,aAAa,EACb,cAAc,EACd,aAAa,EACb,YAAY,EACZ,UAAU,CACb,CAAC;AACN,CAAC;AAED,MAAM,OAAO,kBAAmB,SAAQ,cAAc;IAClD,YACI,gBAAkC,EACjB,cAA2B,EAC5C,cAA8B,EAC9B,aAAsC,EACtC,YAAsC,EACtC,cAA+B;QAE/B,KAAK,CAAC,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;QANpE,mBAAc,GAAd,cAAc,CAAa;IAOhD,CAAC;IAED,YAAY,CAAC,KAAa;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC;IAED,IAAI,aAAa;QACb,OAAO,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC;IACtC,CAAC;IAED,uBAAuB;QACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC,EAAE,EAAE,CAAC;YAC1C,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,aAAa,CAAC,OAAO,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,aAAa,CAAC,YAAY,EAAE,CAAC;gBACxG,OAAO,IAAI,CAAC;YAChB,CAAC;QACL,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,0BAA0B;QACtB,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ","sourcesContent":["import { GeometryVector, type MortonSettings } from \"./geometryVector\";\nimport { GEOMETRY_TYPE } from \"./geometryType\";\nimport { VertexBufferType } from \"./vertexBufferType\";\nimport type { TopologyVector } from \"../../vector/geometry/topologyVector\";\n\nexport function createFlatGeometryVector(\n geometryTypes: Uint32Array,\n topologyVector: TopologyVector,\n vertexOffsets: Uint32Array | undefined,\n vertexBuffer: Int32Array | Uint32Array,\n): FlatGeometryVector {\n return new FlatGeometryVector(VertexBufferType.VEC_2, geometryTypes, topologyVector, vertexOffsets, vertexBuffer);\n}\n\nexport function createFlatGeometryVectorMortonEncoded(\n geometryTypes: Uint32Array,\n topologyVector: TopologyVector,\n vertexOffsets: Uint32Array | undefined,\n vertexBuffer: Int32Array | Uint32Array,\n mortonInfo: MortonSettings,\n): FlatGeometryVector {\n return new FlatGeometryVector(\n VertexBufferType.MORTON,\n geometryTypes,\n topologyVector,\n vertexOffsets,\n vertexBuffer,\n mortonInfo,\n );\n}\n\nexport class FlatGeometryVector extends GeometryVector {\n constructor(\n vertexBufferType: VertexBufferType,\n private readonly _geometryTypes: Uint32Array,\n topologyVector: TopologyVector,\n vertexOffsets: Uint32Array | undefined,\n vertexBuffer: Int32Array | Uint32Array,\n mortonSettings?: MortonSettings,\n ) {\n super(vertexBufferType, topologyVector, vertexOffsets, vertexBuffer, mortonSettings);\n }\n\n geometryType(index: number): number {\n return this._geometryTypes[index];\n }\n\n get numGeometries(): number {\n return this._geometryTypes.length;\n }\n\n containsPolygonGeometry(): boolean {\n for (let i = 0; i < this.numGeometries; i++) {\n if (this.geometryType(i) === GEOMETRY_TYPE.POLYGON || this.geometryType(i) === GEOMETRY_TYPE.MULTIPOLYGON) {\n return true;\n }\n }\n return false;\n }\n\n containsSingleGeometryType(): boolean {\n return false;\n }\n}\n"]}
|
||||
10
node_modules/@maplibre/mlt/dist/vector/geometry/flatGpuVector.d.ts
generated
vendored
Normal file
10
node_modules/@maplibre/mlt/dist/vector/geometry/flatGpuVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { GpuVector } from "./gpuVector";
|
||||
import type { TopologyVector } from "./topologyVector";
|
||||
export declare function createFlatGpuVector(geometryTypes: Uint32Array, triangleOffsets: Uint32Array, indexBuffer: Uint32Array, vertexBuffer: Int32Array | Uint32Array, topologyVector?: TopologyVector): GpuVector;
|
||||
export declare class FlatGpuVector extends GpuVector {
|
||||
private readonly _geometryTypes;
|
||||
constructor(_geometryTypes: Uint32Array, triangleOffsets: Uint32Array, indexBuffer: Uint32Array, vertexBuffer: Int32Array | Uint32Array, topologyVector?: TopologyVector);
|
||||
geometryType(index: number): number;
|
||||
get numGeometries(): number;
|
||||
containsSingleGeometryType(): boolean;
|
||||
}
|
||||
21
node_modules/@maplibre/mlt/dist/vector/geometry/flatGpuVector.js
generated
vendored
Normal file
21
node_modules/@maplibre/mlt/dist/vector/geometry/flatGpuVector.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import { GpuVector } from "./gpuVector";
|
||||
export function createFlatGpuVector(geometryTypes, triangleOffsets, indexBuffer, vertexBuffer, topologyVector) {
|
||||
return new FlatGpuVector(geometryTypes, triangleOffsets, indexBuffer, vertexBuffer, topologyVector);
|
||||
}
|
||||
//TODO: extend from GeometryVector -> make topology vector optional
|
||||
export class FlatGpuVector extends GpuVector {
|
||||
constructor(_geometryTypes, triangleOffsets, indexBuffer, vertexBuffer, topologyVector) {
|
||||
super(triangleOffsets, indexBuffer, vertexBuffer, topologyVector);
|
||||
this._geometryTypes = _geometryTypes;
|
||||
}
|
||||
geometryType(index) {
|
||||
return this._geometryTypes[index];
|
||||
}
|
||||
get numGeometries() {
|
||||
return this._geometryTypes.length;
|
||||
}
|
||||
containsSingleGeometryType() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=flatGpuVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/geometry/flatGpuVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/geometry/flatGpuVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"flatGpuVector.js","sourceRoot":"","sources":["../../../src/vector/geometry/flatGpuVector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,MAAM,UAAU,mBAAmB,CAC/B,aAA0B,EAC1B,eAA4B,EAC5B,WAAwB,EACxB,YAAsC,EACtC,cAA+B;IAE/B,OAAO,IAAI,aAAa,CAAC,aAAa,EAAE,eAAe,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;AACxG,CAAC;AAED,mEAAmE;AACnE,MAAM,OAAO,aAAc,SAAQ,SAAS;IACxC,YACqB,cAA2B,EAC5C,eAA4B,EAC5B,WAAwB,EACxB,YAAsC,EACtC,cAA+B;QAE/B,KAAK,CAAC,eAAe,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;QANjD,mBAAc,GAAd,cAAc,CAAa;IAOhD,CAAC;IAED,YAAY,CAAC,KAAa;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC;IAED,IAAI,aAAa;QACb,OAAO,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC;IACtC,CAAC;IAED,0BAA0B;QACtB,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ","sourcesContent":["import { GpuVector } from \"./gpuVector\";\nimport type { TopologyVector } from \"./topologyVector\";\n\nexport function createFlatGpuVector(\n geometryTypes: Uint32Array,\n triangleOffsets: Uint32Array,\n indexBuffer: Uint32Array,\n vertexBuffer: Int32Array | Uint32Array,\n topologyVector?: TopologyVector,\n): GpuVector {\n return new FlatGpuVector(geometryTypes, triangleOffsets, indexBuffer, vertexBuffer, topologyVector);\n}\n\n//TODO: extend from GeometryVector -> make topology vector optional\nexport class FlatGpuVector extends GpuVector {\n constructor(\n private readonly _geometryTypes: Uint32Array,\n triangleOffsets: Uint32Array,\n indexBuffer: Uint32Array,\n vertexBuffer: Int32Array | Uint32Array,\n topologyVector?: TopologyVector,\n ) {\n super(triangleOffsets, indexBuffer, vertexBuffer, topologyVector);\n }\n\n geometryType(index: number): number {\n return this._geometryTypes[index];\n }\n\n get numGeometries(): number {\n return this._geometryTypes.length;\n }\n\n containsSingleGeometryType(): boolean {\n return false;\n }\n}\n"]}
|
||||
13
node_modules/@maplibre/mlt/dist/vector/geometry/geometryType.d.ts
generated
vendored
Normal file
13
node_modules/@maplibre/mlt/dist/vector/geometry/geometryType.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
export declare enum GEOMETRY_TYPE {
|
||||
POINT = 0,
|
||||
LINESTRING = 1,
|
||||
POLYGON = 2,
|
||||
MULTIPOINT = 3,
|
||||
MULTILINESTRING = 4,
|
||||
MULTIPOLYGON = 5
|
||||
}
|
||||
export declare enum SINGLE_PART_GEOMETRY_TYPE {
|
||||
POINT = 0,
|
||||
LINESTRING = 1,
|
||||
POLYGON = 2
|
||||
}
|
||||
16
node_modules/@maplibre/mlt/dist/vector/geometry/geometryType.js
generated
vendored
Normal file
16
node_modules/@maplibre/mlt/dist/vector/geometry/geometryType.js
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
export var GEOMETRY_TYPE;
|
||||
(function (GEOMETRY_TYPE) {
|
||||
GEOMETRY_TYPE[GEOMETRY_TYPE["POINT"] = 0] = "POINT";
|
||||
GEOMETRY_TYPE[GEOMETRY_TYPE["LINESTRING"] = 1] = "LINESTRING";
|
||||
GEOMETRY_TYPE[GEOMETRY_TYPE["POLYGON"] = 2] = "POLYGON";
|
||||
GEOMETRY_TYPE[GEOMETRY_TYPE["MULTIPOINT"] = 3] = "MULTIPOINT";
|
||||
GEOMETRY_TYPE[GEOMETRY_TYPE["MULTILINESTRING"] = 4] = "MULTILINESTRING";
|
||||
GEOMETRY_TYPE[GEOMETRY_TYPE["MULTIPOLYGON"] = 5] = "MULTIPOLYGON";
|
||||
})(GEOMETRY_TYPE || (GEOMETRY_TYPE = {}));
|
||||
export var SINGLE_PART_GEOMETRY_TYPE;
|
||||
(function (SINGLE_PART_GEOMETRY_TYPE) {
|
||||
SINGLE_PART_GEOMETRY_TYPE[SINGLE_PART_GEOMETRY_TYPE["POINT"] = 0] = "POINT";
|
||||
SINGLE_PART_GEOMETRY_TYPE[SINGLE_PART_GEOMETRY_TYPE["LINESTRING"] = 1] = "LINESTRING";
|
||||
SINGLE_PART_GEOMETRY_TYPE[SINGLE_PART_GEOMETRY_TYPE["POLYGON"] = 2] = "POLYGON";
|
||||
})(SINGLE_PART_GEOMETRY_TYPE || (SINGLE_PART_GEOMETRY_TYPE = {}));
|
||||
//# sourceMappingURL=geometryType.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/geometry/geometryType.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/geometry/geometryType.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"geometryType.js","sourceRoot":"","sources":["../../../src/vector/geometry/geometryType.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,aAOX;AAPD,WAAY,aAAa;IACrB,mDAAS,CAAA;IACT,6DAAc,CAAA;IACd,uDAAW,CAAA;IACX,6DAAc,CAAA;IACd,uEAAmB,CAAA;IACnB,iEAAgB,CAAA;AACpB,CAAC,EAPW,aAAa,KAAb,aAAa,QAOxB;AAED,MAAM,CAAN,IAAY,yBAIX;AAJD,WAAY,yBAAyB;IACjC,2EAAS,CAAA;IACT,qFAAc,CAAA;IACd,+EAAW,CAAA;AACf,CAAC,EAJW,yBAAyB,KAAzB,yBAAyB,QAIpC","sourcesContent":["export enum GEOMETRY_TYPE {\n POINT = 0,\n LINESTRING = 1,\n POLYGON = 2,\n MULTIPOINT = 3,\n MULTILINESTRING = 4,\n MULTIPOLYGON = 5,\n}\n\nexport enum SINGLE_PART_GEOMETRY_TYPE {\n POINT = 0,\n LINESTRING = 1,\n POLYGON = 2,\n}\n"]}
|
||||
33
node_modules/@maplibre/mlt/dist/vector/geometry/geometryVector.d.ts
generated
vendored
Normal file
33
node_modules/@maplibre/mlt/dist/vector/geometry/geometryVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
import type Point from "@mapbox/point-geometry";
|
||||
import type { GEOMETRY_TYPE } from "./geometryType";
|
||||
import type { VertexBufferType } from "./vertexBufferType";
|
||||
import type { TopologyVector } from "../../vector/geometry/topologyVector";
|
||||
export type CoordinatesArray = Array<Array<Point>>;
|
||||
export type Geometry = {
|
||||
coordinates: CoordinatesArray;
|
||||
type: GEOMETRY_TYPE;
|
||||
};
|
||||
export interface MortonSettings {
|
||||
numBits: number;
|
||||
coordinateShift: number;
|
||||
}
|
||||
export declare abstract class GeometryVector {
|
||||
private readonly _vertexBufferType;
|
||||
private readonly _topologyVector;
|
||||
private readonly _vertexOffsets;
|
||||
private readonly _vertexBuffer;
|
||||
private readonly _mortonSettings?;
|
||||
protected constructor(_vertexBufferType: VertexBufferType, _topologyVector: TopologyVector, _vertexOffsets: Uint32Array | undefined, _vertexBuffer: Int32Array | Uint32Array, _mortonSettings?: MortonSettings);
|
||||
get vertexBufferType(): VertexBufferType;
|
||||
get topologyVector(): TopologyVector;
|
||||
get vertexOffsets(): Uint32Array | undefined;
|
||||
get vertexBuffer(): Int32Array | Uint32Array;
|
||||
getSimpleEncodedVertex(index: number): [number, number];
|
||||
getVertex(index: number): [number, number];
|
||||
getGeometries(): CoordinatesArray[];
|
||||
get mortonSettings(): MortonSettings | undefined;
|
||||
abstract containsPolygonGeometry(): boolean;
|
||||
abstract geometryType(index: number): number;
|
||||
abstract get numGeometries(): number;
|
||||
abstract containsSingleGeometryType(): boolean;
|
||||
}
|
||||
53
node_modules/@maplibre/mlt/dist/vector/geometry/geometryVector.js
generated
vendored
Normal file
53
node_modules/@maplibre/mlt/dist/vector/geometry/geometryVector.js
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
import { convertGeometryVector } from "./geometryVectorConverter";
|
||||
import { decodeZOrderCurve } from "./zOrderCurve";
|
||||
export class GeometryVector {
|
||||
constructor(_vertexBufferType, _topologyVector, _vertexOffsets, _vertexBuffer, _mortonSettings) {
|
||||
this._vertexBufferType = _vertexBufferType;
|
||||
this._topologyVector = _topologyVector;
|
||||
this._vertexOffsets = _vertexOffsets;
|
||||
this._vertexBuffer = _vertexBuffer;
|
||||
this._mortonSettings = _mortonSettings;
|
||||
}
|
||||
get vertexBufferType() {
|
||||
return this._vertexBufferType;
|
||||
}
|
||||
get topologyVector() {
|
||||
return this._topologyVector;
|
||||
}
|
||||
get vertexOffsets() {
|
||||
return this._vertexOffsets;
|
||||
}
|
||||
get vertexBuffer() {
|
||||
return this._vertexBuffer;
|
||||
}
|
||||
/* Allows faster access to the vertices since morton encoding is currently not used in the POC. Morton encoding
|
||||
will be used after adapting the shader to decode the morton codes on the GPU. */
|
||||
getSimpleEncodedVertex(index) {
|
||||
const offset = this.vertexOffsets ? this.vertexOffsets[index] * 2 : index * 2;
|
||||
const x = this.vertexBuffer[offset];
|
||||
const y = this.vertexBuffer[offset + 1];
|
||||
return [x, y];
|
||||
}
|
||||
//TODO: add scaling information to the constructor
|
||||
getVertex(index) {
|
||||
if (this.vertexOffsets && this.mortonSettings) {
|
||||
//TODO: move decoding of the morton codes on the GPU in the vertex shader
|
||||
const vertexOffset = this.vertexOffsets[index];
|
||||
const mortonEncodedVertex = this.vertexBuffer[vertexOffset];
|
||||
//TODO: improve performance -> inline calculation and move to decoding of VertexBuffer
|
||||
const vertex = decodeZOrderCurve(mortonEncodedVertex, this.mortonSettings.numBits, this.mortonSettings.coordinateShift);
|
||||
return [vertex.x, vertex.y];
|
||||
}
|
||||
const offset = this.vertexOffsets ? this.vertexOffsets[index] * 2 : index * 2;
|
||||
const x = this.vertexBuffer[offset];
|
||||
const y = this.vertexBuffer[offset + 1];
|
||||
return [x, y];
|
||||
}
|
||||
getGeometries() {
|
||||
return convertGeometryVector(this);
|
||||
}
|
||||
get mortonSettings() {
|
||||
return this._mortonSettings;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=geometryVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/geometry/geometryVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/geometry/geometryVector.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
node_modules/@maplibre/mlt/dist/vector/geometry/geometryVectorConverter.d.ts
generated
vendored
Normal file
2
node_modules/@maplibre/mlt/dist/vector/geometry/geometryVectorConverter.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { GeometryVector, CoordinatesArray } from "./geometryVector";
|
||||
export declare function convertGeometryVector(geometryVector: GeometryVector): CoordinatesArray[];
|
||||
255
node_modules/@maplibre/mlt/dist/vector/geometry/geometryVectorConverter.js
generated
vendored
Normal file
255
node_modules/@maplibre/mlt/dist/vector/geometry/geometryVectorConverter.js
generated
vendored
Normal file
@@ -0,0 +1,255 @@
|
||||
import { decodeZOrderCurve } from "./zOrderCurve";
|
||||
import { GEOMETRY_TYPE } from "./geometryType";
|
||||
import { VertexBufferType } from "./vertexBufferType";
|
||||
import Point from "@mapbox/point-geometry";
|
||||
export function convertGeometryVector(geometryVector) {
|
||||
const geometries = new Array(geometryVector.numGeometries);
|
||||
let partOffsetCounter = 1;
|
||||
let ringOffsetsCounter = 1;
|
||||
let geometryOffsetsCounter = 1;
|
||||
let geometryCounter = 0;
|
||||
let vertexBufferOffset = 0;
|
||||
let vertexOffsetsOffset = 0;
|
||||
const mortonSettings = geometryVector.mortonSettings;
|
||||
const topologyVector = geometryVector.topologyVector;
|
||||
const geometryOffsets = topologyVector.geometryOffsets;
|
||||
const partOffsets = topologyVector.partOffsets;
|
||||
const ringOffsets = topologyVector.ringOffsets;
|
||||
const vertexOffsets = geometryVector.vertexOffsets;
|
||||
const nonOffset = !vertexOffsets || vertexOffsets.length === 0;
|
||||
const containsPolygon = geometryVector.containsPolygonGeometry();
|
||||
const vertexBuffer = geometryVector.vertexBuffer;
|
||||
for (let i = 0; i < geometryVector.numGeometries; i++) {
|
||||
const geometryType = geometryVector.geometryType(i);
|
||||
switch (geometryType) {
|
||||
case GEOMETRY_TYPE.POINT:
|
||||
{
|
||||
let x;
|
||||
let y;
|
||||
if (nonOffset) {
|
||||
x = vertexBuffer[vertexBufferOffset++];
|
||||
y = vertexBuffer[vertexBufferOffset++];
|
||||
}
|
||||
else if (geometryVector.vertexBufferType === VertexBufferType.MORTON) {
|
||||
const offset = vertexOffsets[vertexOffsetsOffset++];
|
||||
const mortonCode = vertexBuffer[offset];
|
||||
const vertex = decodeZOrderCurve(mortonCode, mortonSettings.numBits, mortonSettings.coordinateShift);
|
||||
x = vertex.x;
|
||||
y = vertex.y;
|
||||
}
|
||||
else {
|
||||
const offset = vertexOffsets[vertexOffsetsOffset++] * 2;
|
||||
x = vertexBuffer[offset];
|
||||
y = vertexBuffer[offset + 1];
|
||||
}
|
||||
geometries[geometryCounter++] = [[new Point(x, y)]];
|
||||
if (geometryOffsets)
|
||||
geometryOffsetsCounter++;
|
||||
if (partOffsets)
|
||||
partOffsetCounter++;
|
||||
if (ringOffsets)
|
||||
ringOffsetsCounter++;
|
||||
}
|
||||
break;
|
||||
case GEOMETRY_TYPE.MULTIPOINT:
|
||||
{
|
||||
const numPoints = geometryOffsets[geometryOffsetsCounter] - geometryOffsets[geometryOffsetsCounter - 1];
|
||||
geometryOffsetsCounter++;
|
||||
const points = new Array(numPoints);
|
||||
if (nonOffset) {
|
||||
for (let j = 0; j < numPoints; j++) {
|
||||
const x = vertexBuffer[vertexBufferOffset++];
|
||||
const y = vertexBuffer[vertexBufferOffset++];
|
||||
points[j] = new Point(x, y);
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (let j = 0; j < numPoints; j++) {
|
||||
const offset = vertexOffsets[vertexOffsetsOffset++] * 2;
|
||||
const x = vertexBuffer[offset];
|
||||
const y = vertexBuffer[offset + 1];
|
||||
points[j] = new Point(x, y);
|
||||
}
|
||||
}
|
||||
geometries[geometryCounter++] = points.map((point) => [point]);
|
||||
// MULTIPOINT must increment offset counters like POINT does
|
||||
partOffsetCounter += numPoints;
|
||||
ringOffsetsCounter += numPoints;
|
||||
}
|
||||
break;
|
||||
case GEOMETRY_TYPE.LINESTRING:
|
||||
{
|
||||
let numVertices;
|
||||
if (containsPolygon) {
|
||||
numVertices = ringOffsets[ringOffsetsCounter] - ringOffsets[ringOffsetsCounter - 1];
|
||||
ringOffsetsCounter++;
|
||||
}
|
||||
else {
|
||||
numVertices = partOffsets[partOffsetCounter] - partOffsets[partOffsetCounter - 1];
|
||||
}
|
||||
partOffsetCounter++;
|
||||
let vertices;
|
||||
if (nonOffset) {
|
||||
vertices = getLineStringOrRing(vertexBuffer, vertexBufferOffset, numVertices, false);
|
||||
vertexBufferOffset += numVertices * 2;
|
||||
}
|
||||
else {
|
||||
vertices = decodeDictionaryEncodedLineStringOrRing(geometryVector.vertexBufferType, vertexBuffer, vertexOffsets, vertexOffsetsOffset, numVertices, false, mortonSettings);
|
||||
vertexOffsetsOffset += numVertices;
|
||||
}
|
||||
geometries[geometryCounter++] = [vertices];
|
||||
if (geometryOffsets)
|
||||
geometryOffsetsCounter++;
|
||||
}
|
||||
break;
|
||||
case GEOMETRY_TYPE.POLYGON:
|
||||
{
|
||||
const numRings = partOffsets[partOffsetCounter] - partOffsets[partOffsetCounter - 1];
|
||||
partOffsetCounter++;
|
||||
const rings = new Array(numRings - 1);
|
||||
let shell;
|
||||
let numVertices = ringOffsets[ringOffsetsCounter] - ringOffsets[ringOffsetsCounter - 1];
|
||||
ringOffsetsCounter++;
|
||||
if (nonOffset) {
|
||||
shell = getLineStringOrRing(vertexBuffer, vertexBufferOffset, numVertices, true);
|
||||
vertexBufferOffset += numVertices * 2;
|
||||
for (let j = 0; j < rings.length; j++) {
|
||||
numVertices = ringOffsets[ringOffsetsCounter] - ringOffsets[ringOffsetsCounter - 1];
|
||||
ringOffsetsCounter++;
|
||||
rings[j] = getLineStringOrRing(vertexBuffer, vertexBufferOffset, numVertices, true);
|
||||
vertexBufferOffset += numVertices * 2;
|
||||
}
|
||||
}
|
||||
else {
|
||||
shell = decodeDictionaryEncodedLineStringOrRing(geometryVector.vertexBufferType, vertexBuffer, vertexOffsets, vertexOffsetsOffset, numVertices, true, mortonSettings);
|
||||
vertexOffsetsOffset += numVertices;
|
||||
for (let j = 0; j < rings.length; j++) {
|
||||
numVertices = ringOffsets[ringOffsetsCounter] - ringOffsets[ringOffsetsCounter - 1];
|
||||
ringOffsetsCounter++;
|
||||
rings[j] = decodeDictionaryEncodedLineStringOrRing(geometryVector.vertexBufferType, vertexBuffer, vertexOffsets, vertexOffsetsOffset, numVertices, true, mortonSettings);
|
||||
vertexOffsetsOffset += numVertices;
|
||||
}
|
||||
}
|
||||
geometries[geometryCounter++] = [shell].concat(rings);
|
||||
if (geometryOffsets)
|
||||
geometryOffsetsCounter++;
|
||||
}
|
||||
break;
|
||||
case GEOMETRY_TYPE.MULTILINESTRING:
|
||||
{
|
||||
const numLineStrings = geometryOffsets[geometryOffsetsCounter] - geometryOffsets[geometryOffsetsCounter - 1];
|
||||
geometryOffsetsCounter++;
|
||||
const lineStrings = new Array(numLineStrings);
|
||||
for (let j = 0; j < numLineStrings; j++) {
|
||||
let numVertices;
|
||||
if (containsPolygon) {
|
||||
numVertices = ringOffsets[ringOffsetsCounter] - ringOffsets[ringOffsetsCounter - 1];
|
||||
ringOffsetsCounter++;
|
||||
}
|
||||
else {
|
||||
numVertices = partOffsets[partOffsetCounter] - partOffsets[partOffsetCounter - 1];
|
||||
}
|
||||
partOffsetCounter++;
|
||||
if (nonOffset) {
|
||||
lineStrings[j] = getLineStringOrRing(vertexBuffer, vertexBufferOffset, numVertices, false);
|
||||
vertexBufferOffset += numVertices * 2;
|
||||
}
|
||||
else {
|
||||
const vertices = decodeDictionaryEncodedLineStringOrRing(geometryVector.vertexBufferType, vertexBuffer, vertexOffsets, vertexOffsetsOffset, numVertices, false, mortonSettings);
|
||||
lineStrings[j] = vertices;
|
||||
vertexOffsetsOffset += numVertices;
|
||||
}
|
||||
}
|
||||
geometries[geometryCounter++] = lineStrings;
|
||||
}
|
||||
break;
|
||||
case GEOMETRY_TYPE.MULTIPOLYGON:
|
||||
{
|
||||
const numPolygons = geometryOffsets[geometryOffsetsCounter] - geometryOffsets[geometryOffsetsCounter - 1];
|
||||
geometryOffsetsCounter++;
|
||||
const polygons = new Array(numPolygons);
|
||||
for (let j = 0; j < numPolygons; j++) {
|
||||
const numRings = partOffsets[partOffsetCounter] - partOffsets[partOffsetCounter - 1];
|
||||
partOffsetCounter++;
|
||||
let shell;
|
||||
const rings = new Array(numRings - 1);
|
||||
const numVertices = ringOffsets[ringOffsetsCounter] - ringOffsets[ringOffsetsCounter - 1];
|
||||
ringOffsetsCounter++;
|
||||
if (nonOffset) {
|
||||
shell = getLineStringOrRing(vertexBuffer, vertexBufferOffset, numVertices, true);
|
||||
vertexBufferOffset += numVertices * 2;
|
||||
}
|
||||
else {
|
||||
shell = decodeDictionaryEncodedLineStringOrRing(geometryVector.vertexBufferType, vertexBuffer, vertexOffsets, vertexOffsetsOffset, numVertices, true, mortonSettings);
|
||||
vertexOffsetsOffset += numVertices;
|
||||
}
|
||||
for (let k = 0; k < rings.length; k++) {
|
||||
const numRingVertices = ringOffsets[ringOffsetsCounter] - ringOffsets[ringOffsetsCounter - 1];
|
||||
ringOffsetsCounter++;
|
||||
if (nonOffset) {
|
||||
rings[k] = getLineStringOrRing(vertexBuffer, vertexBufferOffset, numRingVertices, true);
|
||||
vertexBufferOffset += numRingVertices * 2;
|
||||
}
|
||||
else {
|
||||
rings[k] = decodeDictionaryEncodedLineStringOrRing(geometryVector.vertexBufferType, vertexBuffer, vertexOffsets, vertexOffsetsOffset, numRingVertices, true, mortonSettings);
|
||||
vertexOffsetsOffset += numRingVertices;
|
||||
}
|
||||
}
|
||||
polygons[j] = [shell].concat(rings);
|
||||
}
|
||||
geometries[geometryCounter++] = polygons.flat();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new Error("The specified geometry type is currently not supported.");
|
||||
}
|
||||
}
|
||||
return geometries;
|
||||
}
|
||||
function decodeDictionaryEncodedLineStringOrRing(vertexBufferType, vertexBuffer, vertexOffsets, vertexOffset, numVertices, closeLineString, mortonSettings) {
|
||||
if (vertexBufferType === VertexBufferType.MORTON) {
|
||||
return decodeMortonDictionaryEncodedLineString(vertexBuffer, vertexOffsets, vertexOffset, numVertices, closeLineString, mortonSettings);
|
||||
}
|
||||
else {
|
||||
return decodeDictionaryEncodedLineString(vertexBuffer, vertexOffsets, vertexOffset, numVertices, closeLineString);
|
||||
}
|
||||
}
|
||||
function getLineStringOrRing(vertexBuffer, startIndex, numVertices, closeLineString) {
|
||||
const vertices = new Array(closeLineString ? numVertices + 1 : numVertices);
|
||||
for (let i = 0; i < numVertices * 2; i += 2) {
|
||||
const x = vertexBuffer[startIndex + i];
|
||||
const y = vertexBuffer[startIndex + i + 1];
|
||||
vertices[i / 2] = new Point(x, y);
|
||||
}
|
||||
if (closeLineString) {
|
||||
vertices[vertices.length - 1] = vertices[0];
|
||||
}
|
||||
return vertices;
|
||||
}
|
||||
function decodeDictionaryEncodedLineString(vertexBuffer, vertexOffsets, vertexOffset, numVertices, closeLineString) {
|
||||
const vertices = new Array(closeLineString ? numVertices + 1 : numVertices);
|
||||
for (let i = 0; i < numVertices * 2; i += 2) {
|
||||
const offset = vertexOffsets[vertexOffset + i / 2] * 2;
|
||||
const x = vertexBuffer[offset];
|
||||
const y = vertexBuffer[offset + 1];
|
||||
vertices[i / 2] = new Point(x, y);
|
||||
}
|
||||
if (closeLineString) {
|
||||
vertices[vertices.length - 1] = vertices[0];
|
||||
}
|
||||
return vertices;
|
||||
}
|
||||
function decodeMortonDictionaryEncodedLineString(vertexBuffer, vertexOffsets, vertexOffset, numVertices, closeLineString, mortonSettings) {
|
||||
const vertices = new Array(closeLineString ? numVertices + 1 : numVertices);
|
||||
for (let i = 0; i < numVertices; i++) {
|
||||
const offset = vertexOffsets[vertexOffset + i];
|
||||
const mortonEncodedVertex = vertexBuffer[offset];
|
||||
const vertex = decodeZOrderCurve(mortonEncodedVertex, mortonSettings.numBits, mortonSettings.coordinateShift);
|
||||
vertices[i] = new Point(vertex.x, vertex.y);
|
||||
}
|
||||
if (closeLineString) {
|
||||
vertices[vertices.length - 1] = vertices[0];
|
||||
}
|
||||
return vertices;
|
||||
}
|
||||
//# sourceMappingURL=geometryVectorConverter.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/geometry/geometryVectorConverter.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/geometry/geometryVectorConverter.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
22
node_modules/@maplibre/mlt/dist/vector/geometry/gpuVector.d.ts
generated
vendored
Normal file
22
node_modules/@maplibre/mlt/dist/vector/geometry/gpuVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import type { CoordinatesArray } from "./geometryVector";
|
||||
import type { TopologyVector } from "./topologyVector";
|
||||
export declare abstract class GpuVector implements Iterable<CoordinatesArray> {
|
||||
private readonly _triangleOffsets;
|
||||
private readonly _indexBuffer;
|
||||
private readonly _vertexBuffer;
|
||||
private readonly _topologyVector?;
|
||||
protected constructor(_triangleOffsets: Uint32Array, _indexBuffer: Uint32Array, _vertexBuffer: Int32Array | Uint32Array, _topologyVector?: TopologyVector);
|
||||
abstract geometryType(index: number): number;
|
||||
abstract get numGeometries(): number;
|
||||
abstract containsSingleGeometryType(): boolean;
|
||||
get triangleOffsets(): Uint32Array;
|
||||
get indexBuffer(): Uint32Array;
|
||||
get vertexBuffer(): Int32Array | Uint32Array;
|
||||
get topologyVector(): TopologyVector | undefined;
|
||||
/**
|
||||
* Returns geometries as coordinate arrays by extracting polygon outlines from topology.
|
||||
* The vertexBuffer contains the outline vertices, separate from the tessellated triangles.
|
||||
*/
|
||||
getGeometries(): CoordinatesArray[];
|
||||
[Symbol.iterator](): Iterator<CoordinatesArray>;
|
||||
}
|
||||
118
node_modules/@maplibre/mlt/dist/vector/geometry/gpuVector.js
generated
vendored
Normal file
118
node_modules/@maplibre/mlt/dist/vector/geometry/gpuVector.js
generated
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
import Point from "@mapbox/point-geometry";
|
||||
import { GEOMETRY_TYPE } from "./geometryType";
|
||||
export class GpuVector {
|
||||
constructor(_triangleOffsets, _indexBuffer, _vertexBuffer, _topologyVector) {
|
||||
this._triangleOffsets = _triangleOffsets;
|
||||
this._indexBuffer = _indexBuffer;
|
||||
this._vertexBuffer = _vertexBuffer;
|
||||
this._topologyVector = _topologyVector;
|
||||
}
|
||||
get triangleOffsets() {
|
||||
return this._triangleOffsets;
|
||||
}
|
||||
get indexBuffer() {
|
||||
return this._indexBuffer;
|
||||
}
|
||||
get vertexBuffer() {
|
||||
return this._vertexBuffer;
|
||||
}
|
||||
get topologyVector() {
|
||||
return this._topologyVector;
|
||||
}
|
||||
/**
|
||||
* Returns geometries as coordinate arrays by extracting polygon outlines from topology.
|
||||
* The vertexBuffer contains the outline vertices, separate from the tessellated triangles.
|
||||
*/
|
||||
getGeometries() {
|
||||
if (!this._topologyVector) {
|
||||
throw new Error("Cannot convert GpuVector to coordinates without topology information");
|
||||
}
|
||||
const geometries = new Array(this.numGeometries);
|
||||
const topology = this._topologyVector;
|
||||
const partOffsets = topology.partOffsets;
|
||||
const ringOffsets = topology.ringOffsets;
|
||||
const geometryOffsets = topology.geometryOffsets;
|
||||
// Use counters to track position in offset arrays (like Java implementation)
|
||||
let vertexBufferOffset = 0;
|
||||
let partOffsetCounter = 1;
|
||||
let ringOffsetsCounter = 1;
|
||||
let geometryOffsetsCounter = 1;
|
||||
for (let i = 0; i < this.numGeometries; i++) {
|
||||
const geometryType = this.geometryType(i);
|
||||
switch (geometryType) {
|
||||
case GEOMETRY_TYPE.POLYGON:
|
||||
{
|
||||
// Get number of rings for this polygon
|
||||
const numRings = partOffsets[partOffsetCounter] - partOffsets[partOffsetCounter - 1];
|
||||
partOffsetCounter++;
|
||||
const rings = [];
|
||||
for (let j = 0; j < numRings; j++) {
|
||||
// Get number of vertices in this ring
|
||||
const numVertices = ringOffsets[ringOffsetsCounter] - ringOffsets[ringOffsetsCounter - 1];
|
||||
ringOffsetsCounter++;
|
||||
const ring = [];
|
||||
for (let k = 0; k < numVertices; k++) {
|
||||
const x = this._vertexBuffer[vertexBufferOffset++];
|
||||
const y = this._vertexBuffer[vertexBufferOffset++];
|
||||
ring.push(new Point(x, y));
|
||||
}
|
||||
// Close the ring by duplicating the first vertex (MVT format requirement)
|
||||
if (ring.length > 0) {
|
||||
ring.push(ring[0]);
|
||||
}
|
||||
rings.push(ring);
|
||||
}
|
||||
geometries[i] = rings;
|
||||
if (geometryOffsets)
|
||||
geometryOffsetsCounter++;
|
||||
}
|
||||
break;
|
||||
case GEOMETRY_TYPE.MULTIPOLYGON:
|
||||
{
|
||||
// Get number of polygons in this multipolygon
|
||||
const numPolygons = geometryOffsets[geometryOffsetsCounter] - geometryOffsets[geometryOffsetsCounter - 1];
|
||||
geometryOffsetsCounter++;
|
||||
const allRings = [];
|
||||
for (let p = 0; p < numPolygons; p++) {
|
||||
// Get number of rings in this polygon
|
||||
const numRings = partOffsets[partOffsetCounter] - partOffsets[partOffsetCounter - 1];
|
||||
partOffsetCounter++;
|
||||
for (let j = 0; j < numRings; j++) {
|
||||
// Get number of vertices in this ring
|
||||
const numVertices = ringOffsets[ringOffsetsCounter] - ringOffsets[ringOffsetsCounter - 1];
|
||||
ringOffsetsCounter++;
|
||||
const ring = [];
|
||||
for (let k = 0; k < numVertices; k++) {
|
||||
const x = this._vertexBuffer[vertexBufferOffset++];
|
||||
const y = this._vertexBuffer[vertexBufferOffset++];
|
||||
ring.push(new Point(x, y));
|
||||
}
|
||||
// Close the ring by duplicating the first vertex (MVT format requirement)
|
||||
if (ring.length > 0) {
|
||||
ring.push(ring[0]);
|
||||
}
|
||||
allRings.push(ring);
|
||||
}
|
||||
}
|
||||
geometries[i] = allRings;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return geometries;
|
||||
}
|
||||
[Symbol.iterator]() {
|
||||
/*for(let i = 1; i < this.triangleOffsets.length; i++) {
|
||||
const numTriangles = this.triangleOffsets[i] - this.triangleOffsets[i-1];
|
||||
const startIndex = this.triangleOffsets[i-1] * 3;
|
||||
const endIndex = this.triangleOffsets[i] * 3;
|
||||
}
|
||||
|
||||
while (index < this.numGeometries) {
|
||||
yield geometries[index++];
|
||||
}*/
|
||||
//throw new Error("Iterator on a GpuVector is not implemented yet.");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=gpuVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/geometry/gpuVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/geometry/gpuVector.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
5
node_modules/@maplibre/mlt/dist/vector/geometry/topologyVector.d.ts
generated
vendored
Normal file
5
node_modules/@maplibre/mlt/dist/vector/geometry/topologyVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export type TopologyVector = {
|
||||
readonly geometryOffsets?: Uint32Array;
|
||||
readonly partOffsets?: Uint32Array;
|
||||
readonly ringOffsets?: Uint32Array;
|
||||
};
|
||||
2
node_modules/@maplibre/mlt/dist/vector/geometry/topologyVector.js
generated
vendored
Normal file
2
node_modules/@maplibre/mlt/dist/vector/geometry/topologyVector.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=topologyVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/geometry/topologyVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/geometry/topologyVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"topologyVector.js","sourceRoot":"","sources":["../../../src/vector/geometry/topologyVector.ts"],"names":[],"mappings":"","sourcesContent":["export type TopologyVector = {\n readonly geometryOffsets?: Uint32Array;\n readonly partOffsets?: Uint32Array;\n readonly ringOffsets?: Uint32Array;\n};\n"]}
|
||||
5
node_modules/@maplibre/mlt/dist/vector/geometry/vertexBufferType.d.ts
generated
vendored
Normal file
5
node_modules/@maplibre/mlt/dist/vector/geometry/vertexBufferType.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export declare enum VertexBufferType {
|
||||
MORTON = 0,
|
||||
VEC_2 = 1,
|
||||
VEC_3 = 2
|
||||
}
|
||||
7
node_modules/@maplibre/mlt/dist/vector/geometry/vertexBufferType.js
generated
vendored
Normal file
7
node_modules/@maplibre/mlt/dist/vector/geometry/vertexBufferType.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export var VertexBufferType;
|
||||
(function (VertexBufferType) {
|
||||
VertexBufferType[VertexBufferType["MORTON"] = 0] = "MORTON";
|
||||
VertexBufferType[VertexBufferType["VEC_2"] = 1] = "VEC_2";
|
||||
VertexBufferType[VertexBufferType["VEC_3"] = 2] = "VEC_3";
|
||||
})(VertexBufferType || (VertexBufferType = {}));
|
||||
//# sourceMappingURL=vertexBufferType.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/geometry/vertexBufferType.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/geometry/vertexBufferType.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"vertexBufferType.js","sourceRoot":"","sources":["../../../src/vector/geometry/vertexBufferType.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IACxB,2DAAU,CAAA;IACV,yDAAS,CAAA;IACT,yDAAS,CAAA;AACb,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B","sourcesContent":["export enum VertexBufferType {\n MORTON = 0,\n VEC_2 = 1,\n VEC_3 = 2,\n}\n"]}
|
||||
4
node_modules/@maplibre/mlt/dist/vector/geometry/zOrderCurve.d.ts
generated
vendored
Normal file
4
node_modules/@maplibre/mlt/dist/vector/geometry/zOrderCurve.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare function decodeZOrderCurve(mortonCode: number, numBits: number, coordinateShift: number): {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
13
node_modules/@maplibre/mlt/dist/vector/geometry/zOrderCurve.js
generated
vendored
Normal file
13
node_modules/@maplibre/mlt/dist/vector/geometry/zOrderCurve.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
export function decodeZOrderCurve(mortonCode, numBits, coordinateShift) {
|
||||
const x = decodeMorton(mortonCode, numBits) - coordinateShift;
|
||||
const y = decodeMorton(mortonCode >> 1, numBits) - coordinateShift;
|
||||
return { x, y };
|
||||
}
|
||||
function decodeMorton(code, numBits) {
|
||||
let coordinate = 0;
|
||||
for (let i = 0; i < numBits; i++) {
|
||||
coordinate |= (code & (1 << (2 * i))) >> i;
|
||||
}
|
||||
return coordinate;
|
||||
}
|
||||
//# sourceMappingURL=zOrderCurve.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/geometry/zOrderCurve.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/geometry/zOrderCurve.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"zOrderCurve.js","sourceRoot":"","sources":["../../../src/vector/geometry/zOrderCurve.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,iBAAiB,CAC7B,UAAkB,EAClB,OAAe,EACf,eAAuB;IAEvB,MAAM,CAAC,GAAG,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,GAAG,eAAe,CAAC;IAC9D,MAAM,CAAC,GAAG,YAAY,CAAC,UAAU,IAAI,CAAC,EAAE,OAAO,CAAC,GAAG,eAAe,CAAC;IACnE,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AACpB,CAAC;AAED,SAAS,YAAY,CAAC,IAAY,EAAE,OAAe;IAC/C,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC;QAC/B,UAAU,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,UAAU,CAAC;AACtB,CAAC","sourcesContent":["export function decodeZOrderCurve(\n mortonCode: number,\n numBits: number,\n coordinateShift: number,\n): { x: number; y: number } {\n const x = decodeMorton(mortonCode, numBits) - coordinateShift;\n const y = decodeMorton(mortonCode >> 1, numBits) - coordinateShift;\n return { x, y };\n}\n\nfunction decodeMorton(code: number, numBits: number): number {\n let coordinate = 0;\n for (let i = 0; i < numBits; i++) {\n coordinate |= (code & (1 << (2 * i))) >> i;\n }\n return coordinate;\n}\n"]}
|
||||
8
node_modules/@maplibre/mlt/dist/vector/idVector.d.ts
generated
vendored
Normal file
8
node_modules/@maplibre/mlt/dist/vector/idVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import type { Int32FlatVector } from "./flat/int32FlatVector";
|
||||
import type { Int64FlatVector } from "./flat/int64FlatVector";
|
||||
import type { Int32ConstVector } from "./constant/int32ConstVector";
|
||||
import type { Int64ConstVector } from "./constant/int64ConstVector";
|
||||
import type { Int32SequenceVector } from "./sequence/int32SequenceVector";
|
||||
import type { Int64SequenceVector } from "./sequence/int64SequenceVector";
|
||||
import type { DoubleFlatVector } from "./flat/doubleFlatVector";
|
||||
export type IdVector = Int32FlatVector | Int64FlatVector | DoubleFlatVector | Int32SequenceVector | Int64SequenceVector | Int32ConstVector | Int64ConstVector;
|
||||
2
node_modules/@maplibre/mlt/dist/vector/idVector.js
generated
vendored
Normal file
2
node_modules/@maplibre/mlt/dist/vector/idVector.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=idVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/idVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/idVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"idVector.js","sourceRoot":"","sources":["../../src/vector/idVector.ts"],"names":[],"mappings":"","sourcesContent":["import type { Int32FlatVector } from \"./flat/int32FlatVector\";\nimport type { Int64FlatVector } from \"./flat/int64FlatVector\";\nimport type { Int32ConstVector } from \"./constant/int32ConstVector\";\nimport type { Int64ConstVector } from \"./constant/int64ConstVector\";\nimport type { Int32SequenceVector } from \"./sequence/int32SequenceVector\";\nimport type { Int64SequenceVector } from \"./sequence/int64SequenceVector\";\nimport type { DoubleFlatVector } from \"./flat/doubleFlatVector\";\n\nexport type IdVector =\n | Int32FlatVector\n | Int64FlatVector\n | DoubleFlatVector\n | Int32SequenceVector\n | Int64SequenceVector\n | Int32ConstVector\n | Int64ConstVector;\n"]}
|
||||
5
node_modules/@maplibre/mlt/dist/vector/sequence/int32SequenceVector.d.ts
generated
vendored
Normal file
5
node_modules/@maplibre/mlt/dist/vector/sequence/int32SequenceVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { SequenceVector } from "./sequenceVector";
|
||||
export declare class Int32SequenceVector extends SequenceVector<Int32Array, number> {
|
||||
constructor(name: string, baseValue: number, delta: number, size: number);
|
||||
protected getValueFromBuffer(index: number): number;
|
||||
}
|
||||
10
node_modules/@maplibre/mlt/dist/vector/sequence/int32SequenceVector.js
generated
vendored
Normal file
10
node_modules/@maplibre/mlt/dist/vector/sequence/int32SequenceVector.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { SequenceVector } from "./sequenceVector";
|
||||
export class Int32SequenceVector extends SequenceVector {
|
||||
constructor(name, baseValue, delta, size) {
|
||||
super(name, Int32Array.of(baseValue), delta, size);
|
||||
}
|
||||
getValueFromBuffer(index) {
|
||||
return this.dataBuffer[0] + index * this.delta;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=int32SequenceVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/sequence/int32SequenceVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/sequence/int32SequenceVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"int32SequenceVector.js","sourceRoot":"","sources":["../../../src/vector/sequence/int32SequenceVector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,OAAO,mBAAoB,SAAQ,cAAkC;IACvE,YAAmB,IAAY,EAAE,SAAiB,EAAE,KAAa,EAAE,IAAY;QAC3E,KAAK,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;IACS,kBAAkB,CAAC,KAAa;QACtC,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;IACnD,CAAC;CACJ","sourcesContent":["import { SequenceVector } from \"./sequenceVector\";\n\nexport class Int32SequenceVector extends SequenceVector<Int32Array, number> {\n public constructor(name: string, baseValue: number, delta: number, size: number) {\n super(name, Int32Array.of(baseValue), delta, size);\n }\n protected getValueFromBuffer(index: number): number {\n return this.dataBuffer[0] + index * this.delta;\n }\n}\n"]}
|
||||
5
node_modules/@maplibre/mlt/dist/vector/sequence/int64SequenceVector.d.ts
generated
vendored
Normal file
5
node_modules/@maplibre/mlt/dist/vector/sequence/int64SequenceVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import { SequenceVector } from "./sequenceVector";
|
||||
export declare class Int64SequenceVector extends SequenceVector<BigInt64Array, bigint> {
|
||||
constructor(name: string, baseValue: bigint, delta: bigint, size: number);
|
||||
protected getValueFromBuffer(index: number): bigint;
|
||||
}
|
||||
10
node_modules/@maplibre/mlt/dist/vector/sequence/int64SequenceVector.js
generated
vendored
Normal file
10
node_modules/@maplibre/mlt/dist/vector/sequence/int64SequenceVector.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { SequenceVector } from "./sequenceVector";
|
||||
export class Int64SequenceVector extends SequenceVector {
|
||||
constructor(name, baseValue, delta, size) {
|
||||
super(name, BigInt64Array.of(baseValue), delta, size);
|
||||
}
|
||||
getValueFromBuffer(index) {
|
||||
return this.dataBuffer[0] + BigInt(index) * this.delta;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=int64SequenceVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/sequence/int64SequenceVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/sequence/int64SequenceVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"int64SequenceVector.js","sourceRoot":"","sources":["../../../src/vector/sequence/int64SequenceVector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,OAAO,mBAAoB,SAAQ,cAAqC;IAC1E,YAAmB,IAAY,EAAE,SAAiB,EAAE,KAAa,EAAE,IAAY;QAC3E,KAAK,CAAC,IAAI,EAAE,aAAa,CAAC,EAAE,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IAC1D,CAAC;IAES,kBAAkB,CAAC,KAAa;QACtC,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;IAC3D,CAAC;CACJ","sourcesContent":["import { SequenceVector } from \"./sequenceVector\";\n\nexport class Int64SequenceVector extends SequenceVector<BigInt64Array, bigint> {\n public constructor(name: string, baseValue: bigint, delta: bigint, size: number) {\n super(name, BigInt64Array.of(baseValue), delta, size);\n }\n\n protected getValueFromBuffer(index: number): bigint {\n return this.dataBuffer[0] + BigInt(index) * this.delta;\n }\n}\n"]}
|
||||
5
node_modules/@maplibre/mlt/dist/vector/sequence/sequenceVector.d.ts
generated
vendored
Normal file
5
node_modules/@maplibre/mlt/dist/vector/sequence/sequenceVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import Vector from "../vector";
|
||||
export declare abstract class SequenceVector<T extends ArrayBufferView, K> extends Vector<T, K> {
|
||||
protected readonly delta: K;
|
||||
protected constructor(name: string, baseValueBuffer: T, delta: K, size: number);
|
||||
}
|
||||
8
node_modules/@maplibre/mlt/dist/vector/sequence/sequenceVector.js
generated
vendored
Normal file
8
node_modules/@maplibre/mlt/dist/vector/sequence/sequenceVector.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import Vector from "../vector";
|
||||
export class SequenceVector extends Vector {
|
||||
constructor(name, baseValueBuffer, delta, size) {
|
||||
super(name, baseValueBuffer, size);
|
||||
this.delta = delta;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=sequenceVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/sequence/sequenceVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/sequence/sequenceVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"sequenceVector.js","sourceRoot":"","sources":["../../../src/vector/sequence/sequenceVector.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,OAAgB,cAA6C,SAAQ,MAAY;IAGnF,YAAsB,IAAY,EAAE,eAAkB,EAAE,KAAQ,EAAE,IAAY;QAC1E,KAAK,CAAC,IAAI,EAAE,eAAe,EAAE,IAAI,CAAC,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;CACJ","sourcesContent":["import Vector from \"../vector\";\n\nexport abstract class SequenceVector<T extends ArrayBufferView, K> extends Vector<T, K> {\n protected readonly delta: K;\n\n protected constructor(name: string, baseValueBuffer: T, delta: K, size: number) {\n super(name, baseValueBuffer, size);\n this.delta = delta;\n }\n}\n"]}
|
||||
6
node_modules/@maplibre/mlt/dist/vector/variableSizeVector.d.ts
generated
vendored
Normal file
6
node_modules/@maplibre/mlt/dist/vector/variableSizeVector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import type BitVector from "./flat/bitVector";
|
||||
import Vector from "./vector";
|
||||
export declare abstract class VariableSizeVector<T extends ArrayBufferView, K> extends Vector<T, K> {
|
||||
protected offsetBuffer: Uint32Array;
|
||||
protected constructor(name: string, offsetBuffer: Uint32Array, dataBuffer: T, sizeOrNullabilityBuffer: number | BitVector);
|
||||
}
|
||||
8
node_modules/@maplibre/mlt/dist/vector/variableSizeVector.js
generated
vendored
Normal file
8
node_modules/@maplibre/mlt/dist/vector/variableSizeVector.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import Vector from "./vector";
|
||||
export class VariableSizeVector extends Vector {
|
||||
constructor(name, offsetBuffer, dataBuffer, sizeOrNullabilityBuffer) {
|
||||
super(name, dataBuffer, sizeOrNullabilityBuffer);
|
||||
this.offsetBuffer = offsetBuffer;
|
||||
}
|
||||
}
|
||||
//# sourceMappingURL=variableSizeVector.js.map
|
||||
1
node_modules/@maplibre/mlt/dist/vector/variableSizeVector.js.map
generated
vendored
Normal file
1
node_modules/@maplibre/mlt/dist/vector/variableSizeVector.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"variableSizeVector.js","sourceRoot":"","sources":["../../src/vector/variableSizeVector.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,OAAgB,kBAAiD,SAAQ,MAAY;IACvF,YACI,IAAY,EACF,YAAyB,EACnC,UAAa,EACb,uBAA2C;QAE3C,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,uBAAuB,CAAC,CAAC;QAJvC,iBAAY,GAAZ,YAAY,CAAa;IAKvC,CAAC;CACJ","sourcesContent":["import type BitVector from \"./flat/bitVector\";\nimport Vector from \"./vector\";\n\nexport abstract class VariableSizeVector<T extends ArrayBufferView, K> extends Vector<T, K> {\n protected constructor(\n name: string,\n protected offsetBuffer: Uint32Array,\n dataBuffer: T,\n sizeOrNullabilityBuffer: number | BitVector,\n ) {\n super(name, dataBuffer, sizeOrNullabilityBuffer);\n }\n}\n"]}
|
||||
13
node_modules/@maplibre/mlt/dist/vector/vector.d.ts
generated
vendored
Normal file
13
node_modules/@maplibre/mlt/dist/vector/vector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import type BitVector from "./flat/bitVector";
|
||||
export default abstract class Vector<T extends ArrayBufferView = ArrayBufferView, K = unknown> {
|
||||
private readonly _name;
|
||||
protected readonly dataBuffer: T;
|
||||
protected nullabilityBuffer: BitVector | null;
|
||||
protected _size: number;
|
||||
constructor(_name: string, dataBuffer: T, sizeOrNullabilityBuffer: number | BitVector);
|
||||
getValue(index: number): K | null;
|
||||
has(index: number): boolean;
|
||||
get name(): string;
|
||||
get size(): number;
|
||||
protected abstract getValueFromBuffer(index: number): K;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user