Skip to content

meos.js


meos.js ​

Namespaces ​

NamespaceDescription
TemporalType-
TInterpolation-

Enumerations ​

EnumerationDescription
TemporalTypeSubtype of a temporal value.
TInterpolationInterpolation mode of a temporal sequence.

Classes ​

ClassDescription
BigIntSetThe BigIntSet class of the MEOS object model.
BigIntSpanThe BigIntSpan class of the MEOS object model.
BigIntSpanSetThe BigIntSpanSet class of the MEOS object model.
DateSetThe DateSet class of the MEOS object model.
DateSpanThe DateSpan class of the MEOS object model.
DateSpanSetThe DateSpanSet class of the MEOS object model.
FloatSetThe FloatSet class of the MEOS object model.
FloatSpanThe FloatSpan class of the MEOS object model.
FloatSpanSetThe FloatSpanSet class of the MEOS object model.
IntSetThe IntSet class of the MEOS object model.
IntSpanThe IntSpan class of the MEOS object model.
IntSpanSetThe IntSpanSet class of the MEOS object model.
MeosAggregationErrorError during a temporal aggregation (code 6).
MeosArgumentErrorAbstract base for all invalid-argument errors.
MeosDirectoryErrorFilesystem directory error (code 7).
MeosDivisionByZeroErrorDivision by zero (code 4).
MeosExceptionBase class for all MEOS runtime errors. Carries the raw error code (from meos.h) and level (PostgreSQL severity).
MeosFeatureNotSupportedThe requested feature is not supported (code 13).
MeosFileErrorFilesystem file error (code 8).
MeosGeoJsonInputErrorGeoJSON input parsing error (code 26).
MeosGeoJsonOutputErrorGeoJSON output serialisation error (code 27).
MeosInternalErrorUnspecified internal MEOS error (code 1).
MeosInternalTypeErrorInternal type mismatch in MEOS (code 2).
MeosInvalidArgErrorInvalid argument (code 10).
MeosInvalidArgTypeErrorArgument has the wrong type (code 11).
MeosInvalidArgValueErrorArgument value is not accepted (code 12).
MeosIoErrorAbstract base for all serialisation/deserialisation errors.
MeosMemoryAllocErrorWASM/C heap allocation failure (code 5).
MeosMfJsonInputErrorMF-JSON input parsing error (code 20).
MeosMfJsonOutputErrorMF-JSON output serialisation error (code 21).
MeosTextInputErrorWKT/text input parsing error (code 22).
MeosTextOutputErrorWKT/text output serialisation error (code 23).
MeosValueOutOfRangeErrorA numeric value is outside its valid range (code 3).
MeosWkbInputErrorWKB input parsing error (code 24).
MeosWkbOutputErrorWKB output serialisation error (code 25).
SetUnordered set of base values.
SpanContiguous range over an ordered base type.
SpanSetSet of disjoint spans.
STBoxSpace x time box (bbox of TSpatial).
TBoolTemporal boolean type.
TBoolInstTemporal boolean — Instant subtype.
TBoolSeqTemporal boolean — Sequence subtype.
TBoolSeqSetTemporal boolean — SequenceSet subtype.
TBoxNumeric x time box (bbox of TNumber).
TextSetThe TextSet class of the MEOS object model.
TFloatTemporal float type.
TFloatInstTemporal float — Instant subtype.
TFloatSeqTemporal float — Sequence subtype.
TFloatSeqSetTemporal float — SequenceSet subtype.
TGeogPointTemporal geography point type.
TGeogPointInstTemporal geography point - Instant subtype.
TGeogPointSeqTemporal geography point - Sequence subtype.
TGeogPointSeqSetTemporal geography point - SequenceSet subtype.
TGeomPointTemporal geometry point type.
TGeomPointInstTemporal geometry point - Instant subtype.
TGeomPointSeqTemporal geometry point - Sequence subtype.
TGeomPointSeqSetTemporal geometry point - SequenceSet subtype.
TIntTemporal integer type.
TIntInstTemporal integer — Instant subtype.
TIntSeqTemporal integer — Sequence subtype.
TIntSeqSetTemporal integer — SequenceSet subtype.
TsTzSetThe TsTzSet class of the MEOS object model.
TsTzSpanThe TsTzSpan class of the MEOS object model.
TsTzSpanSetThe TsTzSpanSet class of the MEOS object model.
TTextTemporal text type.
TTextInstTemporal text — Instant subtype.
TTextSeqTemporal text — Sequence subtype.
TTextSeqSetTemporal text — SequenceSet subtype.

Type Aliases ​

TBoolSubtype ​

ts
type TBoolSubtype = 
  | TBoolInst
  | TBoolSeq
  | TBoolSeqSet;

Defined in: core/types/temporal/TemporalFactory.ts:22


TFloatSubtype ​

ts
type TFloatSubtype = 
  | TFloatInst
  | TFloatSeq
  | TFloatSeqSet;

Defined in: core/types/temporal/TemporalFactory.ts:24


TGeogPointSubtype ​

ts
type TGeogPointSubtype = 
  | TGeogPointInst
  | TGeogPointSeq
  | TGeogPointSeqSet;

Defined in: core/types/temporal/TemporalFactory.ts:27


TGeomPointSubtype ​

ts
type TGeomPointSubtype = 
  | TGeomPointInst
  | TGeomPointSeq
  | TGeomPointSeqSet;

Defined in: core/types/temporal/TemporalFactory.ts:26


TIntSubtype ​

ts
type TIntSubtype = 
  | TIntInst
  | TIntSeq
  | TIntSeqSet;

Defined in: core/types/temporal/TemporalFactory.ts:23


TTextSubtype ​

ts
type TTextSubtype = 
  | TTextInst
  | TTextSeq
  | TTextSeqSet;

Defined in: core/types/temporal/TemporalFactory.ts:25

Variables ​

MEOS_ERR_AGGREGATION_ERROR ​

ts
const MEOS_ERR_AGGREGATION_ERROR: 6 = 6;

Defined in: core/functions/errors.ts:14


MEOS_ERR_DIRECTORY_ERROR ​

ts
const MEOS_ERR_DIRECTORY_ERROR: 7 = 7;

Defined in: core/functions/errors.ts:15


MEOS_ERR_DIVISION_BY_ZERO ​

ts
const MEOS_ERR_DIVISION_BY_ZERO: 4 = 4;

Defined in: core/functions/errors.ts:12


MEOS_ERR_FEATURE_NOT_SUPPORTED ​

ts
const MEOS_ERR_FEATURE_NOT_SUPPORTED: 13 = 13;

Defined in: core/functions/errors.ts:20


MEOS_ERR_FILE_ERROR ​

ts
const MEOS_ERR_FILE_ERROR: 8 = 8;

Defined in: core/functions/errors.ts:16


MEOS_ERR_GEOJSON_INPUT ​

ts
const MEOS_ERR_GEOJSON_INPUT: 26 = 26;

Defined in: core/functions/errors.ts:27


MEOS_ERR_GEOJSON_OUTPUT ​

ts
const MEOS_ERR_GEOJSON_OUTPUT: 27 = 27;

Defined in: core/functions/errors.ts:28


MEOS_ERR_INTERNAL_ERROR ​

ts
const MEOS_ERR_INTERNAL_ERROR: 1 = 1;

Defined in: core/functions/errors.ts:9


MEOS_ERR_INTERNAL_TYPE_ERROR ​

ts
const MEOS_ERR_INTERNAL_TYPE_ERROR: 2 = 2;

Defined in: core/functions/errors.ts:10


MEOS_ERR_INVALID_ARG ​

ts
const MEOS_ERR_INVALID_ARG: 10 = 10;

Defined in: core/functions/errors.ts:17


MEOS_ERR_INVALID_ARG_TYPE ​

ts
const MEOS_ERR_INVALID_ARG_TYPE: 11 = 11;

Defined in: core/functions/errors.ts:18


MEOS_ERR_INVALID_ARG_VALUE ​

ts
const MEOS_ERR_INVALID_ARG_VALUE: 12 = 12;

Defined in: core/functions/errors.ts:19


MEOS_ERR_MEMORY_ALLOC_ERROR ​

ts
const MEOS_ERR_MEMORY_ALLOC_ERROR: 5 = 5;

Defined in: core/functions/errors.ts:13


MEOS_ERR_MFJSON_INPUT ​

ts
const MEOS_ERR_MFJSON_INPUT: 20 = 20;

Defined in: core/functions/errors.ts:21


MEOS_ERR_MFJSON_OUTPUT ​

ts
const MEOS_ERR_MFJSON_OUTPUT: 21 = 21;

Defined in: core/functions/errors.ts:22


MEOS_ERR_TEXT_INPUT ​

ts
const MEOS_ERR_TEXT_INPUT: 22 = 22;

Defined in: core/functions/errors.ts:23


MEOS_ERR_TEXT_OUTPUT ​

ts
const MEOS_ERR_TEXT_OUTPUT: 23 = 23;

Defined in: core/functions/errors.ts:24


MEOS_ERR_VALUE_OUT_OF_RANGE ​

ts
const MEOS_ERR_VALUE_OUT_OF_RANGE: 3 = 3;

Defined in: core/functions/errors.ts:11


MEOS_ERR_WKB_INPUT ​

ts
const MEOS_ERR_WKB_INPUT: 24 = 24;

Defined in: core/functions/errors.ts:25


MEOS_ERR_WKB_OUTPUT ​

ts
const MEOS_ERR_WKB_OUTPUT: 25 = 25;

Defined in: core/functions/errors.ts:26


MEOS_ERROR ​

ts
const MEOS_ERROR: 21 = 21;

Defined in: core/functions/errors.ts:5


MEOS_NOTICE ​

ts
const MEOS_NOTICE: 18 = 18;

Defined in: core/functions/errors.ts:3


MEOS_WARNING ​

ts
const MEOS_WARNING: 19 = 19;

Defined in: core/functions/errors.ts:4

Functions ​

createTBool() ​

ts
function createTBool(ptr): TBoolSubtype;

Defined in: core/types/temporal/TemporalFactory.ts:34

Routes a raw TBool pointer to TBoolInst | TBoolSeq | TBoolSeqSet.

Parameters ​

ptr ​

number

Returns ​

TBoolSubtype


createTFloat() ​

ts
function createTFloat(ptr): TFloatSubtype;

Defined in: core/types/temporal/TemporalFactory.ts:50

Routes a raw TFloat pointer to TFloatInst | TFloatSeq | TFloatSeqSet.

Parameters ​

ptr ​

number

Returns ​

TFloatSubtype


createTGeogPoint() ​

ts
function createTGeogPoint(ptr): TGeogPointSubtype;

Defined in: core/types/temporal/TemporalFactory.ts:74

Routes a raw TGeogPoint pointer to TGeogPointInst | TGeogPointSeq | TGeogPointSeqSet.

Parameters ​

ptr ​

number

Returns ​

TGeogPointSubtype


createTGeomPoint() ​

ts
function createTGeomPoint(ptr): TGeomPointSubtype;

Defined in: core/types/temporal/TemporalFactory.ts:66

Routes a raw TGeomPoint pointer to TGeomPointInst | TGeomPointSeq | TGeomPointSeqSet.

Parameters ​

ptr ​

number

Returns ​

TGeomPointSubtype


createTInt() ​

ts
function createTInt(ptr): TIntSubtype;

Defined in: core/types/temporal/TemporalFactory.ts:42

Routes a raw TInt pointer to TIntInst | TIntSeq | TIntSeqSet.

Parameters ​

ptr ​

number

Returns ​

TIntSubtype


createTText() ​

ts
function createTText(ptr): TTextSubtype;

Defined in: core/types/temporal/TemporalFactory.ts:58

Routes a raw TText pointer to TTextInst | TTextSeq | TTextSeqSet.

Parameters ​

ptr ​

number

Returns ​

TTextSubtype


getModule() ​

ts
function getModule(): MeosModule;

Defined in: core/runtime/meos.ts:97

Returns the initialised MeosModule.

Throws if initMeos() has not been called yet. All generated wrappers in core/functions.ts call this via the call<T>() helper.

Returns ​

MeosModule


initMeos() ​

ts
function initMeos(): Promise<void>;

Defined in: core/runtime/meos.ts:84

Initialises the MEOS WASM module.

Must be awaited before calling any MEOS function. Safe to call multiple times. Subsequent calls are no-ops once the module is loaded.

Throws if the runtime does not support WebAssembly MEMORY64.

Returns ​

Promise<void>


makeMeosException() ​

ts
function makeMeosException(
   code, 
   level, 
   message): MeosException;

Defined in: core/functions/errors.ts:156

Constructs the most specific MeosException subclass for the given error code. Falls back to the base MeosException for unknown codes.

Parameters ​

code ​

number

level ​

number

message ​

string

Returns ​

MeosException