diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..0e79750 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,76 @@ +name: build + +# Derive the MEOS catalog and the all-families libmeos from a single +# MobilityDB commit via the shared provision-meos action (the same derivation +# JMEOS / Spark / PyMEOS-CFFI consume), regenerate the flat FFI functions +# package from that catalog, and prove the committed generated code is in sync +# with it. No MEOS header is parsed in this repository: the functions package +# is a projection of the catalog, and cgo only compiles it against the +# installed libmeos. The catalog itself is never committed — it is derived +# here from MobilityDB. + +on: + push: + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + name: Provision catalog + build GoMEOS (Linux, all families) + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Provision MEOS (catalog + all-families libmeos) + id: provision + uses: MobilityDB/MEOS-API/.github/actions/provision-meos@master + with: + mobilitydb-ref: master + build-libmeos: "true" + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: "1.23" + + - name: Stage the derived catalog for the generator + run: cp "${{ steps.provision.outputs.catalog-path }}" tools/meos-idl.json + + - name: Regenerate the functions package from the catalog + run: python3 tools/codegen.py + + - name: Report drift between the committed and freshly derived functions package + run: | + # Informational only: CI builds and tests the FRESHLY regenerated + # functions/ above, so a drift against the committed snapshot never + # fails the build (MobilityDB master moves independently of this repo). + # The committed functions/ is a convenience snapshot for `go get` + # consumers; refresh it by running 'python3 tools/codegen.py' against a + # freshly derived meos-idl.json and committing the result. + if ! git diff --quiet -- functions/; then + echo "::notice::functions/ differs from the freshly derived catalog (snapshot lags MobilityDB master):" + git diff --stat -- functions/ + else + echo "functions/ snapshot is in sync with the derived catalog." + fi + + - name: Build the generated functions package against the all-families libmeos + env: + CGO_CFLAGS: -I/usr/local/include -I/usr/include/h3 + CGO_LDFLAGS: -L/usr/local/lib -lmeos + LD_LIBRARY_PATH: /usr/local/lib + run: go build ./functions + + - name: Run the portable-parity gate + env: + CGO_ENABLED: "0" + run: go test ./tools/parity/ diff --git a/.github/workflows/portable-parity.yml b/.github/workflows/portable-parity.yml new file mode 100644 index 0000000..7574d86 --- /dev/null +++ b/.github/workflows/portable-parity.yml @@ -0,0 +1,40 @@ +name: portable-aliases parity + +# Gates the portable bare-name dialect (RFC #920; MEOS-API cross-repo +# handoff PR #9): GoMEOS's exposed CGO symbol set — the hand-written root +# package plus the IDL-driven generated surface (tools/_preview, emitted +# by tools/codegen.py from tools/meos-idl.json, the MEOS-API parser's +# JSON output) — must remain a superset of portableAliases.bareNames: +# 29/29, 0 unbacked, and every one of the six in-scope user-facing type +# families (temporal, geo, cbuffer, npoint, pose, rgeo) covered. +# cbuffer/npoint/pose/rgeo are full temporal types and are never excluded +# from the parity headline. +# +# Neither job needs libmeos/CGO: both audit the source statically, so the +# gate is self-contained and cannot be flaked by the C toolchain. + +on: + push: + pull_request: + +jobs: + parity: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Parity gate (script — exposed symbol set ⊇ bareNames) + run: python3 tools/portable_parity.py --check + + - uses: actions/setup-go@v5 + with: + go-version: '1.23' + + - name: Parity gate (Go test — language-independent mirror) + env: + CGO_ENABLED: '0' + run: go test ./tools/parity/ -v diff --git a/.gitignore b/.gitignore index a4f47c2..f786007 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ cgo_flag_config.go -/test \ No newline at end of file +/test +# Derived MEOS catalog: generated in CI from MobilityDB via the shared +# provision-meos action (MEOS-API run.py), never committed. The flat FFI +# functions package is projected from it and IS committed. +tools/meos-idl.json diff --git a/README.md b/README.md index 228f6ac..02b1dab 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,14 @@ # GoMEOS [MEOS (Mobility Engine, Open Source)](https://www.libmeos.org/) is a C library which enables the manipulation of -temporal and spatio-temporal data based on [MobilityDB](https://mobilitydb.com/)'s data types and functions. +temporal and spatio-temporal data based on [MobilityDB](https://github.com/MobilityDB/MobilityDB)'s data types and functions. -GoMEOS is a Go library that wraps the MEOS C library using [CGO](https://pkg.go.dev/cmd/cgo), providing a set of Go functions that allows to use MEOS functionality by directly accessing C structs and C functions. +GoMEOS is a Go library that wraps the MEOS C library using [CGO](https://pkg.go.dev/cmd/cgo), providing a set of Go functions that allows to use MEOS functionality by directly accessing C structs and C functions. It tracks MEOS 1.4. GoMEOS exposes the functionality of MEOS and is meant to be used directly by the user. +The wrappers are generated from the [MEOS-API](https://github.com/MobilityDB/MEOS-API) `meos-idl.json` catalog rather than written by hand. To regenerate them against a given MEOS version, see [`tools/README.md`](tools/README.md). + # Usage ## Installation diff --git a/cast.h b/cast.h index 802e6e8..c9f3552 100644 --- a/cast.h +++ b/cast.h @@ -17,7 +17,9 @@ #define gunion_spanset_spanset union_spanset_spanset +#include #include "meos.h" +#include "meos_geo.h" #include #include diff --git a/functions/cgo.go b/functions/cgo.go new file mode 100644 index 0000000..4695e79 --- /dev/null +++ b/functions/cgo.go @@ -0,0 +1,32 @@ +package functions + +/* +// Every optional MEOS family is enabled so the ``#if ``-guarded +// declarations in the core headers (e.g. meos_initialize_pointcloud) are +// visible -- matching the all-families libmeos the catalog is derived from, in +// sync with MobilityDB CMakeLists.txt's ``if(ALL)`` loop (alphabetical). The +// families expose external library types (H3's h3api.h) through their own +// headers, so their include dirs are added too. +#cgo darwin CFLAGS: -I/opt/homebrew/include -I/opt/homebrew/include/h3 -DMEOS=1 -DARROW=1 -DCBUFFER=1 -DH3=1 -DJSON=1 -DNPOINT=1 -DPOINTCLOUD=1 -DPOSE=1 -DQUADBIN=1 -DRASTER=1 -DRGEO=1 +#cgo darwin LDFLAGS: -L/opt/homebrew/lib -lmeos -Wl,-rpath,/opt/homebrew/lib + +#cgo linux CFLAGS: -I/usr/local/include/ -I/usr/include/h3 -DMEOS=1 -DARROW=1 -DCBUFFER=1 -DH3=1 -DJSON=1 -DNPOINT=1 -DPOINTCLOUD=1 -DPOSE=1 -DQUADBIN=1 -DRASTER=1 -DRGEO=1 +#cgo linux LDFLAGS: -L/usr/local/lib -lmeos -Wl,-rpath,/usr/local/lib + +#include +#include "meos.h" +#include "meos_catalog.h" +#include "meos_geo.h" +#include "meos_internal.h" +#include "meos_internal_geo.h" +#include "meos_npoint.h" +#include "meos_cbuffer.h" +#include "meos_pose.h" +#include "meos_rgeo.h" +#include "meos_h3.h" +#include "meos_quadbin.h" +#include "meos_json.h" +#include "meos_pointcloud.h" +#include "meos_arrow.h" +*/ +import "C" diff --git a/functions/meos_meos.go b/functions/meos_meos.go new file mode 100644 index 0000000..caaee11 --- /dev/null +++ b/functions/meos_meos.go @@ -0,0 +1,9812 @@ +package functions + +/* +#include +#include "meos.h" +#include "meos_catalog.h" +#include "meos_geo.h" +#include "meos_internal.h" +#include "meos_internal_geo.h" +#include "meos_npoint.h" +#include "meos_cbuffer.h" +#include "meos_pose.h" +#include "meos_rgeo.h" +#include "meos_h3.h" +#include "meos_quadbin.h" +#include "meos_json.h" +#include "meos_pointcloud.h" +#include "meos_arrow.h" + +// cgo reads C.union_* as a union TYPE; alias the union operators so C.g resolves them as functions. +#define gunion_bigint_set union_bigint_set +#define gunion_bigint_span union_bigint_span +#define gunion_bigint_spanset union_bigint_spanset +#define gunion_cbuffer_set union_cbuffer_set +#define gunion_date_set union_date_set +#define gunion_date_span union_date_span +#define gunion_date_spanset union_date_spanset +#define gunion_float_set union_float_set +#define gunion_float_span union_float_span +#define gunion_float_spanset union_float_spanset +#define gunion_geo_set union_geo_set +#define gunion_int_set union_int_set +#define gunion_int_span union_int_span +#define gunion_int_spanset union_int_spanset +#define gunion_jsonb_set union_jsonb_set +#define gunion_npoint_set union_npoint_set +#define gunion_pcpatch_set union_pcpatch_set +#define gunion_pcpoint_set union_pcpoint_set +#define gunion_pose_set union_pose_set +#define gunion_set_bigint union_set_bigint +#define gunion_set_cbuffer union_set_cbuffer +#define gunion_set_date union_set_date +#define gunion_set_float union_set_float +#define gunion_set_geo union_set_geo +#define gunion_set_int union_set_int +#define gunion_set_jsonb union_set_jsonb +#define gunion_set_npoint union_set_npoint +#define gunion_set_pcpatch union_set_pcpatch +#define gunion_set_pcpoint union_set_pcpoint +#define gunion_set_pose union_set_pose +#define gunion_set_set union_set_set +#define gunion_set_text union_set_text +#define gunion_set_timestamptz union_set_timestamptz +#define gunion_set_value union_set_value +#define gunion_span_bigint union_span_bigint +#define gunion_span_date union_span_date +#define gunion_span_float union_span_float +#define gunion_span_int union_span_int +#define gunion_span_span union_span_span +#define gunion_span_spanset union_span_spanset +#define gunion_span_timestamptz union_span_timestamptz +#define gunion_span_value union_span_value +#define gunion_spanset_bigint union_spanset_bigint +#define gunion_spanset_date union_spanset_date +#define gunion_spanset_float union_spanset_float +#define gunion_spanset_int union_spanset_int +#define gunion_spanset_span union_spanset_span +#define gunion_spanset_spanset union_spanset_spanset +#define gunion_spanset_timestamptz union_spanset_timestamptz +#define gunion_spanset_value union_spanset_value +#define gunion_stbox_stbox union_stbox_stbox +#define gunion_tbox_tbox union_tbox_tbox +#define gunion_text_set union_text_set +#define gunion_timestamptz_set union_timestamptz_set +#define gunion_timestamptz_span union_timestamptz_span +#define gunion_timestamptz_spanset union_timestamptz_spanset +#define gunion_tpcbox_tpcbox union_tpcbox_tpcbox +#define gunion_value_set union_value_set +#define gunion_value_span union_value_span +#define gunion_value_spanset union_value_spanset +*/ +import "C" +import ( + "unsafe" +) + +var _ = unsafe.Pointer(nil) + +// BoolIn wraps MEOS C function bool_in. +func BoolIn(str string) bool { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.bool_in(_c_str) + return bool(_cret) +} + + +// BoolOut wraps MEOS C function bool_out. +func BoolOut(b bool) string { + _cret := C.bool_out(C.bool(b)) + return C.GoString(_cret) +} + + +// Float8Out wraps MEOS C function float8_out. +func Float8Out(num float64, maxdd int) string { + _cret := C.float8_out(C.double(num), C.int(maxdd)) + return C.GoString(_cret) +} + + +// DateIn wraps MEOS C function date_in. +func DateIn(str string) int32 { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.date_in(_c_str) + return int32(_cret) +} + + +// DateOut wraps MEOS C function date_out. +func DateOut(date int32) string { + _cret := C.date_out(C.DateADT(date)) + return C.GoString(_cret) +} + + +// IntervalCmp wraps MEOS C function interval_cmp. +func IntervalCmp(interv1 *Interval, interv2 *Interval) int { + _cret := C.interval_cmp(interv1._inner, interv2._inner) + return int(_cret) +} + + +// IntervalIn wraps MEOS C function interval_in. +func IntervalIn(str string, typmod int32) *Interval { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.interval_in(_c_str, C.int32(typmod)) + return &Interval{_inner: _cret} +} + + +// IntervalOut wraps MEOS C function interval_out. +func IntervalOut(interv *Interval) string { + _cret := C.interval_out(interv._inner) + return C.GoString(_cret) +} + + +// TimeIn wraps MEOS C function time_in. +func TimeIn(str string, typmod int32) int64 { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.time_in(_c_str, C.int32(typmod)) + return int64(_cret) +} + + +// TimeOut wraps MEOS C function time_out. +func TimeOut(time int64) string { + _cret := C.time_out(C.TimeADT(time)) + return C.GoString(_cret) +} + + +// TimestampIn wraps MEOS C function timestamp_in. +func TimestampIn(str string, typmod int32) int64 { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.timestamp_in(_c_str, C.int32(typmod)) + return int64(_cret) +} + + +// TimestampOut wraps MEOS C function timestamp_out. +func TimestampOut(ts int64) string { + _cret := C.timestamp_out(C.Timestamp(ts)) + return C.GoString(_cret) +} + + +// TimestamptzIn wraps MEOS C function timestamptz_in. +func TimestamptzIn(str string, typmod int32) int64 { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.timestamptz_in(_c_str, C.int32(typmod)) + return int64(_cret) +} + + +// TimestamptzOut wraps MEOS C function timestamptz_out. +func TimestamptzOut(tstz int64) string { + _cret := C.timestamptz_out(C.TimestampTz(tstz)) + return C.GoString(_cret) +} + + +// CstringToText wraps MEOS C function cstring_to_text. +func CstringToText(str string) string { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.cstring_to_text(_c_str) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// TextToCstring wraps MEOS C function text_to_cstring. +func TextToCstring(txt string) string { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.text_to_cstring(_c_txt) + return C.GoString(_cret) +} + + +// TextIn wraps MEOS C function text_in. +func TextIn(str string) string { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.text_in(_c_str) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// TextOut wraps MEOS C function text_out. +func TextOut(txt string) string { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.text_out(_c_txt) + return C.GoString(_cret) +} + + +// TODO text_cmp: unsupported param Oid +// func TextCmp(...) { /* not yet handled by codegen */ } + + +// TextCopy wraps MEOS C function text_copy. +func TextCopy(txt string) string { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.text_copy(_c_txt) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// TextInitcap wraps MEOS C function text_initcap. +func TextInitcap(txt string) string { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.text_initcap(_c_txt) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// TextLower wraps MEOS C function text_lower. +func TextLower(txt string) string { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.text_lower(_c_txt) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// TextUpper wraps MEOS C function text_upper. +func TextUpper(txt string) string { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.text_upper(_c_txt) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// TextcatTextText wraps MEOS C function textcat_text_text. +func TextcatTextText(txt1 string, txt2 string) string { + _c_txt1 := C.cstring_to_text(C.CString(txt1)) + defer C.free(unsafe.Pointer(_c_txt1)) + _c_txt2 := C.cstring_to_text(C.CString(txt2)) + defer C.free(unsafe.Pointer(_c_txt2)) + _cret := C.textcat_text_text(_c_txt1, _c_txt2) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// MeosErrno wraps MEOS C function meos_errno. +func MeosErrno() int { + _cret := C.meos_errno() + return int(_cret) +} + + +// MeosErrnoSet wraps MEOS C function meos_errno_set. +func MeosErrnoSet(err int) int { + _cret := C.meos_errno_set(C.int(err)) + return int(_cret) +} + + +// MeosErrnoRestore wraps MEOS C function meos_errno_restore. +func MeosErrnoRestore(err int) int { + _cret := C.meos_errno_restore(C.int(err)) + return int(_cret) +} + + +// MeosErrnoReset wraps MEOS C function meos_errno_reset. +func MeosErrnoReset() int { + _cret := C.meos_errno_reset() + return int(_cret) +} + + +// MeosArrayCreate wraps MEOS C function meos_array_create. +func MeosArrayCreate(elem_size int) *MeosArray { + _cret := C.meos_array_create(C.int(elem_size)) + return &MeosArray{_inner: _cret} +} + + +// MeosArrayAdd wraps MEOS C function meos_array_add. +func MeosArrayAdd(array *MeosArray, value unsafe.Pointer) { + C.meos_array_add(array._inner, unsafe.Pointer(value)) +} + + +// MeosArrayGet wraps MEOS C function meos_array_get. +func MeosArrayGet(array *MeosArray, n int) unsafe.Pointer { + _cret := C.meos_array_get(array._inner, C.int(n)) + return unsafe.Pointer(_cret) +} + + +// MeosArrayCount wraps MEOS C function meos_array_count. +func MeosArrayCount(array *MeosArray) int { + _cret := C.meos_array_count(array._inner) + return int(_cret) +} + + +// MeosArrayReset wraps MEOS C function meos_array_reset. +func MeosArrayReset(array *MeosArray) { + C.meos_array_reset(array._inner) +} + + +// MeosArrayResetFree wraps MEOS C function meos_array_reset_free. +func MeosArrayResetFree(array *MeosArray) { + C.meos_array_reset_free(array._inner) +} + + +// MeosArrayDestroy wraps MEOS C function meos_array_destroy. +func MeosArrayDestroy(array *MeosArray) { + C.meos_array_destroy(array._inner) +} + + +// MeosArrayDestroyFree wraps MEOS C function meos_array_destroy_free. +func MeosArrayDestroyFree(array *MeosArray) { + C.meos_array_destroy_free(array._inner) +} + + +// RtreeCreateIntspan wraps MEOS C function rtree_create_intspan. +func RtreeCreateIntspan() *RTree { + _cret := C.rtree_create_intspan() + return &RTree{_inner: _cret} +} + + +// RtreeCreateBigintspan wraps MEOS C function rtree_create_bigintspan. +func RtreeCreateBigintspan() *RTree { + _cret := C.rtree_create_bigintspan() + return &RTree{_inner: _cret} +} + + +// RtreeCreateFloatspan wraps MEOS C function rtree_create_floatspan. +func RtreeCreateFloatspan() *RTree { + _cret := C.rtree_create_floatspan() + return &RTree{_inner: _cret} +} + + +// RtreeCreateDatespan wraps MEOS C function rtree_create_datespan. +func RtreeCreateDatespan() *RTree { + _cret := C.rtree_create_datespan() + return &RTree{_inner: _cret} +} + + +// RtreeCreateTstzspan wraps MEOS C function rtree_create_tstzspan. +func RtreeCreateTstzspan() *RTree { + _cret := C.rtree_create_tstzspan() + return &RTree{_inner: _cret} +} + + +// RtreeCreateTBOX wraps MEOS C function rtree_create_tbox. +func RtreeCreateTBOX() *RTree { + _cret := C.rtree_create_tbox() + return &RTree{_inner: _cret} +} + + +// RtreeCreateSTBOX wraps MEOS C function rtree_create_stbox. +func RtreeCreateSTBOX() *RTree { + _cret := C.rtree_create_stbox() + return &RTree{_inner: _cret} +} + + +// RtreeCreateTpcbox wraps MEOS C function rtree_create_tpcbox. +func RtreeCreateTpcbox() *RTree { + _cret := C.rtree_create_tpcbox() + return &RTree{_inner: _cret} +} + + +// RtreeFree wraps MEOS C function rtree_free. +func RtreeFree(rtree *RTree) { + C.rtree_free(rtree._inner) +} + + +// RtreeInsert wraps MEOS C function rtree_insert. +func RtreeInsert(rtree *RTree, box unsafe.Pointer, id int) { + C.rtree_insert(rtree._inner, unsafe.Pointer(box), C.int(id)) +} + + +// RtreeInsertTemporal wraps MEOS C function rtree_insert_temporal. +func RtreeInsertTemporal(rtree *RTree, temp *Temporal, id int) { + C.rtree_insert_temporal(rtree._inner, temp._inner, C.int(id)) +} + + +// RtreeInsertTemporalSplit wraps MEOS C function rtree_insert_temporal_split. +func RtreeInsertTemporalSplit(rtree *RTree, temp *Temporal, id int, maxboxes int) { + C.rtree_insert_temporal_split(rtree._inner, temp._inner, C.int(id), C.int(maxboxes)) +} + + +// RtreeSearch wraps MEOS C function rtree_search. +func RtreeSearch(rtree *RTree, op RTreeSearchOp, query unsafe.Pointer) (int, *MeosArray) { + var _out_result C.MeosArray + _cret := C.rtree_search(rtree._inner, C.RTreeSearchOp(op), unsafe.Pointer(query), &_out_result) + return int(_cret), &MeosArray{_inner: &_out_result} +} + + +// RtreeSearchTemporal wraps MEOS C function rtree_search_temporal. +func RtreeSearchTemporal(rtree *RTree, op RTreeSearchOp, temp *Temporal) (int, *MeosArray) { + var _out_result C.MeosArray + _cret := C.rtree_search_temporal(rtree._inner, C.RTreeSearchOp(op), temp._inner, &_out_result) + return int(_cret), &MeosArray{_inner: &_out_result} +} + + +// RtreeSearchTemporalDedup wraps MEOS C function rtree_search_temporal_dedup. +func RtreeSearchTemporalDedup(rtree *RTree, op RTreeSearchOp, temp *Temporal, maxboxes int) (int, *MeosArray) { + var _out_result C.MeosArray + _cret := C.rtree_search_temporal_dedup(rtree._inner, C.RTreeSearchOp(op), temp._inner, C.int(maxboxes), &_out_result) + return int(_cret), &MeosArray{_inner: &_out_result} +} + + +// TODO meos_initialize_allocator: unsupported param meos_malloc_fn +// func MeosInitializeAllocator(...) { /* not yet handled by codegen */ } + + +// MeosInitializeNoexitErrorHandler wraps MEOS C function meos_initialize_noexit_error_handler. +func MeosInitializeNoexitErrorHandler() { + C.meos_initialize_noexit_error_handler() +} + + +// MeosInitializeTimezone wraps MEOS C function meos_initialize_timezone. +func MeosInitializeTimezone(name string) { + _c_name := C.CString(name) + defer C.free(unsafe.Pointer(_c_name)) + C.meos_initialize_timezone(_c_name) +} + + +// MeosInitializeCollation wraps MEOS C function meos_initialize_collation. +func MeosInitializeCollation() { + C.meos_initialize_collation() +} + + +// MeosFinalizeTimezone wraps MEOS C function meos_finalize_timezone. +func MeosFinalizeTimezone() { + C.meos_finalize_timezone() +} + + +// MeosFinalizeCollation wraps MEOS C function meos_finalize_collation. +func MeosFinalizeCollation() { + C.meos_finalize_collation() +} + + +// MeosFinalizeProjsrs wraps MEOS C function meos_finalize_projsrs. +func MeosFinalizeProjsrs() { + C.meos_finalize_projsrs() +} + + +// MeosFinalizeWays wraps MEOS C function meos_finalize_ways. +func MeosFinalizeWays() { + C.meos_finalize_ways() +} + + +// MeosInitializePointcloud wraps MEOS C function meos_initialize_pointcloud. +func MeosInitializePointcloud() { + C.meos_initialize_pointcloud() +} + + +// MeosSetDatestyle wraps MEOS C function meos_set_datestyle. +func MeosSetDatestyle(newval string, extra unsafe.Pointer) bool { + _c_newval := C.CString(newval) + defer C.free(unsafe.Pointer(_c_newval)) + _cret := C.meos_set_datestyle(_c_newval, unsafe.Pointer(extra)) + return bool(_cret) +} + + +// MeosSetIntervalstyle wraps MEOS C function meos_set_intervalstyle. +func MeosSetIntervalstyle(newval string, extra int) bool { + _c_newval := C.CString(newval) + defer C.free(unsafe.Pointer(_c_newval)) + _cret := C.meos_set_intervalstyle(_c_newval, C.int(extra)) + return bool(_cret) +} + + +// MeosGetDatestyle wraps MEOS C function meos_get_datestyle. +func MeosGetDatestyle() string { + _cret := C.meos_get_datestyle() + return C.GoString(_cret) +} + + +// MeosGetIntervalstyle wraps MEOS C function meos_get_intervalstyle. +func MeosGetIntervalstyle() string { + _cret := C.meos_get_intervalstyle() + return C.GoString(_cret) +} + + +// MeosSetSpatialRefSysCsv wraps MEOS C function meos_set_spatial_ref_sys_csv. +func MeosSetSpatialRefSysCsv(path string) { + _c_path := C.CString(path) + defer C.free(unsafe.Pointer(_c_path)) + C.meos_set_spatial_ref_sys_csv(_c_path) +} + + +// MeosSetWaysCsv wraps MEOS C function meos_set_ways_csv. +func MeosSetWaysCsv(path string) { + _c_path := C.CString(path) + defer C.free(unsafe.Pointer(_c_path)) + C.meos_set_ways_csv(_c_path) +} + + +// MeosInitialize wraps MEOS C function meos_initialize. +func MeosInitialize() { + C.meos_initialize() +} + + +// MeosFinalize wraps MEOS C function meos_finalize. +func MeosFinalize() { + C.meos_finalize() +} + + +// BigintsetIn wraps MEOS C function bigintset_in. +func BigintsetIn(str string) *Set { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.bigintset_in(_c_str) + return &Set{_inner: _cret} +} + + +// BigintsetOut wraps MEOS C function bigintset_out. +func BigintsetOut(set *Set) string { + _cret := C.bigintset_out(set._inner) + return C.GoString(_cret) +} + + +// BigintspanExpand wraps MEOS C function bigintspan_expand. +func BigintspanExpand(s *Span, value int64) *Span { + _cret := C.bigintspan_expand(s._inner, C.int64_t(value)) + return &Span{_inner: _cret} +} + + +// BigintspanIn wraps MEOS C function bigintspan_in. +func BigintspanIn(str string) *Span { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.bigintspan_in(_c_str) + return &Span{_inner: _cret} +} + + +// BigintspanOut wraps MEOS C function bigintspan_out. +func BigintspanOut(s *Span) string { + _cret := C.bigintspan_out(s._inner) + return C.GoString(_cret) +} + + +// BigintspansetIn wraps MEOS C function bigintspanset_in. +func BigintspansetIn(str string) *SpanSet { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.bigintspanset_in(_c_str) + return &SpanSet{_inner: _cret} +} + + +// BigintspansetOut wraps MEOS C function bigintspanset_out. +func BigintspansetOut(ss *SpanSet) string { + _cret := C.bigintspanset_out(ss._inner) + return C.GoString(_cret) +} + + +// DatesetIn wraps MEOS C function dateset_in. +func DatesetIn(str string) *Set { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.dateset_in(_c_str) + return &Set{_inner: _cret} +} + + +// DatesetOut wraps MEOS C function dateset_out. +func DatesetOut(s *Set) string { + _cret := C.dateset_out(s._inner) + return C.GoString(_cret) +} + + +// DatespanIn wraps MEOS C function datespan_in. +func DatespanIn(str string) *Span { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.datespan_in(_c_str) + return &Span{_inner: _cret} +} + + +// DatespanOut wraps MEOS C function datespan_out. +func DatespanOut(s *Span) string { + _cret := C.datespan_out(s._inner) + return C.GoString(_cret) +} + + +// DatespansetIn wraps MEOS C function datespanset_in. +func DatespansetIn(str string) *SpanSet { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.datespanset_in(_c_str) + return &SpanSet{_inner: _cret} +} + + +// DatespansetOut wraps MEOS C function datespanset_out. +func DatespansetOut(ss *SpanSet) string { + _cret := C.datespanset_out(ss._inner) + return C.GoString(_cret) +} + + +// FloatsetIn wraps MEOS C function floatset_in. +func FloatsetIn(str string) *Set { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.floatset_in(_c_str) + return &Set{_inner: _cret} +} + + +// FloatsetOut wraps MEOS C function floatset_out. +func FloatsetOut(set *Set, maxdd int) string { + _cret := C.floatset_out(set._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// FloatspanExpand wraps MEOS C function floatspan_expand. +func FloatspanExpand(s *Span, value float64) *Span { + _cret := C.floatspan_expand(s._inner, C.double(value)) + return &Span{_inner: _cret} +} + + +// FloatspanIn wraps MEOS C function floatspan_in. +func FloatspanIn(str string) *Span { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.floatspan_in(_c_str) + return &Span{_inner: _cret} +} + + +// FloatspanOut wraps MEOS C function floatspan_out. +func FloatspanOut(s *Span, maxdd int) string { + _cret := C.floatspan_out(s._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// FloatspansetIn wraps MEOS C function floatspanset_in. +func FloatspansetIn(str string) *SpanSet { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.floatspanset_in(_c_str) + return &SpanSet{_inner: _cret} +} + + +// FloatspansetOut wraps MEOS C function floatspanset_out. +func FloatspansetOut(ss *SpanSet, maxdd int) string { + _cret := C.floatspanset_out(ss._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// IntsetIn wraps MEOS C function intset_in. +func IntsetIn(str string) *Set { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.intset_in(_c_str) + return &Set{_inner: _cret} +} + + +// IntsetOut wraps MEOS C function intset_out. +func IntsetOut(set *Set) string { + _cret := C.intset_out(set._inner) + return C.GoString(_cret) +} + + +// IntspanExpand wraps MEOS C function intspan_expand. +func IntspanExpand(s *Span, value int32) *Span { + _cret := C.intspan_expand(s._inner, C.int32(value)) + return &Span{_inner: _cret} +} + + +// IntspanIn wraps MEOS C function intspan_in. +func IntspanIn(str string) *Span { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.intspan_in(_c_str) + return &Span{_inner: _cret} +} + + +// IntspanOut wraps MEOS C function intspan_out. +func IntspanOut(s *Span) string { + _cret := C.intspan_out(s._inner) + return C.GoString(_cret) +} + + +// IntspansetIn wraps MEOS C function intspanset_in. +func IntspansetIn(str string) *SpanSet { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.intspanset_in(_c_str) + return &SpanSet{_inner: _cret} +} + + +// IntspansetOut wraps MEOS C function intspanset_out. +func IntspansetOut(ss *SpanSet) string { + _cret := C.intspanset_out(ss._inner) + return C.GoString(_cret) +} + + +// SetAsHexwkb wraps MEOS C function set_as_hexwkb. +func SetAsHexwkb(s *Set, variant uint8, size_out unsafe.Pointer) string { + _cret := C.set_as_hexwkb(s._inner, C.uint8_t(variant), (*C.size_t)(unsafe.Pointer(size_out))) + return C.GoString(_cret) +} + + +// SetAsWKB wraps MEOS C function set_as_wkb. +func SetAsWKB(s *Set, variant uint8, size_out unsafe.Pointer) unsafe.Pointer { + _cret := C.set_as_wkb(s._inner, C.uint8_t(variant), (*C.size_t)(unsafe.Pointer(size_out))) + return unsafe.Pointer(_cret) +} + + +// SetFromHexwkb wraps MEOS C function set_from_hexwkb. +func SetFromHexwkb(hexwkb string) *Set { + _c_hexwkb := C.CString(hexwkb) + defer C.free(unsafe.Pointer(_c_hexwkb)) + _cret := C.set_from_hexwkb(_c_hexwkb) + return &Set{_inner: _cret} +} + + +// SetFromWKB wraps MEOS C function set_from_wkb. +func SetFromWKB(wkb unsafe.Pointer, size uint) *Set { + _cret := C.set_from_wkb((*C.uint8_t)(unsafe.Pointer(wkb)), C.size_t(size)) + return &Set{_inner: _cret} +} + + +// SpanAsHexwkb wraps MEOS C function span_as_hexwkb. +func SpanAsHexwkb(s *Span, variant uint8, size_out unsafe.Pointer) string { + _cret := C.span_as_hexwkb(s._inner, C.uint8_t(variant), (*C.size_t)(unsafe.Pointer(size_out))) + return C.GoString(_cret) +} + + +// SpanAsWKB wraps MEOS C function span_as_wkb. +func SpanAsWKB(s *Span, variant uint8, size_out unsafe.Pointer) unsafe.Pointer { + _cret := C.span_as_wkb(s._inner, C.uint8_t(variant), (*C.size_t)(unsafe.Pointer(size_out))) + return unsafe.Pointer(_cret) +} + + +// SpanFromHexwkb wraps MEOS C function span_from_hexwkb. +func SpanFromHexwkb(hexwkb string) *Span { + _c_hexwkb := C.CString(hexwkb) + defer C.free(unsafe.Pointer(_c_hexwkb)) + _cret := C.span_from_hexwkb(_c_hexwkb) + return &Span{_inner: _cret} +} + + +// SpanFromWKB wraps MEOS C function span_from_wkb. +func SpanFromWKB(wkb unsafe.Pointer, size uint) *Span { + _cret := C.span_from_wkb((*C.uint8_t)(unsafe.Pointer(wkb)), C.size_t(size)) + return &Span{_inner: _cret} +} + + +// SpansetAsHexwkb wraps MEOS C function spanset_as_hexwkb. +func SpansetAsHexwkb(ss *SpanSet, variant uint8, size_out unsafe.Pointer) string { + _cret := C.spanset_as_hexwkb(ss._inner, C.uint8_t(variant), (*C.size_t)(unsafe.Pointer(size_out))) + return C.GoString(_cret) +} + + +// SpansetAsWKB wraps MEOS C function spanset_as_wkb. +func SpansetAsWKB(ss *SpanSet, variant uint8, size_out unsafe.Pointer) unsafe.Pointer { + _cret := C.spanset_as_wkb(ss._inner, C.uint8_t(variant), (*C.size_t)(unsafe.Pointer(size_out))) + return unsafe.Pointer(_cret) +} + + +// SpansetFromHexwkb wraps MEOS C function spanset_from_hexwkb. +func SpansetFromHexwkb(hexwkb string) *SpanSet { + _c_hexwkb := C.CString(hexwkb) + defer C.free(unsafe.Pointer(_c_hexwkb)) + _cret := C.spanset_from_hexwkb(_c_hexwkb) + return &SpanSet{_inner: _cret} +} + + +// SpansetFromWKB wraps MEOS C function spanset_from_wkb. +func SpansetFromWKB(wkb unsafe.Pointer, size uint) *SpanSet { + _cret := C.spanset_from_wkb((*C.uint8_t)(unsafe.Pointer(wkb)), C.size_t(size)) + return &SpanSet{_inner: _cret} +} + + +// TextsetIn wraps MEOS C function textset_in. +func TextsetIn(str string) *Set { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.textset_in(_c_str) + return &Set{_inner: _cret} +} + + +// TextsetOut wraps MEOS C function textset_out. +func TextsetOut(set *Set) string { + _cret := C.textset_out(set._inner) + return C.GoString(_cret) +} + + +// TstzsetIn wraps MEOS C function tstzset_in. +func TstzsetIn(str string) *Set { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tstzset_in(_c_str) + return &Set{_inner: _cret} +} + + +// TstzsetOut wraps MEOS C function tstzset_out. +func TstzsetOut(set *Set) string { + _cret := C.tstzset_out(set._inner) + return C.GoString(_cret) +} + + +// TstzspanIn wraps MEOS C function tstzspan_in. +func TstzspanIn(str string) *Span { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tstzspan_in(_c_str) + return &Span{_inner: _cret} +} + + +// TstzspanOut wraps MEOS C function tstzspan_out. +func TstzspanOut(s *Span) string { + _cret := C.tstzspan_out(s._inner) + return C.GoString(_cret) +} + + +// TstzspansetIn wraps MEOS C function tstzspanset_in. +func TstzspansetIn(str string) *SpanSet { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tstzspanset_in(_c_str) + return &SpanSet{_inner: _cret} +} + + +// TstzspansetOut wraps MEOS C function tstzspanset_out. +func TstzspansetOut(ss *SpanSet) string { + _cret := C.tstzspanset_out(ss._inner) + return C.GoString(_cret) +} + + +// BigintsetMake wraps MEOS C function bigintset_make. +func BigintsetMake(values unsafe.Pointer, count int) *Set { + _cret := C.bigintset_make((*C.int64_t)(unsafe.Pointer(values)), C.int(count)) + return &Set{_inner: _cret} +} + + +// BigintspanMake wraps MEOS C function bigintspan_make. +func BigintspanMake(lower int64, upper int64, lower_inc bool, upper_inc bool) *Span { + _cret := C.bigintspan_make(C.int64_t(lower), C.int64_t(upper), C.bool(lower_inc), C.bool(upper_inc)) + return &Span{_inner: _cret} +} + + +// DatesetMake wraps MEOS C function dateset_make. +func DatesetMake(values unsafe.Pointer, count int) *Set { + _cret := C.dateset_make((*C.DateADT)(unsafe.Pointer(values)), C.int(count)) + return &Set{_inner: _cret} +} + + +// DatespanMake wraps MEOS C function datespan_make. +func DatespanMake(lower int32, upper int32, lower_inc bool, upper_inc bool) *Span { + _cret := C.datespan_make(C.DateADT(lower), C.DateADT(upper), C.bool(lower_inc), C.bool(upper_inc)) + return &Span{_inner: _cret} +} + + +// FloatsetMake wraps MEOS C function floatset_make. +func FloatsetMake(values unsafe.Pointer, count int) *Set { + _cret := C.floatset_make((*C.double)(unsafe.Pointer(values)), C.int(count)) + return &Set{_inner: _cret} +} + + +// FloatspanMake wraps MEOS C function floatspan_make. +func FloatspanMake(lower float64, upper float64, lower_inc bool, upper_inc bool) *Span { + _cret := C.floatspan_make(C.double(lower), C.double(upper), C.bool(lower_inc), C.bool(upper_inc)) + return &Span{_inner: _cret} +} + + +// IntsetMake wraps MEOS C function intset_make. +func IntsetMake(values unsafe.Pointer, count int) *Set { + _cret := C.intset_make((*C.int)(unsafe.Pointer(values)), C.int(count)) + return &Set{_inner: _cret} +} + + +// IntspanMake wraps MEOS C function intspan_make. +func IntspanMake(lower int, upper int, lower_inc bool, upper_inc bool) *Span { + _cret := C.intspan_make(C.int(lower), C.int(upper), C.bool(lower_inc), C.bool(upper_inc)) + return &Span{_inner: _cret} +} + + +// SetCopy wraps MEOS C function set_copy. +func SetCopy(s *Set) *Set { + _cret := C.set_copy(s._inner) + return &Set{_inner: _cret} +} + + +// SpanCopy wraps MEOS C function span_copy. +func SpanCopy(s *Span) *Span { + _cret := C.span_copy(s._inner) + return &Span{_inner: _cret} +} + + +// SpansetCopy wraps MEOS C function spanset_copy. +func SpansetCopy(ss *SpanSet) *SpanSet { + _cret := C.spanset_copy(ss._inner) + return &SpanSet{_inner: _cret} +} + + +// SpansetMake wraps MEOS C function spanset_make. +func SpansetMake(spans *Span, count int) *SpanSet { + _cret := C.spanset_make(spans._inner, C.int(count)) + return &SpanSet{_inner: _cret} +} + + +// TextsetMake wraps MEOS C function textset_make. +func TextsetMake(values unsafe.Pointer, count int) *Set { + _cret := C.textset_make((**C.text)(unsafe.Pointer(values)), C.int(count)) + return &Set{_inner: _cret} +} + + +// TstzsetMake wraps MEOS C function tstzset_make. +func TstzsetMake(values unsafe.Pointer, count int) *Set { + _cret := C.tstzset_make((*C.TimestampTz)(unsafe.Pointer(values)), C.int(count)) + return &Set{_inner: _cret} +} + + +// TstzspanMake wraps MEOS C function tstzspan_make. +func TstzspanMake(lower int64, upper int64, lower_inc bool, upper_inc bool) *Span { + _cret := C.tstzspan_make(C.TimestampTz(lower), C.TimestampTz(upper), C.bool(lower_inc), C.bool(upper_inc)) + return &Span{_inner: _cret} +} + + +// BigintToSet wraps MEOS C function bigint_to_set. +func BigintToSet(i int64) *Set { + _cret := C.bigint_to_set(C.int64_t(i)) + return &Set{_inner: _cret} +} + + +// BigintToSpan wraps MEOS C function bigint_to_span. +func BigintToSpan(i int) *Span { + _cret := C.bigint_to_span(C.int(i)) + return &Span{_inner: _cret} +} + + +// BigintToSpanset wraps MEOS C function bigint_to_spanset. +func BigintToSpanset(i int) *SpanSet { + _cret := C.bigint_to_spanset(C.int(i)) + return &SpanSet{_inner: _cret} +} + + +// DateToSet wraps MEOS C function date_to_set. +func DateToSet(d int32) *Set { + _cret := C.date_to_set(C.DateADT(d)) + return &Set{_inner: _cret} +} + + +// DateToSpan wraps MEOS C function date_to_span. +func DateToSpan(d int32) *Span { + _cret := C.date_to_span(C.DateADT(d)) + return &Span{_inner: _cret} +} + + +// DateToSpanset wraps MEOS C function date_to_spanset. +func DateToSpanset(d int32) *SpanSet { + _cret := C.date_to_spanset(C.DateADT(d)) + return &SpanSet{_inner: _cret} +} + + +// DatesetToTstzset wraps MEOS C function dateset_to_tstzset. +func DatesetToTstzset(s *Set) *Set { + _cret := C.dateset_to_tstzset(s._inner) + return &Set{_inner: _cret} +} + + +// DatespanToTstzspan wraps MEOS C function datespan_to_tstzspan. +func DatespanToTstzspan(s *Span) *Span { + _cret := C.datespan_to_tstzspan(s._inner) + return &Span{_inner: _cret} +} + + +// DatespansetToTstzspanset wraps MEOS C function datespanset_to_tstzspanset. +func DatespansetToTstzspanset(ss *SpanSet) *SpanSet { + _cret := C.datespanset_to_tstzspanset(ss._inner) + return &SpanSet{_inner: _cret} +} + + +// FloatToSet wraps MEOS C function float_to_set. +func FloatToSet(d float64) *Set { + _cret := C.float_to_set(C.double(d)) + return &Set{_inner: _cret} +} + + +// FloatToSpan wraps MEOS C function float_to_span. +func FloatToSpan(d float64) *Span { + _cret := C.float_to_span(C.double(d)) + return &Span{_inner: _cret} +} + + +// FloatToSpanset wraps MEOS C function float_to_spanset. +func FloatToSpanset(d float64) *SpanSet { + _cret := C.float_to_spanset(C.double(d)) + return &SpanSet{_inner: _cret} +} + + +// FloatsetToIntset wraps MEOS C function floatset_to_intset. +func FloatsetToIntset(s *Set) *Set { + _cret := C.floatset_to_intset(s._inner) + return &Set{_inner: _cret} +} + + +// FloatspanToIntspan wraps MEOS C function floatspan_to_intspan. +func FloatspanToIntspan(s *Span) *Span { + _cret := C.floatspan_to_intspan(s._inner) + return &Span{_inner: _cret} +} + + +// FloatspanToBigintspan wraps MEOS C function floatspan_to_bigintspan. +func FloatspanToBigintspan(s *Span) *Span { + _cret := C.floatspan_to_bigintspan(s._inner) + return &Span{_inner: _cret} +} + + +// FloatspansetToIntspanset wraps MEOS C function floatspanset_to_intspanset. +func FloatspansetToIntspanset(ss *SpanSet) *SpanSet { + _cret := C.floatspanset_to_intspanset(ss._inner) + return &SpanSet{_inner: _cret} +} + + +// IntToSet wraps MEOS C function int_to_set. +func IntToSet(i int) *Set { + _cret := C.int_to_set(C.int(i)) + return &Set{_inner: _cret} +} + + +// IntToSpan wraps MEOS C function int_to_span. +func IntToSpan(i int) *Span { + _cret := C.int_to_span(C.int(i)) + return &Span{_inner: _cret} +} + + +// IntToSpanset wraps MEOS C function int_to_spanset. +func IntToSpanset(i int) *SpanSet { + _cret := C.int_to_spanset(C.int(i)) + return &SpanSet{_inner: _cret} +} + + +// IntsetToFloatset wraps MEOS C function intset_to_floatset. +func IntsetToFloatset(s *Set) *Set { + _cret := C.intset_to_floatset(s._inner) + return &Set{_inner: _cret} +} + + +// IntspanToFloatspan wraps MEOS C function intspan_to_floatspan. +func IntspanToFloatspan(s *Span) *Span { + _cret := C.intspan_to_floatspan(s._inner) + return &Span{_inner: _cret} +} + + +// IntspanToBigintspan wraps MEOS C function intspan_to_bigintspan. +func IntspanToBigintspan(s *Span) *Span { + _cret := C.intspan_to_bigintspan(s._inner) + return &Span{_inner: _cret} +} + + +// BigintspanToIntspan wraps MEOS C function bigintspan_to_intspan. +func BigintspanToIntspan(s *Span) *Span { + _cret := C.bigintspan_to_intspan(s._inner) + return &Span{_inner: _cret} +} + + +// BigintspanToFloatspan wraps MEOS C function bigintspan_to_floatspan. +func BigintspanToFloatspan(s *Span) *Span { + _cret := C.bigintspan_to_floatspan(s._inner) + return &Span{_inner: _cret} +} + + +// IntspansetToFloatspanset wraps MEOS C function intspanset_to_floatspanset. +func IntspansetToFloatspanset(ss *SpanSet) *SpanSet { + _cret := C.intspanset_to_floatspanset(ss._inner) + return &SpanSet{_inner: _cret} +} + + +// SetToSpan wraps MEOS C function set_to_span. +func SetToSpan(s *Set) *Span { + _cret := C.set_to_span(s._inner) + return &Span{_inner: _cret} +} + + +// SetToSpanset wraps MEOS C function set_to_spanset. +func SetToSpanset(s *Set) *SpanSet { + _cret := C.set_to_spanset(s._inner) + return &SpanSet{_inner: _cret} +} + + +// SpanToSpanset wraps MEOS C function span_to_spanset. +func SpanToSpanset(s *Span) *SpanSet { + _cret := C.span_to_spanset(s._inner) + return &SpanSet{_inner: _cret} +} + + +// TextToSet wraps MEOS C function text_to_set. +func TextToSet(txt string) *Set { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.text_to_set(_c_txt) + return &Set{_inner: _cret} +} + + +// TimestamptzToSet wraps MEOS C function timestamptz_to_set. +func TimestamptzToSet(t int64) *Set { + _cret := C.timestamptz_to_set(C.TimestampTz(t)) + return &Set{_inner: _cret} +} + + +// TimestamptzToSpan wraps MEOS C function timestamptz_to_span. +func TimestamptzToSpan(t int64) *Span { + _cret := C.timestamptz_to_span(C.TimestampTz(t)) + return &Span{_inner: _cret} +} + + +// TimestamptzToSpanset wraps MEOS C function timestamptz_to_spanset. +func TimestamptzToSpanset(t int64) *SpanSet { + _cret := C.timestamptz_to_spanset(C.TimestampTz(t)) + return &SpanSet{_inner: _cret} +} + + +// TstzsetToDateset wraps MEOS C function tstzset_to_dateset. +func TstzsetToDateset(s *Set) *Set { + _cret := C.tstzset_to_dateset(s._inner) + return &Set{_inner: _cret} +} + + +// TstzspanToDatespan wraps MEOS C function tstzspan_to_datespan. +func TstzspanToDatespan(s *Span) *Span { + _cret := C.tstzspan_to_datespan(s._inner) + return &Span{_inner: _cret} +} + + +// TstzspansetToDatespanset wraps MEOS C function tstzspanset_to_datespanset. +func TstzspansetToDatespanset(ss *SpanSet) *SpanSet { + _cret := C.tstzspanset_to_datespanset(ss._inner) + return &SpanSet{_inner: _cret} +} + + +// BigintsetEndValue wraps MEOS C function bigintset_end_value. +func BigintsetEndValue(s *Set) int64 { + _cret := C.bigintset_end_value(s._inner) + return int64(_cret) +} + + +// BigintsetStartValue wraps MEOS C function bigintset_start_value. +func BigintsetStartValue(s *Set) int64 { + _cret := C.bigintset_start_value(s._inner) + return int64(_cret) +} + + +// BigintsetValueN wraps MEOS C function bigintset_value_n. +func BigintsetValueN(s *Set, n int) (bool, int64) { + var _out_result C.int64_t + _cret := C.bigintset_value_n(s._inner, C.int(n), &_out_result) + return bool(_cret), int64(_out_result) +} + + +// BigintsetValues wraps MEOS C function bigintset_values. +func BigintsetValues(s *Set, count unsafe.Pointer) unsafe.Pointer { + _cret := C.bigintset_values(s._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// BigintspanLower wraps MEOS C function bigintspan_lower. +func BigintspanLower(s *Span) int64 { + _cret := C.bigintspan_lower(s._inner) + return int64(_cret) +} + + +// BigintspanUpper wraps MEOS C function bigintspan_upper. +func BigintspanUpper(s *Span) int64 { + _cret := C.bigintspan_upper(s._inner) + return int64(_cret) +} + + +// BigintspanWidth wraps MEOS C function bigintspan_width. +func BigintspanWidth(s *Span) int64 { + _cret := C.bigintspan_width(s._inner) + return int64(_cret) +} + + +// BigintspansetLower wraps MEOS C function bigintspanset_lower. +func BigintspansetLower(ss *SpanSet) int64 { + _cret := C.bigintspanset_lower(ss._inner) + return int64(_cret) +} + + +// BigintspansetUpper wraps MEOS C function bigintspanset_upper. +func BigintspansetUpper(ss *SpanSet) int64 { + _cret := C.bigintspanset_upper(ss._inner) + return int64(_cret) +} + + +// BigintspansetWidth wraps MEOS C function bigintspanset_width. +func BigintspansetWidth(ss *SpanSet, boundspan bool) int64 { + _cret := C.bigintspanset_width(ss._inner, C.bool(boundspan)) + return int64(_cret) +} + + +// DatesetEndValue wraps MEOS C function dateset_end_value. +func DatesetEndValue(s *Set) int32 { + _cret := C.dateset_end_value(s._inner) + return int32(_cret) +} + + +// DatesetStartValue wraps MEOS C function dateset_start_value. +func DatesetStartValue(s *Set) int32 { + _cret := C.dateset_start_value(s._inner) + return int32(_cret) +} + + +// DatesetValueN wraps MEOS C function dateset_value_n. +func DatesetValueN(s *Set, n int) (bool, int32) { + var _out_result C.DateADT + _cret := C.dateset_value_n(s._inner, C.int(n), &_out_result) + return bool(_cret), int32(_out_result) +} + + +// DatesetValues wraps MEOS C function dateset_values. +func DatesetValues(s *Set, count unsafe.Pointer) unsafe.Pointer { + _cret := C.dateset_values(s._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// DatespanDuration wraps MEOS C function datespan_duration. +func DatespanDuration(s *Span) *Interval { + _cret := C.datespan_duration(s._inner) + return &Interval{_inner: _cret} +} + + +// DatespanLower wraps MEOS C function datespan_lower. +func DatespanLower(s *Span) int32 { + _cret := C.datespan_lower(s._inner) + return int32(_cret) +} + + +// DatespanUpper wraps MEOS C function datespan_upper. +func DatespanUpper(s *Span) int32 { + _cret := C.datespan_upper(s._inner) + return int32(_cret) +} + + +// DatespansetDateN wraps MEOS C function datespanset_date_n. +func DatespansetDateN(ss *SpanSet, n int) (bool, int32) { + var _out_result C.DateADT + _cret := C.datespanset_date_n(ss._inner, C.int(n), &_out_result) + return bool(_cret), int32(_out_result) +} + + +// DatespansetDates wraps MEOS C function datespanset_dates. +func DatespansetDates(ss *SpanSet) *Set { + _cret := C.datespanset_dates(ss._inner) + return &Set{_inner: _cret} +} + + +// DatespansetDuration wraps MEOS C function datespanset_duration. +func DatespansetDuration(ss *SpanSet, boundspan bool) *Interval { + _cret := C.datespanset_duration(ss._inner, C.bool(boundspan)) + return &Interval{_inner: _cret} +} + + +// DatespansetEndDate wraps MEOS C function datespanset_end_date. +func DatespansetEndDate(ss *SpanSet) int32 { + _cret := C.datespanset_end_date(ss._inner) + return int32(_cret) +} + + +// DatespansetNumDates wraps MEOS C function datespanset_num_dates. +func DatespansetNumDates(ss *SpanSet) int { + _cret := C.datespanset_num_dates(ss._inner) + return int(_cret) +} + + +// DatespansetStartDate wraps MEOS C function datespanset_start_date. +func DatespansetStartDate(ss *SpanSet) int32 { + _cret := C.datespanset_start_date(ss._inner) + return int32(_cret) +} + + +// FloatsetEndValue wraps MEOS C function floatset_end_value. +func FloatsetEndValue(s *Set) float64 { + _cret := C.floatset_end_value(s._inner) + return float64(_cret) +} + + +// FloatsetStartValue wraps MEOS C function floatset_start_value. +func FloatsetStartValue(s *Set) float64 { + _cret := C.floatset_start_value(s._inner) + return float64(_cret) +} + + +// FloatsetValueN wraps MEOS C function floatset_value_n. +func FloatsetValueN(s *Set, n int) (bool, float64) { + var _out_result C.double + _cret := C.floatset_value_n(s._inner, C.int(n), &_out_result) + return bool(_cret), float64(_out_result) +} + + +// FloatsetValues wraps MEOS C function floatset_values. +func FloatsetValues(s *Set, count unsafe.Pointer) unsafe.Pointer { + _cret := C.floatset_values(s._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// FloatspanLower wraps MEOS C function floatspan_lower. +func FloatspanLower(s *Span) float64 { + _cret := C.floatspan_lower(s._inner) + return float64(_cret) +} + + +// FloatspanUpper wraps MEOS C function floatspan_upper. +func FloatspanUpper(s *Span) float64 { + _cret := C.floatspan_upper(s._inner) + return float64(_cret) +} + + +// FloatspanWidth wraps MEOS C function floatspan_width. +func FloatspanWidth(s *Span) float64 { + _cret := C.floatspan_width(s._inner) + return float64(_cret) +} + + +// FloatspansetLower wraps MEOS C function floatspanset_lower. +func FloatspansetLower(ss *SpanSet) float64 { + _cret := C.floatspanset_lower(ss._inner) + return float64(_cret) +} + + +// FloatspansetUpper wraps MEOS C function floatspanset_upper. +func FloatspansetUpper(ss *SpanSet) float64 { + _cret := C.floatspanset_upper(ss._inner) + return float64(_cret) +} + + +// FloatspansetWidth wraps MEOS C function floatspanset_width. +func FloatspansetWidth(ss *SpanSet, boundspan bool) float64 { + _cret := C.floatspanset_width(ss._inner, C.bool(boundspan)) + return float64(_cret) +} + + +// IntsetEndValue wraps MEOS C function intset_end_value. +func IntsetEndValue(s *Set) int { + _cret := C.intset_end_value(s._inner) + return int(_cret) +} + + +// IntsetStartValue wraps MEOS C function intset_start_value. +func IntsetStartValue(s *Set) int { + _cret := C.intset_start_value(s._inner) + return int(_cret) +} + + +// IntsetValueN wraps MEOS C function intset_value_n. +func IntsetValueN(s *Set, n int) (bool, int) { + var _out_result C.int + _cret := C.intset_value_n(s._inner, C.int(n), &_out_result) + return bool(_cret), int(_out_result) +} + + +// IntsetValues wraps MEOS C function intset_values. +func IntsetValues(s *Set, count unsafe.Pointer) unsafe.Pointer { + _cret := C.intset_values(s._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// IntspanLower wraps MEOS C function intspan_lower. +func IntspanLower(s *Span) int { + _cret := C.intspan_lower(s._inner) + return int(_cret) +} + + +// IntspanUpper wraps MEOS C function intspan_upper. +func IntspanUpper(s *Span) int { + _cret := C.intspan_upper(s._inner) + return int(_cret) +} + + +// IntspanWidth wraps MEOS C function intspan_width. +func IntspanWidth(s *Span) int { + _cret := C.intspan_width(s._inner) + return int(_cret) +} + + +// IntspansetLower wraps MEOS C function intspanset_lower. +func IntspansetLower(ss *SpanSet) int { + _cret := C.intspanset_lower(ss._inner) + return int(_cret) +} + + +// IntspansetUpper wraps MEOS C function intspanset_upper. +func IntspansetUpper(ss *SpanSet) int { + _cret := C.intspanset_upper(ss._inner) + return int(_cret) +} + + +// IntspansetWidth wraps MEOS C function intspanset_width. +func IntspansetWidth(ss *SpanSet, boundspan bool) int { + _cret := C.intspanset_width(ss._inner, C.bool(boundspan)) + return int(_cret) +} + + +// SetHash wraps MEOS C function set_hash. +func SetHash(s *Set) uint32 { + _cret := C.set_hash(s._inner) + return uint32(_cret) +} + + +// SetHashExtended wraps MEOS C function set_hash_extended. +func SetHashExtended(s *Set, seed uint64) uint64 { + _cret := C.set_hash_extended(s._inner, C.uint64_t(seed)) + return uint64(_cret) +} + + +// SetNumValues wraps MEOS C function set_num_values. +func SetNumValues(s *Set) int { + _cret := C.set_num_values(s._inner) + return int(_cret) +} + + +// SpanHash wraps MEOS C function span_hash. +func SpanHash(s *Span) uint32 { + _cret := C.span_hash(s._inner) + return uint32(_cret) +} + + +// SpanHashExtended wraps MEOS C function span_hash_extended. +func SpanHashExtended(s *Span, seed uint64) uint64 { + _cret := C.span_hash_extended(s._inner, C.uint64_t(seed)) + return uint64(_cret) +} + + +// SpanLowerInc wraps MEOS C function span_lower_inc. +func SpanLowerInc(s *Span) bool { + _cret := C.span_lower_inc(s._inner) + return bool(_cret) +} + + +// SpanUpperInc wraps MEOS C function span_upper_inc. +func SpanUpperInc(s *Span) bool { + _cret := C.span_upper_inc(s._inner) + return bool(_cret) +} + + +// SpansetEndSpan wraps MEOS C function spanset_end_span. +func SpansetEndSpan(ss *SpanSet) *Span { + _cret := C.spanset_end_span(ss._inner) + return &Span{_inner: _cret} +} + + +// SpansetHash wraps MEOS C function spanset_hash. +func SpansetHash(ss *SpanSet) uint32 { + _cret := C.spanset_hash(ss._inner) + return uint32(_cret) +} + + +// SpansetHashExtended wraps MEOS C function spanset_hash_extended. +func SpansetHashExtended(ss *SpanSet, seed uint64) uint64 { + _cret := C.spanset_hash_extended(ss._inner, C.uint64_t(seed)) + return uint64(_cret) +} + + +// SpansetLowerInc wraps MEOS C function spanset_lower_inc. +func SpansetLowerInc(ss *SpanSet) bool { + _cret := C.spanset_lower_inc(ss._inner) + return bool(_cret) +} + + +// SpansetNumSpans wraps MEOS C function spanset_num_spans. +func SpansetNumSpans(ss *SpanSet) int { + _cret := C.spanset_num_spans(ss._inner) + return int(_cret) +} + + +// SpansetSpan wraps MEOS C function spanset_span. +func SpansetSpan(ss *SpanSet) *Span { + _cret := C.spanset_span(ss._inner) + return &Span{_inner: _cret} +} + + +// SpansetSpanN wraps MEOS C function spanset_span_n. +func SpansetSpanN(ss *SpanSet, i int) *Span { + _cret := C.spanset_span_n(ss._inner, C.int(i)) + return &Span{_inner: _cret} +} + + +// SpansetSpanarr wraps MEOS C function spanset_spanarr. +func SpansetSpanarr(ss *SpanSet, count unsafe.Pointer) unsafe.Pointer { + _cret := C.spanset_spanarr(ss._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// SpansetStartSpan wraps MEOS C function spanset_start_span. +func SpansetStartSpan(ss *SpanSet) *Span { + _cret := C.spanset_start_span(ss._inner) + return &Span{_inner: _cret} +} + + +// SpansetUpperInc wraps MEOS C function spanset_upper_inc. +func SpansetUpperInc(ss *SpanSet) bool { + _cret := C.spanset_upper_inc(ss._inner) + return bool(_cret) +} + + +// TextsetEndValue wraps MEOS C function textset_end_value. +func TextsetEndValue(s *Set) string { + _cret := C.textset_end_value(s._inner) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// TextsetStartValue wraps MEOS C function textset_start_value. +func TextsetStartValue(s *Set) string { + _cret := C.textset_start_value(s._inner) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// TextsetValueN wraps MEOS C function textset_value_n. +func TextsetValueN(s *Set, n int) (bool, string) { + var _out_result *C.text + _cret := C.textset_value_n(s._inner, C.int(n), &_out_result) + return bool(_cret), C.GoString(C.text_to_cstring(_out_result)) +} + + +// TextsetValues wraps MEOS C function textset_values. +func TextsetValues(s *Set, count unsafe.Pointer) unsafe.Pointer { + _cret := C.textset_values(s._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TstzsetEndValue wraps MEOS C function tstzset_end_value. +func TstzsetEndValue(s *Set) int64 { + _cret := C.tstzset_end_value(s._inner) + return int64(_cret) +} + + +// TstzsetStartValue wraps MEOS C function tstzset_start_value. +func TstzsetStartValue(s *Set) int64 { + _cret := C.tstzset_start_value(s._inner) + return int64(_cret) +} + + +// TstzsetValueN wraps MEOS C function tstzset_value_n. +func TstzsetValueN(s *Set, n int) (bool, int64) { + var _out_result C.TimestampTz + _cret := C.tstzset_value_n(s._inner, C.int(n), &_out_result) + return bool(_cret), int64(_out_result) +} + + +// TstzsetValues wraps MEOS C function tstzset_values. +func TstzsetValues(s *Set, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tstzset_values(s._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TstzspanDuration wraps MEOS C function tstzspan_duration. +func TstzspanDuration(s *Span) *Interval { + _cret := C.tstzspan_duration(s._inner) + return &Interval{_inner: _cret} +} + + +// TstzspanLower wraps MEOS C function tstzspan_lower. +func TstzspanLower(s *Span) int64 { + _cret := C.tstzspan_lower(s._inner) + return int64(_cret) +} + + +// TstzspanUpper wraps MEOS C function tstzspan_upper. +func TstzspanUpper(s *Span) int64 { + _cret := C.tstzspan_upper(s._inner) + return int64(_cret) +} + + +// TstzspansetDuration wraps MEOS C function tstzspanset_duration. +func TstzspansetDuration(ss *SpanSet, boundspan bool) *Interval { + _cret := C.tstzspanset_duration(ss._inner, C.bool(boundspan)) + return &Interval{_inner: _cret} +} + + +// TstzspansetEndTimestamptz wraps MEOS C function tstzspanset_end_timestamptz. +func TstzspansetEndTimestamptz(ss *SpanSet) int64 { + _cret := C.tstzspanset_end_timestamptz(ss._inner) + return int64(_cret) +} + + +// TstzspansetLower wraps MEOS C function tstzspanset_lower. +func TstzspansetLower(ss *SpanSet) int64 { + _cret := C.tstzspanset_lower(ss._inner) + return int64(_cret) +} + + +// TstzspansetNumTimestamps wraps MEOS C function tstzspanset_num_timestamps. +func TstzspansetNumTimestamps(ss *SpanSet) int { + _cret := C.tstzspanset_num_timestamps(ss._inner) + return int(_cret) +} + + +// TstzspansetStartTimestamptz wraps MEOS C function tstzspanset_start_timestamptz. +func TstzspansetStartTimestamptz(ss *SpanSet) int64 { + _cret := C.tstzspanset_start_timestamptz(ss._inner) + return int64(_cret) +} + + +// TstzspansetTimestamps wraps MEOS C function tstzspanset_timestamps. +func TstzspansetTimestamps(ss *SpanSet) *Set { + _cret := C.tstzspanset_timestamps(ss._inner) + return &Set{_inner: _cret} +} + + +// TstzspansetTimestamptzN wraps MEOS C function tstzspanset_timestamptz_n. +func TstzspansetTimestamptzN(ss *SpanSet, n int) (bool, int64) { + var _out_result C.TimestampTz + _cret := C.tstzspanset_timestamptz_n(ss._inner, C.int(n), &_out_result) + return bool(_cret), int64(_out_result) +} + + +// TstzspansetUpper wraps MEOS C function tstzspanset_upper. +func TstzspansetUpper(ss *SpanSet) int64 { + _cret := C.tstzspanset_upper(ss._inner) + return int64(_cret) +} + + +// BigintsetShiftScale wraps MEOS C function bigintset_shift_scale. +func BigintsetShiftScale(s *Set, shift int64, width int64, hasshift bool, haswidth bool) *Set { + _cret := C.bigintset_shift_scale(s._inner, C.int64_t(shift), C.int64_t(width), C.bool(hasshift), C.bool(haswidth)) + return &Set{_inner: _cret} +} + + +// BigintspanShiftScale wraps MEOS C function bigintspan_shift_scale. +func BigintspanShiftScale(s *Span, shift int64, width int64, hasshift bool, haswidth bool) *Span { + _cret := C.bigintspan_shift_scale(s._inner, C.int64_t(shift), C.int64_t(width), C.bool(hasshift), C.bool(haswidth)) + return &Span{_inner: _cret} +} + + +// BigintspansetShiftScale wraps MEOS C function bigintspanset_shift_scale. +func BigintspansetShiftScale(ss *SpanSet, shift int64, width int64, hasshift bool, haswidth bool) *SpanSet { + _cret := C.bigintspanset_shift_scale(ss._inner, C.int64_t(shift), C.int64_t(width), C.bool(hasshift), C.bool(haswidth)) + return &SpanSet{_inner: _cret} +} + + +// DatesetShiftScale wraps MEOS C function dateset_shift_scale. +func DatesetShiftScale(s *Set, shift int, width int, hasshift bool, haswidth bool) *Set { + _cret := C.dateset_shift_scale(s._inner, C.int(shift), C.int(width), C.bool(hasshift), C.bool(haswidth)) + return &Set{_inner: _cret} +} + + +// DatespanShiftScale wraps MEOS C function datespan_shift_scale. +func DatespanShiftScale(s *Span, shift int, width int, hasshift bool, haswidth bool) *Span { + _cret := C.datespan_shift_scale(s._inner, C.int(shift), C.int(width), C.bool(hasshift), C.bool(haswidth)) + return &Span{_inner: _cret} +} + + +// DatespansetShiftScale wraps MEOS C function datespanset_shift_scale. +func DatespansetShiftScale(ss *SpanSet, shift int, width int, hasshift bool, haswidth bool) *SpanSet { + _cret := C.datespanset_shift_scale(ss._inner, C.int(shift), C.int(width), C.bool(hasshift), C.bool(haswidth)) + return &SpanSet{_inner: _cret} +} + + +// FloatsetCeil wraps MEOS C function floatset_ceil. +func FloatsetCeil(s *Set) *Set { + _cret := C.floatset_ceil(s._inner) + return &Set{_inner: _cret} +} + + +// FloatsetDegrees wraps MEOS C function floatset_degrees. +func FloatsetDegrees(s *Set, normalize bool) *Set { + _cret := C.floatset_degrees(s._inner, C.bool(normalize)) + return &Set{_inner: _cret} +} + + +// FloatsetFloor wraps MEOS C function floatset_floor. +func FloatsetFloor(s *Set) *Set { + _cret := C.floatset_floor(s._inner) + return &Set{_inner: _cret} +} + + +// FloatsetRadians wraps MEOS C function floatset_radians. +func FloatsetRadians(s *Set) *Set { + _cret := C.floatset_radians(s._inner) + return &Set{_inner: _cret} +} + + +// FloatsetShiftScale wraps MEOS C function floatset_shift_scale. +func FloatsetShiftScale(s *Set, shift float64, width float64, hasshift bool, haswidth bool) *Set { + _cret := C.floatset_shift_scale(s._inner, C.double(shift), C.double(width), C.bool(hasshift), C.bool(haswidth)) + return &Set{_inner: _cret} +} + + +// FloatspanCeil wraps MEOS C function floatspan_ceil. +func FloatspanCeil(s *Span) *Span { + _cret := C.floatspan_ceil(s._inner) + return &Span{_inner: _cret} +} + + +// FloatspanDegrees wraps MEOS C function floatspan_degrees. +func FloatspanDegrees(s *Span, normalize bool) *Span { + _cret := C.floatspan_degrees(s._inner, C.bool(normalize)) + return &Span{_inner: _cret} +} + + +// FloatspanFloor wraps MEOS C function floatspan_floor. +func FloatspanFloor(s *Span) *Span { + _cret := C.floatspan_floor(s._inner) + return &Span{_inner: _cret} +} + + +// FloatspanRadians wraps MEOS C function floatspan_radians. +func FloatspanRadians(s *Span) *Span { + _cret := C.floatspan_radians(s._inner) + return &Span{_inner: _cret} +} + + +// FloatspanRound wraps MEOS C function floatspan_round. +func FloatspanRound(s *Span, maxdd int) *Span { + _cret := C.floatspan_round(s._inner, C.int(maxdd)) + return &Span{_inner: _cret} +} + + +// FloatspanShiftScale wraps MEOS C function floatspan_shift_scale. +func FloatspanShiftScale(s *Span, shift float64, width float64, hasshift bool, haswidth bool) *Span { + _cret := C.floatspan_shift_scale(s._inner, C.double(shift), C.double(width), C.bool(hasshift), C.bool(haswidth)) + return &Span{_inner: _cret} +} + + +// FloatspansetCeil wraps MEOS C function floatspanset_ceil. +func FloatspansetCeil(ss *SpanSet) *SpanSet { + _cret := C.floatspanset_ceil(ss._inner) + return &SpanSet{_inner: _cret} +} + + +// FloatspansetFloor wraps MEOS C function floatspanset_floor. +func FloatspansetFloor(ss *SpanSet) *SpanSet { + _cret := C.floatspanset_floor(ss._inner) + return &SpanSet{_inner: _cret} +} + + +// FloatspansetDegrees wraps MEOS C function floatspanset_degrees. +func FloatspansetDegrees(ss *SpanSet, normalize bool) *SpanSet { + _cret := C.floatspanset_degrees(ss._inner, C.bool(normalize)) + return &SpanSet{_inner: _cret} +} + + +// FloatspansetRadians wraps MEOS C function floatspanset_radians. +func FloatspansetRadians(ss *SpanSet) *SpanSet { + _cret := C.floatspanset_radians(ss._inner) + return &SpanSet{_inner: _cret} +} + + +// FloatspansetRound wraps MEOS C function floatspanset_round. +func FloatspansetRound(ss *SpanSet, maxdd int) *SpanSet { + _cret := C.floatspanset_round(ss._inner, C.int(maxdd)) + return &SpanSet{_inner: _cret} +} + + +// FloatspansetShiftScale wraps MEOS C function floatspanset_shift_scale. +func FloatspansetShiftScale(ss *SpanSet, shift float64, width float64, hasshift bool, haswidth bool) *SpanSet { + _cret := C.floatspanset_shift_scale(ss._inner, C.double(shift), C.double(width), C.bool(hasshift), C.bool(haswidth)) + return &SpanSet{_inner: _cret} +} + + +// IntsetShiftScale wraps MEOS C function intset_shift_scale. +func IntsetShiftScale(s *Set, shift int, width int, hasshift bool, haswidth bool) *Set { + _cret := C.intset_shift_scale(s._inner, C.int(shift), C.int(width), C.bool(hasshift), C.bool(haswidth)) + return &Set{_inner: _cret} +} + + +// IntspanShiftScale wraps MEOS C function intspan_shift_scale. +func IntspanShiftScale(s *Span, shift int, width int, hasshift bool, haswidth bool) *Span { + _cret := C.intspan_shift_scale(s._inner, C.int(shift), C.int(width), C.bool(hasshift), C.bool(haswidth)) + return &Span{_inner: _cret} +} + + +// IntspansetShiftScale wraps MEOS C function intspanset_shift_scale. +func IntspansetShiftScale(ss *SpanSet, shift int, width int, hasshift bool, haswidth bool) *SpanSet { + _cret := C.intspanset_shift_scale(ss._inner, C.int(shift), C.int(width), C.bool(hasshift), C.bool(haswidth)) + return &SpanSet{_inner: _cret} +} + + +// TstzspanExpand wraps MEOS C function tstzspan_expand. +func TstzspanExpand(s *Span, interv *Interval) *Span { + _cret := C.tstzspan_expand(s._inner, interv._inner) + return &Span{_inner: _cret} +} + + +// SetRound wraps MEOS C function set_round. +func SetRound(s *Set, maxdd int) *Set { + _cret := C.set_round(s._inner, C.int(maxdd)) + return &Set{_inner: _cret} +} + + +// TextcatTextTextset wraps MEOS C function textcat_text_textset. +func TextcatTextTextset(txt string, s *Set) *Set { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.textcat_text_textset(_c_txt, s._inner) + return &Set{_inner: _cret} +} + + +// TextcatTextsetText wraps MEOS C function textcat_textset_text. +func TextcatTextsetText(s *Set, txt string) *Set { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.textcat_textset_text(s._inner, _c_txt) + return &Set{_inner: _cret} +} + + +// TextsetInitcap wraps MEOS C function textset_initcap. +func TextsetInitcap(s *Set) *Set { + _cret := C.textset_initcap(s._inner) + return &Set{_inner: _cret} +} + + +// TextsetLower wraps MEOS C function textset_lower. +func TextsetLower(s *Set) *Set { + _cret := C.textset_lower(s._inner) + return &Set{_inner: _cret} +} + + +// TextsetUpper wraps MEOS C function textset_upper. +func TextsetUpper(s *Set) *Set { + _cret := C.textset_upper(s._inner) + return &Set{_inner: _cret} +} + + +// TimestamptzTprecision wraps MEOS C function timestamptz_tprecision. +func TimestamptzTprecision(t int64, duration *Interval, torigin int64) int64 { + _cret := C.timestamptz_tprecision(C.TimestampTz(t), duration._inner, C.TimestampTz(torigin)) + return int64(_cret) +} + + +// TstzsetShiftScale wraps MEOS C function tstzset_shift_scale. +func TstzsetShiftScale(s *Set, shift *Interval, duration *Interval) *Set { + _cret := C.tstzset_shift_scale(s._inner, shift._inner, duration._inner) + return &Set{_inner: _cret} +} + + +// TstzsetTprecision wraps MEOS C function tstzset_tprecision. +func TstzsetTprecision(s *Set, duration *Interval, torigin int64) *Set { + _cret := C.tstzset_tprecision(s._inner, duration._inner, C.TimestampTz(torigin)) + return &Set{_inner: _cret} +} + + +// TstzspanShiftScale wraps MEOS C function tstzspan_shift_scale. +func TstzspanShiftScale(s *Span, shift *Interval, duration *Interval) *Span { + _cret := C.tstzspan_shift_scale(s._inner, shift._inner, duration._inner) + return &Span{_inner: _cret} +} + + +// TstzspanTprecision wraps MEOS C function tstzspan_tprecision. +func TstzspanTprecision(s *Span, duration *Interval, torigin int64) *Span { + _cret := C.tstzspan_tprecision(s._inner, duration._inner, C.TimestampTz(torigin)) + return &Span{_inner: _cret} +} + + +// TstzspansetShiftScale wraps MEOS C function tstzspanset_shift_scale. +func TstzspansetShiftScale(ss *SpanSet, shift *Interval, duration *Interval) *SpanSet { + _cret := C.tstzspanset_shift_scale(ss._inner, shift._inner, duration._inner) + return &SpanSet{_inner: _cret} +} + + +// TstzspansetTprecision wraps MEOS C function tstzspanset_tprecision. +func TstzspansetTprecision(ss *SpanSet, duration *Interval, torigin int64) *SpanSet { + _cret := C.tstzspanset_tprecision(ss._inner, duration._inner, C.TimestampTz(torigin)) + return &SpanSet{_inner: _cret} +} + + +// SetCmp wraps MEOS C function set_cmp. +func SetCmp(s1 *Set, s2 *Set) int { + _cret := C.set_cmp(s1._inner, s2._inner) + return int(_cret) +} + + +// SetEq wraps MEOS C function set_eq. +func SetEq(s1 *Set, s2 *Set) bool { + _cret := C.set_eq(s1._inner, s2._inner) + return bool(_cret) +} + + +// SetGe wraps MEOS C function set_ge. +func SetGe(s1 *Set, s2 *Set) bool { + _cret := C.set_ge(s1._inner, s2._inner) + return bool(_cret) +} + + +// SetGt wraps MEOS C function set_gt. +func SetGt(s1 *Set, s2 *Set) bool { + _cret := C.set_gt(s1._inner, s2._inner) + return bool(_cret) +} + + +// SetLe wraps MEOS C function set_le. +func SetLe(s1 *Set, s2 *Set) bool { + _cret := C.set_le(s1._inner, s2._inner) + return bool(_cret) +} + + +// SetLt wraps MEOS C function set_lt. +func SetLt(s1 *Set, s2 *Set) bool { + _cret := C.set_lt(s1._inner, s2._inner) + return bool(_cret) +} + + +// SetNe wraps MEOS C function set_ne. +func SetNe(s1 *Set, s2 *Set) bool { + _cret := C.set_ne(s1._inner, s2._inner) + return bool(_cret) +} + + +// SpanCmp wraps MEOS C function span_cmp. +func SpanCmp(s1 *Span, s2 *Span) int { + _cret := C.span_cmp(s1._inner, s2._inner) + return int(_cret) +} + + +// SpanEq wraps MEOS C function span_eq. +func SpanEq(s1 *Span, s2 *Span) bool { + _cret := C.span_eq(s1._inner, s2._inner) + return bool(_cret) +} + + +// SpanGe wraps MEOS C function span_ge. +func SpanGe(s1 *Span, s2 *Span) bool { + _cret := C.span_ge(s1._inner, s2._inner) + return bool(_cret) +} + + +// SpanGt wraps MEOS C function span_gt. +func SpanGt(s1 *Span, s2 *Span) bool { + _cret := C.span_gt(s1._inner, s2._inner) + return bool(_cret) +} + + +// SpanLe wraps MEOS C function span_le. +func SpanLe(s1 *Span, s2 *Span) bool { + _cret := C.span_le(s1._inner, s2._inner) + return bool(_cret) +} + + +// SpanLt wraps MEOS C function span_lt. +func SpanLt(s1 *Span, s2 *Span) bool { + _cret := C.span_lt(s1._inner, s2._inner) + return bool(_cret) +} + + +// SpanNe wraps MEOS C function span_ne. +func SpanNe(s1 *Span, s2 *Span) bool { + _cret := C.span_ne(s1._inner, s2._inner) + return bool(_cret) +} + + +// SpansetCmp wraps MEOS C function spanset_cmp. +func SpansetCmp(ss1 *SpanSet, ss2 *SpanSet) int { + _cret := C.spanset_cmp(ss1._inner, ss2._inner) + return int(_cret) +} + + +// SpansetEq wraps MEOS C function spanset_eq. +func SpansetEq(ss1 *SpanSet, ss2 *SpanSet) bool { + _cret := C.spanset_eq(ss1._inner, ss2._inner) + return bool(_cret) +} + + +// SpansetGe wraps MEOS C function spanset_ge. +func SpansetGe(ss1 *SpanSet, ss2 *SpanSet) bool { + _cret := C.spanset_ge(ss1._inner, ss2._inner) + return bool(_cret) +} + + +// SpansetGt wraps MEOS C function spanset_gt. +func SpansetGt(ss1 *SpanSet, ss2 *SpanSet) bool { + _cret := C.spanset_gt(ss1._inner, ss2._inner) + return bool(_cret) +} + + +// SpansetLe wraps MEOS C function spanset_le. +func SpansetLe(ss1 *SpanSet, ss2 *SpanSet) bool { + _cret := C.spanset_le(ss1._inner, ss2._inner) + return bool(_cret) +} + + +// SpansetLt wraps MEOS C function spanset_lt. +func SpansetLt(ss1 *SpanSet, ss2 *SpanSet) bool { + _cret := C.spanset_lt(ss1._inner, ss2._inner) + return bool(_cret) +} + + +// SpansetNe wraps MEOS C function spanset_ne. +func SpansetNe(ss1 *SpanSet, ss2 *SpanSet) bool { + _cret := C.spanset_ne(ss1._inner, ss2._inner) + return bool(_cret) +} + + +// SetSpans wraps MEOS C function set_spans. +func SetSpans(s *Set, count unsafe.Pointer) *Span { + _cret := C.set_spans(s._inner, (*C.int)(unsafe.Pointer(count))) + return &Span{_inner: _cret} +} + + +// SetSplitEachNSpans wraps MEOS C function set_split_each_n_spans. +func SetSplitEachNSpans(s *Set, elems_per_span int, count unsafe.Pointer) *Span { + _cret := C.set_split_each_n_spans(s._inner, C.int(elems_per_span), (*C.int)(unsafe.Pointer(count))) + return &Span{_inner: _cret} +} + + +// SetSplitNSpans wraps MEOS C function set_split_n_spans. +func SetSplitNSpans(s *Set, span_count int, count unsafe.Pointer) *Span { + _cret := C.set_split_n_spans(s._inner, C.int(span_count), (*C.int)(unsafe.Pointer(count))) + return &Span{_inner: _cret} +} + + +// SpansetSpans wraps MEOS C function spanset_spans. +func SpansetSpans(ss *SpanSet, count unsafe.Pointer) *Span { + _cret := C.spanset_spans(ss._inner, (*C.int)(unsafe.Pointer(count))) + return &Span{_inner: _cret} +} + + +// SpansetSplitEachNSpans wraps MEOS C function spanset_split_each_n_spans. +func SpansetSplitEachNSpans(ss *SpanSet, elems_per_span int, count unsafe.Pointer) *Span { + _cret := C.spanset_split_each_n_spans(ss._inner, C.int(elems_per_span), (*C.int)(unsafe.Pointer(count))) + return &Span{_inner: _cret} +} + + +// SpansetSplitNSpans wraps MEOS C function spanset_split_n_spans. +func SpansetSplitNSpans(ss *SpanSet, span_count int, count unsafe.Pointer) *Span { + _cret := C.spanset_split_n_spans(ss._inner, C.int(span_count), (*C.int)(unsafe.Pointer(count))) + return &Span{_inner: _cret} +} + + +// AdjacentSpanBigint wraps MEOS C function adjacent_span_bigint. +func AdjacentSpanBigint(s *Span, i int64) bool { + _cret := C.adjacent_span_bigint(s._inner, C.int64_t(i)) + return bool(_cret) +} + + +// AdjacentSpanDate wraps MEOS C function adjacent_span_date. +func AdjacentSpanDate(s *Span, d int32) bool { + _cret := C.adjacent_span_date(s._inner, C.DateADT(d)) + return bool(_cret) +} + + +// AdjacentSpanFloat wraps MEOS C function adjacent_span_float. +func AdjacentSpanFloat(s *Span, d float64) bool { + _cret := C.adjacent_span_float(s._inner, C.double(d)) + return bool(_cret) +} + + +// AdjacentSpanInt wraps MEOS C function adjacent_span_int. +func AdjacentSpanInt(s *Span, i int) bool { + _cret := C.adjacent_span_int(s._inner, C.int(i)) + return bool(_cret) +} + + +// AdjacentSpanSpan wraps MEOS C function adjacent_span_span. +func AdjacentSpanSpan(s1 *Span, s2 *Span) bool { + _cret := C.adjacent_span_span(s1._inner, s2._inner) + return bool(_cret) +} + + +// AdjacentSpanSpanset wraps MEOS C function adjacent_span_spanset. +func AdjacentSpanSpanset(s *Span, ss *SpanSet) bool { + _cret := C.adjacent_span_spanset(s._inner, ss._inner) + return bool(_cret) +} + + +// AdjacentSpanTimestamptz wraps MEOS C function adjacent_span_timestamptz. +func AdjacentSpanTimestamptz(s *Span, t int64) bool { + _cret := C.adjacent_span_timestamptz(s._inner, C.TimestampTz(t)) + return bool(_cret) +} + + +// AdjacentSpansetBigint wraps MEOS C function adjacent_spanset_bigint. +func AdjacentSpansetBigint(ss *SpanSet, i int64) bool { + _cret := C.adjacent_spanset_bigint(ss._inner, C.int64_t(i)) + return bool(_cret) +} + + +// AdjacentSpansetDate wraps MEOS C function adjacent_spanset_date. +func AdjacentSpansetDate(ss *SpanSet, d int32) bool { + _cret := C.adjacent_spanset_date(ss._inner, C.DateADT(d)) + return bool(_cret) +} + + +// AdjacentSpansetFloat wraps MEOS C function adjacent_spanset_float. +func AdjacentSpansetFloat(ss *SpanSet, d float64) bool { + _cret := C.adjacent_spanset_float(ss._inner, C.double(d)) + return bool(_cret) +} + + +// AdjacentSpansetInt wraps MEOS C function adjacent_spanset_int. +func AdjacentSpansetInt(ss *SpanSet, i int) bool { + _cret := C.adjacent_spanset_int(ss._inner, C.int(i)) + return bool(_cret) +} + + +// AdjacentSpansetTimestamptz wraps MEOS C function adjacent_spanset_timestamptz. +func AdjacentSpansetTimestamptz(ss *SpanSet, t int64) bool { + _cret := C.adjacent_spanset_timestamptz(ss._inner, C.TimestampTz(t)) + return bool(_cret) +} + + +// AdjacentSpansetSpan wraps MEOS C function adjacent_spanset_span. +func AdjacentSpansetSpan(ss *SpanSet, s *Span) bool { + _cret := C.adjacent_spanset_span(ss._inner, s._inner) + return bool(_cret) +} + + +// AdjacentSpansetSpanset wraps MEOS C function adjacent_spanset_spanset. +func AdjacentSpansetSpanset(ss1 *SpanSet, ss2 *SpanSet) bool { + _cret := C.adjacent_spanset_spanset(ss1._inner, ss2._inner) + return bool(_cret) +} + + +// ContainedBigintSet wraps MEOS C function contained_bigint_set. +func ContainedBigintSet(i int64, s *Set) bool { + _cret := C.contained_bigint_set(C.int64_t(i), s._inner) + return bool(_cret) +} + + +// ContainedBigintSpan wraps MEOS C function contained_bigint_span. +func ContainedBigintSpan(i int64, s *Span) bool { + _cret := C.contained_bigint_span(C.int64_t(i), s._inner) + return bool(_cret) +} + + +// ContainedBigintSpanset wraps MEOS C function contained_bigint_spanset. +func ContainedBigintSpanset(i int64, ss *SpanSet) bool { + _cret := C.contained_bigint_spanset(C.int64_t(i), ss._inner) + return bool(_cret) +} + + +// ContainedDateSet wraps MEOS C function contained_date_set. +func ContainedDateSet(d int32, s *Set) bool { + _cret := C.contained_date_set(C.DateADT(d), s._inner) + return bool(_cret) +} + + +// ContainedDateSpan wraps MEOS C function contained_date_span. +func ContainedDateSpan(d int32, s *Span) bool { + _cret := C.contained_date_span(C.DateADT(d), s._inner) + return bool(_cret) +} + + +// ContainedDateSpanset wraps MEOS C function contained_date_spanset. +func ContainedDateSpanset(d int32, ss *SpanSet) bool { + _cret := C.contained_date_spanset(C.DateADT(d), ss._inner) + return bool(_cret) +} + + +// ContainedFloatSet wraps MEOS C function contained_float_set. +func ContainedFloatSet(d float64, s *Set) bool { + _cret := C.contained_float_set(C.double(d), s._inner) + return bool(_cret) +} + + +// ContainedFloatSpan wraps MEOS C function contained_float_span. +func ContainedFloatSpan(d float64, s *Span) bool { + _cret := C.contained_float_span(C.double(d), s._inner) + return bool(_cret) +} + + +// ContainedFloatSpanset wraps MEOS C function contained_float_spanset. +func ContainedFloatSpanset(d float64, ss *SpanSet) bool { + _cret := C.contained_float_spanset(C.double(d), ss._inner) + return bool(_cret) +} + + +// ContainedIntSet wraps MEOS C function contained_int_set. +func ContainedIntSet(i int, s *Set) bool { + _cret := C.contained_int_set(C.int(i), s._inner) + return bool(_cret) +} + + +// ContainedIntSpan wraps MEOS C function contained_int_span. +func ContainedIntSpan(i int, s *Span) bool { + _cret := C.contained_int_span(C.int(i), s._inner) + return bool(_cret) +} + + +// ContainedIntSpanset wraps MEOS C function contained_int_spanset. +func ContainedIntSpanset(i int, ss *SpanSet) bool { + _cret := C.contained_int_spanset(C.int(i), ss._inner) + return bool(_cret) +} + + +// ContainedSetSet wraps MEOS C function contained_set_set. +func ContainedSetSet(s1 *Set, s2 *Set) bool { + _cret := C.contained_set_set(s1._inner, s2._inner) + return bool(_cret) +} + + +// ContainedSpanSpan wraps MEOS C function contained_span_span. +func ContainedSpanSpan(s1 *Span, s2 *Span) bool { + _cret := C.contained_span_span(s1._inner, s2._inner) + return bool(_cret) +} + + +// ContainedSpanSpanset wraps MEOS C function contained_span_spanset. +func ContainedSpanSpanset(s *Span, ss *SpanSet) bool { + _cret := C.contained_span_spanset(s._inner, ss._inner) + return bool(_cret) +} + + +// ContainedSpansetSpan wraps MEOS C function contained_spanset_span. +func ContainedSpansetSpan(ss *SpanSet, s *Span) bool { + _cret := C.contained_spanset_span(ss._inner, s._inner) + return bool(_cret) +} + + +// ContainedSpansetSpanset wraps MEOS C function contained_spanset_spanset. +func ContainedSpansetSpanset(ss1 *SpanSet, ss2 *SpanSet) bool { + _cret := C.contained_spanset_spanset(ss1._inner, ss2._inner) + return bool(_cret) +} + + +// ContainedTextSet wraps MEOS C function contained_text_set. +func ContainedTextSet(txt string, s *Set) bool { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.contained_text_set(_c_txt, s._inner) + return bool(_cret) +} + + +// ContainedTimestamptzSet wraps MEOS C function contained_timestamptz_set. +func ContainedTimestamptzSet(t int64, s *Set) bool { + _cret := C.contained_timestamptz_set(C.TimestampTz(t), s._inner) + return bool(_cret) +} + + +// ContainedTimestamptzSpan wraps MEOS C function contained_timestamptz_span. +func ContainedTimestamptzSpan(t int64, s *Span) bool { + _cret := C.contained_timestamptz_span(C.TimestampTz(t), s._inner) + return bool(_cret) +} + + +// ContainedTimestamptzSpanset wraps MEOS C function contained_timestamptz_spanset. +func ContainedTimestamptzSpanset(t int64, ss *SpanSet) bool { + _cret := C.contained_timestamptz_spanset(C.TimestampTz(t), ss._inner) + return bool(_cret) +} + + +// ContainsSetBigint wraps MEOS C function contains_set_bigint. +func ContainsSetBigint(s *Set, i int64) bool { + _cret := C.contains_set_bigint(s._inner, C.int64_t(i)) + return bool(_cret) +} + + +// ContainsSetDate wraps MEOS C function contains_set_date. +func ContainsSetDate(s *Set, d int32) bool { + _cret := C.contains_set_date(s._inner, C.DateADT(d)) + return bool(_cret) +} + + +// ContainsSetFloat wraps MEOS C function contains_set_float. +func ContainsSetFloat(s *Set, d float64) bool { + _cret := C.contains_set_float(s._inner, C.double(d)) + return bool(_cret) +} + + +// ContainsSetInt wraps MEOS C function contains_set_int. +func ContainsSetInt(s *Set, i int) bool { + _cret := C.contains_set_int(s._inner, C.int(i)) + return bool(_cret) +} + + +// ContainsSetSet wraps MEOS C function contains_set_set. +func ContainsSetSet(s1 *Set, s2 *Set) bool { + _cret := C.contains_set_set(s1._inner, s2._inner) + return bool(_cret) +} + + +// ContainsSetText wraps MEOS C function contains_set_text. +func ContainsSetText(s *Set, t string) bool { + _c_t := C.cstring_to_text(C.CString(t)) + defer C.free(unsafe.Pointer(_c_t)) + _cret := C.contains_set_text(s._inner, _c_t) + return bool(_cret) +} + + +// ContainsSetTimestamptz wraps MEOS C function contains_set_timestamptz. +func ContainsSetTimestamptz(s *Set, t int64) bool { + _cret := C.contains_set_timestamptz(s._inner, C.TimestampTz(t)) + return bool(_cret) +} + + +// ContainsSpanBigint wraps MEOS C function contains_span_bigint. +func ContainsSpanBigint(s *Span, i int64) bool { + _cret := C.contains_span_bigint(s._inner, C.int64_t(i)) + return bool(_cret) +} + + +// ContainsSpanDate wraps MEOS C function contains_span_date. +func ContainsSpanDate(s *Span, d int32) bool { + _cret := C.contains_span_date(s._inner, C.DateADT(d)) + return bool(_cret) +} + + +// ContainsSpanFloat wraps MEOS C function contains_span_float. +func ContainsSpanFloat(s *Span, d float64) bool { + _cret := C.contains_span_float(s._inner, C.double(d)) + return bool(_cret) +} + + +// ContainsSpanInt wraps MEOS C function contains_span_int. +func ContainsSpanInt(s *Span, i int) bool { + _cret := C.contains_span_int(s._inner, C.int(i)) + return bool(_cret) +} + + +// ContainsSpanSpan wraps MEOS C function contains_span_span. +func ContainsSpanSpan(s1 *Span, s2 *Span) bool { + _cret := C.contains_span_span(s1._inner, s2._inner) + return bool(_cret) +} + + +// ContainsSpanSpanset wraps MEOS C function contains_span_spanset. +func ContainsSpanSpanset(s *Span, ss *SpanSet) bool { + _cret := C.contains_span_spanset(s._inner, ss._inner) + return bool(_cret) +} + + +// ContainsSpanTimestamptz wraps MEOS C function contains_span_timestamptz. +func ContainsSpanTimestamptz(s *Span, t int64) bool { + _cret := C.contains_span_timestamptz(s._inner, C.TimestampTz(t)) + return bool(_cret) +} + + +// ContainsSpansetBigint wraps MEOS C function contains_spanset_bigint. +func ContainsSpansetBigint(ss *SpanSet, i int64) bool { + _cret := C.contains_spanset_bigint(ss._inner, C.int64_t(i)) + return bool(_cret) +} + + +// ContainsSpansetDate wraps MEOS C function contains_spanset_date. +func ContainsSpansetDate(ss *SpanSet, d int32) bool { + _cret := C.contains_spanset_date(ss._inner, C.DateADT(d)) + return bool(_cret) +} + + +// ContainsSpansetFloat wraps MEOS C function contains_spanset_float. +func ContainsSpansetFloat(ss *SpanSet, d float64) bool { + _cret := C.contains_spanset_float(ss._inner, C.double(d)) + return bool(_cret) +} + + +// ContainsSpansetInt wraps MEOS C function contains_spanset_int. +func ContainsSpansetInt(ss *SpanSet, i int) bool { + _cret := C.contains_spanset_int(ss._inner, C.int(i)) + return bool(_cret) +} + + +// ContainsSpansetSpan wraps MEOS C function contains_spanset_span. +func ContainsSpansetSpan(ss *SpanSet, s *Span) bool { + _cret := C.contains_spanset_span(ss._inner, s._inner) + return bool(_cret) +} + + +// ContainsSpansetSpanset wraps MEOS C function contains_spanset_spanset. +func ContainsSpansetSpanset(ss1 *SpanSet, ss2 *SpanSet) bool { + _cret := C.contains_spanset_spanset(ss1._inner, ss2._inner) + return bool(_cret) +} + + +// ContainsSpansetTimestamptz wraps MEOS C function contains_spanset_timestamptz. +func ContainsSpansetTimestamptz(ss *SpanSet, t int64) bool { + _cret := C.contains_spanset_timestamptz(ss._inner, C.TimestampTz(t)) + return bool(_cret) +} + + +// OverlapsSetSet wraps MEOS C function overlaps_set_set. +func OverlapsSetSet(s1 *Set, s2 *Set) bool { + _cret := C.overlaps_set_set(s1._inner, s2._inner) + return bool(_cret) +} + + +// OverlapsSpanSpan wraps MEOS C function overlaps_span_span. +func OverlapsSpanSpan(s1 *Span, s2 *Span) bool { + _cret := C.overlaps_span_span(s1._inner, s2._inner) + return bool(_cret) +} + + +// OverlapsSpanSpanset wraps MEOS C function overlaps_span_spanset. +func OverlapsSpanSpanset(s *Span, ss *SpanSet) bool { + _cret := C.overlaps_span_spanset(s._inner, ss._inner) + return bool(_cret) +} + + +// OverlapsSpansetSpan wraps MEOS C function overlaps_spanset_span. +func OverlapsSpansetSpan(ss *SpanSet, s *Span) bool { + _cret := C.overlaps_spanset_span(ss._inner, s._inner) + return bool(_cret) +} + + +// OverlapsSpansetSpanset wraps MEOS C function overlaps_spanset_spanset. +func OverlapsSpansetSpanset(ss1 *SpanSet, ss2 *SpanSet) bool { + _cret := C.overlaps_spanset_spanset(ss1._inner, ss2._inner) + return bool(_cret) +} + + +// SameSpanSpan wraps MEOS C function same_span_span. +func SameSpanSpan(s1 *Span, s2 *Span) bool { + _cret := C.same_span_span(s1._inner, s2._inner) + return bool(_cret) +} + + +// AfterDateSet wraps MEOS C function after_date_set. +func AfterDateSet(d int32, s *Set) bool { + _cret := C.after_date_set(C.DateADT(d), s._inner) + return bool(_cret) +} + + +// AfterDateSpan wraps MEOS C function after_date_span. +func AfterDateSpan(d int32, s *Span) bool { + _cret := C.after_date_span(C.DateADT(d), s._inner) + return bool(_cret) +} + + +// AfterDateSpanset wraps MEOS C function after_date_spanset. +func AfterDateSpanset(d int32, ss *SpanSet) bool { + _cret := C.after_date_spanset(C.DateADT(d), ss._inner) + return bool(_cret) +} + + +// AfterSetDate wraps MEOS C function after_set_date. +func AfterSetDate(s *Set, d int32) bool { + _cret := C.after_set_date(s._inner, C.DateADT(d)) + return bool(_cret) +} + + +// AfterSetTimestamptz wraps MEOS C function after_set_timestamptz. +func AfterSetTimestamptz(s *Set, t int64) bool { + _cret := C.after_set_timestamptz(s._inner, C.TimestampTz(t)) + return bool(_cret) +} + + +// AfterSpanDate wraps MEOS C function after_span_date. +func AfterSpanDate(s *Span, d int32) bool { + _cret := C.after_span_date(s._inner, C.DateADT(d)) + return bool(_cret) +} + + +// AfterSpanTimestamptz wraps MEOS C function after_span_timestamptz. +func AfterSpanTimestamptz(s *Span, t int64) bool { + _cret := C.after_span_timestamptz(s._inner, C.TimestampTz(t)) + return bool(_cret) +} + + +// AfterSpansetDate wraps MEOS C function after_spanset_date. +func AfterSpansetDate(ss *SpanSet, d int32) bool { + _cret := C.after_spanset_date(ss._inner, C.DateADT(d)) + return bool(_cret) +} + + +// AfterSpansetTimestamptz wraps MEOS C function after_spanset_timestamptz. +func AfterSpansetTimestamptz(ss *SpanSet, t int64) bool { + _cret := C.after_spanset_timestamptz(ss._inner, C.TimestampTz(t)) + return bool(_cret) +} + + +// AfterTimestamptzSet wraps MEOS C function after_timestamptz_set. +func AfterTimestamptzSet(t int64, s *Set) bool { + _cret := C.after_timestamptz_set(C.TimestampTz(t), s._inner) + return bool(_cret) +} + + +// AfterTimestamptzSpan wraps MEOS C function after_timestamptz_span. +func AfterTimestamptzSpan(t int64, s *Span) bool { + _cret := C.after_timestamptz_span(C.TimestampTz(t), s._inner) + return bool(_cret) +} + + +// AfterTimestamptzSpanset wraps MEOS C function after_timestamptz_spanset. +func AfterTimestamptzSpanset(t int64, ss *SpanSet) bool { + _cret := C.after_timestamptz_spanset(C.TimestampTz(t), ss._inner) + return bool(_cret) +} + + +// BeforeDateSet wraps MEOS C function before_date_set. +func BeforeDateSet(d int32, s *Set) bool { + _cret := C.before_date_set(C.DateADT(d), s._inner) + return bool(_cret) +} + + +// BeforeDateSpan wraps MEOS C function before_date_span. +func BeforeDateSpan(d int32, s *Span) bool { + _cret := C.before_date_span(C.DateADT(d), s._inner) + return bool(_cret) +} + + +// BeforeDateSpanset wraps MEOS C function before_date_spanset. +func BeforeDateSpanset(d int32, ss *SpanSet) bool { + _cret := C.before_date_spanset(C.DateADT(d), ss._inner) + return bool(_cret) +} + + +// BeforeSetDate wraps MEOS C function before_set_date. +func BeforeSetDate(s *Set, d int32) bool { + _cret := C.before_set_date(s._inner, C.DateADT(d)) + return bool(_cret) +} + + +// BeforeSetTimestamptz wraps MEOS C function before_set_timestamptz. +func BeforeSetTimestamptz(s *Set, t int64) bool { + _cret := C.before_set_timestamptz(s._inner, C.TimestampTz(t)) + return bool(_cret) +} + + +// BeforeSpanDate wraps MEOS C function before_span_date. +func BeforeSpanDate(s *Span, d int32) bool { + _cret := C.before_span_date(s._inner, C.DateADT(d)) + return bool(_cret) +} + + +// BeforeSpanTimestamptz wraps MEOS C function before_span_timestamptz. +func BeforeSpanTimestamptz(s *Span, t int64) bool { + _cret := C.before_span_timestamptz(s._inner, C.TimestampTz(t)) + return bool(_cret) +} + + +// BeforeSpansetDate wraps MEOS C function before_spanset_date. +func BeforeSpansetDate(ss *SpanSet, d int32) bool { + _cret := C.before_spanset_date(ss._inner, C.DateADT(d)) + return bool(_cret) +} + + +// BeforeSpansetTimestamptz wraps MEOS C function before_spanset_timestamptz. +func BeforeSpansetTimestamptz(ss *SpanSet, t int64) bool { + _cret := C.before_spanset_timestamptz(ss._inner, C.TimestampTz(t)) + return bool(_cret) +} + + +// BeforeTimestamptzSet wraps MEOS C function before_timestamptz_set. +func BeforeTimestamptzSet(t int64, s *Set) bool { + _cret := C.before_timestamptz_set(C.TimestampTz(t), s._inner) + return bool(_cret) +} + + +// BeforeTimestamptzSpan wraps MEOS C function before_timestamptz_span. +func BeforeTimestamptzSpan(t int64, s *Span) bool { + _cret := C.before_timestamptz_span(C.TimestampTz(t), s._inner) + return bool(_cret) +} + + +// BeforeTimestamptzSpanset wraps MEOS C function before_timestamptz_spanset. +func BeforeTimestamptzSpanset(t int64, ss *SpanSet) bool { + _cret := C.before_timestamptz_spanset(C.TimestampTz(t), ss._inner) + return bool(_cret) +} + + +// LeftBigintSet wraps MEOS C function left_bigint_set. +func LeftBigintSet(i int64, s *Set) bool { + _cret := C.left_bigint_set(C.int64_t(i), s._inner) + return bool(_cret) +} + + +// LeftBigintSpan wraps MEOS C function left_bigint_span. +func LeftBigintSpan(i int64, s *Span) bool { + _cret := C.left_bigint_span(C.int64_t(i), s._inner) + return bool(_cret) +} + + +// LeftBigintSpanset wraps MEOS C function left_bigint_spanset. +func LeftBigintSpanset(i int64, ss *SpanSet) bool { + _cret := C.left_bigint_spanset(C.int64_t(i), ss._inner) + return bool(_cret) +} + + +// LeftFloatSet wraps MEOS C function left_float_set. +func LeftFloatSet(d float64, s *Set) bool { + _cret := C.left_float_set(C.double(d), s._inner) + return bool(_cret) +} + + +// LeftFloatSpan wraps MEOS C function left_float_span. +func LeftFloatSpan(d float64, s *Span) bool { + _cret := C.left_float_span(C.double(d), s._inner) + return bool(_cret) +} + + +// LeftFloatSpanset wraps MEOS C function left_float_spanset. +func LeftFloatSpanset(d float64, ss *SpanSet) bool { + _cret := C.left_float_spanset(C.double(d), ss._inner) + return bool(_cret) +} + + +// LeftIntSet wraps MEOS C function left_int_set. +func LeftIntSet(i int, s *Set) bool { + _cret := C.left_int_set(C.int(i), s._inner) + return bool(_cret) +} + + +// LeftIntSpan wraps MEOS C function left_int_span. +func LeftIntSpan(i int, s *Span) bool { + _cret := C.left_int_span(C.int(i), s._inner) + return bool(_cret) +} + + +// LeftIntSpanset wraps MEOS C function left_int_spanset. +func LeftIntSpanset(i int, ss *SpanSet) bool { + _cret := C.left_int_spanset(C.int(i), ss._inner) + return bool(_cret) +} + + +// LeftSetBigint wraps MEOS C function left_set_bigint. +func LeftSetBigint(s *Set, i int64) bool { + _cret := C.left_set_bigint(s._inner, C.int64_t(i)) + return bool(_cret) +} + + +// LeftSetFloat wraps MEOS C function left_set_float. +func LeftSetFloat(s *Set, d float64) bool { + _cret := C.left_set_float(s._inner, C.double(d)) + return bool(_cret) +} + + +// LeftSetInt wraps MEOS C function left_set_int. +func LeftSetInt(s *Set, i int) bool { + _cret := C.left_set_int(s._inner, C.int(i)) + return bool(_cret) +} + + +// LeftSetSet wraps MEOS C function left_set_set. +func LeftSetSet(s1 *Set, s2 *Set) bool { + _cret := C.left_set_set(s1._inner, s2._inner) + return bool(_cret) +} + + +// LeftSetText wraps MEOS C function left_set_text. +func LeftSetText(s *Set, txt string) bool { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.left_set_text(s._inner, _c_txt) + return bool(_cret) +} + + +// LeftSpanBigint wraps MEOS C function left_span_bigint. +func LeftSpanBigint(s *Span, i int64) bool { + _cret := C.left_span_bigint(s._inner, C.int64_t(i)) + return bool(_cret) +} + + +// LeftSpanFloat wraps MEOS C function left_span_float. +func LeftSpanFloat(s *Span, d float64) bool { + _cret := C.left_span_float(s._inner, C.double(d)) + return bool(_cret) +} + + +// LeftSpanInt wraps MEOS C function left_span_int. +func LeftSpanInt(s *Span, i int) bool { + _cret := C.left_span_int(s._inner, C.int(i)) + return bool(_cret) +} + + +// LeftSpanSpan wraps MEOS C function left_span_span. +func LeftSpanSpan(s1 *Span, s2 *Span) bool { + _cret := C.left_span_span(s1._inner, s2._inner) + return bool(_cret) +} + + +// LeftSpanSpanset wraps MEOS C function left_span_spanset. +func LeftSpanSpanset(s *Span, ss *SpanSet) bool { + _cret := C.left_span_spanset(s._inner, ss._inner) + return bool(_cret) +} + + +// LeftSpansetBigint wraps MEOS C function left_spanset_bigint. +func LeftSpansetBigint(ss *SpanSet, i int64) bool { + _cret := C.left_spanset_bigint(ss._inner, C.int64_t(i)) + return bool(_cret) +} + + +// LeftSpansetFloat wraps MEOS C function left_spanset_float. +func LeftSpansetFloat(ss *SpanSet, d float64) bool { + _cret := C.left_spanset_float(ss._inner, C.double(d)) + return bool(_cret) +} + + +// LeftSpansetInt wraps MEOS C function left_spanset_int. +func LeftSpansetInt(ss *SpanSet, i int) bool { + _cret := C.left_spanset_int(ss._inner, C.int(i)) + return bool(_cret) +} + + +// LeftSpansetSpan wraps MEOS C function left_spanset_span. +func LeftSpansetSpan(ss *SpanSet, s *Span) bool { + _cret := C.left_spanset_span(ss._inner, s._inner) + return bool(_cret) +} + + +// LeftSpansetSpanset wraps MEOS C function left_spanset_spanset. +func LeftSpansetSpanset(ss1 *SpanSet, ss2 *SpanSet) bool { + _cret := C.left_spanset_spanset(ss1._inner, ss2._inner) + return bool(_cret) +} + + +// LeftTextSet wraps MEOS C function left_text_set. +func LeftTextSet(txt string, s *Set) bool { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.left_text_set(_c_txt, s._inner) + return bool(_cret) +} + + +// OverafterDateSet wraps MEOS C function overafter_date_set. +func OverafterDateSet(d int32, s *Set) bool { + _cret := C.overafter_date_set(C.DateADT(d), s._inner) + return bool(_cret) +} + + +// OverafterDateSpan wraps MEOS C function overafter_date_span. +func OverafterDateSpan(d int32, s *Span) bool { + _cret := C.overafter_date_span(C.DateADT(d), s._inner) + return bool(_cret) +} + + +// OverafterDateSpanset wraps MEOS C function overafter_date_spanset. +func OverafterDateSpanset(d int32, ss *SpanSet) bool { + _cret := C.overafter_date_spanset(C.DateADT(d), ss._inner) + return bool(_cret) +} + + +// OverafterSetDate wraps MEOS C function overafter_set_date. +func OverafterSetDate(s *Set, d int32) bool { + _cret := C.overafter_set_date(s._inner, C.DateADT(d)) + return bool(_cret) +} + + +// OverafterSetTimestamptz wraps MEOS C function overafter_set_timestamptz. +func OverafterSetTimestamptz(s *Set, t int64) bool { + _cret := C.overafter_set_timestamptz(s._inner, C.TimestampTz(t)) + return bool(_cret) +} + + +// OverafterSpanDate wraps MEOS C function overafter_span_date. +func OverafterSpanDate(s *Span, d int32) bool { + _cret := C.overafter_span_date(s._inner, C.DateADT(d)) + return bool(_cret) +} + + +// OverafterSpanTimestamptz wraps MEOS C function overafter_span_timestamptz. +func OverafterSpanTimestamptz(s *Span, t int64) bool { + _cret := C.overafter_span_timestamptz(s._inner, C.TimestampTz(t)) + return bool(_cret) +} + + +// OverafterSpansetDate wraps MEOS C function overafter_spanset_date. +func OverafterSpansetDate(ss *SpanSet, d int32) bool { + _cret := C.overafter_spanset_date(ss._inner, C.DateADT(d)) + return bool(_cret) +} + + +// OverafterSpansetTimestamptz wraps MEOS C function overafter_spanset_timestamptz. +func OverafterSpansetTimestamptz(ss *SpanSet, t int64) bool { + _cret := C.overafter_spanset_timestamptz(ss._inner, C.TimestampTz(t)) + return bool(_cret) +} + + +// OverafterTimestamptzSet wraps MEOS C function overafter_timestamptz_set. +func OverafterTimestamptzSet(t int64, s *Set) bool { + _cret := C.overafter_timestamptz_set(C.TimestampTz(t), s._inner) + return bool(_cret) +} + + +// OverafterTimestamptzSpan wraps MEOS C function overafter_timestamptz_span. +func OverafterTimestamptzSpan(t int64, s *Span) bool { + _cret := C.overafter_timestamptz_span(C.TimestampTz(t), s._inner) + return bool(_cret) +} + + +// OverafterTimestamptzSpanset wraps MEOS C function overafter_timestamptz_spanset. +func OverafterTimestamptzSpanset(t int64, ss *SpanSet) bool { + _cret := C.overafter_timestamptz_spanset(C.TimestampTz(t), ss._inner) + return bool(_cret) +} + + +// OverbeforeDateSet wraps MEOS C function overbefore_date_set. +func OverbeforeDateSet(d int32, s *Set) bool { + _cret := C.overbefore_date_set(C.DateADT(d), s._inner) + return bool(_cret) +} + + +// OverbeforeDateSpan wraps MEOS C function overbefore_date_span. +func OverbeforeDateSpan(d int32, s *Span) bool { + _cret := C.overbefore_date_span(C.DateADT(d), s._inner) + return bool(_cret) +} + + +// OverbeforeDateSpanset wraps MEOS C function overbefore_date_spanset. +func OverbeforeDateSpanset(d int32, ss *SpanSet) bool { + _cret := C.overbefore_date_spanset(C.DateADT(d), ss._inner) + return bool(_cret) +} + + +// OverbeforeSetDate wraps MEOS C function overbefore_set_date. +func OverbeforeSetDate(s *Set, d int32) bool { + _cret := C.overbefore_set_date(s._inner, C.DateADT(d)) + return bool(_cret) +} + + +// OverbeforeSetTimestamptz wraps MEOS C function overbefore_set_timestamptz. +func OverbeforeSetTimestamptz(s *Set, t int64) bool { + _cret := C.overbefore_set_timestamptz(s._inner, C.TimestampTz(t)) + return bool(_cret) +} + + +// OverbeforeSpanDate wraps MEOS C function overbefore_span_date. +func OverbeforeSpanDate(s *Span, d int32) bool { + _cret := C.overbefore_span_date(s._inner, C.DateADT(d)) + return bool(_cret) +} + + +// OverbeforeSpanTimestamptz wraps MEOS C function overbefore_span_timestamptz. +func OverbeforeSpanTimestamptz(s *Span, t int64) bool { + _cret := C.overbefore_span_timestamptz(s._inner, C.TimestampTz(t)) + return bool(_cret) +} + + +// OverbeforeSpansetDate wraps MEOS C function overbefore_spanset_date. +func OverbeforeSpansetDate(ss *SpanSet, d int32) bool { + _cret := C.overbefore_spanset_date(ss._inner, C.DateADT(d)) + return bool(_cret) +} + + +// OverbeforeSpansetTimestamptz wraps MEOS C function overbefore_spanset_timestamptz. +func OverbeforeSpansetTimestamptz(ss *SpanSet, t int64) bool { + _cret := C.overbefore_spanset_timestamptz(ss._inner, C.TimestampTz(t)) + return bool(_cret) +} + + +// OverbeforeTimestamptzSet wraps MEOS C function overbefore_timestamptz_set. +func OverbeforeTimestamptzSet(t int64, s *Set) bool { + _cret := C.overbefore_timestamptz_set(C.TimestampTz(t), s._inner) + return bool(_cret) +} + + +// OverbeforeTimestamptzSpan wraps MEOS C function overbefore_timestamptz_span. +func OverbeforeTimestamptzSpan(t int64, s *Span) bool { + _cret := C.overbefore_timestamptz_span(C.TimestampTz(t), s._inner) + return bool(_cret) +} + + +// OverbeforeTimestamptzSpanset wraps MEOS C function overbefore_timestamptz_spanset. +func OverbeforeTimestamptzSpanset(t int64, ss *SpanSet) bool { + _cret := C.overbefore_timestamptz_spanset(C.TimestampTz(t), ss._inner) + return bool(_cret) +} + + +// OverleftBigintSet wraps MEOS C function overleft_bigint_set. +func OverleftBigintSet(i int64, s *Set) bool { + _cret := C.overleft_bigint_set(C.int64_t(i), s._inner) + return bool(_cret) +} + + +// OverleftBigintSpan wraps MEOS C function overleft_bigint_span. +func OverleftBigintSpan(i int64, s *Span) bool { + _cret := C.overleft_bigint_span(C.int64_t(i), s._inner) + return bool(_cret) +} + + +// OverleftBigintSpanset wraps MEOS C function overleft_bigint_spanset. +func OverleftBigintSpanset(i int64, ss *SpanSet) bool { + _cret := C.overleft_bigint_spanset(C.int64_t(i), ss._inner) + return bool(_cret) +} + + +// OverleftFloatSet wraps MEOS C function overleft_float_set. +func OverleftFloatSet(d float64, s *Set) bool { + _cret := C.overleft_float_set(C.double(d), s._inner) + return bool(_cret) +} + + +// OverleftFloatSpan wraps MEOS C function overleft_float_span. +func OverleftFloatSpan(d float64, s *Span) bool { + _cret := C.overleft_float_span(C.double(d), s._inner) + return bool(_cret) +} + + +// OverleftFloatSpanset wraps MEOS C function overleft_float_spanset. +func OverleftFloatSpanset(d float64, ss *SpanSet) bool { + _cret := C.overleft_float_spanset(C.double(d), ss._inner) + return bool(_cret) +} + + +// OverleftIntSet wraps MEOS C function overleft_int_set. +func OverleftIntSet(i int, s *Set) bool { + _cret := C.overleft_int_set(C.int(i), s._inner) + return bool(_cret) +} + + +// OverleftIntSpan wraps MEOS C function overleft_int_span. +func OverleftIntSpan(i int, s *Span) bool { + _cret := C.overleft_int_span(C.int(i), s._inner) + return bool(_cret) +} + + +// OverleftIntSpanset wraps MEOS C function overleft_int_spanset. +func OverleftIntSpanset(i int, ss *SpanSet) bool { + _cret := C.overleft_int_spanset(C.int(i), ss._inner) + return bool(_cret) +} + + +// OverleftSetBigint wraps MEOS C function overleft_set_bigint. +func OverleftSetBigint(s *Set, i int64) bool { + _cret := C.overleft_set_bigint(s._inner, C.int64_t(i)) + return bool(_cret) +} + + +// OverleftSetFloat wraps MEOS C function overleft_set_float. +func OverleftSetFloat(s *Set, d float64) bool { + _cret := C.overleft_set_float(s._inner, C.double(d)) + return bool(_cret) +} + + +// OverleftSetInt wraps MEOS C function overleft_set_int. +func OverleftSetInt(s *Set, i int) bool { + _cret := C.overleft_set_int(s._inner, C.int(i)) + return bool(_cret) +} + + +// OverleftSetSet wraps MEOS C function overleft_set_set. +func OverleftSetSet(s1 *Set, s2 *Set) bool { + _cret := C.overleft_set_set(s1._inner, s2._inner) + return bool(_cret) +} + + +// OverleftSetText wraps MEOS C function overleft_set_text. +func OverleftSetText(s *Set, txt string) bool { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.overleft_set_text(s._inner, _c_txt) + return bool(_cret) +} + + +// OverleftSpanBigint wraps MEOS C function overleft_span_bigint. +func OverleftSpanBigint(s *Span, i int64) bool { + _cret := C.overleft_span_bigint(s._inner, C.int64_t(i)) + return bool(_cret) +} + + +// OverleftSpanFloat wraps MEOS C function overleft_span_float. +func OverleftSpanFloat(s *Span, d float64) bool { + _cret := C.overleft_span_float(s._inner, C.double(d)) + return bool(_cret) +} + + +// OverleftSpanInt wraps MEOS C function overleft_span_int. +func OverleftSpanInt(s *Span, i int) bool { + _cret := C.overleft_span_int(s._inner, C.int(i)) + return bool(_cret) +} + + +// OverleftSpanSpan wraps MEOS C function overleft_span_span. +func OverleftSpanSpan(s1 *Span, s2 *Span) bool { + _cret := C.overleft_span_span(s1._inner, s2._inner) + return bool(_cret) +} + + +// OverleftSpanSpanset wraps MEOS C function overleft_span_spanset. +func OverleftSpanSpanset(s *Span, ss *SpanSet) bool { + _cret := C.overleft_span_spanset(s._inner, ss._inner) + return bool(_cret) +} + + +// OverleftSpansetBigint wraps MEOS C function overleft_spanset_bigint. +func OverleftSpansetBigint(ss *SpanSet, i int64) bool { + _cret := C.overleft_spanset_bigint(ss._inner, C.int64_t(i)) + return bool(_cret) +} + + +// OverleftSpansetFloat wraps MEOS C function overleft_spanset_float. +func OverleftSpansetFloat(ss *SpanSet, d float64) bool { + _cret := C.overleft_spanset_float(ss._inner, C.double(d)) + return bool(_cret) +} + + +// OverleftSpansetInt wraps MEOS C function overleft_spanset_int. +func OverleftSpansetInt(ss *SpanSet, i int) bool { + _cret := C.overleft_spanset_int(ss._inner, C.int(i)) + return bool(_cret) +} + + +// OverleftSpansetSpan wraps MEOS C function overleft_spanset_span. +func OverleftSpansetSpan(ss *SpanSet, s *Span) bool { + _cret := C.overleft_spanset_span(ss._inner, s._inner) + return bool(_cret) +} + + +// OverleftSpansetSpanset wraps MEOS C function overleft_spanset_spanset. +func OverleftSpansetSpanset(ss1 *SpanSet, ss2 *SpanSet) bool { + _cret := C.overleft_spanset_spanset(ss1._inner, ss2._inner) + return bool(_cret) +} + + +// OverleftTextSet wraps MEOS C function overleft_text_set. +func OverleftTextSet(txt string, s *Set) bool { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.overleft_text_set(_c_txt, s._inner) + return bool(_cret) +} + + +// OverrightBigintSet wraps MEOS C function overright_bigint_set. +func OverrightBigintSet(i int64, s *Set) bool { + _cret := C.overright_bigint_set(C.int64_t(i), s._inner) + return bool(_cret) +} + + +// OverrightBigintSpan wraps MEOS C function overright_bigint_span. +func OverrightBigintSpan(i int64, s *Span) bool { + _cret := C.overright_bigint_span(C.int64_t(i), s._inner) + return bool(_cret) +} + + +// OverrightBigintSpanset wraps MEOS C function overright_bigint_spanset. +func OverrightBigintSpanset(i int64, ss *SpanSet) bool { + _cret := C.overright_bigint_spanset(C.int64_t(i), ss._inner) + return bool(_cret) +} + + +// OverrightFloatSet wraps MEOS C function overright_float_set. +func OverrightFloatSet(d float64, s *Set) bool { + _cret := C.overright_float_set(C.double(d), s._inner) + return bool(_cret) +} + + +// OverrightFloatSpan wraps MEOS C function overright_float_span. +func OverrightFloatSpan(d float64, s *Span) bool { + _cret := C.overright_float_span(C.double(d), s._inner) + return bool(_cret) +} + + +// OverrightFloatSpanset wraps MEOS C function overright_float_spanset. +func OverrightFloatSpanset(d float64, ss *SpanSet) bool { + _cret := C.overright_float_spanset(C.double(d), ss._inner) + return bool(_cret) +} + + +// OverrightIntSet wraps MEOS C function overright_int_set. +func OverrightIntSet(i int, s *Set) bool { + _cret := C.overright_int_set(C.int(i), s._inner) + return bool(_cret) +} + + +// OverrightIntSpan wraps MEOS C function overright_int_span. +func OverrightIntSpan(i int, s *Span) bool { + _cret := C.overright_int_span(C.int(i), s._inner) + return bool(_cret) +} + + +// OverrightIntSpanset wraps MEOS C function overright_int_spanset. +func OverrightIntSpanset(i int, ss *SpanSet) bool { + _cret := C.overright_int_spanset(C.int(i), ss._inner) + return bool(_cret) +} + + +// OverrightSetBigint wraps MEOS C function overright_set_bigint. +func OverrightSetBigint(s *Set, i int64) bool { + _cret := C.overright_set_bigint(s._inner, C.int64_t(i)) + return bool(_cret) +} + + +// OverrightSetFloat wraps MEOS C function overright_set_float. +func OverrightSetFloat(s *Set, d float64) bool { + _cret := C.overright_set_float(s._inner, C.double(d)) + return bool(_cret) +} + + +// OverrightSetInt wraps MEOS C function overright_set_int. +func OverrightSetInt(s *Set, i int) bool { + _cret := C.overright_set_int(s._inner, C.int(i)) + return bool(_cret) +} + + +// OverrightSetSet wraps MEOS C function overright_set_set. +func OverrightSetSet(s1 *Set, s2 *Set) bool { + _cret := C.overright_set_set(s1._inner, s2._inner) + return bool(_cret) +} + + +// OverrightSetText wraps MEOS C function overright_set_text. +func OverrightSetText(s *Set, txt string) bool { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.overright_set_text(s._inner, _c_txt) + return bool(_cret) +} + + +// OverrightSpanBigint wraps MEOS C function overright_span_bigint. +func OverrightSpanBigint(s *Span, i int64) bool { + _cret := C.overright_span_bigint(s._inner, C.int64_t(i)) + return bool(_cret) +} + + +// OverrightSpanFloat wraps MEOS C function overright_span_float. +func OverrightSpanFloat(s *Span, d float64) bool { + _cret := C.overright_span_float(s._inner, C.double(d)) + return bool(_cret) +} + + +// OverrightSpanInt wraps MEOS C function overright_span_int. +func OverrightSpanInt(s *Span, i int) bool { + _cret := C.overright_span_int(s._inner, C.int(i)) + return bool(_cret) +} + + +// OverrightSpanSpan wraps MEOS C function overright_span_span. +func OverrightSpanSpan(s1 *Span, s2 *Span) bool { + _cret := C.overright_span_span(s1._inner, s2._inner) + return bool(_cret) +} + + +// OverrightSpanSpanset wraps MEOS C function overright_span_spanset. +func OverrightSpanSpanset(s *Span, ss *SpanSet) bool { + _cret := C.overright_span_spanset(s._inner, ss._inner) + return bool(_cret) +} + + +// OverrightSpansetBigint wraps MEOS C function overright_spanset_bigint. +func OverrightSpansetBigint(ss *SpanSet, i int64) bool { + _cret := C.overright_spanset_bigint(ss._inner, C.int64_t(i)) + return bool(_cret) +} + + +// OverrightSpansetFloat wraps MEOS C function overright_spanset_float. +func OverrightSpansetFloat(ss *SpanSet, d float64) bool { + _cret := C.overright_spanset_float(ss._inner, C.double(d)) + return bool(_cret) +} + + +// OverrightSpansetInt wraps MEOS C function overright_spanset_int. +func OverrightSpansetInt(ss *SpanSet, i int) bool { + _cret := C.overright_spanset_int(ss._inner, C.int(i)) + return bool(_cret) +} + + +// OverrightSpansetSpan wraps MEOS C function overright_spanset_span. +func OverrightSpansetSpan(ss *SpanSet, s *Span) bool { + _cret := C.overright_spanset_span(ss._inner, s._inner) + return bool(_cret) +} + + +// OverrightSpansetSpanset wraps MEOS C function overright_spanset_spanset. +func OverrightSpansetSpanset(ss1 *SpanSet, ss2 *SpanSet) bool { + _cret := C.overright_spanset_spanset(ss1._inner, ss2._inner) + return bool(_cret) +} + + +// OverrightTextSet wraps MEOS C function overright_text_set. +func OverrightTextSet(txt string, s *Set) bool { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.overright_text_set(_c_txt, s._inner) + return bool(_cret) +} + + +// RightBigintSet wraps MEOS C function right_bigint_set. +func RightBigintSet(i int64, s *Set) bool { + _cret := C.right_bigint_set(C.int64_t(i), s._inner) + return bool(_cret) +} + + +// RightBigintSpan wraps MEOS C function right_bigint_span. +func RightBigintSpan(i int64, s *Span) bool { + _cret := C.right_bigint_span(C.int64_t(i), s._inner) + return bool(_cret) +} + + +// RightBigintSpanset wraps MEOS C function right_bigint_spanset. +func RightBigintSpanset(i int64, ss *SpanSet) bool { + _cret := C.right_bigint_spanset(C.int64_t(i), ss._inner) + return bool(_cret) +} + + +// RightFloatSet wraps MEOS C function right_float_set. +func RightFloatSet(d float64, s *Set) bool { + _cret := C.right_float_set(C.double(d), s._inner) + return bool(_cret) +} + + +// RightFloatSpan wraps MEOS C function right_float_span. +func RightFloatSpan(d float64, s *Span) bool { + _cret := C.right_float_span(C.double(d), s._inner) + return bool(_cret) +} + + +// RightFloatSpanset wraps MEOS C function right_float_spanset. +func RightFloatSpanset(d float64, ss *SpanSet) bool { + _cret := C.right_float_spanset(C.double(d), ss._inner) + return bool(_cret) +} + + +// RightIntSet wraps MEOS C function right_int_set. +func RightIntSet(i int, s *Set) bool { + _cret := C.right_int_set(C.int(i), s._inner) + return bool(_cret) +} + + +// RightIntSpan wraps MEOS C function right_int_span. +func RightIntSpan(i int, s *Span) bool { + _cret := C.right_int_span(C.int(i), s._inner) + return bool(_cret) +} + + +// RightIntSpanset wraps MEOS C function right_int_spanset. +func RightIntSpanset(i int, ss *SpanSet) bool { + _cret := C.right_int_spanset(C.int(i), ss._inner) + return bool(_cret) +} + + +// RightSetBigint wraps MEOS C function right_set_bigint. +func RightSetBigint(s *Set, i int64) bool { + _cret := C.right_set_bigint(s._inner, C.int64_t(i)) + return bool(_cret) +} + + +// RightSetFloat wraps MEOS C function right_set_float. +func RightSetFloat(s *Set, d float64) bool { + _cret := C.right_set_float(s._inner, C.double(d)) + return bool(_cret) +} + + +// RightSetInt wraps MEOS C function right_set_int. +func RightSetInt(s *Set, i int) bool { + _cret := C.right_set_int(s._inner, C.int(i)) + return bool(_cret) +} + + +// RightSetSet wraps MEOS C function right_set_set. +func RightSetSet(s1 *Set, s2 *Set) bool { + _cret := C.right_set_set(s1._inner, s2._inner) + return bool(_cret) +} + + +// RightSetText wraps MEOS C function right_set_text. +func RightSetText(s *Set, txt string) bool { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.right_set_text(s._inner, _c_txt) + return bool(_cret) +} + + +// RightSpanBigint wraps MEOS C function right_span_bigint. +func RightSpanBigint(s *Span, i int64) bool { + _cret := C.right_span_bigint(s._inner, C.int64_t(i)) + return bool(_cret) +} + + +// RightSpanFloat wraps MEOS C function right_span_float. +func RightSpanFloat(s *Span, d float64) bool { + _cret := C.right_span_float(s._inner, C.double(d)) + return bool(_cret) +} + + +// RightSpanInt wraps MEOS C function right_span_int. +func RightSpanInt(s *Span, i int) bool { + _cret := C.right_span_int(s._inner, C.int(i)) + return bool(_cret) +} + + +// RightSpanSpan wraps MEOS C function right_span_span. +func RightSpanSpan(s1 *Span, s2 *Span) bool { + _cret := C.right_span_span(s1._inner, s2._inner) + return bool(_cret) +} + + +// RightSpanSpanset wraps MEOS C function right_span_spanset. +func RightSpanSpanset(s *Span, ss *SpanSet) bool { + _cret := C.right_span_spanset(s._inner, ss._inner) + return bool(_cret) +} + + +// RightSpansetBigint wraps MEOS C function right_spanset_bigint. +func RightSpansetBigint(ss *SpanSet, i int64) bool { + _cret := C.right_spanset_bigint(ss._inner, C.int64_t(i)) + return bool(_cret) +} + + +// RightSpansetFloat wraps MEOS C function right_spanset_float. +func RightSpansetFloat(ss *SpanSet, d float64) bool { + _cret := C.right_spanset_float(ss._inner, C.double(d)) + return bool(_cret) +} + + +// RightSpansetInt wraps MEOS C function right_spanset_int. +func RightSpansetInt(ss *SpanSet, i int) bool { + _cret := C.right_spanset_int(ss._inner, C.int(i)) + return bool(_cret) +} + + +// RightSpansetSpan wraps MEOS C function right_spanset_span. +func RightSpansetSpan(ss *SpanSet, s *Span) bool { + _cret := C.right_spanset_span(ss._inner, s._inner) + return bool(_cret) +} + + +// RightSpansetSpanset wraps MEOS C function right_spanset_spanset. +func RightSpansetSpanset(ss1 *SpanSet, ss2 *SpanSet) bool { + _cret := C.right_spanset_spanset(ss1._inner, ss2._inner) + return bool(_cret) +} + + +// RightTextSet wraps MEOS C function right_text_set. +func RightTextSet(txt string, s *Set) bool { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.right_text_set(_c_txt, s._inner) + return bool(_cret) +} + + +// IntersectionBigintSet wraps MEOS C function intersection_bigint_set. +func IntersectionBigintSet(i int64, s *Set) *Set { + _cret := C.intersection_bigint_set(C.int64_t(i), s._inner) + return &Set{_inner: _cret} +} + + +// IntersectionDateSet wraps MEOS C function intersection_date_set. +func IntersectionDateSet(d int32, s *Set) *Set { + _cret := C.intersection_date_set(C.DateADT(d), s._inner) + return &Set{_inner: _cret} +} + + +// IntersectionFloatSet wraps MEOS C function intersection_float_set. +func IntersectionFloatSet(d float64, s *Set) *Set { + _cret := C.intersection_float_set(C.double(d), s._inner) + return &Set{_inner: _cret} +} + + +// IntersectionIntSet wraps MEOS C function intersection_int_set. +func IntersectionIntSet(i int, s *Set) *Set { + _cret := C.intersection_int_set(C.int(i), s._inner) + return &Set{_inner: _cret} +} + + +// IntersectionSetBigint wraps MEOS C function intersection_set_bigint. +func IntersectionSetBigint(s *Set, i int64) *Set { + _cret := C.intersection_set_bigint(s._inner, C.int64_t(i)) + return &Set{_inner: _cret} +} + + +// IntersectionSetDate wraps MEOS C function intersection_set_date. +func IntersectionSetDate(s *Set, d int32) *Set { + _cret := C.intersection_set_date(s._inner, C.DateADT(d)) + return &Set{_inner: _cret} +} + + +// IntersectionSetFloat wraps MEOS C function intersection_set_float. +func IntersectionSetFloat(s *Set, d float64) *Set { + _cret := C.intersection_set_float(s._inner, C.double(d)) + return &Set{_inner: _cret} +} + + +// IntersectionSetInt wraps MEOS C function intersection_set_int. +func IntersectionSetInt(s *Set, i int) *Set { + _cret := C.intersection_set_int(s._inner, C.int(i)) + return &Set{_inner: _cret} +} + + +// IntersectionSetSet wraps MEOS C function intersection_set_set. +func IntersectionSetSet(s1 *Set, s2 *Set) *Set { + _cret := C.intersection_set_set(s1._inner, s2._inner) + return &Set{_inner: _cret} +} + + +// IntersectionSetText wraps MEOS C function intersection_set_text. +func IntersectionSetText(s *Set, txt string) *Set { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.intersection_set_text(s._inner, _c_txt) + return &Set{_inner: _cret} +} + + +// IntersectionSetTimestamptz wraps MEOS C function intersection_set_timestamptz. +func IntersectionSetTimestamptz(s *Set, t int64) *Set { + _cret := C.intersection_set_timestamptz(s._inner, C.TimestampTz(t)) + return &Set{_inner: _cret} +} + + +// IntersectionSpanBigint wraps MEOS C function intersection_span_bigint. +func IntersectionSpanBigint(s *Span, i int64) *Span { + _cret := C.intersection_span_bigint(s._inner, C.int64_t(i)) + return &Span{_inner: _cret} +} + + +// IntersectionSpanDate wraps MEOS C function intersection_span_date. +func IntersectionSpanDate(s *Span, d int32) *Span { + _cret := C.intersection_span_date(s._inner, C.DateADT(d)) + return &Span{_inner: _cret} +} + + +// IntersectionSpanFloat wraps MEOS C function intersection_span_float. +func IntersectionSpanFloat(s *Span, d float64) *Span { + _cret := C.intersection_span_float(s._inner, C.double(d)) + return &Span{_inner: _cret} +} + + +// IntersectionSpanInt wraps MEOS C function intersection_span_int. +func IntersectionSpanInt(s *Span, i int) *Span { + _cret := C.intersection_span_int(s._inner, C.int(i)) + return &Span{_inner: _cret} +} + + +// IntersectionSpanSpan wraps MEOS C function intersection_span_span. +func IntersectionSpanSpan(s1 *Span, s2 *Span) *Span { + _cret := C.intersection_span_span(s1._inner, s2._inner) + return &Span{_inner: _cret} +} + + +// IntersectionSpanSpanset wraps MEOS C function intersection_span_spanset. +func IntersectionSpanSpanset(s *Span, ss *SpanSet) *SpanSet { + _cret := C.intersection_span_spanset(s._inner, ss._inner) + return &SpanSet{_inner: _cret} +} + + +// IntersectionSpanTimestamptz wraps MEOS C function intersection_span_timestamptz. +func IntersectionSpanTimestamptz(s *Span, t int64) *Span { + _cret := C.intersection_span_timestamptz(s._inner, C.TimestampTz(t)) + return &Span{_inner: _cret} +} + + +// IntersectionSpansetBigint wraps MEOS C function intersection_spanset_bigint. +func IntersectionSpansetBigint(ss *SpanSet, i int64) *SpanSet { + _cret := C.intersection_spanset_bigint(ss._inner, C.int64_t(i)) + return &SpanSet{_inner: _cret} +} + + +// IntersectionSpansetDate wraps MEOS C function intersection_spanset_date. +func IntersectionSpansetDate(ss *SpanSet, d int32) *SpanSet { + _cret := C.intersection_spanset_date(ss._inner, C.DateADT(d)) + return &SpanSet{_inner: _cret} +} + + +// IntersectionSpansetFloat wraps MEOS C function intersection_spanset_float. +func IntersectionSpansetFloat(ss *SpanSet, d float64) *SpanSet { + _cret := C.intersection_spanset_float(ss._inner, C.double(d)) + return &SpanSet{_inner: _cret} +} + + +// IntersectionSpansetInt wraps MEOS C function intersection_spanset_int. +func IntersectionSpansetInt(ss *SpanSet, i int) *SpanSet { + _cret := C.intersection_spanset_int(ss._inner, C.int(i)) + return &SpanSet{_inner: _cret} +} + + +// IntersectionSpansetSpan wraps MEOS C function intersection_spanset_span. +func IntersectionSpansetSpan(ss *SpanSet, s *Span) *SpanSet { + _cret := C.intersection_spanset_span(ss._inner, s._inner) + return &SpanSet{_inner: _cret} +} + + +// IntersectionSpansetSpanset wraps MEOS C function intersection_spanset_spanset. +func IntersectionSpansetSpanset(ss1 *SpanSet, ss2 *SpanSet) *SpanSet { + _cret := C.intersection_spanset_spanset(ss1._inner, ss2._inner) + return &SpanSet{_inner: _cret} +} + + +// IntersectionSpansetTimestamptz wraps MEOS C function intersection_spanset_timestamptz. +func IntersectionSpansetTimestamptz(ss *SpanSet, t int64) *SpanSet { + _cret := C.intersection_spanset_timestamptz(ss._inner, C.TimestampTz(t)) + return &SpanSet{_inner: _cret} +} + + +// IntersectionTextSet wraps MEOS C function intersection_text_set. +func IntersectionTextSet(txt string, s *Set) *Set { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.intersection_text_set(_c_txt, s._inner) + return &Set{_inner: _cret} +} + + +// IntersectionTimestamptzSet wraps MEOS C function intersection_timestamptz_set. +func IntersectionTimestamptzSet(t int64, s *Set) *Set { + _cret := C.intersection_timestamptz_set(C.TimestampTz(t), s._inner) + return &Set{_inner: _cret} +} + + +// MinusBigintSet wraps MEOS C function minus_bigint_set. +func MinusBigintSet(i int64, s *Set) *Set { + _cret := C.minus_bigint_set(C.int64_t(i), s._inner) + return &Set{_inner: _cret} +} + + +// MinusBigintSpan wraps MEOS C function minus_bigint_span. +func MinusBigintSpan(i int64, s *Span) *SpanSet { + _cret := C.minus_bigint_span(C.int64_t(i), s._inner) + return &SpanSet{_inner: _cret} +} + + +// MinusBigintSpanset wraps MEOS C function minus_bigint_spanset. +func MinusBigintSpanset(i int64, ss *SpanSet) *SpanSet { + _cret := C.minus_bigint_spanset(C.int64_t(i), ss._inner) + return &SpanSet{_inner: _cret} +} + + +// MinusDateSet wraps MEOS C function minus_date_set. +func MinusDateSet(d int32, s *Set) *Set { + _cret := C.minus_date_set(C.DateADT(d), s._inner) + return &Set{_inner: _cret} +} + + +// MinusDateSpan wraps MEOS C function minus_date_span. +func MinusDateSpan(d int32, s *Span) *SpanSet { + _cret := C.minus_date_span(C.DateADT(d), s._inner) + return &SpanSet{_inner: _cret} +} + + +// MinusDateSpanset wraps MEOS C function minus_date_spanset. +func MinusDateSpanset(d int32, ss *SpanSet) *SpanSet { + _cret := C.minus_date_spanset(C.DateADT(d), ss._inner) + return &SpanSet{_inner: _cret} +} + + +// MinusFloatSet wraps MEOS C function minus_float_set. +func MinusFloatSet(d float64, s *Set) *Set { + _cret := C.minus_float_set(C.double(d), s._inner) + return &Set{_inner: _cret} +} + + +// MinusFloatSpan wraps MEOS C function minus_float_span. +func MinusFloatSpan(d float64, s *Span) *SpanSet { + _cret := C.minus_float_span(C.double(d), s._inner) + return &SpanSet{_inner: _cret} +} + + +// MinusFloatSpanset wraps MEOS C function minus_float_spanset. +func MinusFloatSpanset(d float64, ss *SpanSet) *SpanSet { + _cret := C.minus_float_spanset(C.double(d), ss._inner) + return &SpanSet{_inner: _cret} +} + + +// MinusIntSet wraps MEOS C function minus_int_set. +func MinusIntSet(i int, s *Set) *Set { + _cret := C.minus_int_set(C.int(i), s._inner) + return &Set{_inner: _cret} +} + + +// MinusIntSpan wraps MEOS C function minus_int_span. +func MinusIntSpan(i int, s *Span) *SpanSet { + _cret := C.minus_int_span(C.int(i), s._inner) + return &SpanSet{_inner: _cret} +} + + +// MinusIntSpanset wraps MEOS C function minus_int_spanset. +func MinusIntSpanset(i int, ss *SpanSet) *SpanSet { + _cret := C.minus_int_spanset(C.int(i), ss._inner) + return &SpanSet{_inner: _cret} +} + + +// MinusSetBigint wraps MEOS C function minus_set_bigint. +func MinusSetBigint(s *Set, i int64) *Set { + _cret := C.minus_set_bigint(s._inner, C.int64_t(i)) + return &Set{_inner: _cret} +} + + +// MinusSetDate wraps MEOS C function minus_set_date. +func MinusSetDate(s *Set, d int32) *Set { + _cret := C.minus_set_date(s._inner, C.DateADT(d)) + return &Set{_inner: _cret} +} + + +// MinusSetFloat wraps MEOS C function minus_set_float. +func MinusSetFloat(s *Set, d float64) *Set { + _cret := C.minus_set_float(s._inner, C.double(d)) + return &Set{_inner: _cret} +} + + +// MinusSetInt wraps MEOS C function minus_set_int. +func MinusSetInt(s *Set, i int) *Set { + _cret := C.minus_set_int(s._inner, C.int(i)) + return &Set{_inner: _cret} +} + + +// MinusSetSet wraps MEOS C function minus_set_set. +func MinusSetSet(s1 *Set, s2 *Set) *Set { + _cret := C.minus_set_set(s1._inner, s2._inner) + return &Set{_inner: _cret} +} + + +// MinusSetText wraps MEOS C function minus_set_text. +func MinusSetText(s *Set, txt string) *Set { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.minus_set_text(s._inner, _c_txt) + return &Set{_inner: _cret} +} + + +// MinusSetTimestamptz wraps MEOS C function minus_set_timestamptz. +func MinusSetTimestamptz(s *Set, t int64) *Set { + _cret := C.minus_set_timestamptz(s._inner, C.TimestampTz(t)) + return &Set{_inner: _cret} +} + + +// MinusSpanBigint wraps MEOS C function minus_span_bigint. +func MinusSpanBigint(s *Span, i int64) *SpanSet { + _cret := C.minus_span_bigint(s._inner, C.int64_t(i)) + return &SpanSet{_inner: _cret} +} + + +// MinusSpanDate wraps MEOS C function minus_span_date. +func MinusSpanDate(s *Span, d int32) *SpanSet { + _cret := C.minus_span_date(s._inner, C.DateADT(d)) + return &SpanSet{_inner: _cret} +} + + +// MinusSpanFloat wraps MEOS C function minus_span_float. +func MinusSpanFloat(s *Span, d float64) *SpanSet { + _cret := C.minus_span_float(s._inner, C.double(d)) + return &SpanSet{_inner: _cret} +} + + +// MinusSpanInt wraps MEOS C function minus_span_int. +func MinusSpanInt(s *Span, i int) *SpanSet { + _cret := C.minus_span_int(s._inner, C.int(i)) + return &SpanSet{_inner: _cret} +} + + +// MinusSpanSpan wraps MEOS C function minus_span_span. +func MinusSpanSpan(s1 *Span, s2 *Span) *SpanSet { + _cret := C.minus_span_span(s1._inner, s2._inner) + return &SpanSet{_inner: _cret} +} + + +// MinusSpanSpanset wraps MEOS C function minus_span_spanset. +func MinusSpanSpanset(s *Span, ss *SpanSet) *SpanSet { + _cret := C.minus_span_spanset(s._inner, ss._inner) + return &SpanSet{_inner: _cret} +} + + +// MinusSpanTimestamptz wraps MEOS C function minus_span_timestamptz. +func MinusSpanTimestamptz(s *Span, t int64) *SpanSet { + _cret := C.minus_span_timestamptz(s._inner, C.TimestampTz(t)) + return &SpanSet{_inner: _cret} +} + + +// MinusSpansetBigint wraps MEOS C function minus_spanset_bigint. +func MinusSpansetBigint(ss *SpanSet, i int64) *SpanSet { + _cret := C.minus_spanset_bigint(ss._inner, C.int64_t(i)) + return &SpanSet{_inner: _cret} +} + + +// MinusSpansetDate wraps MEOS C function minus_spanset_date. +func MinusSpansetDate(ss *SpanSet, d int32) *SpanSet { + _cret := C.minus_spanset_date(ss._inner, C.DateADT(d)) + return &SpanSet{_inner: _cret} +} + + +// MinusSpansetFloat wraps MEOS C function minus_spanset_float. +func MinusSpansetFloat(ss *SpanSet, d float64) *SpanSet { + _cret := C.minus_spanset_float(ss._inner, C.double(d)) + return &SpanSet{_inner: _cret} +} + + +// MinusSpansetInt wraps MEOS C function minus_spanset_int. +func MinusSpansetInt(ss *SpanSet, i int) *SpanSet { + _cret := C.minus_spanset_int(ss._inner, C.int(i)) + return &SpanSet{_inner: _cret} +} + + +// MinusSpansetSpan wraps MEOS C function minus_spanset_span. +func MinusSpansetSpan(ss *SpanSet, s *Span) *SpanSet { + _cret := C.minus_spanset_span(ss._inner, s._inner) + return &SpanSet{_inner: _cret} +} + + +// MinusSpansetSpanset wraps MEOS C function minus_spanset_spanset. +func MinusSpansetSpanset(ss1 *SpanSet, ss2 *SpanSet) *SpanSet { + _cret := C.minus_spanset_spanset(ss1._inner, ss2._inner) + return &SpanSet{_inner: _cret} +} + + +// MinusSpansetTimestamptz wraps MEOS C function minus_spanset_timestamptz. +func MinusSpansetTimestamptz(ss *SpanSet, t int64) *SpanSet { + _cret := C.minus_spanset_timestamptz(ss._inner, C.TimestampTz(t)) + return &SpanSet{_inner: _cret} +} + + +// MinusTextSet wraps MEOS C function minus_text_set. +func MinusTextSet(txt string, s *Set) *Set { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.minus_text_set(_c_txt, s._inner) + return &Set{_inner: _cret} +} + + +// MinusTimestamptzSet wraps MEOS C function minus_timestamptz_set. +func MinusTimestamptzSet(t int64, s *Set) *Set { + _cret := C.minus_timestamptz_set(C.TimestampTz(t), s._inner) + return &Set{_inner: _cret} +} + + +// MinusTimestamptzSpan wraps MEOS C function minus_timestamptz_span. +func MinusTimestamptzSpan(t int64, s *Span) *SpanSet { + _cret := C.minus_timestamptz_span(C.TimestampTz(t), s._inner) + return &SpanSet{_inner: _cret} +} + + +// MinusTimestamptzSpanset wraps MEOS C function minus_timestamptz_spanset. +func MinusTimestamptzSpanset(t int64, ss *SpanSet) *SpanSet { + _cret := C.minus_timestamptz_spanset(C.TimestampTz(t), ss._inner) + return &SpanSet{_inner: _cret} +} + + +// UnionBigintSet wraps MEOS C function union_bigint_set. +func UnionBigintSet(i int64, s *Set) *Set { + _cret := C.gunion_bigint_set(C.int64_t(i), s._inner) + return &Set{_inner: _cret} +} + + +// UnionBigintSpan wraps MEOS C function union_bigint_span. +func UnionBigintSpan(s *Span, i int64) *SpanSet { + _cret := C.gunion_bigint_span(s._inner, C.int64_t(i)) + return &SpanSet{_inner: _cret} +} + + +// UnionBigintSpanset wraps MEOS C function union_bigint_spanset. +func UnionBigintSpanset(i int64, ss *SpanSet) *SpanSet { + _cret := C.gunion_bigint_spanset(C.int64_t(i), ss._inner) + return &SpanSet{_inner: _cret} +} + + +// UnionDateSet wraps MEOS C function union_date_set. +func UnionDateSet(d int32, s *Set) *Set { + _cret := C.gunion_date_set(C.DateADT(d), s._inner) + return &Set{_inner: _cret} +} + + +// UnionDateSpan wraps MEOS C function union_date_span. +func UnionDateSpan(s *Span, d int32) *SpanSet { + _cret := C.gunion_date_span(s._inner, C.DateADT(d)) + return &SpanSet{_inner: _cret} +} + + +// UnionDateSpanset wraps MEOS C function union_date_spanset. +func UnionDateSpanset(d int32, ss *SpanSet) *SpanSet { + _cret := C.gunion_date_spanset(C.DateADT(d), ss._inner) + return &SpanSet{_inner: _cret} +} + + +// UnionFloatSet wraps MEOS C function union_float_set. +func UnionFloatSet(d float64, s *Set) *Set { + _cret := C.gunion_float_set(C.double(d), s._inner) + return &Set{_inner: _cret} +} + + +// UnionFloatSpan wraps MEOS C function union_float_span. +func UnionFloatSpan(s *Span, d float64) *SpanSet { + _cret := C.gunion_float_span(s._inner, C.double(d)) + return &SpanSet{_inner: _cret} +} + + +// UnionFloatSpanset wraps MEOS C function union_float_spanset. +func UnionFloatSpanset(d float64, ss *SpanSet) *SpanSet { + _cret := C.gunion_float_spanset(C.double(d), ss._inner) + return &SpanSet{_inner: _cret} +} + + +// UnionIntSet wraps MEOS C function union_int_set. +func UnionIntSet(i int, s *Set) *Set { + _cret := C.gunion_int_set(C.int(i), s._inner) + return &Set{_inner: _cret} +} + + +// UnionIntSpan wraps MEOS C function union_int_span. +func UnionIntSpan(i int, s *Span) *SpanSet { + _cret := C.gunion_int_span(C.int(i), s._inner) + return &SpanSet{_inner: _cret} +} + + +// UnionIntSpanset wraps MEOS C function union_int_spanset. +func UnionIntSpanset(i int, ss *SpanSet) *SpanSet { + _cret := C.gunion_int_spanset(C.int(i), ss._inner) + return &SpanSet{_inner: _cret} +} + + +// UnionSetBigint wraps MEOS C function union_set_bigint. +func UnionSetBigint(s *Set, i int64) *Set { + _cret := C.gunion_set_bigint(s._inner, C.int64_t(i)) + return &Set{_inner: _cret} +} + + +// UnionSetDate wraps MEOS C function union_set_date. +func UnionSetDate(s *Set, d int32) *Set { + _cret := C.gunion_set_date(s._inner, C.DateADT(d)) + return &Set{_inner: _cret} +} + + +// UnionSetFloat wraps MEOS C function union_set_float. +func UnionSetFloat(s *Set, d float64) *Set { + _cret := C.gunion_set_float(s._inner, C.double(d)) + return &Set{_inner: _cret} +} + + +// UnionSetInt wraps MEOS C function union_set_int. +func UnionSetInt(s *Set, i int) *Set { + _cret := C.gunion_set_int(s._inner, C.int(i)) + return &Set{_inner: _cret} +} + + +// UnionSetSet wraps MEOS C function union_set_set. +func UnionSetSet(s1 *Set, s2 *Set) *Set { + _cret := C.gunion_set_set(s1._inner, s2._inner) + return &Set{_inner: _cret} +} + + +// UnionSetText wraps MEOS C function union_set_text. +func UnionSetText(s *Set, txt string) *Set { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.gunion_set_text(s._inner, _c_txt) + return &Set{_inner: _cret} +} + + +// UnionSetTimestamptz wraps MEOS C function union_set_timestamptz. +func UnionSetTimestamptz(s *Set, t int64) *Set { + _cret := C.gunion_set_timestamptz(s._inner, C.TimestampTz(t)) + return &Set{_inner: _cret} +} + + +// UnionSpanBigint wraps MEOS C function union_span_bigint. +func UnionSpanBigint(s *Span, i int64) *SpanSet { + _cret := C.gunion_span_bigint(s._inner, C.int64_t(i)) + return &SpanSet{_inner: _cret} +} + + +// UnionSpanDate wraps MEOS C function union_span_date. +func UnionSpanDate(s *Span, d int32) *SpanSet { + _cret := C.gunion_span_date(s._inner, C.DateADT(d)) + return &SpanSet{_inner: _cret} +} + + +// UnionSpanFloat wraps MEOS C function union_span_float. +func UnionSpanFloat(s *Span, d float64) *SpanSet { + _cret := C.gunion_span_float(s._inner, C.double(d)) + return &SpanSet{_inner: _cret} +} + + +// UnionSpanInt wraps MEOS C function union_span_int. +func UnionSpanInt(s *Span, i int) *SpanSet { + _cret := C.gunion_span_int(s._inner, C.int(i)) + return &SpanSet{_inner: _cret} +} + + +// UnionSpanSpan wraps MEOS C function union_span_span. +func UnionSpanSpan(s1 *Span, s2 *Span) *SpanSet { + _cret := C.gunion_span_span(s1._inner, s2._inner) + return &SpanSet{_inner: _cret} +} + + +// SuperUnionSpanSpan wraps MEOS C function super_union_span_span. +func SuperUnionSpanSpan(s1 *Span, s2 *Span) *Span { + _cret := C.super_union_span_span(s1._inner, s2._inner) + return &Span{_inner: _cret} +} + + +// UnionSpanSpanset wraps MEOS C function union_span_spanset. +func UnionSpanSpanset(s *Span, ss *SpanSet) *SpanSet { + _cret := C.gunion_span_spanset(s._inner, ss._inner) + return &SpanSet{_inner: _cret} +} + + +// UnionSpanTimestamptz wraps MEOS C function union_span_timestamptz. +func UnionSpanTimestamptz(s *Span, t int64) *SpanSet { + _cret := C.gunion_span_timestamptz(s._inner, C.TimestampTz(t)) + return &SpanSet{_inner: _cret} +} + + +// UnionSpansetBigint wraps MEOS C function union_spanset_bigint. +func UnionSpansetBigint(ss *SpanSet, i int64) *SpanSet { + _cret := C.gunion_spanset_bigint(ss._inner, C.int64_t(i)) + return &SpanSet{_inner: _cret} +} + + +// UnionSpansetDate wraps MEOS C function union_spanset_date. +func UnionSpansetDate(ss *SpanSet, d int32) *SpanSet { + _cret := C.gunion_spanset_date(ss._inner, C.DateADT(d)) + return &SpanSet{_inner: _cret} +} + + +// UnionSpansetFloat wraps MEOS C function union_spanset_float. +func UnionSpansetFloat(ss *SpanSet, d float64) *SpanSet { + _cret := C.gunion_spanset_float(ss._inner, C.double(d)) + return &SpanSet{_inner: _cret} +} + + +// UnionSpansetInt wraps MEOS C function union_spanset_int. +func UnionSpansetInt(ss *SpanSet, i int) *SpanSet { + _cret := C.gunion_spanset_int(ss._inner, C.int(i)) + return &SpanSet{_inner: _cret} +} + + +// UnionSpansetSpan wraps MEOS C function union_spanset_span. +func UnionSpansetSpan(ss *SpanSet, s *Span) *SpanSet { + _cret := C.gunion_spanset_span(ss._inner, s._inner) + return &SpanSet{_inner: _cret} +} + + +// UnionSpansetSpanset wraps MEOS C function union_spanset_spanset. +func UnionSpansetSpanset(ss1 *SpanSet, ss2 *SpanSet) *SpanSet { + _cret := C.gunion_spanset_spanset(ss1._inner, ss2._inner) + return &SpanSet{_inner: _cret} +} + + +// UnionSpansetTimestamptz wraps MEOS C function union_spanset_timestamptz. +func UnionSpansetTimestamptz(ss *SpanSet, t int64) *SpanSet { + _cret := C.gunion_spanset_timestamptz(ss._inner, C.TimestampTz(t)) + return &SpanSet{_inner: _cret} +} + + +// UnionTextSet wraps MEOS C function union_text_set. +func UnionTextSet(txt string, s *Set) *Set { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.gunion_text_set(_c_txt, s._inner) + return &Set{_inner: _cret} +} + + +// UnionTimestamptzSet wraps MEOS C function union_timestamptz_set. +func UnionTimestamptzSet(t int64, s *Set) *Set { + _cret := C.gunion_timestamptz_set(C.TimestampTz(t), s._inner) + return &Set{_inner: _cret} +} + + +// UnionTimestamptzSpan wraps MEOS C function union_timestamptz_span. +func UnionTimestamptzSpan(t int64, s *Span) *SpanSet { + _cret := C.gunion_timestamptz_span(C.TimestampTz(t), s._inner) + return &SpanSet{_inner: _cret} +} + + +// UnionTimestamptzSpanset wraps MEOS C function union_timestamptz_spanset. +func UnionTimestamptzSpanset(t int64, ss *SpanSet) *SpanSet { + _cret := C.gunion_timestamptz_spanset(C.TimestampTz(t), ss._inner) + return &SpanSet{_inner: _cret} +} + + +// DistanceBigintsetBigintset wraps MEOS C function distance_bigintset_bigintset. +func DistanceBigintsetBigintset(s1 *Set, s2 *Set) int64 { + _cret := C.distance_bigintset_bigintset(s1._inner, s2._inner) + return int64(_cret) +} + + +// DistanceBigintspanBigintspan wraps MEOS C function distance_bigintspan_bigintspan. +func DistanceBigintspanBigintspan(s1 *Span, s2 *Span) int64 { + _cret := C.distance_bigintspan_bigintspan(s1._inner, s2._inner) + return int64(_cret) +} + + +// DistanceBigintspansetBigintspan wraps MEOS C function distance_bigintspanset_bigintspan. +func DistanceBigintspansetBigintspan(ss *SpanSet, s *Span) int64 { + _cret := C.distance_bigintspanset_bigintspan(ss._inner, s._inner) + return int64(_cret) +} + + +// DistanceBigintspansetBigintspanset wraps MEOS C function distance_bigintspanset_bigintspanset. +func DistanceBigintspansetBigintspanset(ss1 *SpanSet, ss2 *SpanSet) int64 { + _cret := C.distance_bigintspanset_bigintspanset(ss1._inner, ss2._inner) + return int64(_cret) +} + + +// DistanceDatesetDateset wraps MEOS C function distance_dateset_dateset. +func DistanceDatesetDateset(s1 *Set, s2 *Set) int { + _cret := C.distance_dateset_dateset(s1._inner, s2._inner) + return int(_cret) +} + + +// DistanceDatespanDatespan wraps MEOS C function distance_datespan_datespan. +func DistanceDatespanDatespan(s1 *Span, s2 *Span) int { + _cret := C.distance_datespan_datespan(s1._inner, s2._inner) + return int(_cret) +} + + +// DistanceDatespansetDatespan wraps MEOS C function distance_datespanset_datespan. +func DistanceDatespansetDatespan(ss *SpanSet, s *Span) int { + _cret := C.distance_datespanset_datespan(ss._inner, s._inner) + return int(_cret) +} + + +// DistanceDatespansetDatespanset wraps MEOS C function distance_datespanset_datespanset. +func DistanceDatespansetDatespanset(ss1 *SpanSet, ss2 *SpanSet) int { + _cret := C.distance_datespanset_datespanset(ss1._inner, ss2._inner) + return int(_cret) +} + + +// DistanceFloatsetFloatset wraps MEOS C function distance_floatset_floatset. +func DistanceFloatsetFloatset(s1 *Set, s2 *Set) float64 { + _cret := C.distance_floatset_floatset(s1._inner, s2._inner) + return float64(_cret) +} + + +// DistanceFloatspanFloatspan wraps MEOS C function distance_floatspan_floatspan. +func DistanceFloatspanFloatspan(s1 *Span, s2 *Span) float64 { + _cret := C.distance_floatspan_floatspan(s1._inner, s2._inner) + return float64(_cret) +} + + +// DistanceFloatspansetFloatspan wraps MEOS C function distance_floatspanset_floatspan. +func DistanceFloatspansetFloatspan(ss *SpanSet, s *Span) float64 { + _cret := C.distance_floatspanset_floatspan(ss._inner, s._inner) + return float64(_cret) +} + + +// DistanceFloatspansetFloatspanset wraps MEOS C function distance_floatspanset_floatspanset. +func DistanceFloatspansetFloatspanset(ss1 *SpanSet, ss2 *SpanSet) float64 { + _cret := C.distance_floatspanset_floatspanset(ss1._inner, ss2._inner) + return float64(_cret) +} + + +// DistanceIntsetIntset wraps MEOS C function distance_intset_intset. +func DistanceIntsetIntset(s1 *Set, s2 *Set) int { + _cret := C.distance_intset_intset(s1._inner, s2._inner) + return int(_cret) +} + + +// DistanceIntspanIntspan wraps MEOS C function distance_intspan_intspan. +func DistanceIntspanIntspan(s1 *Span, s2 *Span) int { + _cret := C.distance_intspan_intspan(s1._inner, s2._inner) + return int(_cret) +} + + +// DistanceIntspansetIntspan wraps MEOS C function distance_intspanset_intspan. +func DistanceIntspansetIntspan(ss *SpanSet, s *Span) int { + _cret := C.distance_intspanset_intspan(ss._inner, s._inner) + return int(_cret) +} + + +// DistanceIntspansetIntspanset wraps MEOS C function distance_intspanset_intspanset. +func DistanceIntspansetIntspanset(ss1 *SpanSet, ss2 *SpanSet) int { + _cret := C.distance_intspanset_intspanset(ss1._inner, ss2._inner) + return int(_cret) +} + + +// DistanceSetBigint wraps MEOS C function distance_set_bigint. +func DistanceSetBigint(s *Set, i int64) int64 { + _cret := C.distance_set_bigint(s._inner, C.int64_t(i)) + return int64(_cret) +} + + +// DistanceSetDate wraps MEOS C function distance_set_date. +func DistanceSetDate(s *Set, d int32) int { + _cret := C.distance_set_date(s._inner, C.DateADT(d)) + return int(_cret) +} + + +// DistanceSetFloat wraps MEOS C function distance_set_float. +func DistanceSetFloat(s *Set, d float64) float64 { + _cret := C.distance_set_float(s._inner, C.double(d)) + return float64(_cret) +} + + +// DistanceSetInt wraps MEOS C function distance_set_int. +func DistanceSetInt(s *Set, i int) int { + _cret := C.distance_set_int(s._inner, C.int(i)) + return int(_cret) +} + + +// DistanceSetTimestamptz wraps MEOS C function distance_set_timestamptz. +func DistanceSetTimestamptz(s *Set, t int64) float64 { + _cret := C.distance_set_timestamptz(s._inner, C.TimestampTz(t)) + return float64(_cret) +} + + +// DistanceSpanBigint wraps MEOS C function distance_span_bigint. +func DistanceSpanBigint(s *Span, i int64) int64 { + _cret := C.distance_span_bigint(s._inner, C.int64_t(i)) + return int64(_cret) +} + + +// DistanceSpanDate wraps MEOS C function distance_span_date. +func DistanceSpanDate(s *Span, d int32) int { + _cret := C.distance_span_date(s._inner, C.DateADT(d)) + return int(_cret) +} + + +// DistanceSpanFloat wraps MEOS C function distance_span_float. +func DistanceSpanFloat(s *Span, d float64) float64 { + _cret := C.distance_span_float(s._inner, C.double(d)) + return float64(_cret) +} + + +// DistanceSpanInt wraps MEOS C function distance_span_int. +func DistanceSpanInt(s *Span, i int) int { + _cret := C.distance_span_int(s._inner, C.int(i)) + return int(_cret) +} + + +// DistanceSpanTimestamptz wraps MEOS C function distance_span_timestamptz. +func DistanceSpanTimestamptz(s *Span, t int64) float64 { + _cret := C.distance_span_timestamptz(s._inner, C.TimestampTz(t)) + return float64(_cret) +} + + +// DistanceSpansetBigint wraps MEOS C function distance_spanset_bigint. +func DistanceSpansetBigint(ss *SpanSet, i int64) int64 { + _cret := C.distance_spanset_bigint(ss._inner, C.int64_t(i)) + return int64(_cret) +} + + +// DistanceSpansetDate wraps MEOS C function distance_spanset_date. +func DistanceSpansetDate(ss *SpanSet, d int32) int { + _cret := C.distance_spanset_date(ss._inner, C.DateADT(d)) + return int(_cret) +} + + +// DistanceSpansetFloat wraps MEOS C function distance_spanset_float. +func DistanceSpansetFloat(ss *SpanSet, d float64) float64 { + _cret := C.distance_spanset_float(ss._inner, C.double(d)) + return float64(_cret) +} + + +// DistanceSpansetInt wraps MEOS C function distance_spanset_int. +func DistanceSpansetInt(ss *SpanSet, i int) int { + _cret := C.distance_spanset_int(ss._inner, C.int(i)) + return int(_cret) +} + + +// DistanceSpansetTimestamptz wraps MEOS C function distance_spanset_timestamptz. +func DistanceSpansetTimestamptz(ss *SpanSet, t int64) float64 { + _cret := C.distance_spanset_timestamptz(ss._inner, C.TimestampTz(t)) + return float64(_cret) +} + + +// DistanceTstzsetTstzset wraps MEOS C function distance_tstzset_tstzset. +func DistanceTstzsetTstzset(s1 *Set, s2 *Set) float64 { + _cret := C.distance_tstzset_tstzset(s1._inner, s2._inner) + return float64(_cret) +} + + +// DistanceTstzspanTstzspan wraps MEOS C function distance_tstzspan_tstzspan. +func DistanceTstzspanTstzspan(s1 *Span, s2 *Span) float64 { + _cret := C.distance_tstzspan_tstzspan(s1._inner, s2._inner) + return float64(_cret) +} + + +// DistanceTstzspansetTstzspan wraps MEOS C function distance_tstzspanset_tstzspan. +func DistanceTstzspansetTstzspan(ss *SpanSet, s *Span) float64 { + _cret := C.distance_tstzspanset_tstzspan(ss._inner, s._inner) + return float64(_cret) +} + + +// DistanceTstzspansetTstzspanset wraps MEOS C function distance_tstzspanset_tstzspanset. +func DistanceTstzspansetTstzspanset(ss1 *SpanSet, ss2 *SpanSet) float64 { + _cret := C.distance_tstzspanset_tstzspanset(ss1._inner, ss2._inner) + return float64(_cret) +} + + +// BigintExtentTransfn wraps MEOS C function bigint_extent_transfn. +func BigintExtentTransfn(state *Span, i int64) *Span { + _cret := C.bigint_extent_transfn(state._inner, C.int64_t(i)) + return &Span{_inner: _cret} +} + + +// BigintUnionTransfn wraps MEOS C function bigint_union_transfn. +func BigintUnionTransfn(state *Set, i int64) *Set { + _cret := C.bigint_union_transfn(state._inner, C.int64_t(i)) + return &Set{_inner: _cret} +} + + +// DateExtentTransfn wraps MEOS C function date_extent_transfn. +func DateExtentTransfn(state *Span, d int32) *Span { + _cret := C.date_extent_transfn(state._inner, C.DateADT(d)) + return &Span{_inner: _cret} +} + + +// DateUnionTransfn wraps MEOS C function date_union_transfn. +func DateUnionTransfn(state *Set, d int32) *Set { + _cret := C.date_union_transfn(state._inner, C.DateADT(d)) + return &Set{_inner: _cret} +} + + +// FloatExtentTransfn wraps MEOS C function float_extent_transfn. +func FloatExtentTransfn(state *Span, d float64) *Span { + _cret := C.float_extent_transfn(state._inner, C.double(d)) + return &Span{_inner: _cret} +} + + +// FloatUnionTransfn wraps MEOS C function float_union_transfn. +func FloatUnionTransfn(state *Set, d float64) *Set { + _cret := C.float_union_transfn(state._inner, C.double(d)) + return &Set{_inner: _cret} +} + + +// IntExtentTransfn wraps MEOS C function int_extent_transfn. +func IntExtentTransfn(state *Span, i int) *Span { + _cret := C.int_extent_transfn(state._inner, C.int(i)) + return &Span{_inner: _cret} +} + + +// IntUnionTransfn wraps MEOS C function int_union_transfn. +func IntUnionTransfn(state *Set, i int32) *Set { + _cret := C.int_union_transfn(state._inner, C.int32(i)) + return &Set{_inner: _cret} +} + + +// SetExtentTransfn wraps MEOS C function set_extent_transfn. +func SetExtentTransfn(state *Span, s *Set) *Span { + _cret := C.set_extent_transfn(state._inner, s._inner) + return &Span{_inner: _cret} +} + + +// SetUnionFinalfn wraps MEOS C function set_union_finalfn. +func SetUnionFinalfn(state *Set) *Set { + _cret := C.set_union_finalfn(state._inner) + return &Set{_inner: _cret} +} + + +// SetUnionTransfn wraps MEOS C function set_union_transfn. +func SetUnionTransfn(state *Set, s *Set) *Set { + _cret := C.set_union_transfn(state._inner, s._inner) + return &Set{_inner: _cret} +} + + +// SpanExtentTransfn wraps MEOS C function span_extent_transfn. +func SpanExtentTransfn(state *Span, s *Span) *Span { + _cret := C.span_extent_transfn(state._inner, s._inner) + return &Span{_inner: _cret} +} + + +// SpanUnionTransfn wraps MEOS C function span_union_transfn. +func SpanUnionTransfn(state *SpanSet, s *Span) *SpanSet { + _cret := C.span_union_transfn(state._inner, s._inner) + return &SpanSet{_inner: _cret} +} + + +// SpansetExtentTransfn wraps MEOS C function spanset_extent_transfn. +func SpansetExtentTransfn(state *Span, ss *SpanSet) *Span { + _cret := C.spanset_extent_transfn(state._inner, ss._inner) + return &Span{_inner: _cret} +} + + +// SpansetUnionFinalfn wraps MEOS C function spanset_union_finalfn. +func SpansetUnionFinalfn(state *SpanSet) *SpanSet { + _cret := C.spanset_union_finalfn(state._inner) + return &SpanSet{_inner: _cret} +} + + +// SpansetUnionTransfn wraps MEOS C function spanset_union_transfn. +func SpansetUnionTransfn(state *SpanSet, ss *SpanSet) *SpanSet { + _cret := C.spanset_union_transfn(state._inner, ss._inner) + return &SpanSet{_inner: _cret} +} + + +// TextUnionTransfn wraps MEOS C function text_union_transfn. +func TextUnionTransfn(state *Set, txt string) *Set { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.text_union_transfn(state._inner, _c_txt) + return &Set{_inner: _cret} +} + + +// TimestamptzExtentTransfn wraps MEOS C function timestamptz_extent_transfn. +func TimestamptzExtentTransfn(state *Span, t int64) *Span { + _cret := C.timestamptz_extent_transfn(state._inner, C.TimestampTz(t)) + return &Span{_inner: _cret} +} + + +// TimestamptzUnionTransfn wraps MEOS C function timestamptz_union_transfn. +func TimestamptzUnionTransfn(state *Set, t int64) *Set { + _cret := C.timestamptz_union_transfn(state._inner, C.TimestampTz(t)) + return &Set{_inner: _cret} +} + + +// BigintGetBin wraps MEOS C function bigint_get_bin. +func BigintGetBin(value int64, vsize int64, vorigin int64) int64 { + _cret := C.bigint_get_bin(C.int64_t(value), C.int64_t(vsize), C.int64_t(vorigin)) + return int64(_cret) +} + + +// BigintspanBins wraps MEOS C function bigintspan_bins. +func BigintspanBins(s *Span, vsize int64, vorigin int64, count unsafe.Pointer) *Span { + _cret := C.bigintspan_bins(s._inner, C.int64_t(vsize), C.int64_t(vorigin), (*C.int)(unsafe.Pointer(count))) + return &Span{_inner: _cret} +} + + +// BigintspansetBins wraps MEOS C function bigintspanset_bins. +func BigintspansetBins(ss *SpanSet, vsize int64, vorigin int64, count unsafe.Pointer) *Span { + _cret := C.bigintspanset_bins(ss._inner, C.int64_t(vsize), C.int64_t(vorigin), (*C.int)(unsafe.Pointer(count))) + return &Span{_inner: _cret} +} + + +// DateGetBin wraps MEOS C function date_get_bin. +func DateGetBin(d int32, duration *Interval, torigin int32) int32 { + _cret := C.date_get_bin(C.DateADT(d), duration._inner, C.DateADT(torigin)) + return int32(_cret) +} + + +// DatespanBins wraps MEOS C function datespan_bins. +func DatespanBins(s *Span, duration *Interval, torigin int32, count unsafe.Pointer) *Span { + _cret := C.datespan_bins(s._inner, duration._inner, C.DateADT(torigin), (*C.int)(unsafe.Pointer(count))) + return &Span{_inner: _cret} +} + + +// DatespansetBins wraps MEOS C function datespanset_bins. +func DatespansetBins(ss *SpanSet, duration *Interval, torigin int32, count unsafe.Pointer) *Span { + _cret := C.datespanset_bins(ss._inner, duration._inner, C.DateADT(torigin), (*C.int)(unsafe.Pointer(count))) + return &Span{_inner: _cret} +} + + +// FloatGetBin wraps MEOS C function float_get_bin. +func FloatGetBin(value float64, vsize float64, vorigin float64) float64 { + _cret := C.float_get_bin(C.double(value), C.double(vsize), C.double(vorigin)) + return float64(_cret) +} + + +// FloatspanBins wraps MEOS C function floatspan_bins. +func FloatspanBins(s *Span, vsize float64, vorigin float64, count unsafe.Pointer) *Span { + _cret := C.floatspan_bins(s._inner, C.double(vsize), C.double(vorigin), (*C.int)(unsafe.Pointer(count))) + return &Span{_inner: _cret} +} + + +// FloatspansetBins wraps MEOS C function floatspanset_bins. +func FloatspansetBins(ss *SpanSet, vsize float64, vorigin float64, count unsafe.Pointer) *Span { + _cret := C.floatspanset_bins(ss._inner, C.double(vsize), C.double(vorigin), (*C.int)(unsafe.Pointer(count))) + return &Span{_inner: _cret} +} + + +// IntGetBin wraps MEOS C function int_get_bin. +func IntGetBin(value int, vsize int, vorigin int) int { + _cret := C.int_get_bin(C.int(value), C.int(vsize), C.int(vorigin)) + return int(_cret) +} + + +// IntspanBins wraps MEOS C function intspan_bins. +func IntspanBins(s *Span, vsize int, vorigin int, count unsafe.Pointer) *Span { + _cret := C.intspan_bins(s._inner, C.int(vsize), C.int(vorigin), (*C.int)(unsafe.Pointer(count))) + return &Span{_inner: _cret} +} + + +// IntspansetBins wraps MEOS C function intspanset_bins. +func IntspansetBins(ss *SpanSet, vsize int, vorigin int, count unsafe.Pointer) *Span { + _cret := C.intspanset_bins(ss._inner, C.int(vsize), C.int(vorigin), (*C.int)(unsafe.Pointer(count))) + return &Span{_inner: _cret} +} + + +// TimestamptzGetBin wraps MEOS C function timestamptz_get_bin. +func TimestamptzGetBin(t int64, duration *Interval, torigin int64) int64 { + _cret := C.timestamptz_get_bin(C.TimestampTz(t), duration._inner, C.TimestampTz(torigin)) + return int64(_cret) +} + + +// TstzspanBins wraps MEOS C function tstzspan_bins. +func TstzspanBins(s *Span, duration *Interval, origin int64, count unsafe.Pointer) *Span { + _cret := C.tstzspan_bins(s._inner, duration._inner, C.TimestampTz(origin), (*C.int)(unsafe.Pointer(count))) + return &Span{_inner: _cret} +} + + +// TstzspansetBins wraps MEOS C function tstzspanset_bins. +func TstzspansetBins(ss *SpanSet, duration *Interval, torigin int64, count unsafe.Pointer) *Span { + _cret := C.tstzspanset_bins(ss._inner, duration._inner, C.TimestampTz(torigin), (*C.int)(unsafe.Pointer(count))) + return &Span{_inner: _cret} +} + + +// TBOXAsHexwkb wraps MEOS C function tbox_as_hexwkb. +func TBOXAsHexwkb(box *TBox, variant uint8, size_out unsafe.Pointer) string { + _cret := C.tbox_as_hexwkb(box._inner, C.uint8_t(variant), (*C.size_t)(unsafe.Pointer(size_out))) + return C.GoString(_cret) +} + + +// TBOXAsWKB wraps MEOS C function tbox_as_wkb. +func TBOXAsWKB(box *TBox, variant uint8, size_out unsafe.Pointer) unsafe.Pointer { + _cret := C.tbox_as_wkb(box._inner, C.uint8_t(variant), (*C.size_t)(unsafe.Pointer(size_out))) + return unsafe.Pointer(_cret) +} + + +// TBOXFromHexwkb wraps MEOS C function tbox_from_hexwkb. +func TBOXFromHexwkb(hexwkb string) *TBox { + _c_hexwkb := C.CString(hexwkb) + defer C.free(unsafe.Pointer(_c_hexwkb)) + _cret := C.tbox_from_hexwkb(_c_hexwkb) + return &TBox{_inner: _cret} +} + + +// TBOXFromWKB wraps MEOS C function tbox_from_wkb. +func TBOXFromWKB(wkb unsafe.Pointer, size uint) *TBox { + _cret := C.tbox_from_wkb((*C.uint8_t)(unsafe.Pointer(wkb)), C.size_t(size)) + return &TBox{_inner: _cret} +} + + +// TBOXIn wraps MEOS C function tbox_in. +func TBOXIn(str string) *TBox { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tbox_in(_c_str) + return &TBox{_inner: _cret} +} + + +// TBOXOut wraps MEOS C function tbox_out. +func TBOXOut(box *TBox, maxdd int) string { + _cret := C.tbox_out(box._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// FloatTimestamptzToTBOX wraps MEOS C function float_timestamptz_to_tbox. +func FloatTimestamptzToTBOX(d float64, t int64) *TBox { + _cret := C.float_timestamptz_to_tbox(C.double(d), C.TimestampTz(t)) + return &TBox{_inner: _cret} +} + + +// FloatTstzspanToTBOX wraps MEOS C function float_tstzspan_to_tbox. +func FloatTstzspanToTBOX(d float64, s *Span) *TBox { + _cret := C.float_tstzspan_to_tbox(C.double(d), s._inner) + return &TBox{_inner: _cret} +} + + +// IntTimestamptzToTBOX wraps MEOS C function int_timestamptz_to_tbox. +func IntTimestamptzToTBOX(i int, t int64) *TBox { + _cret := C.int_timestamptz_to_tbox(C.int(i), C.TimestampTz(t)) + return &TBox{_inner: _cret} +} + + +// BigintTimestamptzToTBOX wraps MEOS C function bigint_timestamptz_to_tbox. +func BigintTimestamptzToTBOX(i int64, t int64) *TBox { + _cret := C.bigint_timestamptz_to_tbox(C.int64_t(i), C.TimestampTz(t)) + return &TBox{_inner: _cret} +} + + +// IntTstzspanToTBOX wraps MEOS C function int_tstzspan_to_tbox. +func IntTstzspanToTBOX(i int, s *Span) *TBox { + _cret := C.int_tstzspan_to_tbox(C.int(i), s._inner) + return &TBox{_inner: _cret} +} + + +// BigintTstzspanToTBOX wraps MEOS C function bigint_tstzspan_to_tbox. +func BigintTstzspanToTBOX(i int64, s *Span) *TBox { + _cret := C.bigint_tstzspan_to_tbox(C.int64_t(i), s._inner) + return &TBox{_inner: _cret} +} + + +// NumspanTstzspanToTBOX wraps MEOS C function numspan_tstzspan_to_tbox. +func NumspanTstzspanToTBOX(span *Span, s *Span) *TBox { + _cret := C.numspan_tstzspan_to_tbox(span._inner, s._inner) + return &TBox{_inner: _cret} +} + + +// NumspanTimestamptzToTBOX wraps MEOS C function numspan_timestamptz_to_tbox. +func NumspanTimestamptzToTBOX(span *Span, t int64) *TBox { + _cret := C.numspan_timestamptz_to_tbox(span._inner, C.TimestampTz(t)) + return &TBox{_inner: _cret} +} + + +// TBOXCopy wraps MEOS C function tbox_copy. +func TBOXCopy(box *TBox) *TBox { + _cret := C.tbox_copy(box._inner) + return &TBox{_inner: _cret} +} + + +// TBOXMake wraps MEOS C function tbox_make. +func TBOXMake(s *Span, p *Span) *TBox { + _cret := C.tbox_make(s._inner, p._inner) + return &TBox{_inner: _cret} +} + + +// FloatToTBOX wraps MEOS C function float_to_tbox. +func FloatToTBOX(d float64) *TBox { + _cret := C.float_to_tbox(C.double(d)) + return &TBox{_inner: _cret} +} + + +// IntToTBOX wraps MEOS C function int_to_tbox. +func IntToTBOX(i int) *TBox { + _cret := C.int_to_tbox(C.int(i)) + return &TBox{_inner: _cret} +} + + +// BigintToTBOX wraps MEOS C function bigint_to_tbox. +func BigintToTBOX(i int64) *TBox { + _cret := C.bigint_to_tbox(C.int64_t(i)) + return &TBox{_inner: _cret} +} + + +// SetToTBOX wraps MEOS C function set_to_tbox. +func SetToTBOX(s *Set) *TBox { + _cret := C.set_to_tbox(s._inner) + return &TBox{_inner: _cret} +} + + +// SpanToTBOX wraps MEOS C function span_to_tbox. +func SpanToTBOX(s *Span) *TBox { + _cret := C.span_to_tbox(s._inner) + return &TBox{_inner: _cret} +} + + +// SpansetToTBOX wraps MEOS C function spanset_to_tbox. +func SpansetToTBOX(ss *SpanSet) *TBox { + _cret := C.spanset_to_tbox(ss._inner) + return &TBox{_inner: _cret} +} + + +// TBOXToIntspan wraps MEOS C function tbox_to_intspan. +func TBOXToIntspan(box *TBox) *Span { + _cret := C.tbox_to_intspan(box._inner) + return &Span{_inner: _cret} +} + + +// TBOXToBigintspan wraps MEOS C function tbox_to_bigintspan. +func TBOXToBigintspan(box *TBox) *Span { + _cret := C.tbox_to_bigintspan(box._inner) + return &Span{_inner: _cret} +} + + +// TBOXToFloatspan wraps MEOS C function tbox_to_floatspan. +func TBOXToFloatspan(box *TBox) *Span { + _cret := C.tbox_to_floatspan(box._inner) + return &Span{_inner: _cret} +} + + +// TBOXToTstzspan wraps MEOS C function tbox_to_tstzspan. +func TBOXToTstzspan(box *TBox) *Span { + _cret := C.tbox_to_tstzspan(box._inner) + return &Span{_inner: _cret} +} + + +// TimestamptzToTBOX wraps MEOS C function timestamptz_to_tbox. +func TimestamptzToTBOX(t int64) *TBox { + _cret := C.timestamptz_to_tbox(C.TimestampTz(t)) + return &TBox{_inner: _cret} +} + + +// TBOXHash wraps MEOS C function tbox_hash. +func TBOXHash(box *TBox) uint32 { + _cret := C.tbox_hash(box._inner) + return uint32(_cret) +} + + +// TBOXHashExtended wraps MEOS C function tbox_hash_extended. +func TBOXHashExtended(box *TBox, seed uint64) uint64 { + _cret := C.tbox_hash_extended(box._inner, C.uint64_t(seed)) + return uint64(_cret) +} + + +// TBOXHast wraps MEOS C function tbox_hast. +func TBOXHast(box *TBox) bool { + _cret := C.tbox_hast(box._inner) + return bool(_cret) +} + + +// TBOXHasx wraps MEOS C function tbox_hasx. +func TBOXHasx(box *TBox) bool { + _cret := C.tbox_hasx(box._inner) + return bool(_cret) +} + + +// TBOXTmax wraps MEOS C function tbox_tmax. +func TBOXTmax(box *TBox) (bool, int64) { + var _out_result C.TimestampTz + _cret := C.tbox_tmax(box._inner, &_out_result) + return bool(_cret), int64(_out_result) +} + + +// TBOXTmaxInc wraps MEOS C function tbox_tmax_inc. +func TBOXTmaxInc(box *TBox) (bool, bool) { + var _out_result C.bool + _cret := C.tbox_tmax_inc(box._inner, &_out_result) + return bool(_cret), bool(_out_result) +} + + +// TBOXTmin wraps MEOS C function tbox_tmin. +func TBOXTmin(box *TBox) (bool, int64) { + var _out_result C.TimestampTz + _cret := C.tbox_tmin(box._inner, &_out_result) + return bool(_cret), int64(_out_result) +} + + +// TBOXTminInc wraps MEOS C function tbox_tmin_inc. +func TBOXTminInc(box *TBox) (bool, bool) { + var _out_result C.bool + _cret := C.tbox_tmin_inc(box._inner, &_out_result) + return bool(_cret), bool(_out_result) +} + + +// TBOXXmax wraps MEOS C function tbox_xmax. +func TBOXXmax(box *TBox) (bool, float64) { + var _out_result C.double + _cret := C.tbox_xmax(box._inner, &_out_result) + return bool(_cret), float64(_out_result) +} + + +// TBOXXmaxInc wraps MEOS C function tbox_xmax_inc. +func TBOXXmaxInc(box *TBox) (bool, bool) { + var _out_result C.bool + _cret := C.tbox_xmax_inc(box._inner, &_out_result) + return bool(_cret), bool(_out_result) +} + + +// TBOXXmin wraps MEOS C function tbox_xmin. +func TBOXXmin(box *TBox) (bool, float64) { + var _out_result C.double + _cret := C.tbox_xmin(box._inner, &_out_result) + return bool(_cret), float64(_out_result) +} + + +// TBOXXminInc wraps MEOS C function tbox_xmin_inc. +func TBOXXminInc(box *TBox) (bool, bool) { + var _out_result C.bool + _cret := C.tbox_xmin_inc(box._inner, &_out_result) + return bool(_cret), bool(_out_result) +} + + +// TboxfloatXmax wraps MEOS C function tboxfloat_xmax. +func TboxfloatXmax(box *TBox) (bool, float64) { + var _out_result C.double + _cret := C.tboxfloat_xmax(box._inner, &_out_result) + return bool(_cret), float64(_out_result) +} + + +// TboxfloatXmin wraps MEOS C function tboxfloat_xmin. +func TboxfloatXmin(box *TBox) (bool, float64) { + var _out_result C.double + _cret := C.tboxfloat_xmin(box._inner, &_out_result) + return bool(_cret), float64(_out_result) +} + + +// TboxintXmax wraps MEOS C function tboxint_xmax. +func TboxintXmax(box *TBox) (bool, int) { + var _out_result C.int + _cret := C.tboxint_xmax(box._inner, &_out_result) + return bool(_cret), int(_out_result) +} + + +// TboxbigintXmax wraps MEOS C function tboxbigint_xmax. +func TboxbigintXmax(box *TBox) (bool, int64) { + var _out_result C.int64_t + _cret := C.tboxbigint_xmax(box._inner, &_out_result) + return bool(_cret), int64(_out_result) +} + + +// TboxintXmin wraps MEOS C function tboxint_xmin. +func TboxintXmin(box *TBox) (bool, int) { + var _out_result C.int + _cret := C.tboxint_xmin(box._inner, &_out_result) + return bool(_cret), int(_out_result) +} + + +// TboxbigintXmin wraps MEOS C function tboxbigint_xmin. +func TboxbigintXmin(box *TBox) (bool, int64) { + var _out_result C.int64_t + _cret := C.tboxbigint_xmin(box._inner, &_out_result) + return bool(_cret), int64(_out_result) +} + + +// TfloatboxExpand wraps MEOS C function tfloatbox_expand. +func TfloatboxExpand(box *TBox, d float64) *TBox { + _cret := C.tfloatbox_expand(box._inner, C.double(d)) + return &TBox{_inner: _cret} +} + + +// TintboxExpand wraps MEOS C function tintbox_expand. +func TintboxExpand(box *TBox, i int) *TBox { + _cret := C.tintbox_expand(box._inner, C.int(i)) + return &TBox{_inner: _cret} +} + + +// TBOXExpandTime wraps MEOS C function tbox_expand_time. +func TBOXExpandTime(box *TBox, interv *Interval) *TBox { + _cret := C.tbox_expand_time(box._inner, interv._inner) + return &TBox{_inner: _cret} +} + + +// TBOXRound wraps MEOS C function tbox_round. +func TBOXRound(box *TBox, maxdd int) *TBox { + _cret := C.tbox_round(box._inner, C.int(maxdd)) + return &TBox{_inner: _cret} +} + + +// TfloatboxShiftScale wraps MEOS C function tfloatbox_shift_scale. +func TfloatboxShiftScale(box *TBox, shift float64, width float64, hasshift bool, haswidth bool) *TBox { + _cret := C.tfloatbox_shift_scale(box._inner, C.double(shift), C.double(width), C.bool(hasshift), C.bool(haswidth)) + return &TBox{_inner: _cret} +} + + +// TintboxShiftScale wraps MEOS C function tintbox_shift_scale. +func TintboxShiftScale(box *TBox, shift int, width int, hasshift bool, haswidth bool) *TBox { + _cret := C.tintbox_shift_scale(box._inner, C.int(shift), C.int(width), C.bool(hasshift), C.bool(haswidth)) + return &TBox{_inner: _cret} +} + + +// TBOXShiftScaleTime wraps MEOS C function tbox_shift_scale_time. +func TBOXShiftScaleTime(box *TBox, shift *Interval, duration *Interval) *TBox { + _cret := C.tbox_shift_scale_time(box._inner, shift._inner, duration._inner) + return &TBox{_inner: _cret} +} + + +// TbigintboxExpand wraps MEOS C function tbigintbox_expand. +func TbigintboxExpand(box *TBox, i int64) *TBox { + _cret := C.tbigintbox_expand(box._inner, C.int64_t(i)) + return &TBox{_inner: _cret} +} + + +// TbigintboxShiftScale wraps MEOS C function tbigintbox_shift_scale. +func TbigintboxShiftScale(box *TBox, shift int64, width int64, hasshift bool, haswidth bool) *TBox { + _cret := C.tbigintbox_shift_scale(box._inner, C.int64_t(shift), C.int64_t(width), C.bool(hasshift), C.bool(haswidth)) + return &TBox{_inner: _cret} +} + + +// UnionTBOXTBOX wraps MEOS C function union_tbox_tbox. +func UnionTBOXTBOX(box1 *TBox, box2 *TBox, strict bool) *TBox { + _cret := C.gunion_tbox_tbox(box1._inner, box2._inner, C.bool(strict)) + return &TBox{_inner: _cret} +} + + +// IntersectionTBOXTBOX wraps MEOS C function intersection_tbox_tbox. +func IntersectionTBOXTBOX(box1 *TBox, box2 *TBox) *TBox { + _cret := C.intersection_tbox_tbox(box1._inner, box2._inner) + return &TBox{_inner: _cret} +} + + +// AdjacentTBOXTBOX wraps MEOS C function adjacent_tbox_tbox. +func AdjacentTBOXTBOX(box1 *TBox, box2 *TBox) bool { + _cret := C.adjacent_tbox_tbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// ContainedTBOXTBOX wraps MEOS C function contained_tbox_tbox. +func ContainedTBOXTBOX(box1 *TBox, box2 *TBox) bool { + _cret := C.contained_tbox_tbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// ContainsTBOXTBOX wraps MEOS C function contains_tbox_tbox. +func ContainsTBOXTBOX(box1 *TBox, box2 *TBox) bool { + _cret := C.contains_tbox_tbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OverlapsTBOXTBOX wraps MEOS C function overlaps_tbox_tbox. +func OverlapsTBOXTBOX(box1 *TBox, box2 *TBox) bool { + _cret := C.overlaps_tbox_tbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// SameTBOXTBOX wraps MEOS C function same_tbox_tbox. +func SameTBOXTBOX(box1 *TBox, box2 *TBox) bool { + _cret := C.same_tbox_tbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// AfterTBOXTBOX wraps MEOS C function after_tbox_tbox. +func AfterTBOXTBOX(box1 *TBox, box2 *TBox) bool { + _cret := C.after_tbox_tbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// BeforeTBOXTBOX wraps MEOS C function before_tbox_tbox. +func BeforeTBOXTBOX(box1 *TBox, box2 *TBox) bool { + _cret := C.before_tbox_tbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// LeftTBOXTBOX wraps MEOS C function left_tbox_tbox. +func LeftTBOXTBOX(box1 *TBox, box2 *TBox) bool { + _cret := C.left_tbox_tbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OverafterTBOXTBOX wraps MEOS C function overafter_tbox_tbox. +func OverafterTBOXTBOX(box1 *TBox, box2 *TBox) bool { + _cret := C.overafter_tbox_tbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OverbeforeTBOXTBOX wraps MEOS C function overbefore_tbox_tbox. +func OverbeforeTBOXTBOX(box1 *TBox, box2 *TBox) bool { + _cret := C.overbefore_tbox_tbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OverleftTBOXTBOX wraps MEOS C function overleft_tbox_tbox. +func OverleftTBOXTBOX(box1 *TBox, box2 *TBox) bool { + _cret := C.overleft_tbox_tbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OverrightTBOXTBOX wraps MEOS C function overright_tbox_tbox. +func OverrightTBOXTBOX(box1 *TBox, box2 *TBox) bool { + _cret := C.overright_tbox_tbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// RightTBOXTBOX wraps MEOS C function right_tbox_tbox. +func RightTBOXTBOX(box1 *TBox, box2 *TBox) bool { + _cret := C.right_tbox_tbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// TBOXCmp wraps MEOS C function tbox_cmp. +func TBOXCmp(box1 *TBox, box2 *TBox) int { + _cret := C.tbox_cmp(box1._inner, box2._inner) + return int(_cret) +} + + +// TBOXEq wraps MEOS C function tbox_eq. +func TBOXEq(box1 *TBox, box2 *TBox) bool { + _cret := C.tbox_eq(box1._inner, box2._inner) + return bool(_cret) +} + + +// TBOXGe wraps MEOS C function tbox_ge. +func TBOXGe(box1 *TBox, box2 *TBox) bool { + _cret := C.tbox_ge(box1._inner, box2._inner) + return bool(_cret) +} + + +// TBOXGt wraps MEOS C function tbox_gt. +func TBOXGt(box1 *TBox, box2 *TBox) bool { + _cret := C.tbox_gt(box1._inner, box2._inner) + return bool(_cret) +} + + +// TBOXLe wraps MEOS C function tbox_le. +func TBOXLe(box1 *TBox, box2 *TBox) bool { + _cret := C.tbox_le(box1._inner, box2._inner) + return bool(_cret) +} + + +// TBOXLt wraps MEOS C function tbox_lt. +func TBOXLt(box1 *TBox, box2 *TBox) bool { + _cret := C.tbox_lt(box1._inner, box2._inner) + return bool(_cret) +} + + +// TBOXNe wraps MEOS C function tbox_ne. +func TBOXNe(box1 *TBox, box2 *TBox) bool { + _cret := C.tbox_ne(box1._inner, box2._inner) + return bool(_cret) +} + + +// TboolFromMFJSON wraps MEOS C function tbool_from_mfjson. +func TboolFromMFJSON(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tbool_from_mfjson(_c_str) + return &Temporal{_inner: _cret} +} + + +// TboolIn wraps MEOS C function tbool_in. +func TboolIn(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tbool_in(_c_str) + return &Temporal{_inner: _cret} +} + + +// TboolOut wraps MEOS C function tbool_out. +func TboolOut(temp *Temporal) string { + _cret := C.tbool_out(temp._inner) + return C.GoString(_cret) +} + + +// TemporalAsHexwkb wraps MEOS C function temporal_as_hexwkb. +func TemporalAsHexwkb(temp *Temporal, variant uint8, size_out unsafe.Pointer) string { + _cret := C.temporal_as_hexwkb(temp._inner, C.uint8_t(variant), (*C.size_t)(unsafe.Pointer(size_out))) + return C.GoString(_cret) +} + + +// TemporalAsMFJSON wraps MEOS C function temporal_as_mfjson. +func TemporalAsMFJSON(temp *Temporal, with_bbox bool, flags int, precision int, srs string) string { + _c_srs := C.CString(srs) + defer C.free(unsafe.Pointer(_c_srs)) + _cret := C.temporal_as_mfjson(temp._inner, C.bool(with_bbox), C.int(flags), C.int(precision), _c_srs) + return C.GoString(_cret) +} + + +// TemporalAsWKB wraps MEOS C function temporal_as_wkb. +func TemporalAsWKB(temp *Temporal, variant uint8, size_out unsafe.Pointer) unsafe.Pointer { + _cret := C.temporal_as_wkb(temp._inner, C.uint8_t(variant), (*C.size_t)(unsafe.Pointer(size_out))) + return unsafe.Pointer(_cret) +} + + +// TemporalFromHexwkb wraps MEOS C function temporal_from_hexwkb. +func TemporalFromHexwkb(hexwkb string) *Temporal { + _c_hexwkb := C.CString(hexwkb) + defer C.free(unsafe.Pointer(_c_hexwkb)) + _cret := C.temporal_from_hexwkb(_c_hexwkb) + return &Temporal{_inner: _cret} +} + + +// TemporalFromWKB wraps MEOS C function temporal_from_wkb. +func TemporalFromWKB(wkb unsafe.Pointer, size uint) *Temporal { + _cret := C.temporal_from_wkb((*C.uint8_t)(unsafe.Pointer(wkb)), C.size_t(size)) + return &Temporal{_inner: _cret} +} + + +// TfloatFromMFJSON wraps MEOS C function tfloat_from_mfjson. +func TfloatFromMFJSON(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tfloat_from_mfjson(_c_str) + return &Temporal{_inner: _cret} +} + + +// TfloatIn wraps MEOS C function tfloat_in. +func TfloatIn(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tfloat_in(_c_str) + return &Temporal{_inner: _cret} +} + + +// TfloatOut wraps MEOS C function tfloat_out. +func TfloatOut(temp *Temporal, maxdd int) string { + _cret := C.tfloat_out(temp._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// TintFromMFJSON wraps MEOS C function tint_from_mfjson. +func TintFromMFJSON(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tint_from_mfjson(_c_str) + return &Temporal{_inner: _cret} +} + + +// TbigintFromMFJSON wraps MEOS C function tbigint_from_mfjson. +func TbigintFromMFJSON(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tbigint_from_mfjson(_c_str) + return &Temporal{_inner: _cret} +} + + +// TintIn wraps MEOS C function tint_in. +func TintIn(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tint_in(_c_str) + return &Temporal{_inner: _cret} +} + + +// TbigintIn wraps MEOS C function tbigint_in. +func TbigintIn(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tbigint_in(_c_str) + return &Temporal{_inner: _cret} +} + + +// TintOut wraps MEOS C function tint_out. +func TintOut(temp *Temporal) string { + _cret := C.tint_out(temp._inner) + return C.GoString(_cret) +} + + +// TbigintOut wraps MEOS C function tbigint_out. +func TbigintOut(temp *Temporal) string { + _cret := C.tbigint_out(temp._inner) + return C.GoString(_cret) +} + + +// TtextFromMFJSON wraps MEOS C function ttext_from_mfjson. +func TtextFromMFJSON(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.ttext_from_mfjson(_c_str) + return &Temporal{_inner: _cret} +} + + +// TtextIn wraps MEOS C function ttext_in. +func TtextIn(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.ttext_in(_c_str) + return &Temporal{_inner: _cret} +} + + +// TtextOut wraps MEOS C function ttext_out. +func TtextOut(temp *Temporal) string { + _cret := C.ttext_out(temp._inner) + return C.GoString(_cret) +} + + +// TboolFromBaseTemp wraps MEOS C function tbool_from_base_temp. +func TboolFromBaseTemp(b bool, temp *Temporal) *Temporal { + _cret := C.tbool_from_base_temp(C.bool(b), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TboolinstMake wraps MEOS C function tboolinst_make. +func TboolinstMake(b bool, t int64) *TInstant { + _cret := C.tboolinst_make(C.bool(b), C.TimestampTz(t)) + return &TInstant{_inner: _cret} +} + + +// TboolseqFromBaseTstzset wraps MEOS C function tboolseq_from_base_tstzset. +func TboolseqFromBaseTstzset(b bool, s *Set) *TSequence { + _cret := C.tboolseq_from_base_tstzset(C.bool(b), s._inner) + return &TSequence{_inner: _cret} +} + + +// TboolseqFromBaseTstzspan wraps MEOS C function tboolseq_from_base_tstzspan. +func TboolseqFromBaseTstzspan(b bool, s *Span) *TSequence { + _cret := C.tboolseq_from_base_tstzspan(C.bool(b), s._inner) + return &TSequence{_inner: _cret} +} + + +// TboolseqsetFromBaseTstzspanset wraps MEOS C function tboolseqset_from_base_tstzspanset. +func TboolseqsetFromBaseTstzspanset(b bool, ss *SpanSet) *TSequenceSet { + _cret := C.tboolseqset_from_base_tstzspanset(C.bool(b), ss._inner) + return &TSequenceSet{_inner: _cret} +} + + +// TemporalCopy wraps MEOS C function temporal_copy. +func TemporalCopy(temp *Temporal) *Temporal { + _cret := C.temporal_copy(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TfloatFromBaseTemp wraps MEOS C function tfloat_from_base_temp. +func TfloatFromBaseTemp(d float64, temp *Temporal) *Temporal { + _cret := C.tfloat_from_base_temp(C.double(d), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TfloatinstMake wraps MEOS C function tfloatinst_make. +func TfloatinstMake(d float64, t int64) *TInstant { + _cret := C.tfloatinst_make(C.double(d), C.TimestampTz(t)) + return &TInstant{_inner: _cret} +} + + +// TfloatseqFromBaseTstzset wraps MEOS C function tfloatseq_from_base_tstzset. +func TfloatseqFromBaseTstzset(d float64, s *Set) *TSequence { + _cret := C.tfloatseq_from_base_tstzset(C.double(d), s._inner) + return &TSequence{_inner: _cret} +} + + +// TfloatseqFromBaseTstzspan wraps MEOS C function tfloatseq_from_base_tstzspan. +func TfloatseqFromBaseTstzspan(d float64, s *Span, interp Interpolation) *TSequence { + _cret := C.tfloatseq_from_base_tstzspan(C.double(d), s._inner, C.interpType(interp)) + return &TSequence{_inner: _cret} +} + + +// TfloatseqsetFromBaseTstzspanset wraps MEOS C function tfloatseqset_from_base_tstzspanset. +func TfloatseqsetFromBaseTstzspanset(d float64, ss *SpanSet, interp Interpolation) *TSequenceSet { + _cret := C.tfloatseqset_from_base_tstzspanset(C.double(d), ss._inner, C.interpType(interp)) + return &TSequenceSet{_inner: _cret} +} + + +// TintFromBaseTemp wraps MEOS C function tint_from_base_temp. +func TintFromBaseTemp(i int, temp *Temporal) *Temporal { + _cret := C.tint_from_base_temp(C.int(i), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TbigintFromBaseTemp wraps MEOS C function tbigint_from_base_temp. +func TbigintFromBaseTemp(i int64, temp *Temporal) *Temporal { + _cret := C.tbigint_from_base_temp(C.int64_t(i), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TintinstMake wraps MEOS C function tintinst_make. +func TintinstMake(i int, t int64) *TInstant { + _cret := C.tintinst_make(C.int(i), C.TimestampTz(t)) + return &TInstant{_inner: _cret} +} + + +// TbigintinstMake wraps MEOS C function tbigintinst_make. +func TbigintinstMake(i int64, t int64) *TInstant { + _cret := C.tbigintinst_make(C.int64_t(i), C.TimestampTz(t)) + return &TInstant{_inner: _cret} +} + + +// TintseqFromBaseTstzset wraps MEOS C function tintseq_from_base_tstzset. +func TintseqFromBaseTstzset(i int, s *Set) *TSequence { + _cret := C.tintseq_from_base_tstzset(C.int(i), s._inner) + return &TSequence{_inner: _cret} +} + + +// TbigintseqFromBaseTstzset wraps MEOS C function tbigintseq_from_base_tstzset. +func TbigintseqFromBaseTstzset(i int64, s *Set) *TSequence { + _cret := C.tbigintseq_from_base_tstzset(C.int64_t(i), s._inner) + return &TSequence{_inner: _cret} +} + + +// TintseqFromBaseTstzspan wraps MEOS C function tintseq_from_base_tstzspan. +func TintseqFromBaseTstzspan(i int, s *Span) *TSequence { + _cret := C.tintseq_from_base_tstzspan(C.int(i), s._inner) + return &TSequence{_inner: _cret} +} + + +// TbigintseqFromBaseTstzspan wraps MEOS C function tbigintseq_from_base_tstzspan. +func TbigintseqFromBaseTstzspan(i int64, s *Span) *TSequence { + _cret := C.tbigintseq_from_base_tstzspan(C.int64_t(i), s._inner) + return &TSequence{_inner: _cret} +} + + +// TintseqsetFromBaseTstzspanset wraps MEOS C function tintseqset_from_base_tstzspanset. +func TintseqsetFromBaseTstzspanset(i int, ss *SpanSet) *TSequenceSet { + _cret := C.tintseqset_from_base_tstzspanset(C.int(i), ss._inner) + return &TSequenceSet{_inner: _cret} +} + + +// TbigintseqsetFromBaseTstzspanset wraps MEOS C function tbigintseqset_from_base_tstzspanset. +func TbigintseqsetFromBaseTstzspanset(i int64, ss *SpanSet) *TSequenceSet { + _cret := C.tbigintseqset_from_base_tstzspanset(C.int64_t(i), ss._inner) + return &TSequenceSet{_inner: _cret} +} + + +// TsequenceMake wraps MEOS C function tsequence_make. +func TsequenceMake(instants unsafe.Pointer, count int, lower_inc bool, upper_inc bool, interp Interpolation, normalize bool) *TSequence { + _cret := C.tsequence_make((**C.TInstant)(unsafe.Pointer(instants)), C.int(count), C.bool(lower_inc), C.bool(upper_inc), C.interpType(interp), C.bool(normalize)) + return &TSequence{_inner: _cret} +} + + +// TsequencesetMake wraps MEOS C function tsequenceset_make. +func TsequencesetMake(sequences unsafe.Pointer, count int, normalize bool) *TSequenceSet { + _cret := C.tsequenceset_make((**C.TSequence)(unsafe.Pointer(sequences)), C.int(count), C.bool(normalize)) + return &TSequenceSet{_inner: _cret} +} + + +// TsequencesetMakeGaps wraps MEOS C function tsequenceset_make_gaps. +func TsequencesetMakeGaps(instants unsafe.Pointer, count int, interp Interpolation, maxt *Interval, maxdist float64) *TSequenceSet { + _cret := C.tsequenceset_make_gaps((**C.TInstant)(unsafe.Pointer(instants)), C.int(count), C.interpType(interp), maxt._inner, C.double(maxdist)) + return &TSequenceSet{_inner: _cret} +} + + +// TtextFromBaseTemp wraps MEOS C function ttext_from_base_temp. +func TtextFromBaseTemp(txt string, temp *Temporal) *Temporal { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.ttext_from_base_temp(_c_txt, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TtextinstMake wraps MEOS C function ttextinst_make. +func TtextinstMake(txt string, t int64) *TInstant { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.ttextinst_make(_c_txt, C.TimestampTz(t)) + return &TInstant{_inner: _cret} +} + + +// TtextseqFromBaseTstzset wraps MEOS C function ttextseq_from_base_tstzset. +func TtextseqFromBaseTstzset(txt string, s *Set) *TSequence { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.ttextseq_from_base_tstzset(_c_txt, s._inner) + return &TSequence{_inner: _cret} +} + + +// TtextseqFromBaseTstzspan wraps MEOS C function ttextseq_from_base_tstzspan. +func TtextseqFromBaseTstzspan(txt string, s *Span) *TSequence { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.ttextseq_from_base_tstzspan(_c_txt, s._inner) + return &TSequence{_inner: _cret} +} + + +// TtextseqsetFromBaseTstzspanset wraps MEOS C function ttextseqset_from_base_tstzspanset. +func TtextseqsetFromBaseTstzspanset(txt string, ss *SpanSet) *TSequenceSet { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.ttextseqset_from_base_tstzspanset(_c_txt, ss._inner) + return &TSequenceSet{_inner: _cret} +} + + +// TboolToTint wraps MEOS C function tbool_to_tint. +func TboolToTint(temp *Temporal) *Temporal { + _cret := C.tbool_to_tint(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TemporalToTstzspan wraps MEOS C function temporal_to_tstzspan. +func TemporalToTstzspan(temp *Temporal) *Span { + _cret := C.temporal_to_tstzspan(temp._inner) + return &Span{_inner: _cret} +} + + +// TfloatToTint wraps MEOS C function tfloat_to_tint. +func TfloatToTint(temp *Temporal) *Temporal { + _cret := C.tfloat_to_tint(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TfloatToTbigint wraps MEOS C function tfloat_to_tbigint. +func TfloatToTbigint(temp *Temporal) *Temporal { + _cret := C.tfloat_to_tbigint(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TintToTfloat wraps MEOS C function tint_to_tfloat. +func TintToTfloat(temp *Temporal) *Temporal { + _cret := C.tint_to_tfloat(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TintToTbigint wraps MEOS C function tint_to_tbigint. +func TintToTbigint(temp *Temporal) *Temporal { + _cret := C.tint_to_tbigint(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TbigintToTint wraps MEOS C function tbigint_to_tint. +func TbigintToTint(temp *Temporal) *Temporal { + _cret := C.tbigint_to_tint(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TbigintToTfloat wraps MEOS C function tbigint_to_tfloat. +func TbigintToTfloat(temp *Temporal) *Temporal { + _cret := C.tbigint_to_tfloat(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TnumberToSpan wraps MEOS C function tnumber_to_span. +func TnumberToSpan(temp *Temporal) *Span { + _cret := C.tnumber_to_span(temp._inner) + return &Span{_inner: _cret} +} + + +// TnumberToTBOX wraps MEOS C function tnumber_to_tbox. +func TnumberToTBOX(temp *Temporal) *TBox { + _cret := C.tnumber_to_tbox(temp._inner) + return &TBox{_inner: _cret} +} + + +// TboolEndValue wraps MEOS C function tbool_end_value. +func TboolEndValue(temp *Temporal) bool { + _cret := C.tbool_end_value(temp._inner) + return bool(_cret) +} + + +// TboolStartValue wraps MEOS C function tbool_start_value. +func TboolStartValue(temp *Temporal) bool { + _cret := C.tbool_start_value(temp._inner) + return bool(_cret) +} + + +// TboolValueAtTimestamptz wraps MEOS C function tbool_value_at_timestamptz. +func TboolValueAtTimestamptz(temp *Temporal, t int64, strict bool) (bool, bool) { + var _out_value C.bool + _cret := C.tbool_value_at_timestamptz(temp._inner, C.TimestampTz(t), C.bool(strict), &_out_value) + return bool(_cret), bool(_out_value) +} + + +// TboolValueN wraps MEOS C function tbool_value_n. +func TboolValueN(temp *Temporal, n int) (bool, bool) { + var _out_result C.bool + _cret := C.tbool_value_n(temp._inner, C.int(n), &_out_result) + return bool(_cret), bool(_out_result) +} + + +// TboolValues wraps MEOS C function tbool_values. +func TboolValues(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tbool_values(temp._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TemporalDuration wraps MEOS C function temporal_duration. +func TemporalDuration(temp *Temporal, boundspan bool) *Interval { + _cret := C.temporal_duration(temp._inner, C.bool(boundspan)) + return &Interval{_inner: _cret} +} + + +// TemporalEndInstant wraps MEOS C function temporal_end_instant. +func TemporalEndInstant(temp *Temporal) *TInstant { + _cret := C.temporal_end_instant(temp._inner) + return &TInstant{_inner: _cret} +} + + +// TemporalEndSequence wraps MEOS C function temporal_end_sequence. +func TemporalEndSequence(temp *Temporal) *TSequence { + _cret := C.temporal_end_sequence(temp._inner) + return &TSequence{_inner: _cret} +} + + +// TemporalEndTimestamptz wraps MEOS C function temporal_end_timestamptz. +func TemporalEndTimestamptz(temp *Temporal) int64 { + _cret := C.temporal_end_timestamptz(temp._inner) + return int64(_cret) +} + + +// TemporalHash wraps MEOS C function temporal_hash. +func TemporalHash(temp *Temporal) uint32 { + _cret := C.temporal_hash(temp._inner) + return uint32(_cret) +} + + +// TemporalInstantN wraps MEOS C function temporal_instant_n. +func TemporalInstantN(temp *Temporal, n int) *TInstant { + _cret := C.temporal_instant_n(temp._inner, C.int(n)) + return &TInstant{_inner: _cret} +} + + +// TemporalInstants wraps MEOS C function temporal_instants. +func TemporalInstants(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.temporal_instants(temp._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TemporalInterp wraps MEOS C function temporal_interp. +func TemporalInterp(temp *Temporal) string { + _cret := C.temporal_interp(temp._inner) + return C.GoString(_cret) +} + + +// TemporalLowerInc wraps MEOS C function temporal_lower_inc. +func TemporalLowerInc(temp *Temporal) bool { + _cret := C.temporal_lower_inc(temp._inner) + return bool(_cret) +} + + +// TemporalMaxInstant wraps MEOS C function temporal_max_instant. +func TemporalMaxInstant(temp *Temporal) *TInstant { + _cret := C.temporal_max_instant(temp._inner) + return &TInstant{_inner: _cret} +} + + +// TemporalMinInstant wraps MEOS C function temporal_min_instant. +func TemporalMinInstant(temp *Temporal) *TInstant { + _cret := C.temporal_min_instant(temp._inner) + return &TInstant{_inner: _cret} +} + + +// TemporalNumInstants wraps MEOS C function temporal_num_instants. +func TemporalNumInstants(temp *Temporal) int { + _cret := C.temporal_num_instants(temp._inner) + return int(_cret) +} + + +// TemporalNumSequences wraps MEOS C function temporal_num_sequences. +func TemporalNumSequences(temp *Temporal) int { + _cret := C.temporal_num_sequences(temp._inner) + return int(_cret) +} + + +// TemporalNumTimestamps wraps MEOS C function temporal_num_timestamps. +func TemporalNumTimestamps(temp *Temporal) int { + _cret := C.temporal_num_timestamps(temp._inner) + return int(_cret) +} + + +// TemporalSegmDuration wraps MEOS C function temporal_segm_duration. +func TemporalSegmDuration(temp *Temporal, duration *Interval, atleast bool, strict bool) *TSequenceSet { + _cret := C.temporal_segm_duration(temp._inner, duration._inner, C.bool(atleast), C.bool(strict)) + return &TSequenceSet{_inner: _cret} +} + + +// TemporalSegments wraps MEOS C function temporal_segments. +func TemporalSegments(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.temporal_segments(temp._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TemporalSequenceN wraps MEOS C function temporal_sequence_n. +func TemporalSequenceN(temp *Temporal, i int) *TSequence { + _cret := C.temporal_sequence_n(temp._inner, C.int(i)) + return &TSequence{_inner: _cret} +} + + +// TemporalSequences wraps MEOS C function temporal_sequences. +func TemporalSequences(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.temporal_sequences(temp._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TemporalStartInstant wraps MEOS C function temporal_start_instant. +func TemporalStartInstant(temp *Temporal) *TInstant { + _cret := C.temporal_start_instant(temp._inner) + return &TInstant{_inner: _cret} +} + + +// TemporalStartSequence wraps MEOS C function temporal_start_sequence. +func TemporalStartSequence(temp *Temporal) *TSequence { + _cret := C.temporal_start_sequence(temp._inner) + return &TSequence{_inner: _cret} +} + + +// TemporalStartTimestamptz wraps MEOS C function temporal_start_timestamptz. +func TemporalStartTimestamptz(temp *Temporal) int64 { + _cret := C.temporal_start_timestamptz(temp._inner) + return int64(_cret) +} + + +// TemporalStops wraps MEOS C function temporal_stops. +func TemporalStops(temp *Temporal, maxdist float64, minduration *Interval) *TSequenceSet { + _cret := C.temporal_stops(temp._inner, C.double(maxdist), minduration._inner) + return &TSequenceSet{_inner: _cret} +} + + +// TemporalSubtype wraps MEOS C function temporal_subtype. +func TemporalSubtype(temp *Temporal) string { + _cret := C.temporal_subtype(temp._inner) + return C.GoString(_cret) +} + + +// TemporalBasetypeName wraps MEOS C function temporal_basetype_name. +func TemporalBasetypeName(temp *Temporal) string { + _cret := C.temporal_basetype_name(temp._inner) + return C.GoString(_cret) +} + + +// TemporalTime wraps MEOS C function temporal_time. +func TemporalTime(temp *Temporal) *SpanSet { + _cret := C.temporal_time(temp._inner) + return &SpanSet{_inner: _cret} +} + + +// TemporalTimestamps wraps MEOS C function temporal_timestamps. +func TemporalTimestamps(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.temporal_timestamps(temp._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TemporalTimestamptzN wraps MEOS C function temporal_timestamptz_n. +func TemporalTimestamptzN(temp *Temporal, n int) (bool, int64) { + var _out_result C.TimestampTz + _cret := C.temporal_timestamptz_n(temp._inner, C.int(n), &_out_result) + return bool(_cret), int64(_out_result) +} + + +// TemporalUpperInc wraps MEOS C function temporal_upper_inc. +func TemporalUpperInc(temp *Temporal) bool { + _cret := C.temporal_upper_inc(temp._inner) + return bool(_cret) +} + + +// TfloatEndValue wraps MEOS C function tfloat_end_value. +func TfloatEndValue(temp *Temporal) float64 { + _cret := C.tfloat_end_value(temp._inner) + return float64(_cret) +} + + +// TfloatMinValue wraps MEOS C function tfloat_min_value. +func TfloatMinValue(temp *Temporal) float64 { + _cret := C.tfloat_min_value(temp._inner) + return float64(_cret) +} + + +// TfloatMaxValue wraps MEOS C function tfloat_max_value. +func TfloatMaxValue(temp *Temporal) float64 { + _cret := C.tfloat_max_value(temp._inner) + return float64(_cret) +} + + +// TfloatStartValue wraps MEOS C function tfloat_start_value. +func TfloatStartValue(temp *Temporal) float64 { + _cret := C.tfloat_start_value(temp._inner) + return float64(_cret) +} + + +// TfloatValueAtTimestamptz wraps MEOS C function tfloat_value_at_timestamptz. +func TfloatValueAtTimestamptz(temp *Temporal, t int64, strict bool) (bool, float64) { + var _out_value C.double + _cret := C.tfloat_value_at_timestamptz(temp._inner, C.TimestampTz(t), C.bool(strict), &_out_value) + return bool(_cret), float64(_out_value) +} + + +// TfloatValueN wraps MEOS C function tfloat_value_n. +func TfloatValueN(temp *Temporal, n int) (bool, float64) { + var _out_result C.double + _cret := C.tfloat_value_n(temp._inner, C.int(n), &_out_result) + return bool(_cret), float64(_out_result) +} + + +// TfloatValues wraps MEOS C function tfloat_values. +func TfloatValues(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tfloat_values(temp._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TintEndValue wraps MEOS C function tint_end_value. +func TintEndValue(temp *Temporal) int { + _cret := C.tint_end_value(temp._inner) + return int(_cret) +} + + +// TbigintEndValue wraps MEOS C function tbigint_end_value. +func TbigintEndValue(temp *Temporal) int64 { + _cret := C.tbigint_end_value(temp._inner) + return int64(_cret) +} + + +// TintMaxValue wraps MEOS C function tint_max_value. +func TintMaxValue(temp *Temporal) int { + _cret := C.tint_max_value(temp._inner) + return int(_cret) +} + + +// TbigintMaxValue wraps MEOS C function tbigint_max_value. +func TbigintMaxValue(temp *Temporal) int64 { + _cret := C.tbigint_max_value(temp._inner) + return int64(_cret) +} + + +// TintMinValue wraps MEOS C function tint_min_value. +func TintMinValue(temp *Temporal) int { + _cret := C.tint_min_value(temp._inner) + return int(_cret) +} + + +// TbigintMinValue wraps MEOS C function tbigint_min_value. +func TbigintMinValue(temp *Temporal) int64 { + _cret := C.tbigint_min_value(temp._inner) + return int64(_cret) +} + + +// TintStartValue wraps MEOS C function tint_start_value. +func TintStartValue(temp *Temporal) int { + _cret := C.tint_start_value(temp._inner) + return int(_cret) +} + + +// TbigintStartValue wraps MEOS C function tbigint_start_value. +func TbigintStartValue(temp *Temporal) int64 { + _cret := C.tbigint_start_value(temp._inner) + return int64(_cret) +} + + +// TbigintValueAtTimestamptz wraps MEOS C function tbigint_value_at_timestamptz. +func TbigintValueAtTimestamptz(temp *Temporal, t int64, strict bool) (bool, int64) { + var _out_value C.int64_t + _cret := C.tbigint_value_at_timestamptz(temp._inner, C.TimestampTz(t), C.bool(strict), &_out_value) + return bool(_cret), int64(_out_value) +} + + +// TintValueAtTimestamptz wraps MEOS C function tint_value_at_timestamptz. +func TintValueAtTimestamptz(temp *Temporal, t int64, strict bool) (bool, int) { + var _out_value C.int + _cret := C.tint_value_at_timestamptz(temp._inner, C.TimestampTz(t), C.bool(strict), &_out_value) + return bool(_cret), int(_out_value) +} + + +// TintValueN wraps MEOS C function tint_value_n. +func TintValueN(temp *Temporal, n int) (bool, int) { + var _out_result C.int + _cret := C.tint_value_n(temp._inner, C.int(n), &_out_result) + return bool(_cret), int(_out_result) +} + + +// TbigintValueN wraps MEOS C function tbigint_value_n. +func TbigintValueN(temp *Temporal, n int64) (bool, int64) { + var _out_result C.int64_t + _cret := C.tbigint_value_n(temp._inner, C.int64_t(n), &_out_result) + return bool(_cret), int64(_out_result) +} + + +// TintValues wraps MEOS C function tint_values. +func TintValues(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tint_values(temp._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TbigintValues wraps MEOS C function tbigint_values. +func TbigintValues(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tbigint_values(temp._inner, (*C.int32)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TnumberAvgValue wraps MEOS C function tnumber_avg_value. +func TnumberAvgValue(temp *Temporal) float64 { + _cret := C.tnumber_avg_value(temp._inner) + return float64(_cret) +} + + +// TnumberIntegral wraps MEOS C function tnumber_integral. +func TnumberIntegral(temp *Temporal) float64 { + _cret := C.tnumber_integral(temp._inner) + return float64(_cret) +} + + +// TnumberTwavg wraps MEOS C function tnumber_twavg. +func TnumberTwavg(temp *Temporal) float64 { + _cret := C.tnumber_twavg(temp._inner) + return float64(_cret) +} + + +// TnumberValuespans wraps MEOS C function tnumber_valuespans. +func TnumberValuespans(temp *Temporal) *SpanSet { + _cret := C.tnumber_valuespans(temp._inner) + return &SpanSet{_inner: _cret} +} + + +// TtextEndValue wraps MEOS C function ttext_end_value. +func TtextEndValue(temp *Temporal) string { + _cret := C.ttext_end_value(temp._inner) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// TtextMaxValue wraps MEOS C function ttext_max_value. +func TtextMaxValue(temp *Temporal) string { + _cret := C.ttext_max_value(temp._inner) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// TtextMinValue wraps MEOS C function ttext_min_value. +func TtextMinValue(temp *Temporal) string { + _cret := C.ttext_min_value(temp._inner) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// TtextStartValue wraps MEOS C function ttext_start_value. +func TtextStartValue(temp *Temporal) string { + _cret := C.ttext_start_value(temp._inner) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// TtextValueAtTimestamptz wraps MEOS C function ttext_value_at_timestamptz. +func TtextValueAtTimestamptz(temp *Temporal, t int64, strict bool) (bool, string) { + var _out_value *C.text + _cret := C.ttext_value_at_timestamptz(temp._inner, C.TimestampTz(t), C.bool(strict), &_out_value) + return bool(_cret), C.GoString(C.text_to_cstring(_out_value)) +} + + +// TtextValueN wraps MEOS C function ttext_value_n. +func TtextValueN(temp *Temporal, n int) (bool, string) { + var _out_result *C.text + _cret := C.ttext_value_n(temp._inner, C.int(n), &_out_result) + return bool(_cret), C.GoString(C.text_to_cstring(_out_result)) +} + + +// TtextValues wraps MEOS C function ttext_values. +func TtextValues(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.ttext_values(temp._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// FloatDegrees wraps MEOS C function float_degrees. +func FloatDegrees(value float64, normalize bool) float64 { + _cret := C.float_degrees(C.double(value), C.bool(normalize)) + return float64(_cret) +} + + +// TemparrRound wraps MEOS C function temparr_round. +func TemparrRound(temp unsafe.Pointer, count int, maxdd int) unsafe.Pointer { + _cret := C.temparr_round((**C.Temporal)(unsafe.Pointer(temp)), C.int(count), C.int(maxdd)) + return unsafe.Pointer(_cret) +} + + +// TemporalRound wraps MEOS C function temporal_round. +func TemporalRound(temp *Temporal, maxdd int) *Temporal { + _cret := C.temporal_round(temp._inner, C.int(maxdd)) + return &Temporal{_inner: _cret} +} + + +// TemporalScaleTime wraps MEOS C function temporal_scale_time. +func TemporalScaleTime(temp *Temporal, duration *Interval) *Temporal { + _cret := C.temporal_scale_time(temp._inner, duration._inner) + return &Temporal{_inner: _cret} +} + + +// TemporalSetInterp wraps MEOS C function temporal_set_interp. +func TemporalSetInterp(temp *Temporal, interp Interpolation) *Temporal { + _cret := C.temporal_set_interp(temp._inner, C.interpType(interp)) + return &Temporal{_inner: _cret} +} + + +// TemporalShiftScaleTime wraps MEOS C function temporal_shift_scale_time. +func TemporalShiftScaleTime(temp *Temporal, shift *Interval, duration *Interval) *Temporal { + _cret := C.temporal_shift_scale_time(temp._inner, shift._inner, duration._inner) + return &Temporal{_inner: _cret} +} + + +// TemporalShiftTime wraps MEOS C function temporal_shift_time. +func TemporalShiftTime(temp *Temporal, shift *Interval) *Temporal { + _cret := C.temporal_shift_time(temp._inner, shift._inner) + return &Temporal{_inner: _cret} +} + + +// TemporalToTinstant wraps MEOS C function temporal_to_tinstant. +func TemporalToTinstant(temp *Temporal) *TInstant { + _cret := C.temporal_to_tinstant(temp._inner) + return &TInstant{_inner: _cret} +} + + +// TemporalToTsequence wraps MEOS C function temporal_to_tsequence. +func TemporalToTsequence(temp *Temporal, interp Interpolation) *TSequence { + _cret := C.temporal_to_tsequence(temp._inner, C.interpType(interp)) + return &TSequence{_inner: _cret} +} + + +// TemporalToTsequenceset wraps MEOS C function temporal_to_tsequenceset. +func TemporalToTsequenceset(temp *Temporal, interp Interpolation) *TSequenceSet { + _cret := C.temporal_to_tsequenceset(temp._inner, C.interpType(interp)) + return &TSequenceSet{_inner: _cret} +} + + +// TfloatCeil wraps MEOS C function tfloat_ceil. +func TfloatCeil(temp *Temporal) *Temporal { + _cret := C.tfloat_ceil(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TfloatDegrees wraps MEOS C function tfloat_degrees. +func TfloatDegrees(temp *Temporal, normalize bool) *Temporal { + _cret := C.tfloat_degrees(temp._inner, C.bool(normalize)) + return &Temporal{_inner: _cret} +} + + +// TfloatFloor wraps MEOS C function tfloat_floor. +func TfloatFloor(temp *Temporal) *Temporal { + _cret := C.tfloat_floor(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TfloatRadians wraps MEOS C function tfloat_radians. +func TfloatRadians(temp *Temporal) *Temporal { + _cret := C.tfloat_radians(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TfloatScaleValue wraps MEOS C function tfloat_scale_value. +func TfloatScaleValue(temp *Temporal, width float64) *Temporal { + _cret := C.tfloat_scale_value(temp._inner, C.double(width)) + return &Temporal{_inner: _cret} +} + + +// TfloatShiftScaleValue wraps MEOS C function tfloat_shift_scale_value. +func TfloatShiftScaleValue(temp *Temporal, shift float64, width float64) *Temporal { + _cret := C.tfloat_shift_scale_value(temp._inner, C.double(shift), C.double(width)) + return &Temporal{_inner: _cret} +} + + +// TfloatShiftValue wraps MEOS C function tfloat_shift_value. +func TfloatShiftValue(temp *Temporal, shift float64) *Temporal { + _cret := C.tfloat_shift_value(temp._inner, C.double(shift)) + return &Temporal{_inner: _cret} +} + + +// TintScaleValue wraps MEOS C function tint_scale_value. +func TintScaleValue(temp *Temporal, width int) *Temporal { + _cret := C.tint_scale_value(temp._inner, C.int(width)) + return &Temporal{_inner: _cret} +} + + +// TbigintScaleValue wraps MEOS C function tbigint_scale_value. +func TbigintScaleValue(temp *Temporal, width int64) *Temporal { + _cret := C.tbigint_scale_value(temp._inner, C.int64_t(width)) + return &Temporal{_inner: _cret} +} + + +// TintShiftScaleValue wraps MEOS C function tint_shift_scale_value. +func TintShiftScaleValue(temp *Temporal, shift int, width int) *Temporal { + _cret := C.tint_shift_scale_value(temp._inner, C.int(shift), C.int(width)) + return &Temporal{_inner: _cret} +} + + +// TbigintShiftScaleValue wraps MEOS C function tbigint_shift_scale_value. +func TbigintShiftScaleValue(temp *Temporal, shift int64, width int64) *Temporal { + _cret := C.tbigint_shift_scale_value(temp._inner, C.int64_t(shift), C.int64_t(width)) + return &Temporal{_inner: _cret} +} + + +// TintShiftValue wraps MEOS C function tint_shift_value. +func TintShiftValue(temp *Temporal, shift int) *Temporal { + _cret := C.tint_shift_value(temp._inner, C.int(shift)) + return &Temporal{_inner: _cret} +} + + +// TbigintShiftValue wraps MEOS C function tbigint_shift_value. +func TbigintShiftValue(temp *Temporal, shift int64) *Temporal { + _cret := C.tbigint_shift_value(temp._inner, C.int64_t(shift)) + return &Temporal{_inner: _cret} +} + + +// TemporalAppendTinstant wraps MEOS C function temporal_append_tinstant. +func TemporalAppendTinstant(temp *Temporal, inst *TInstant, interp Interpolation, maxdist float64, maxt *Interval, expand bool) *Temporal { + _cret := C.temporal_append_tinstant(temp._inner, inst._inner, C.interpType(interp), C.double(maxdist), maxt._inner, C.bool(expand)) + return &Temporal{_inner: _cret} +} + + +// TemporalAppendTsequence wraps MEOS C function temporal_append_tsequence. +func TemporalAppendTsequence(temp *Temporal, seq *TSequence, expand bool) *Temporal { + _cret := C.temporal_append_tsequence(temp._inner, seq._inner, C.bool(expand)) + return &Temporal{_inner: _cret} +} + + +// TemporalDeleteTimestamptz wraps MEOS C function temporal_delete_timestamptz. +func TemporalDeleteTimestamptz(temp *Temporal, t int64, connect bool) *Temporal { + _cret := C.temporal_delete_timestamptz(temp._inner, C.TimestampTz(t), C.bool(connect)) + return &Temporal{_inner: _cret} +} + + +// TemporalDeleteTstzset wraps MEOS C function temporal_delete_tstzset. +func TemporalDeleteTstzset(temp *Temporal, s *Set, connect bool) *Temporal { + _cret := C.temporal_delete_tstzset(temp._inner, s._inner, C.bool(connect)) + return &Temporal{_inner: _cret} +} + + +// TemporalDeleteTstzspan wraps MEOS C function temporal_delete_tstzspan. +func TemporalDeleteTstzspan(temp *Temporal, s *Span, connect bool) *Temporal { + _cret := C.temporal_delete_tstzspan(temp._inner, s._inner, C.bool(connect)) + return &Temporal{_inner: _cret} +} + + +// TemporalDeleteTstzspanset wraps MEOS C function temporal_delete_tstzspanset. +func TemporalDeleteTstzspanset(temp *Temporal, ss *SpanSet, connect bool) *Temporal { + _cret := C.temporal_delete_tstzspanset(temp._inner, ss._inner, C.bool(connect)) + return &Temporal{_inner: _cret} +} + + +// TemporalInsert wraps MEOS C function temporal_insert. +func TemporalInsert(temp1 *Temporal, temp2 *Temporal, connect bool) *Temporal { + _cret := C.temporal_insert(temp1._inner, temp2._inner, C.bool(connect)) + return &Temporal{_inner: _cret} +} + + +// TemporalMerge wraps MEOS C function temporal_merge. +func TemporalMerge(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.temporal_merge(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// TemporalMergeArray wraps MEOS C function temporal_merge_array. +func TemporalMergeArray(temparr unsafe.Pointer, count int) *Temporal { + _cret := C.temporal_merge_array((**C.Temporal)(unsafe.Pointer(temparr)), C.int(count)) + return &Temporal{_inner: _cret} +} + + +// TemporalUpdate wraps MEOS C function temporal_update. +func TemporalUpdate(temp1 *Temporal, temp2 *Temporal, connect bool) *Temporal { + _cret := C.temporal_update(temp1._inner, temp2._inner, C.bool(connect)) + return &Temporal{_inner: _cret} +} + + +// TboolAtValue wraps MEOS C function tbool_at_value. +func TboolAtValue(temp *Temporal, b bool) *Temporal { + _cret := C.tbool_at_value(temp._inner, C.bool(b)) + return &Temporal{_inner: _cret} +} + + +// TboolMinusValue wraps MEOS C function tbool_minus_value. +func TboolMinusValue(temp *Temporal, b bool) *Temporal { + _cret := C.tbool_minus_value(temp._inner, C.bool(b)) + return &Temporal{_inner: _cret} +} + + +// TemporalAfterTimestamptz wraps MEOS C function temporal_after_timestamptz. +func TemporalAfterTimestamptz(temp *Temporal, t int64, strict bool) *Temporal { + _cret := C.temporal_after_timestamptz(temp._inner, C.TimestampTz(t), C.bool(strict)) + return &Temporal{_inner: _cret} +} + + +// TemporalAtMax wraps MEOS C function temporal_at_max. +func TemporalAtMax(temp *Temporal) *Temporal { + _cret := C.temporal_at_max(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TemporalAtMin wraps MEOS C function temporal_at_min. +func TemporalAtMin(temp *Temporal) *Temporal { + _cret := C.temporal_at_min(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TemporalAtTimestamptz wraps MEOS C function temporal_at_timestamptz. +func TemporalAtTimestamptz(temp *Temporal, t int64) *Temporal { + _cret := C.temporal_at_timestamptz(temp._inner, C.TimestampTz(t)) + return &Temporal{_inner: _cret} +} + + +// TemporalAtTstzset wraps MEOS C function temporal_at_tstzset. +func TemporalAtTstzset(temp *Temporal, s *Set) *Temporal { + _cret := C.temporal_at_tstzset(temp._inner, s._inner) + return &Temporal{_inner: _cret} +} + + +// TemporalAtTstzspan wraps MEOS C function temporal_at_tstzspan. +func TemporalAtTstzspan(temp *Temporal, s *Span) *Temporal { + _cret := C.temporal_at_tstzspan(temp._inner, s._inner) + return &Temporal{_inner: _cret} +} + + +// TemporalAtTstzspanset wraps MEOS C function temporal_at_tstzspanset. +func TemporalAtTstzspanset(temp *Temporal, ss *SpanSet) *Temporal { + _cret := C.temporal_at_tstzspanset(temp._inner, ss._inner) + return &Temporal{_inner: _cret} +} + + +// TemporalAtValues wraps MEOS C function temporal_at_values. +func TemporalAtValues(temp *Temporal, set *Set) *Temporal { + _cret := C.temporal_at_values(temp._inner, set._inner) + return &Temporal{_inner: _cret} +} + + +// TemporalBeforeTimestamptz wraps MEOS C function temporal_before_timestamptz. +func TemporalBeforeTimestamptz(temp *Temporal, t int64, strict bool) *Temporal { + _cret := C.temporal_before_timestamptz(temp._inner, C.TimestampTz(t), C.bool(strict)) + return &Temporal{_inner: _cret} +} + + +// TemporalMinusMax wraps MEOS C function temporal_minus_max. +func TemporalMinusMax(temp *Temporal) *Temporal { + _cret := C.temporal_minus_max(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TemporalMinusMin wraps MEOS C function temporal_minus_min. +func TemporalMinusMin(temp *Temporal) *Temporal { + _cret := C.temporal_minus_min(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TemporalMinusTimestamptz wraps MEOS C function temporal_minus_timestamptz. +func TemporalMinusTimestamptz(temp *Temporal, t int64) *Temporal { + _cret := C.temporal_minus_timestamptz(temp._inner, C.TimestampTz(t)) + return &Temporal{_inner: _cret} +} + + +// TemporalMinusTstzset wraps MEOS C function temporal_minus_tstzset. +func TemporalMinusTstzset(temp *Temporal, s *Set) *Temporal { + _cret := C.temporal_minus_tstzset(temp._inner, s._inner) + return &Temporal{_inner: _cret} +} + + +// TemporalMinusTstzspan wraps MEOS C function temporal_minus_tstzspan. +func TemporalMinusTstzspan(temp *Temporal, s *Span) *Temporal { + _cret := C.temporal_minus_tstzspan(temp._inner, s._inner) + return &Temporal{_inner: _cret} +} + + +// TemporalMinusTstzspanset wraps MEOS C function temporal_minus_tstzspanset. +func TemporalMinusTstzspanset(temp *Temporal, ss *SpanSet) *Temporal { + _cret := C.temporal_minus_tstzspanset(temp._inner, ss._inner) + return &Temporal{_inner: _cret} +} + + +// TemporalMinusValues wraps MEOS C function temporal_minus_values. +func TemporalMinusValues(temp *Temporal, set *Set) *Temporal { + _cret := C.temporal_minus_values(temp._inner, set._inner) + return &Temporal{_inner: _cret} +} + + +// TfloatAtValue wraps MEOS C function tfloat_at_value. +func TfloatAtValue(temp *Temporal, d float64) *Temporal { + _cret := C.tfloat_at_value(temp._inner, C.double(d)) + return &Temporal{_inner: _cret} +} + + +// TfloatMinusValue wraps MEOS C function tfloat_minus_value. +func TfloatMinusValue(temp *Temporal, d float64) *Temporal { + _cret := C.tfloat_minus_value(temp._inner, C.double(d)) + return &Temporal{_inner: _cret} +} + + +// TintAtValue wraps MEOS C function tint_at_value. +func TintAtValue(temp *Temporal, i int) *Temporal { + _cret := C.tint_at_value(temp._inner, C.int(i)) + return &Temporal{_inner: _cret} +} + + +// TintMinusValue wraps MEOS C function tint_minus_value. +func TintMinusValue(temp *Temporal, i int) *Temporal { + _cret := C.tint_minus_value(temp._inner, C.int(i)) + return &Temporal{_inner: _cret} +} + + +// TnumberAtSpan wraps MEOS C function tnumber_at_span. +func TnumberAtSpan(temp *Temporal, span *Span) *Temporal { + _cret := C.tnumber_at_span(temp._inner, span._inner) + return &Temporal{_inner: _cret} +} + + +// TnumberAtSpanset wraps MEOS C function tnumber_at_spanset. +func TnumberAtSpanset(temp *Temporal, ss *SpanSet) *Temporal { + _cret := C.tnumber_at_spanset(temp._inner, ss._inner) + return &Temporal{_inner: _cret} +} + + +// TnumberAtTBOX wraps MEOS C function tnumber_at_tbox. +func TnumberAtTBOX(temp *Temporal, box *TBox) *Temporal { + _cret := C.tnumber_at_tbox(temp._inner, box._inner) + return &Temporal{_inner: _cret} +} + + +// TnumberMinusSpan wraps MEOS C function tnumber_minus_span. +func TnumberMinusSpan(temp *Temporal, span *Span) *Temporal { + _cret := C.tnumber_minus_span(temp._inner, span._inner) + return &Temporal{_inner: _cret} +} + + +// TnumberMinusSpanset wraps MEOS C function tnumber_minus_spanset. +func TnumberMinusSpanset(temp *Temporal, ss *SpanSet) *Temporal { + _cret := C.tnumber_minus_spanset(temp._inner, ss._inner) + return &Temporal{_inner: _cret} +} + + +// TnumberMinusTBOX wraps MEOS C function tnumber_minus_tbox. +func TnumberMinusTBOX(temp *Temporal, box *TBox) *Temporal { + _cret := C.tnumber_minus_tbox(temp._inner, box._inner) + return &Temporal{_inner: _cret} +} + + +// TtextAtValue wraps MEOS C function ttext_at_value. +func TtextAtValue(temp *Temporal, txt string) *Temporal { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.ttext_at_value(temp._inner, _c_txt) + return &Temporal{_inner: _cret} +} + + +// TtextMinusValue wraps MEOS C function ttext_minus_value. +func TtextMinusValue(temp *Temporal, txt string) *Temporal { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.ttext_minus_value(temp._inner, _c_txt) + return &Temporal{_inner: _cret} +} + + +// TemporalCmp wraps MEOS C function temporal_cmp. +func TemporalCmp(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.temporal_cmp(temp1._inner, temp2._inner) + return int(_cret) +} + + +// TemporalEq wraps MEOS C function temporal_eq. +func TemporalEq(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.temporal_eq(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// TemporalGe wraps MEOS C function temporal_ge. +func TemporalGe(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.temporal_ge(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// TemporalGt wraps MEOS C function temporal_gt. +func TemporalGt(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.temporal_gt(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// TemporalLe wraps MEOS C function temporal_le. +func TemporalLe(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.temporal_le(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// TemporalLt wraps MEOS C function temporal_lt. +func TemporalLt(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.temporal_lt(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// TemporalNe wraps MEOS C function temporal_ne. +func TemporalNe(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.temporal_ne(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// AlwaysEqBoolTbool wraps MEOS C function always_eq_bool_tbool. +func AlwaysEqBoolTbool(b bool, temp *Temporal) int { + _cret := C.always_eq_bool_tbool(C.bool(b), temp._inner) + return int(_cret) +} + + +// AlwaysEqFloatTfloat wraps MEOS C function always_eq_float_tfloat. +func AlwaysEqFloatTfloat(d float64, temp *Temporal) int { + _cret := C.always_eq_float_tfloat(C.double(d), temp._inner) + return int(_cret) +} + + +// AlwaysEqIntTint wraps MEOS C function always_eq_int_tint. +func AlwaysEqIntTint(i int, temp *Temporal) int { + _cret := C.always_eq_int_tint(C.int(i), temp._inner) + return int(_cret) +} + + +// AlwaysEqTboolBool wraps MEOS C function always_eq_tbool_bool. +func AlwaysEqTboolBool(temp *Temporal, b bool) int { + _cret := C.always_eq_tbool_bool(temp._inner, C.bool(b)) + return int(_cret) +} + + +// AlwaysEqTemporalTemporal wraps MEOS C function always_eq_temporal_temporal. +func AlwaysEqTemporalTemporal(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.always_eq_temporal_temporal(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AlwaysEqTextTtext wraps MEOS C function always_eq_text_ttext. +func AlwaysEqTextTtext(txt string, temp *Temporal) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.always_eq_text_ttext(_c_txt, temp._inner) + return int(_cret) +} + + +// AlwaysEqTfloatFloat wraps MEOS C function always_eq_tfloat_float. +func AlwaysEqTfloatFloat(temp *Temporal, d float64) int { + _cret := C.always_eq_tfloat_float(temp._inner, C.double(d)) + return int(_cret) +} + + +// AlwaysEqTintInt wraps MEOS C function always_eq_tint_int. +func AlwaysEqTintInt(temp *Temporal, i int) int { + _cret := C.always_eq_tint_int(temp._inner, C.int(i)) + return int(_cret) +} + + +// AlwaysEqBigintTbigint wraps MEOS C function always_eq_bigint_tbigint. +func AlwaysEqBigintTbigint(i int64, temp *Temporal) int { + _cret := C.always_eq_bigint_tbigint(C.int64_t(i), temp._inner) + return int(_cret) +} + + +// AlwaysEqTbigintBigint wraps MEOS C function always_eq_tbigint_bigint. +func AlwaysEqTbigintBigint(temp *Temporal, i int64) int { + _cret := C.always_eq_tbigint_bigint(temp._inner, C.int64_t(i)) + return int(_cret) +} + + +// AlwaysEqTtextText wraps MEOS C function always_eq_ttext_text. +func AlwaysEqTtextText(temp *Temporal, txt string) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.always_eq_ttext_text(temp._inner, _c_txt) + return int(_cret) +} + + +// AlwaysGeFloatTfloat wraps MEOS C function always_ge_float_tfloat. +func AlwaysGeFloatTfloat(d float64, temp *Temporal) int { + _cret := C.always_ge_float_tfloat(C.double(d), temp._inner) + return int(_cret) +} + + +// AlwaysGeIntTint wraps MEOS C function always_ge_int_tint. +func AlwaysGeIntTint(i int, temp *Temporal) int { + _cret := C.always_ge_int_tint(C.int(i), temp._inner) + return int(_cret) +} + + +// AlwaysGeTemporalTemporal wraps MEOS C function always_ge_temporal_temporal. +func AlwaysGeTemporalTemporal(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.always_ge_temporal_temporal(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AlwaysGeTextTtext wraps MEOS C function always_ge_text_ttext. +func AlwaysGeTextTtext(txt string, temp *Temporal) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.always_ge_text_ttext(_c_txt, temp._inner) + return int(_cret) +} + + +// AlwaysGeTfloatFloat wraps MEOS C function always_ge_tfloat_float. +func AlwaysGeTfloatFloat(temp *Temporal, d float64) int { + _cret := C.always_ge_tfloat_float(temp._inner, C.double(d)) + return int(_cret) +} + + +// AlwaysGeTintInt wraps MEOS C function always_ge_tint_int. +func AlwaysGeTintInt(temp *Temporal, i int) int { + _cret := C.always_ge_tint_int(temp._inner, C.int(i)) + return int(_cret) +} + + +// AlwaysGeBigintTbigint wraps MEOS C function always_ge_bigint_tbigint. +func AlwaysGeBigintTbigint(i int64, temp *Temporal) int { + _cret := C.always_ge_bigint_tbigint(C.int64_t(i), temp._inner) + return int(_cret) +} + + +// AlwaysGeTbigintBigint wraps MEOS C function always_ge_tbigint_bigint. +func AlwaysGeTbigintBigint(temp *Temporal, i int64) int { + _cret := C.always_ge_tbigint_bigint(temp._inner, C.int64_t(i)) + return int(_cret) +} + + +// AlwaysGeTtextText wraps MEOS C function always_ge_ttext_text. +func AlwaysGeTtextText(temp *Temporal, txt string) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.always_ge_ttext_text(temp._inner, _c_txt) + return int(_cret) +} + + +// AlwaysGtFloatTfloat wraps MEOS C function always_gt_float_tfloat. +func AlwaysGtFloatTfloat(d float64, temp *Temporal) int { + _cret := C.always_gt_float_tfloat(C.double(d), temp._inner) + return int(_cret) +} + + +// AlwaysGtIntTint wraps MEOS C function always_gt_int_tint. +func AlwaysGtIntTint(i int, temp *Temporal) int { + _cret := C.always_gt_int_tint(C.int(i), temp._inner) + return int(_cret) +} + + +// AlwaysGtTemporalTemporal wraps MEOS C function always_gt_temporal_temporal. +func AlwaysGtTemporalTemporal(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.always_gt_temporal_temporal(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AlwaysGtTextTtext wraps MEOS C function always_gt_text_ttext. +func AlwaysGtTextTtext(txt string, temp *Temporal) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.always_gt_text_ttext(_c_txt, temp._inner) + return int(_cret) +} + + +// AlwaysGtTfloatFloat wraps MEOS C function always_gt_tfloat_float. +func AlwaysGtTfloatFloat(temp *Temporal, d float64) int { + _cret := C.always_gt_tfloat_float(temp._inner, C.double(d)) + return int(_cret) +} + + +// AlwaysGtTintInt wraps MEOS C function always_gt_tint_int. +func AlwaysGtTintInt(temp *Temporal, i int) int { + _cret := C.always_gt_tint_int(temp._inner, C.int(i)) + return int(_cret) +} + + +// AlwaysGtBigintTbigint wraps MEOS C function always_gt_bigint_tbigint. +func AlwaysGtBigintTbigint(i int64, temp *Temporal) int { + _cret := C.always_gt_bigint_tbigint(C.int64_t(i), temp._inner) + return int(_cret) +} + + +// AlwaysGtTbigintBigint wraps MEOS C function always_gt_tbigint_bigint. +func AlwaysGtTbigintBigint(temp *Temporal, i int64) int { + _cret := C.always_gt_tbigint_bigint(temp._inner, C.int64_t(i)) + return int(_cret) +} + + +// AlwaysGtTtextText wraps MEOS C function always_gt_ttext_text. +func AlwaysGtTtextText(temp *Temporal, txt string) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.always_gt_ttext_text(temp._inner, _c_txt) + return int(_cret) +} + + +// AlwaysLeFloatTfloat wraps MEOS C function always_le_float_tfloat. +func AlwaysLeFloatTfloat(d float64, temp *Temporal) int { + _cret := C.always_le_float_tfloat(C.double(d), temp._inner) + return int(_cret) +} + + +// AlwaysLeIntTint wraps MEOS C function always_le_int_tint. +func AlwaysLeIntTint(i int, temp *Temporal) int { + _cret := C.always_le_int_tint(C.int(i), temp._inner) + return int(_cret) +} + + +// AlwaysLeTemporalTemporal wraps MEOS C function always_le_temporal_temporal. +func AlwaysLeTemporalTemporal(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.always_le_temporal_temporal(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AlwaysLeTextTtext wraps MEOS C function always_le_text_ttext. +func AlwaysLeTextTtext(txt string, temp *Temporal) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.always_le_text_ttext(_c_txt, temp._inner) + return int(_cret) +} + + +// AlwaysLeTfloatFloat wraps MEOS C function always_le_tfloat_float. +func AlwaysLeTfloatFloat(temp *Temporal, d float64) int { + _cret := C.always_le_tfloat_float(temp._inner, C.double(d)) + return int(_cret) +} + + +// AlwaysLeTintInt wraps MEOS C function always_le_tint_int. +func AlwaysLeTintInt(temp *Temporal, i int) int { + _cret := C.always_le_tint_int(temp._inner, C.int(i)) + return int(_cret) +} + + +// AlwaysLeBigintTbigint wraps MEOS C function always_le_bigint_tbigint. +func AlwaysLeBigintTbigint(i int64, temp *Temporal) int { + _cret := C.always_le_bigint_tbigint(C.int64_t(i), temp._inner) + return int(_cret) +} + + +// AlwaysLeTbigintBigint wraps MEOS C function always_le_tbigint_bigint. +func AlwaysLeTbigintBigint(temp *Temporal, i int64) int { + _cret := C.always_le_tbigint_bigint(temp._inner, C.int64_t(i)) + return int(_cret) +} + + +// AlwaysLeTtextText wraps MEOS C function always_le_ttext_text. +func AlwaysLeTtextText(temp *Temporal, txt string) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.always_le_ttext_text(temp._inner, _c_txt) + return int(_cret) +} + + +// AlwaysLtFloatTfloat wraps MEOS C function always_lt_float_tfloat. +func AlwaysLtFloatTfloat(d float64, temp *Temporal) int { + _cret := C.always_lt_float_tfloat(C.double(d), temp._inner) + return int(_cret) +} + + +// AlwaysLtIntTint wraps MEOS C function always_lt_int_tint. +func AlwaysLtIntTint(i int, temp *Temporal) int { + _cret := C.always_lt_int_tint(C.int(i), temp._inner) + return int(_cret) +} + + +// AlwaysLtTemporalTemporal wraps MEOS C function always_lt_temporal_temporal. +func AlwaysLtTemporalTemporal(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.always_lt_temporal_temporal(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AlwaysLtTextTtext wraps MEOS C function always_lt_text_ttext. +func AlwaysLtTextTtext(txt string, temp *Temporal) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.always_lt_text_ttext(_c_txt, temp._inner) + return int(_cret) +} + + +// AlwaysLtTfloatFloat wraps MEOS C function always_lt_tfloat_float. +func AlwaysLtTfloatFloat(temp *Temporal, d float64) int { + _cret := C.always_lt_tfloat_float(temp._inner, C.double(d)) + return int(_cret) +} + + +// AlwaysLtTintInt wraps MEOS C function always_lt_tint_int. +func AlwaysLtTintInt(temp *Temporal, i int) int { + _cret := C.always_lt_tint_int(temp._inner, C.int(i)) + return int(_cret) +} + + +// AlwaysLtBigintTbigint wraps MEOS C function always_lt_bigint_tbigint. +func AlwaysLtBigintTbigint(i int64, temp *Temporal) int { + _cret := C.always_lt_bigint_tbigint(C.int64_t(i), temp._inner) + return int(_cret) +} + + +// AlwaysLtTbigintBigint wraps MEOS C function always_lt_tbigint_bigint. +func AlwaysLtTbigintBigint(temp *Temporal, i int64) int { + _cret := C.always_lt_tbigint_bigint(temp._inner, C.int64_t(i)) + return int(_cret) +} + + +// AlwaysLtTtextText wraps MEOS C function always_lt_ttext_text. +func AlwaysLtTtextText(temp *Temporal, txt string) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.always_lt_ttext_text(temp._inner, _c_txt) + return int(_cret) +} + + +// AlwaysNeBoolTbool wraps MEOS C function always_ne_bool_tbool. +func AlwaysNeBoolTbool(b bool, temp *Temporal) int { + _cret := C.always_ne_bool_tbool(C.bool(b), temp._inner) + return int(_cret) +} + + +// AlwaysNeFloatTfloat wraps MEOS C function always_ne_float_tfloat. +func AlwaysNeFloatTfloat(d float64, temp *Temporal) int { + _cret := C.always_ne_float_tfloat(C.double(d), temp._inner) + return int(_cret) +} + + +// AlwaysNeIntTint wraps MEOS C function always_ne_int_tint. +func AlwaysNeIntTint(i int, temp *Temporal) int { + _cret := C.always_ne_int_tint(C.int(i), temp._inner) + return int(_cret) +} + + +// AlwaysNeTboolBool wraps MEOS C function always_ne_tbool_bool. +func AlwaysNeTboolBool(temp *Temporal, b bool) int { + _cret := C.always_ne_tbool_bool(temp._inner, C.bool(b)) + return int(_cret) +} + + +// AlwaysNeTemporalTemporal wraps MEOS C function always_ne_temporal_temporal. +func AlwaysNeTemporalTemporal(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.always_ne_temporal_temporal(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AlwaysNeTextTtext wraps MEOS C function always_ne_text_ttext. +func AlwaysNeTextTtext(txt string, temp *Temporal) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.always_ne_text_ttext(_c_txt, temp._inner) + return int(_cret) +} + + +// AlwaysNeTfloatFloat wraps MEOS C function always_ne_tfloat_float. +func AlwaysNeTfloatFloat(temp *Temporal, d float64) int { + _cret := C.always_ne_tfloat_float(temp._inner, C.double(d)) + return int(_cret) +} + + +// AlwaysNeTintInt wraps MEOS C function always_ne_tint_int. +func AlwaysNeTintInt(temp *Temporal, i int) int { + _cret := C.always_ne_tint_int(temp._inner, C.int(i)) + return int(_cret) +} + + +// AlwaysNeBigintTbigint wraps MEOS C function always_ne_bigint_tbigint. +func AlwaysNeBigintTbigint(i int64, temp *Temporal) int { + _cret := C.always_ne_bigint_tbigint(C.int64_t(i), temp._inner) + return int(_cret) +} + + +// AlwaysNeTbigintBigint wraps MEOS C function always_ne_tbigint_bigint. +func AlwaysNeTbigintBigint(temp *Temporal, i int64) int { + _cret := C.always_ne_tbigint_bigint(temp._inner, C.int64_t(i)) + return int(_cret) +} + + +// AlwaysNeTtextText wraps MEOS C function always_ne_ttext_text. +func AlwaysNeTtextText(temp *Temporal, txt string) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.always_ne_ttext_text(temp._inner, _c_txt) + return int(_cret) +} + + +// EverEqBoolTbool wraps MEOS C function ever_eq_bool_tbool. +func EverEqBoolTbool(b bool, temp *Temporal) int { + _cret := C.ever_eq_bool_tbool(C.bool(b), temp._inner) + return int(_cret) +} + + +// EverEqFloatTfloat wraps MEOS C function ever_eq_float_tfloat. +func EverEqFloatTfloat(d float64, temp *Temporal) int { + _cret := C.ever_eq_float_tfloat(C.double(d), temp._inner) + return int(_cret) +} + + +// EverEqIntTint wraps MEOS C function ever_eq_int_tint. +func EverEqIntTint(i int, temp *Temporal) int { + _cret := C.ever_eq_int_tint(C.int(i), temp._inner) + return int(_cret) +} + + +// EverEqTboolBool wraps MEOS C function ever_eq_tbool_bool. +func EverEqTboolBool(temp *Temporal, b bool) int { + _cret := C.ever_eq_tbool_bool(temp._inner, C.bool(b)) + return int(_cret) +} + + +// EverEqTemporalTemporal wraps MEOS C function ever_eq_temporal_temporal. +func EverEqTemporalTemporal(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ever_eq_temporal_temporal(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EverEqTextTtext wraps MEOS C function ever_eq_text_ttext. +func EverEqTextTtext(txt string, temp *Temporal) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.ever_eq_text_ttext(_c_txt, temp._inner) + return int(_cret) +} + + +// EverEqTfloatFloat wraps MEOS C function ever_eq_tfloat_float. +func EverEqTfloatFloat(temp *Temporal, d float64) int { + _cret := C.ever_eq_tfloat_float(temp._inner, C.double(d)) + return int(_cret) +} + + +// EverEqTintInt wraps MEOS C function ever_eq_tint_int. +func EverEqTintInt(temp *Temporal, i int) int { + _cret := C.ever_eq_tint_int(temp._inner, C.int(i)) + return int(_cret) +} + + +// EverEqBigintTbigint wraps MEOS C function ever_eq_bigint_tbigint. +func EverEqBigintTbigint(i int64, temp *Temporal) int { + _cret := C.ever_eq_bigint_tbigint(C.int64_t(i), temp._inner) + return int(_cret) +} + + +// EverEqTbigintBigint wraps MEOS C function ever_eq_tbigint_bigint. +func EverEqTbigintBigint(temp *Temporal, i int64) int { + _cret := C.ever_eq_tbigint_bigint(temp._inner, C.int64_t(i)) + return int(_cret) +} + + +// EverEqTtextText wraps MEOS C function ever_eq_ttext_text. +func EverEqTtextText(temp *Temporal, txt string) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.ever_eq_ttext_text(temp._inner, _c_txt) + return int(_cret) +} + + +// EverGeFloatTfloat wraps MEOS C function ever_ge_float_tfloat. +func EverGeFloatTfloat(d float64, temp *Temporal) int { + _cret := C.ever_ge_float_tfloat(C.double(d), temp._inner) + return int(_cret) +} + + +// EverGeIntTint wraps MEOS C function ever_ge_int_tint. +func EverGeIntTint(i int, temp *Temporal) int { + _cret := C.ever_ge_int_tint(C.int(i), temp._inner) + return int(_cret) +} + + +// EverGeTemporalTemporal wraps MEOS C function ever_ge_temporal_temporal. +func EverGeTemporalTemporal(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ever_ge_temporal_temporal(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EverGeTextTtext wraps MEOS C function ever_ge_text_ttext. +func EverGeTextTtext(txt string, temp *Temporal) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.ever_ge_text_ttext(_c_txt, temp._inner) + return int(_cret) +} + + +// EverGeTfloatFloat wraps MEOS C function ever_ge_tfloat_float. +func EverGeTfloatFloat(temp *Temporal, d float64) int { + _cret := C.ever_ge_tfloat_float(temp._inner, C.double(d)) + return int(_cret) +} + + +// EverGeTintInt wraps MEOS C function ever_ge_tint_int. +func EverGeTintInt(temp *Temporal, i int) int { + _cret := C.ever_ge_tint_int(temp._inner, C.int(i)) + return int(_cret) +} + + +// EverGeBigintTbigint wraps MEOS C function ever_ge_bigint_tbigint. +func EverGeBigintTbigint(i int64, temp *Temporal) int { + _cret := C.ever_ge_bigint_tbigint(C.int64_t(i), temp._inner) + return int(_cret) +} + + +// EverGeTbigintBigint wraps MEOS C function ever_ge_tbigint_bigint. +func EverGeTbigintBigint(temp *Temporal, i int64) int { + _cret := C.ever_ge_tbigint_bigint(temp._inner, C.int64_t(i)) + return int(_cret) +} + + +// EverGeTtextText wraps MEOS C function ever_ge_ttext_text. +func EverGeTtextText(temp *Temporal, txt string) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.ever_ge_ttext_text(temp._inner, _c_txt) + return int(_cret) +} + + +// EverGtFloatTfloat wraps MEOS C function ever_gt_float_tfloat. +func EverGtFloatTfloat(d float64, temp *Temporal) int { + _cret := C.ever_gt_float_tfloat(C.double(d), temp._inner) + return int(_cret) +} + + +// EverGtIntTint wraps MEOS C function ever_gt_int_tint. +func EverGtIntTint(i int, temp *Temporal) int { + _cret := C.ever_gt_int_tint(C.int(i), temp._inner) + return int(_cret) +} + + +// EverGtTemporalTemporal wraps MEOS C function ever_gt_temporal_temporal. +func EverGtTemporalTemporal(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ever_gt_temporal_temporal(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EverGtTextTtext wraps MEOS C function ever_gt_text_ttext. +func EverGtTextTtext(txt string, temp *Temporal) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.ever_gt_text_ttext(_c_txt, temp._inner) + return int(_cret) +} + + +// EverGtTfloatFloat wraps MEOS C function ever_gt_tfloat_float. +func EverGtTfloatFloat(temp *Temporal, d float64) int { + _cret := C.ever_gt_tfloat_float(temp._inner, C.double(d)) + return int(_cret) +} + + +// EverGtTintInt wraps MEOS C function ever_gt_tint_int. +func EverGtTintInt(temp *Temporal, i int) int { + _cret := C.ever_gt_tint_int(temp._inner, C.int(i)) + return int(_cret) +} + + +// EverGtBigintTbigint wraps MEOS C function ever_gt_bigint_tbigint. +func EverGtBigintTbigint(i int64, temp *Temporal) int { + _cret := C.ever_gt_bigint_tbigint(C.int64_t(i), temp._inner) + return int(_cret) +} + + +// EverGtTbigintBigint wraps MEOS C function ever_gt_tbigint_bigint. +func EverGtTbigintBigint(temp *Temporal, i int64) int { + _cret := C.ever_gt_tbigint_bigint(temp._inner, C.int64_t(i)) + return int(_cret) +} + + +// EverGtTtextText wraps MEOS C function ever_gt_ttext_text. +func EverGtTtextText(temp *Temporal, txt string) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.ever_gt_ttext_text(temp._inner, _c_txt) + return int(_cret) +} + + +// EverLeFloatTfloat wraps MEOS C function ever_le_float_tfloat. +func EverLeFloatTfloat(d float64, temp *Temporal) int { + _cret := C.ever_le_float_tfloat(C.double(d), temp._inner) + return int(_cret) +} + + +// EverLeIntTint wraps MEOS C function ever_le_int_tint. +func EverLeIntTint(i int, temp *Temporal) int { + _cret := C.ever_le_int_tint(C.int(i), temp._inner) + return int(_cret) +} + + +// EverLeTemporalTemporal wraps MEOS C function ever_le_temporal_temporal. +func EverLeTemporalTemporal(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ever_le_temporal_temporal(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EverLeTextTtext wraps MEOS C function ever_le_text_ttext. +func EverLeTextTtext(txt string, temp *Temporal) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.ever_le_text_ttext(_c_txt, temp._inner) + return int(_cret) +} + + +// EverLeTfloatFloat wraps MEOS C function ever_le_tfloat_float. +func EverLeTfloatFloat(temp *Temporal, d float64) int { + _cret := C.ever_le_tfloat_float(temp._inner, C.double(d)) + return int(_cret) +} + + +// EverLeTintInt wraps MEOS C function ever_le_tint_int. +func EverLeTintInt(temp *Temporal, i int) int { + _cret := C.ever_le_tint_int(temp._inner, C.int(i)) + return int(_cret) +} + + +// EverLeBigintTbigint wraps MEOS C function ever_le_bigint_tbigint. +func EverLeBigintTbigint(i int64, temp *Temporal) int { + _cret := C.ever_le_bigint_tbigint(C.int64_t(i), temp._inner) + return int(_cret) +} + + +// EverLeTbigintBigint wraps MEOS C function ever_le_tbigint_bigint. +func EverLeTbigintBigint(temp *Temporal, i int64) int { + _cret := C.ever_le_tbigint_bigint(temp._inner, C.int64_t(i)) + return int(_cret) +} + + +// EverLeTtextText wraps MEOS C function ever_le_ttext_text. +func EverLeTtextText(temp *Temporal, txt string) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.ever_le_ttext_text(temp._inner, _c_txt) + return int(_cret) +} + + +// EverLtFloatTfloat wraps MEOS C function ever_lt_float_tfloat. +func EverLtFloatTfloat(d float64, temp *Temporal) int { + _cret := C.ever_lt_float_tfloat(C.double(d), temp._inner) + return int(_cret) +} + + +// EverLtIntTint wraps MEOS C function ever_lt_int_tint. +func EverLtIntTint(i int, temp *Temporal) int { + _cret := C.ever_lt_int_tint(C.int(i), temp._inner) + return int(_cret) +} + + +// EverLtTemporalTemporal wraps MEOS C function ever_lt_temporal_temporal. +func EverLtTemporalTemporal(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ever_lt_temporal_temporal(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EverLtTextTtext wraps MEOS C function ever_lt_text_ttext. +func EverLtTextTtext(txt string, temp *Temporal) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.ever_lt_text_ttext(_c_txt, temp._inner) + return int(_cret) +} + + +// EverLtTfloatFloat wraps MEOS C function ever_lt_tfloat_float. +func EverLtTfloatFloat(temp *Temporal, d float64) int { + _cret := C.ever_lt_tfloat_float(temp._inner, C.double(d)) + return int(_cret) +} + + +// EverLtTintInt wraps MEOS C function ever_lt_tint_int. +func EverLtTintInt(temp *Temporal, i int) int { + _cret := C.ever_lt_tint_int(temp._inner, C.int(i)) + return int(_cret) +} + + +// EverLtBigintTbigint wraps MEOS C function ever_lt_bigint_tbigint. +func EverLtBigintTbigint(i int64, temp *Temporal) int { + _cret := C.ever_lt_bigint_tbigint(C.int64_t(i), temp._inner) + return int(_cret) +} + + +// EverLtTbigintBigint wraps MEOS C function ever_lt_tbigint_bigint. +func EverLtTbigintBigint(temp *Temporal, i int64) int { + _cret := C.ever_lt_tbigint_bigint(temp._inner, C.int64_t(i)) + return int(_cret) +} + + +// EverLtTtextText wraps MEOS C function ever_lt_ttext_text. +func EverLtTtextText(temp *Temporal, txt string) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.ever_lt_ttext_text(temp._inner, _c_txt) + return int(_cret) +} + + +// EverNeBoolTbool wraps MEOS C function ever_ne_bool_tbool. +func EverNeBoolTbool(b bool, temp *Temporal) int { + _cret := C.ever_ne_bool_tbool(C.bool(b), temp._inner) + return int(_cret) +} + + +// EverNeFloatTfloat wraps MEOS C function ever_ne_float_tfloat. +func EverNeFloatTfloat(d float64, temp *Temporal) int { + _cret := C.ever_ne_float_tfloat(C.double(d), temp._inner) + return int(_cret) +} + + +// EverNeIntTint wraps MEOS C function ever_ne_int_tint. +func EverNeIntTint(i int, temp *Temporal) int { + _cret := C.ever_ne_int_tint(C.int(i), temp._inner) + return int(_cret) +} + + +// EverNeTboolBool wraps MEOS C function ever_ne_tbool_bool. +func EverNeTboolBool(temp *Temporal, b bool) int { + _cret := C.ever_ne_tbool_bool(temp._inner, C.bool(b)) + return int(_cret) +} + + +// EverNeTemporalTemporal wraps MEOS C function ever_ne_temporal_temporal. +func EverNeTemporalTemporal(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ever_ne_temporal_temporal(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EverNeTextTtext wraps MEOS C function ever_ne_text_ttext. +func EverNeTextTtext(txt string, temp *Temporal) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.ever_ne_text_ttext(_c_txt, temp._inner) + return int(_cret) +} + + +// EverNeTfloatFloat wraps MEOS C function ever_ne_tfloat_float. +func EverNeTfloatFloat(temp *Temporal, d float64) int { + _cret := C.ever_ne_tfloat_float(temp._inner, C.double(d)) + return int(_cret) +} + + +// EverNeTintInt wraps MEOS C function ever_ne_tint_int. +func EverNeTintInt(temp *Temporal, i int) int { + _cret := C.ever_ne_tint_int(temp._inner, C.int(i)) + return int(_cret) +} + + +// EverNeBigintTbigint wraps MEOS C function ever_ne_bigint_tbigint. +func EverNeBigintTbigint(i int64, temp *Temporal) int { + _cret := C.ever_ne_bigint_tbigint(C.int64_t(i), temp._inner) + return int(_cret) +} + + +// EverNeTbigintBigint wraps MEOS C function ever_ne_tbigint_bigint. +func EverNeTbigintBigint(temp *Temporal, i int64) int { + _cret := C.ever_ne_tbigint_bigint(temp._inner, C.int64_t(i)) + return int(_cret) +} + + +// EverNeTtextText wraps MEOS C function ever_ne_ttext_text. +func EverNeTtextText(temp *Temporal, txt string) int { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.ever_ne_ttext_text(temp._inner, _c_txt) + return int(_cret) +} + + +// TeqBoolTbool wraps MEOS C function teq_bool_tbool. +func TeqBoolTbool(b bool, temp *Temporal) *Temporal { + _cret := C.teq_bool_tbool(C.bool(b), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TeqFloatTfloat wraps MEOS C function teq_float_tfloat. +func TeqFloatTfloat(d float64, temp *Temporal) *Temporal { + _cret := C.teq_float_tfloat(C.double(d), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TeqIntTint wraps MEOS C function teq_int_tint. +func TeqIntTint(i int, temp *Temporal) *Temporal { + _cret := C.teq_int_tint(C.int(i), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TeqTboolBool wraps MEOS C function teq_tbool_bool. +func TeqTboolBool(temp *Temporal, b bool) *Temporal { + _cret := C.teq_tbool_bool(temp._inner, C.bool(b)) + return &Temporal{_inner: _cret} +} + + +// TeqTemporalTemporal wraps MEOS C function teq_temporal_temporal. +func TeqTemporalTemporal(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.teq_temporal_temporal(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// TeqTextTtext wraps MEOS C function teq_text_ttext. +func TeqTextTtext(txt string, temp *Temporal) *Temporal { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.teq_text_ttext(_c_txt, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TeqTfloatFloat wraps MEOS C function teq_tfloat_float. +func TeqTfloatFloat(temp *Temporal, d float64) *Temporal { + _cret := C.teq_tfloat_float(temp._inner, C.double(d)) + return &Temporal{_inner: _cret} +} + + +// TeqTintInt wraps MEOS C function teq_tint_int. +func TeqTintInt(temp *Temporal, i int) *Temporal { + _cret := C.teq_tint_int(temp._inner, C.int(i)) + return &Temporal{_inner: _cret} +} + + +// TeqTtextText wraps MEOS C function teq_ttext_text. +func TeqTtextText(temp *Temporal, txt string) *Temporal { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.teq_ttext_text(temp._inner, _c_txt) + return &Temporal{_inner: _cret} +} + + +// TgeFloatTfloat wraps MEOS C function tge_float_tfloat. +func TgeFloatTfloat(d float64, temp *Temporal) *Temporal { + _cret := C.tge_float_tfloat(C.double(d), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TgeIntTint wraps MEOS C function tge_int_tint. +func TgeIntTint(i int, temp *Temporal) *Temporal { + _cret := C.tge_int_tint(C.int(i), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TgeTemporalTemporal wraps MEOS C function tge_temporal_temporal. +func TgeTemporalTemporal(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tge_temporal_temporal(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// TgeTextTtext wraps MEOS C function tge_text_ttext. +func TgeTextTtext(txt string, temp *Temporal) *Temporal { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.tge_text_ttext(_c_txt, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TgeTfloatFloat wraps MEOS C function tge_tfloat_float. +func TgeTfloatFloat(temp *Temporal, d float64) *Temporal { + _cret := C.tge_tfloat_float(temp._inner, C.double(d)) + return &Temporal{_inner: _cret} +} + + +// TgeTintInt wraps MEOS C function tge_tint_int. +func TgeTintInt(temp *Temporal, i int) *Temporal { + _cret := C.tge_tint_int(temp._inner, C.int(i)) + return &Temporal{_inner: _cret} +} + + +// TgeTtextText wraps MEOS C function tge_ttext_text. +func TgeTtextText(temp *Temporal, txt string) *Temporal { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.tge_ttext_text(temp._inner, _c_txt) + return &Temporal{_inner: _cret} +} + + +// TgtFloatTfloat wraps MEOS C function tgt_float_tfloat. +func TgtFloatTfloat(d float64, temp *Temporal) *Temporal { + _cret := C.tgt_float_tfloat(C.double(d), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TgtIntTint wraps MEOS C function tgt_int_tint. +func TgtIntTint(i int, temp *Temporal) *Temporal { + _cret := C.tgt_int_tint(C.int(i), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TgtTemporalTemporal wraps MEOS C function tgt_temporal_temporal. +func TgtTemporalTemporal(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tgt_temporal_temporal(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// TgtTextTtext wraps MEOS C function tgt_text_ttext. +func TgtTextTtext(txt string, temp *Temporal) *Temporal { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.tgt_text_ttext(_c_txt, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TgtTfloatFloat wraps MEOS C function tgt_tfloat_float. +func TgtTfloatFloat(temp *Temporal, d float64) *Temporal { + _cret := C.tgt_tfloat_float(temp._inner, C.double(d)) + return &Temporal{_inner: _cret} +} + + +// TgtTintInt wraps MEOS C function tgt_tint_int. +func TgtTintInt(temp *Temporal, i int) *Temporal { + _cret := C.tgt_tint_int(temp._inner, C.int(i)) + return &Temporal{_inner: _cret} +} + + +// TgtTtextText wraps MEOS C function tgt_ttext_text. +func TgtTtextText(temp *Temporal, txt string) *Temporal { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.tgt_ttext_text(temp._inner, _c_txt) + return &Temporal{_inner: _cret} +} + + +// TleFloatTfloat wraps MEOS C function tle_float_tfloat. +func TleFloatTfloat(d float64, temp *Temporal) *Temporal { + _cret := C.tle_float_tfloat(C.double(d), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TleIntTint wraps MEOS C function tle_int_tint. +func TleIntTint(i int, temp *Temporal) *Temporal { + _cret := C.tle_int_tint(C.int(i), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TleTemporalTemporal wraps MEOS C function tle_temporal_temporal. +func TleTemporalTemporal(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tle_temporal_temporal(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// TleTextTtext wraps MEOS C function tle_text_ttext. +func TleTextTtext(txt string, temp *Temporal) *Temporal { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.tle_text_ttext(_c_txt, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TleTfloatFloat wraps MEOS C function tle_tfloat_float. +func TleTfloatFloat(temp *Temporal, d float64) *Temporal { + _cret := C.tle_tfloat_float(temp._inner, C.double(d)) + return &Temporal{_inner: _cret} +} + + +// TleTintInt wraps MEOS C function tle_tint_int. +func TleTintInt(temp *Temporal, i int) *Temporal { + _cret := C.tle_tint_int(temp._inner, C.int(i)) + return &Temporal{_inner: _cret} +} + + +// TleTtextText wraps MEOS C function tle_ttext_text. +func TleTtextText(temp *Temporal, txt string) *Temporal { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.tle_ttext_text(temp._inner, _c_txt) + return &Temporal{_inner: _cret} +} + + +// TltFloatTfloat wraps MEOS C function tlt_float_tfloat. +func TltFloatTfloat(d float64, temp *Temporal) *Temporal { + _cret := C.tlt_float_tfloat(C.double(d), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TltIntTint wraps MEOS C function tlt_int_tint. +func TltIntTint(i int, temp *Temporal) *Temporal { + _cret := C.tlt_int_tint(C.int(i), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TltTemporalTemporal wraps MEOS C function tlt_temporal_temporal. +func TltTemporalTemporal(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tlt_temporal_temporal(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// TltTextTtext wraps MEOS C function tlt_text_ttext. +func TltTextTtext(txt string, temp *Temporal) *Temporal { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.tlt_text_ttext(_c_txt, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TltTfloatFloat wraps MEOS C function tlt_tfloat_float. +func TltTfloatFloat(temp *Temporal, d float64) *Temporal { + _cret := C.tlt_tfloat_float(temp._inner, C.double(d)) + return &Temporal{_inner: _cret} +} + + +// TltTintInt wraps MEOS C function tlt_tint_int. +func TltTintInt(temp *Temporal, i int) *Temporal { + _cret := C.tlt_tint_int(temp._inner, C.int(i)) + return &Temporal{_inner: _cret} +} + + +// TltTtextText wraps MEOS C function tlt_ttext_text. +func TltTtextText(temp *Temporal, txt string) *Temporal { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.tlt_ttext_text(temp._inner, _c_txt) + return &Temporal{_inner: _cret} +} + + +// TneBoolTbool wraps MEOS C function tne_bool_tbool. +func TneBoolTbool(b bool, temp *Temporal) *Temporal { + _cret := C.tne_bool_tbool(C.bool(b), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TneFloatTfloat wraps MEOS C function tne_float_tfloat. +func TneFloatTfloat(d float64, temp *Temporal) *Temporal { + _cret := C.tne_float_tfloat(C.double(d), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TneIntTint wraps MEOS C function tne_int_tint. +func TneIntTint(i int, temp *Temporal) *Temporal { + _cret := C.tne_int_tint(C.int(i), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TneTboolBool wraps MEOS C function tne_tbool_bool. +func TneTboolBool(temp *Temporal, b bool) *Temporal { + _cret := C.tne_tbool_bool(temp._inner, C.bool(b)) + return &Temporal{_inner: _cret} +} + + +// TneTemporalTemporal wraps MEOS C function tne_temporal_temporal. +func TneTemporalTemporal(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tne_temporal_temporal(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// TneTextTtext wraps MEOS C function tne_text_ttext. +func TneTextTtext(txt string, temp *Temporal) *Temporal { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.tne_text_ttext(_c_txt, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TneTfloatFloat wraps MEOS C function tne_tfloat_float. +func TneTfloatFloat(temp *Temporal, d float64) *Temporal { + _cret := C.tne_tfloat_float(temp._inner, C.double(d)) + return &Temporal{_inner: _cret} +} + + +// TneTintInt wraps MEOS C function tne_tint_int. +func TneTintInt(temp *Temporal, i int) *Temporal { + _cret := C.tne_tint_int(temp._inner, C.int(i)) + return &Temporal{_inner: _cret} +} + + +// TneTtextText wraps MEOS C function tne_ttext_text. +func TneTtextText(temp *Temporal, txt string) *Temporal { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.tne_ttext_text(temp._inner, _c_txt) + return &Temporal{_inner: _cret} +} + + +// TemporalSpans wraps MEOS C function temporal_spans. +func TemporalSpans(temp *Temporal, count unsafe.Pointer) *Span { + _cret := C.temporal_spans(temp._inner, (*C.int)(unsafe.Pointer(count))) + return &Span{_inner: _cret} +} + + +// TemporalSplitEachNSpans wraps MEOS C function temporal_split_each_n_spans. +func TemporalSplitEachNSpans(temp *Temporal, elem_count int, count unsafe.Pointer) *Span { + _cret := C.temporal_split_each_n_spans(temp._inner, C.int(elem_count), (*C.int)(unsafe.Pointer(count))) + return &Span{_inner: _cret} +} + + +// TemporalSplitNSpans wraps MEOS C function temporal_split_n_spans. +func TemporalSplitNSpans(temp *Temporal, span_count int, count unsafe.Pointer) *Span { + _cret := C.temporal_split_n_spans(temp._inner, C.int(span_count), (*C.int)(unsafe.Pointer(count))) + return &Span{_inner: _cret} +} + + +// TnumberSplitEachNTboxes wraps MEOS C function tnumber_split_each_n_tboxes. +func TnumberSplitEachNTboxes(temp *Temporal, elem_count int, count unsafe.Pointer) *TBox { + _cret := C.tnumber_split_each_n_tboxes(temp._inner, C.int(elem_count), (*C.int)(unsafe.Pointer(count))) + return &TBox{_inner: _cret} +} + + +// TnumberSplitNTboxes wraps MEOS C function tnumber_split_n_tboxes. +func TnumberSplitNTboxes(temp *Temporal, box_count int, count unsafe.Pointer) *TBox { + _cret := C.tnumber_split_n_tboxes(temp._inner, C.int(box_count), (*C.int)(unsafe.Pointer(count))) + return &TBox{_inner: _cret} +} + + +// TnumberTboxes wraps MEOS C function tnumber_tboxes. +func TnumberTboxes(temp *Temporal, count unsafe.Pointer) *TBox { + _cret := C.tnumber_tboxes(temp._inner, (*C.int)(unsafe.Pointer(count))) + return &TBox{_inner: _cret} +} + + +// AdjacentNumspanTnumber wraps MEOS C function adjacent_numspan_tnumber. +func AdjacentNumspanTnumber(s *Span, temp *Temporal) bool { + _cret := C.adjacent_numspan_tnumber(s._inner, temp._inner) + return bool(_cret) +} + + +// AdjacentTBOXTnumber wraps MEOS C function adjacent_tbox_tnumber. +func AdjacentTBOXTnumber(box *TBox, temp *Temporal) bool { + _cret := C.adjacent_tbox_tnumber(box._inner, temp._inner) + return bool(_cret) +} + + +// AdjacentTemporalTemporal wraps MEOS C function adjacent_temporal_temporal. +func AdjacentTemporalTemporal(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.adjacent_temporal_temporal(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// AdjacentTemporalTstzspan wraps MEOS C function adjacent_temporal_tstzspan. +func AdjacentTemporalTstzspan(temp *Temporal, s *Span) bool { + _cret := C.adjacent_temporal_tstzspan(temp._inner, s._inner) + return bool(_cret) +} + + +// AdjacentTnumberNumspan wraps MEOS C function adjacent_tnumber_numspan. +func AdjacentTnumberNumspan(temp *Temporal, s *Span) bool { + _cret := C.adjacent_tnumber_numspan(temp._inner, s._inner) + return bool(_cret) +} + + +// AdjacentTnumberTBOX wraps MEOS C function adjacent_tnumber_tbox. +func AdjacentTnumberTBOX(temp *Temporal, box *TBox) bool { + _cret := C.adjacent_tnumber_tbox(temp._inner, box._inner) + return bool(_cret) +} + + +// AdjacentTnumberTnumber wraps MEOS C function adjacent_tnumber_tnumber. +func AdjacentTnumberTnumber(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.adjacent_tnumber_tnumber(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// AdjacentTstzspanTemporal wraps MEOS C function adjacent_tstzspan_temporal. +func AdjacentTstzspanTemporal(s *Span, temp *Temporal) bool { + _cret := C.adjacent_tstzspan_temporal(s._inner, temp._inner) + return bool(_cret) +} + + +// ContainedNumspanTnumber wraps MEOS C function contained_numspan_tnumber. +func ContainedNumspanTnumber(s *Span, temp *Temporal) bool { + _cret := C.contained_numspan_tnumber(s._inner, temp._inner) + return bool(_cret) +} + + +// ContainedTBOXTnumber wraps MEOS C function contained_tbox_tnumber. +func ContainedTBOXTnumber(box *TBox, temp *Temporal) bool { + _cret := C.contained_tbox_tnumber(box._inner, temp._inner) + return bool(_cret) +} + + +// ContainedTemporalTemporal wraps MEOS C function contained_temporal_temporal. +func ContainedTemporalTemporal(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.contained_temporal_temporal(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// ContainedTemporalTstzspan wraps MEOS C function contained_temporal_tstzspan. +func ContainedTemporalTstzspan(temp *Temporal, s *Span) bool { + _cret := C.contained_temporal_tstzspan(temp._inner, s._inner) + return bool(_cret) +} + + +// ContainedTnumberNumspan wraps MEOS C function contained_tnumber_numspan. +func ContainedTnumberNumspan(temp *Temporal, s *Span) bool { + _cret := C.contained_tnumber_numspan(temp._inner, s._inner) + return bool(_cret) +} + + +// ContainedTnumberTBOX wraps MEOS C function contained_tnumber_tbox. +func ContainedTnumberTBOX(temp *Temporal, box *TBox) bool { + _cret := C.contained_tnumber_tbox(temp._inner, box._inner) + return bool(_cret) +} + + +// ContainedTnumberTnumber wraps MEOS C function contained_tnumber_tnumber. +func ContainedTnumberTnumber(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.contained_tnumber_tnumber(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// ContainedTstzspanTemporal wraps MEOS C function contained_tstzspan_temporal. +func ContainedTstzspanTemporal(s *Span, temp *Temporal) bool { + _cret := C.contained_tstzspan_temporal(s._inner, temp._inner) + return bool(_cret) +} + + +// ContainsNumspanTnumber wraps MEOS C function contains_numspan_tnumber. +func ContainsNumspanTnumber(s *Span, temp *Temporal) bool { + _cret := C.contains_numspan_tnumber(s._inner, temp._inner) + return bool(_cret) +} + + +// ContainsTBOXTnumber wraps MEOS C function contains_tbox_tnumber. +func ContainsTBOXTnumber(box *TBox, temp *Temporal) bool { + _cret := C.contains_tbox_tnumber(box._inner, temp._inner) + return bool(_cret) +} + + +// ContainsTemporalTstzspan wraps MEOS C function contains_temporal_tstzspan. +func ContainsTemporalTstzspan(temp *Temporal, s *Span) bool { + _cret := C.contains_temporal_tstzspan(temp._inner, s._inner) + return bool(_cret) +} + + +// ContainsTemporalTemporal wraps MEOS C function contains_temporal_temporal. +func ContainsTemporalTemporal(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.contains_temporal_temporal(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// ContainsTnumberNumspan wraps MEOS C function contains_tnumber_numspan. +func ContainsTnumberNumspan(temp *Temporal, s *Span) bool { + _cret := C.contains_tnumber_numspan(temp._inner, s._inner) + return bool(_cret) +} + + +// ContainsTnumberTBOX wraps MEOS C function contains_tnumber_tbox. +func ContainsTnumberTBOX(temp *Temporal, box *TBox) bool { + _cret := C.contains_tnumber_tbox(temp._inner, box._inner) + return bool(_cret) +} + + +// ContainsTnumberTnumber wraps MEOS C function contains_tnumber_tnumber. +func ContainsTnumberTnumber(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.contains_tnumber_tnumber(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// ContainsTstzspanTemporal wraps MEOS C function contains_tstzspan_temporal. +func ContainsTstzspanTemporal(s *Span, temp *Temporal) bool { + _cret := C.contains_tstzspan_temporal(s._inner, temp._inner) + return bool(_cret) +} + + +// OverlapsNumspanTnumber wraps MEOS C function overlaps_numspan_tnumber. +func OverlapsNumspanTnumber(s *Span, temp *Temporal) bool { + _cret := C.overlaps_numspan_tnumber(s._inner, temp._inner) + return bool(_cret) +} + + +// OverlapsTBOXTnumber wraps MEOS C function overlaps_tbox_tnumber. +func OverlapsTBOXTnumber(box *TBox, temp *Temporal) bool { + _cret := C.overlaps_tbox_tnumber(box._inner, temp._inner) + return bool(_cret) +} + + +// OverlapsTemporalTemporal wraps MEOS C function overlaps_temporal_temporal. +func OverlapsTemporalTemporal(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.overlaps_temporal_temporal(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// OverlapsTemporalTstzspan wraps MEOS C function overlaps_temporal_tstzspan. +func OverlapsTemporalTstzspan(temp *Temporal, s *Span) bool { + _cret := C.overlaps_temporal_tstzspan(temp._inner, s._inner) + return bool(_cret) +} + + +// OverlapsTnumberNumspan wraps MEOS C function overlaps_tnumber_numspan. +func OverlapsTnumberNumspan(temp *Temporal, s *Span) bool { + _cret := C.overlaps_tnumber_numspan(temp._inner, s._inner) + return bool(_cret) +} + + +// OverlapsTnumberTBOX wraps MEOS C function overlaps_tnumber_tbox. +func OverlapsTnumberTBOX(temp *Temporal, box *TBox) bool { + _cret := C.overlaps_tnumber_tbox(temp._inner, box._inner) + return bool(_cret) +} + + +// OverlapsTnumberTnumber wraps MEOS C function overlaps_tnumber_tnumber. +func OverlapsTnumberTnumber(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.overlaps_tnumber_tnumber(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// OverlapsTstzspanTemporal wraps MEOS C function overlaps_tstzspan_temporal. +func OverlapsTstzspanTemporal(s *Span, temp *Temporal) bool { + _cret := C.overlaps_tstzspan_temporal(s._inner, temp._inner) + return bool(_cret) +} + + +// SameNumspanTnumber wraps MEOS C function same_numspan_tnumber. +func SameNumspanTnumber(s *Span, temp *Temporal) bool { + _cret := C.same_numspan_tnumber(s._inner, temp._inner) + return bool(_cret) +} + + +// SameTBOXTnumber wraps MEOS C function same_tbox_tnumber. +func SameTBOXTnumber(box *TBox, temp *Temporal) bool { + _cret := C.same_tbox_tnumber(box._inner, temp._inner) + return bool(_cret) +} + + +// SameTemporalTemporal wraps MEOS C function same_temporal_temporal. +func SameTemporalTemporal(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.same_temporal_temporal(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// SameTemporalTstzspan wraps MEOS C function same_temporal_tstzspan. +func SameTemporalTstzspan(temp *Temporal, s *Span) bool { + _cret := C.same_temporal_tstzspan(temp._inner, s._inner) + return bool(_cret) +} + + +// SameTnumberNumspan wraps MEOS C function same_tnumber_numspan. +func SameTnumberNumspan(temp *Temporal, s *Span) bool { + _cret := C.same_tnumber_numspan(temp._inner, s._inner) + return bool(_cret) +} + + +// SameTnumberTBOX wraps MEOS C function same_tnumber_tbox. +func SameTnumberTBOX(temp *Temporal, box *TBox) bool { + _cret := C.same_tnumber_tbox(temp._inner, box._inner) + return bool(_cret) +} + + +// SameTnumberTnumber wraps MEOS C function same_tnumber_tnumber. +func SameTnumberTnumber(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.same_tnumber_tnumber(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// SameTstzspanTemporal wraps MEOS C function same_tstzspan_temporal. +func SameTstzspanTemporal(s *Span, temp *Temporal) bool { + _cret := C.same_tstzspan_temporal(s._inner, temp._inner) + return bool(_cret) +} + + +// AfterTBOXTnumber wraps MEOS C function after_tbox_tnumber. +func AfterTBOXTnumber(box *TBox, temp *Temporal) bool { + _cret := C.after_tbox_tnumber(box._inner, temp._inner) + return bool(_cret) +} + + +// AfterTemporalTstzspan wraps MEOS C function after_temporal_tstzspan. +func AfterTemporalTstzspan(temp *Temporal, s *Span) bool { + _cret := C.after_temporal_tstzspan(temp._inner, s._inner) + return bool(_cret) +} + + +// AfterTemporalTemporal wraps MEOS C function after_temporal_temporal. +func AfterTemporalTemporal(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.after_temporal_temporal(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// AfterTnumberTBOX wraps MEOS C function after_tnumber_tbox. +func AfterTnumberTBOX(temp *Temporal, box *TBox) bool { + _cret := C.after_tnumber_tbox(temp._inner, box._inner) + return bool(_cret) +} + + +// AfterTnumberTnumber wraps MEOS C function after_tnumber_tnumber. +func AfterTnumberTnumber(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.after_tnumber_tnumber(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// AfterTstzspanTemporal wraps MEOS C function after_tstzspan_temporal. +func AfterTstzspanTemporal(s *Span, temp *Temporal) bool { + _cret := C.after_tstzspan_temporal(s._inner, temp._inner) + return bool(_cret) +} + + +// BeforeTBOXTnumber wraps MEOS C function before_tbox_tnumber. +func BeforeTBOXTnumber(box *TBox, temp *Temporal) bool { + _cret := C.before_tbox_tnumber(box._inner, temp._inner) + return bool(_cret) +} + + +// BeforeTemporalTstzspan wraps MEOS C function before_temporal_tstzspan. +func BeforeTemporalTstzspan(temp *Temporal, s *Span) bool { + _cret := C.before_temporal_tstzspan(temp._inner, s._inner) + return bool(_cret) +} + + +// BeforeTemporalTemporal wraps MEOS C function before_temporal_temporal. +func BeforeTemporalTemporal(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.before_temporal_temporal(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// BeforeTnumberTBOX wraps MEOS C function before_tnumber_tbox. +func BeforeTnumberTBOX(temp *Temporal, box *TBox) bool { + _cret := C.before_tnumber_tbox(temp._inner, box._inner) + return bool(_cret) +} + + +// BeforeTnumberTnumber wraps MEOS C function before_tnumber_tnumber. +func BeforeTnumberTnumber(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.before_tnumber_tnumber(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// BeforeTstzspanTemporal wraps MEOS C function before_tstzspan_temporal. +func BeforeTstzspanTemporal(s *Span, temp *Temporal) bool { + _cret := C.before_tstzspan_temporal(s._inner, temp._inner) + return bool(_cret) +} + + +// LeftTBOXTnumber wraps MEOS C function left_tbox_tnumber. +func LeftTBOXTnumber(box *TBox, temp *Temporal) bool { + _cret := C.left_tbox_tnumber(box._inner, temp._inner) + return bool(_cret) +} + + +// LeftNumspanTnumber wraps MEOS C function left_numspan_tnumber. +func LeftNumspanTnumber(s *Span, temp *Temporal) bool { + _cret := C.left_numspan_tnumber(s._inner, temp._inner) + return bool(_cret) +} + + +// LeftTnumberNumspan wraps MEOS C function left_tnumber_numspan. +func LeftTnumberNumspan(temp *Temporal, s *Span) bool { + _cret := C.left_tnumber_numspan(temp._inner, s._inner) + return bool(_cret) +} + + +// LeftTnumberTBOX wraps MEOS C function left_tnumber_tbox. +func LeftTnumberTBOX(temp *Temporal, box *TBox) bool { + _cret := C.left_tnumber_tbox(temp._inner, box._inner) + return bool(_cret) +} + + +// LeftTnumberTnumber wraps MEOS C function left_tnumber_tnumber. +func LeftTnumberTnumber(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.left_tnumber_tnumber(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// OverafterTBOXTnumber wraps MEOS C function overafter_tbox_tnumber. +func OverafterTBOXTnumber(box *TBox, temp *Temporal) bool { + _cret := C.overafter_tbox_tnumber(box._inner, temp._inner) + return bool(_cret) +} + + +// OverafterTemporalTstzspan wraps MEOS C function overafter_temporal_tstzspan. +func OverafterTemporalTstzspan(temp *Temporal, s *Span) bool { + _cret := C.overafter_temporal_tstzspan(temp._inner, s._inner) + return bool(_cret) +} + + +// OverafterTemporalTemporal wraps MEOS C function overafter_temporal_temporal. +func OverafterTemporalTemporal(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.overafter_temporal_temporal(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// OverafterTnumberTBOX wraps MEOS C function overafter_tnumber_tbox. +func OverafterTnumberTBOX(temp *Temporal, box *TBox) bool { + _cret := C.overafter_tnumber_tbox(temp._inner, box._inner) + return bool(_cret) +} + + +// OverafterTnumberTnumber wraps MEOS C function overafter_tnumber_tnumber. +func OverafterTnumberTnumber(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.overafter_tnumber_tnumber(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// OverafterTstzspanTemporal wraps MEOS C function overafter_tstzspan_temporal. +func OverafterTstzspanTemporal(s *Span, temp *Temporal) bool { + _cret := C.overafter_tstzspan_temporal(s._inner, temp._inner) + return bool(_cret) +} + + +// OverbeforeTBOXTnumber wraps MEOS C function overbefore_tbox_tnumber. +func OverbeforeTBOXTnumber(box *TBox, temp *Temporal) bool { + _cret := C.overbefore_tbox_tnumber(box._inner, temp._inner) + return bool(_cret) +} + + +// OverbeforeTemporalTstzspan wraps MEOS C function overbefore_temporal_tstzspan. +func OverbeforeTemporalTstzspan(temp *Temporal, s *Span) bool { + _cret := C.overbefore_temporal_tstzspan(temp._inner, s._inner) + return bool(_cret) +} + + +// OverbeforeTemporalTemporal wraps MEOS C function overbefore_temporal_temporal. +func OverbeforeTemporalTemporal(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.overbefore_temporal_temporal(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// OverbeforeTnumberTBOX wraps MEOS C function overbefore_tnumber_tbox. +func OverbeforeTnumberTBOX(temp *Temporal, box *TBox) bool { + _cret := C.overbefore_tnumber_tbox(temp._inner, box._inner) + return bool(_cret) +} + + +// OverbeforeTnumberTnumber wraps MEOS C function overbefore_tnumber_tnumber. +func OverbeforeTnumberTnumber(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.overbefore_tnumber_tnumber(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// OverbeforeTstzspanTemporal wraps MEOS C function overbefore_tstzspan_temporal. +func OverbeforeTstzspanTemporal(s *Span, temp *Temporal) bool { + _cret := C.overbefore_tstzspan_temporal(s._inner, temp._inner) + return bool(_cret) +} + + +// OverleftNumspanTnumber wraps MEOS C function overleft_numspan_tnumber. +func OverleftNumspanTnumber(s *Span, temp *Temporal) bool { + _cret := C.overleft_numspan_tnumber(s._inner, temp._inner) + return bool(_cret) +} + + +// OverleftTBOXTnumber wraps MEOS C function overleft_tbox_tnumber. +func OverleftTBOXTnumber(box *TBox, temp *Temporal) bool { + _cret := C.overleft_tbox_tnumber(box._inner, temp._inner) + return bool(_cret) +} + + +// OverleftTnumberNumspan wraps MEOS C function overleft_tnumber_numspan. +func OverleftTnumberNumspan(temp *Temporal, s *Span) bool { + _cret := C.overleft_tnumber_numspan(temp._inner, s._inner) + return bool(_cret) +} + + +// OverleftTnumberTBOX wraps MEOS C function overleft_tnumber_tbox. +func OverleftTnumberTBOX(temp *Temporal, box *TBox) bool { + _cret := C.overleft_tnumber_tbox(temp._inner, box._inner) + return bool(_cret) +} + + +// OverleftTnumberTnumber wraps MEOS C function overleft_tnumber_tnumber. +func OverleftTnumberTnumber(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.overleft_tnumber_tnumber(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// OverrightNumspanTnumber wraps MEOS C function overright_numspan_tnumber. +func OverrightNumspanTnumber(s *Span, temp *Temporal) bool { + _cret := C.overright_numspan_tnumber(s._inner, temp._inner) + return bool(_cret) +} + + +// OverrightTBOXTnumber wraps MEOS C function overright_tbox_tnumber. +func OverrightTBOXTnumber(box *TBox, temp *Temporal) bool { + _cret := C.overright_tbox_tnumber(box._inner, temp._inner) + return bool(_cret) +} + + +// OverrightTnumberNumspan wraps MEOS C function overright_tnumber_numspan. +func OverrightTnumberNumspan(temp *Temporal, s *Span) bool { + _cret := C.overright_tnumber_numspan(temp._inner, s._inner) + return bool(_cret) +} + + +// OverrightTnumberTBOX wraps MEOS C function overright_tnumber_tbox. +func OverrightTnumberTBOX(temp *Temporal, box *TBox) bool { + _cret := C.overright_tnumber_tbox(temp._inner, box._inner) + return bool(_cret) +} + + +// OverrightTnumberTnumber wraps MEOS C function overright_tnumber_tnumber. +func OverrightTnumberTnumber(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.overright_tnumber_tnumber(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// RightNumspanTnumber wraps MEOS C function right_numspan_tnumber. +func RightNumspanTnumber(s *Span, temp *Temporal) bool { + _cret := C.right_numspan_tnumber(s._inner, temp._inner) + return bool(_cret) +} + + +// RightTBOXTnumber wraps MEOS C function right_tbox_tnumber. +func RightTBOXTnumber(box *TBox, temp *Temporal) bool { + _cret := C.right_tbox_tnumber(box._inner, temp._inner) + return bool(_cret) +} + + +// RightTnumberNumspan wraps MEOS C function right_tnumber_numspan. +func RightTnumberNumspan(temp *Temporal, s *Span) bool { + _cret := C.right_tnumber_numspan(temp._inner, s._inner) + return bool(_cret) +} + + +// RightTnumberTBOX wraps MEOS C function right_tnumber_tbox. +func RightTnumberTBOX(temp *Temporal, box *TBox) bool { + _cret := C.right_tnumber_tbox(temp._inner, box._inner) + return bool(_cret) +} + + +// RightTnumberTnumber wraps MEOS C function right_tnumber_tnumber. +func RightTnumberTnumber(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.right_tnumber_tnumber(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// TandBoolTbool wraps MEOS C function tand_bool_tbool. +func TandBoolTbool(b bool, temp *Temporal) *Temporal { + _cret := C.tand_bool_tbool(C.bool(b), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TandTboolBool wraps MEOS C function tand_tbool_bool. +func TandTboolBool(temp *Temporal, b bool) *Temporal { + _cret := C.tand_tbool_bool(temp._inner, C.bool(b)) + return &Temporal{_inner: _cret} +} + + +// TandTboolTbool wraps MEOS C function tand_tbool_tbool. +func TandTboolTbool(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tand_tbool_tbool(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// TboolWhenTrue wraps MEOS C function tbool_when_true. +func TboolWhenTrue(temp *Temporal) *SpanSet { + _cret := C.tbool_when_true(temp._inner) + return &SpanSet{_inner: _cret} +} + + +// TnotTbool wraps MEOS C function tnot_tbool. +func TnotTbool(temp *Temporal) *Temporal { + _cret := C.tnot_tbool(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TorBoolTbool wraps MEOS C function tor_bool_tbool. +func TorBoolTbool(b bool, temp *Temporal) *Temporal { + _cret := C.tor_bool_tbool(C.bool(b), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TorTboolBool wraps MEOS C function tor_tbool_bool. +func TorTboolBool(temp *Temporal, b bool) *Temporal { + _cret := C.tor_tbool_bool(temp._inner, C.bool(b)) + return &Temporal{_inner: _cret} +} + + +// TorTboolTbool wraps MEOS C function tor_tbool_tbool. +func TorTboolTbool(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tor_tbool_tbool(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// AddFloatTfloat wraps MEOS C function add_float_tfloat. +func AddFloatTfloat(d float64, tnumber *Temporal) *Temporal { + _cret := C.add_float_tfloat(C.double(d), tnumber._inner) + return &Temporal{_inner: _cret} +} + + +// AddIntTint wraps MEOS C function add_int_tint. +func AddIntTint(i int, tnumber *Temporal) *Temporal { + _cret := C.add_int_tint(C.int(i), tnumber._inner) + return &Temporal{_inner: _cret} +} + + +// AddTfloatFloat wraps MEOS C function add_tfloat_float. +func AddTfloatFloat(tnumber *Temporal, d float64) *Temporal { + _cret := C.add_tfloat_float(tnumber._inner, C.double(d)) + return &Temporal{_inner: _cret} +} + + +// AddTintInt wraps MEOS C function add_tint_int. +func AddTintInt(tnumber *Temporal, i int) *Temporal { + _cret := C.add_tint_int(tnumber._inner, C.int(i)) + return &Temporal{_inner: _cret} +} + + +// AddBigintTbigint wraps MEOS C function add_bigint_tbigint. +func AddBigintTbigint(i int64, tnumber *Temporal) *Temporal { + _cret := C.add_bigint_tbigint(C.int64_t(i), tnumber._inner) + return &Temporal{_inner: _cret} +} + + +// AddTbigintBigint wraps MEOS C function add_tbigint_bigint. +func AddTbigintBigint(tnumber *Temporal, i int64) *Temporal { + _cret := C.add_tbigint_bigint(tnumber._inner, C.int64_t(i)) + return &Temporal{_inner: _cret} +} + + +// AddTnumberTnumber wraps MEOS C function add_tnumber_tnumber. +func AddTnumberTnumber(tnumber1 *Temporal, tnumber2 *Temporal) *Temporal { + _cret := C.add_tnumber_tnumber(tnumber1._inner, tnumber2._inner) + return &Temporal{_inner: _cret} +} + + +// DivFloatTfloat wraps MEOS C function div_float_tfloat. +func DivFloatTfloat(d float64, tnumber *Temporal) *Temporal { + _cret := C.div_float_tfloat(C.double(d), tnumber._inner) + return &Temporal{_inner: _cret} +} + + +// DivIntTint wraps MEOS C function div_int_tint. +func DivIntTint(i int, tnumber *Temporal) *Temporal { + _cret := C.div_int_tint(C.int(i), tnumber._inner) + return &Temporal{_inner: _cret} +} + + +// DivTfloatFloat wraps MEOS C function div_tfloat_float. +func DivTfloatFloat(tnumber *Temporal, d float64) *Temporal { + _cret := C.div_tfloat_float(tnumber._inner, C.double(d)) + return &Temporal{_inner: _cret} +} + + +// DivTintInt wraps MEOS C function div_tint_int. +func DivTintInt(tnumber *Temporal, i int) *Temporal { + _cret := C.div_tint_int(tnumber._inner, C.int(i)) + return &Temporal{_inner: _cret} +} + + +// DivBigintTbigint wraps MEOS C function div_bigint_tbigint. +func DivBigintTbigint(i int64, tnumber *Temporal) *Temporal { + _cret := C.div_bigint_tbigint(C.int64_t(i), tnumber._inner) + return &Temporal{_inner: _cret} +} + + +// DivTbigintBigint wraps MEOS C function div_tbigint_bigint. +func DivTbigintBigint(tnumber *Temporal, i int64) *Temporal { + _cret := C.div_tbigint_bigint(tnumber._inner, C.int64_t(i)) + return &Temporal{_inner: _cret} +} + + +// DivTnumberTnumber wraps MEOS C function div_tnumber_tnumber. +func DivTnumberTnumber(tnumber1 *Temporal, tnumber2 *Temporal) *Temporal { + _cret := C.div_tnumber_tnumber(tnumber1._inner, tnumber2._inner) + return &Temporal{_inner: _cret} +} + + +// MulFloatTfloat wraps MEOS C function mul_float_tfloat. +func MulFloatTfloat(d float64, tnumber *Temporal) *Temporal { + _cret := C.mul_float_tfloat(C.double(d), tnumber._inner) + return &Temporal{_inner: _cret} +} + + +// MulIntTint wraps MEOS C function mul_int_tint. +func MulIntTint(i int, tnumber *Temporal) *Temporal { + _cret := C.mul_int_tint(C.int(i), tnumber._inner) + return &Temporal{_inner: _cret} +} + + +// MulTfloatFloat wraps MEOS C function mul_tfloat_float. +func MulTfloatFloat(tnumber *Temporal, d float64) *Temporal { + _cret := C.mul_tfloat_float(tnumber._inner, C.double(d)) + return &Temporal{_inner: _cret} +} + + +// MulTintInt wraps MEOS C function mul_tint_int. +func MulTintInt(tnumber *Temporal, i int) *Temporal { + _cret := C.mul_tint_int(tnumber._inner, C.int(i)) + return &Temporal{_inner: _cret} +} + + +// MulBigintTbigint wraps MEOS C function mul_bigint_tbigint. +func MulBigintTbigint(i int64, tnumber *Temporal) *Temporal { + _cret := C.mul_bigint_tbigint(C.int64_t(i), tnumber._inner) + return &Temporal{_inner: _cret} +} + + +// MulTbigintBigint wraps MEOS C function mul_tbigint_bigint. +func MulTbigintBigint(tnumber *Temporal, i int64) *Temporal { + _cret := C.mul_tbigint_bigint(tnumber._inner, C.int64_t(i)) + return &Temporal{_inner: _cret} +} + + +// MulTnumberTnumber wraps MEOS C function mul_tnumber_tnumber. +func MulTnumberTnumber(tnumber1 *Temporal, tnumber2 *Temporal) *Temporal { + _cret := C.mul_tnumber_tnumber(tnumber1._inner, tnumber2._inner) + return &Temporal{_inner: _cret} +} + + +// SubFloatTfloat wraps MEOS C function sub_float_tfloat. +func SubFloatTfloat(d float64, tnumber *Temporal) *Temporal { + _cret := C.sub_float_tfloat(C.double(d), tnumber._inner) + return &Temporal{_inner: _cret} +} + + +// SubIntTint wraps MEOS C function sub_int_tint. +func SubIntTint(i int, tnumber *Temporal) *Temporal { + _cret := C.sub_int_tint(C.int(i), tnumber._inner) + return &Temporal{_inner: _cret} +} + + +// SubTfloatFloat wraps MEOS C function sub_tfloat_float. +func SubTfloatFloat(tnumber *Temporal, d float64) *Temporal { + _cret := C.sub_tfloat_float(tnumber._inner, C.double(d)) + return &Temporal{_inner: _cret} +} + + +// SubTintInt wraps MEOS C function sub_tint_int. +func SubTintInt(tnumber *Temporal, i int) *Temporal { + _cret := C.sub_tint_int(tnumber._inner, C.int(i)) + return &Temporal{_inner: _cret} +} + + +// SubBigintTbigint wraps MEOS C function sub_bigint_tbigint. +func SubBigintTbigint(i int64, tnumber *Temporal) *Temporal { + _cret := C.sub_bigint_tbigint(C.int64_t(i), tnumber._inner) + return &Temporal{_inner: _cret} +} + + +// SubTbigintBigint wraps MEOS C function sub_tbigint_bigint. +func SubTbigintBigint(tnumber *Temporal, i int64) *Temporal { + _cret := C.sub_tbigint_bigint(tnumber._inner, C.int64_t(i)) + return &Temporal{_inner: _cret} +} + + +// SubTnumberTnumber wraps MEOS C function sub_tnumber_tnumber. +func SubTnumberTnumber(tnumber1 *Temporal, tnumber2 *Temporal) *Temporal { + _cret := C.sub_tnumber_tnumber(tnumber1._inner, tnumber2._inner) + return &Temporal{_inner: _cret} +} + + +// TemporalDerivative wraps MEOS C function temporal_derivative. +func TemporalDerivative(temp *Temporal) *Temporal { + _cret := C.temporal_derivative(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TfloatExp wraps MEOS C function tfloat_exp. +func TfloatExp(temp *Temporal) *Temporal { + _cret := C.tfloat_exp(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TfloatLn wraps MEOS C function tfloat_ln. +func TfloatLn(temp *Temporal) *Temporal { + _cret := C.tfloat_ln(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TfloatLog10 wraps MEOS C function tfloat_log10. +func TfloatLog10(temp *Temporal) *Temporal { + _cret := C.tfloat_log10(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TfloatSin wraps MEOS C function tfloat_sin. +func TfloatSin(temp *Temporal) *Temporal { + _cret := C.tfloat_sin(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TfloatCos wraps MEOS C function tfloat_cos. +func TfloatCos(temp *Temporal) *Temporal { + _cret := C.tfloat_cos(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TfloatTan wraps MEOS C function tfloat_tan. +func TfloatTan(temp *Temporal) *Temporal { + _cret := C.tfloat_tan(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TnumberAbs wraps MEOS C function tnumber_abs. +func TnumberAbs(temp *Temporal) *Temporal { + _cret := C.tnumber_abs(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TnumberTrend wraps MEOS C function tnumber_trend. +func TnumberTrend(temp *Temporal) *Temporal { + _cret := C.tnumber_trend(temp._inner) + return &Temporal{_inner: _cret} +} + + +// FloatAngularDifference wraps MEOS C function float_angular_difference. +func FloatAngularDifference(degrees1 float64, degrees2 float64) float64 { + _cret := C.float_angular_difference(C.double(degrees1), C.double(degrees2)) + return float64(_cret) +} + + +// TnumberAngularDifference wraps MEOS C function tnumber_angular_difference. +func TnumberAngularDifference(temp *Temporal) *Temporal { + _cret := C.tnumber_angular_difference(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TnumberDeltaValue wraps MEOS C function tnumber_delta_value. +func TnumberDeltaValue(temp *Temporal) *Temporal { + _cret := C.tnumber_delta_value(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TextcatTextTtext wraps MEOS C function textcat_text_ttext. +func TextcatTextTtext(txt string, temp *Temporal) *Temporal { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.textcat_text_ttext(_c_txt, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TextcatTtextText wraps MEOS C function textcat_ttext_text. +func TextcatTtextText(temp *Temporal, txt string) *Temporal { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.textcat_ttext_text(temp._inner, _c_txt) + return &Temporal{_inner: _cret} +} + + +// TextcatTtextTtext wraps MEOS C function textcat_ttext_ttext. +func TextcatTtextTtext(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.textcat_ttext_ttext(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// TtextInitcap wraps MEOS C function ttext_initcap. +func TtextInitcap(temp *Temporal) *Temporal { + _cret := C.ttext_initcap(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TtextUpper wraps MEOS C function ttext_upper. +func TtextUpper(temp *Temporal) *Temporal { + _cret := C.ttext_upper(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TtextLower wraps MEOS C function ttext_lower. +func TtextLower(temp *Temporal) *Temporal { + _cret := C.ttext_lower(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TdistanceTfloatFloat wraps MEOS C function tdistance_tfloat_float. +func TdistanceTfloatFloat(temp *Temporal, d float64) *Temporal { + _cret := C.tdistance_tfloat_float(temp._inner, C.double(d)) + return &Temporal{_inner: _cret} +} + + +// TdistanceTintInt wraps MEOS C function tdistance_tint_int. +func TdistanceTintInt(temp *Temporal, i int) *Temporal { + _cret := C.tdistance_tint_int(temp._inner, C.int(i)) + return &Temporal{_inner: _cret} +} + + +// TdistanceTnumberTnumber wraps MEOS C function tdistance_tnumber_tnumber. +func TdistanceTnumberTnumber(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tdistance_tnumber_tnumber(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// NadTboxfloatTboxfloat wraps MEOS C function nad_tboxfloat_tboxfloat. +func NadTboxfloatTboxfloat(box1 *TBox, box2 *TBox) float64 { + _cret := C.nad_tboxfloat_tboxfloat(box1._inner, box2._inner) + return float64(_cret) +} + + +// NadTboxintTboxint wraps MEOS C function nad_tboxint_tboxint. +func NadTboxintTboxint(box1 *TBox, box2 *TBox) int { + _cret := C.nad_tboxint_tboxint(box1._inner, box2._inner) + return int(_cret) +} + + +// NadTfloatFloat wraps MEOS C function nad_tfloat_float. +func NadTfloatFloat(temp *Temporal, d float64) float64 { + _cret := C.nad_tfloat_float(temp._inner, C.double(d)) + return float64(_cret) +} + + +// NadTfloatTfloat wraps MEOS C function nad_tfloat_tfloat. +func NadTfloatTfloat(temp1 *Temporal, temp2 *Temporal) float64 { + _cret := C.nad_tfloat_tfloat(temp1._inner, temp2._inner) + return float64(_cret) +} + + +// NadTfloatTBOX wraps MEOS C function nad_tfloat_tbox. +func NadTfloatTBOX(temp *Temporal, box *TBox) float64 { + _cret := C.nad_tfloat_tbox(temp._inner, box._inner) + return float64(_cret) +} + + +// NadTintInt wraps MEOS C function nad_tint_int. +func NadTintInt(temp *Temporal, i int) int { + _cret := C.nad_tint_int(temp._inner, C.int(i)) + return int(_cret) +} + + +// NadTintTBOX wraps MEOS C function nad_tint_tbox. +func NadTintTBOX(temp *Temporal, box *TBox) int { + _cret := C.nad_tint_tbox(temp._inner, box._inner) + return int(_cret) +} + + +// NadTintTint wraps MEOS C function nad_tint_tint. +func NadTintTint(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.nad_tint_tint(temp1._inner, temp2._inner) + return int(_cret) +} + + +// TboolTandTransfn wraps MEOS C function tbool_tand_transfn. +func TboolTandTransfn(state *SkipList, temp *Temporal) *SkipList { + _cret := C.tbool_tand_transfn(state._inner, temp._inner) + return &SkipList{_inner: _cret} +} + + +// TboolTandCombinefn wraps MEOS C function tbool_tand_combinefn. +func TboolTandCombinefn(state1 *SkipList, state2 *SkipList) *SkipList { + _cret := C.tbool_tand_combinefn(state1._inner, state2._inner) + return &SkipList{_inner: _cret} +} + + +// TboolTorTransfn wraps MEOS C function tbool_tor_transfn. +func TboolTorTransfn(state *SkipList, temp *Temporal) *SkipList { + _cret := C.tbool_tor_transfn(state._inner, temp._inner) + return &SkipList{_inner: _cret} +} + + +// TboolTorCombinefn wraps MEOS C function tbool_tor_combinefn. +func TboolTorCombinefn(state1 *SkipList, state2 *SkipList) *SkipList { + _cret := C.tbool_tor_combinefn(state1._inner, state2._inner) + return &SkipList{_inner: _cret} +} + + +// TemporalExtentTransfn wraps MEOS C function temporal_extent_transfn. +func TemporalExtentTransfn(s *Span, temp *Temporal) *Span { + _cret := C.temporal_extent_transfn(s._inner, temp._inner) + return &Span{_inner: _cret} +} + + +// TemporalTaggFinalfn wraps MEOS C function temporal_tagg_finalfn. +func TemporalTaggFinalfn(state *SkipList) *Temporal { + _cret := C.temporal_tagg_finalfn(state._inner) + return &Temporal{_inner: _cret} +} + + +// TemporalTcountTransfn wraps MEOS C function temporal_tcount_transfn. +func TemporalTcountTransfn(state *SkipList, temp *Temporal) *SkipList { + _cret := C.temporal_tcount_transfn(state._inner, temp._inner) + return &SkipList{_inner: _cret} +} + + +// TemporalTcountCombinefn wraps MEOS C function temporal_tcount_combinefn. +func TemporalTcountCombinefn(state1 *SkipList, state2 *SkipList) *SkipList { + _cret := C.temporal_tcount_combinefn(state1._inner, state2._inner) + return &SkipList{_inner: _cret} +} + + +// TfloatTmaxTransfn wraps MEOS C function tfloat_tmax_transfn. +func TfloatTmaxTransfn(state *SkipList, temp *Temporal) *SkipList { + _cret := C.tfloat_tmax_transfn(state._inner, temp._inner) + return &SkipList{_inner: _cret} +} + + +// TfloatTmaxCombinefn wraps MEOS C function tfloat_tmax_combinefn. +func TfloatTmaxCombinefn(state1 *SkipList, state2 *SkipList) *SkipList { + _cret := C.tfloat_tmax_combinefn(state1._inner, state2._inner) + return &SkipList{_inner: _cret} +} + + +// TfloatTminTransfn wraps MEOS C function tfloat_tmin_transfn. +func TfloatTminTransfn(state *SkipList, temp *Temporal) *SkipList { + _cret := C.tfloat_tmin_transfn(state._inner, temp._inner) + return &SkipList{_inner: _cret} +} + + +// TfloatTminCombinefn wraps MEOS C function tfloat_tmin_combinefn. +func TfloatTminCombinefn(state1 *SkipList, state2 *SkipList) *SkipList { + _cret := C.tfloat_tmin_combinefn(state1._inner, state2._inner) + return &SkipList{_inner: _cret} +} + + +// TfloatTsumTransfn wraps MEOS C function tfloat_tsum_transfn. +func TfloatTsumTransfn(state *SkipList, temp *Temporal) *SkipList { + _cret := C.tfloat_tsum_transfn(state._inner, temp._inner) + return &SkipList{_inner: _cret} +} + + +// TfloatTsumCombinefn wraps MEOS C function tfloat_tsum_combinefn. +func TfloatTsumCombinefn(state1 *SkipList, state2 *SkipList) *SkipList { + _cret := C.tfloat_tsum_combinefn(state1._inner, state2._inner) + return &SkipList{_inner: _cret} +} + + +// TfloatWmaxTransfn wraps MEOS C function tfloat_wmax_transfn. +func TfloatWmaxTransfn(state *SkipList, temp *Temporal, interv *Interval) *SkipList { + _cret := C.tfloat_wmax_transfn(state._inner, temp._inner, interv._inner) + return &SkipList{_inner: _cret} +} + + +// TfloatWminTransfn wraps MEOS C function tfloat_wmin_transfn. +func TfloatWminTransfn(state *SkipList, temp *Temporal, interv *Interval) *SkipList { + _cret := C.tfloat_wmin_transfn(state._inner, temp._inner, interv._inner) + return &SkipList{_inner: _cret} +} + + +// TfloatWsumTransfn wraps MEOS C function tfloat_wsum_transfn. +func TfloatWsumTransfn(state *SkipList, temp *Temporal, interv *Interval) *SkipList { + _cret := C.tfloat_wsum_transfn(state._inner, temp._inner, interv._inner) + return &SkipList{_inner: _cret} +} + + +// TimestamptzTcountTransfn wraps MEOS C function timestamptz_tcount_transfn. +func TimestamptzTcountTransfn(state *SkipList, t int64) *SkipList { + _cret := C.timestamptz_tcount_transfn(state._inner, C.TimestampTz(t)) + return &SkipList{_inner: _cret} +} + + +// TintTmaxTransfn wraps MEOS C function tint_tmax_transfn. +func TintTmaxTransfn(state *SkipList, temp *Temporal) *SkipList { + _cret := C.tint_tmax_transfn(state._inner, temp._inner) + return &SkipList{_inner: _cret} +} + + +// TintTmaxCombinefn wraps MEOS C function tint_tmax_combinefn. +func TintTmaxCombinefn(state1 *SkipList, state2 *SkipList) *SkipList { + _cret := C.tint_tmax_combinefn(state1._inner, state2._inner) + return &SkipList{_inner: _cret} +} + + +// TintTminTransfn wraps MEOS C function tint_tmin_transfn. +func TintTminTransfn(state *SkipList, temp *Temporal) *SkipList { + _cret := C.tint_tmin_transfn(state._inner, temp._inner) + return &SkipList{_inner: _cret} +} + + +// TintTminCombinefn wraps MEOS C function tint_tmin_combinefn. +func TintTminCombinefn(state1 *SkipList, state2 *SkipList) *SkipList { + _cret := C.tint_tmin_combinefn(state1._inner, state2._inner) + return &SkipList{_inner: _cret} +} + + +// TintTsumTransfn wraps MEOS C function tint_tsum_transfn. +func TintTsumTransfn(state *SkipList, temp *Temporal) *SkipList { + _cret := C.tint_tsum_transfn(state._inner, temp._inner) + return &SkipList{_inner: _cret} +} + + +// TintTsumCombinefn wraps MEOS C function tint_tsum_combinefn. +func TintTsumCombinefn(state1 *SkipList, state2 *SkipList) *SkipList { + _cret := C.tint_tsum_combinefn(state1._inner, state2._inner) + return &SkipList{_inner: _cret} +} + + +// TintWmaxTransfn wraps MEOS C function tint_wmax_transfn. +func TintWmaxTransfn(state *SkipList, temp *Temporal, interv *Interval) *SkipList { + _cret := C.tint_wmax_transfn(state._inner, temp._inner, interv._inner) + return &SkipList{_inner: _cret} +} + + +// TintWminTransfn wraps MEOS C function tint_wmin_transfn. +func TintWminTransfn(state *SkipList, temp *Temporal, interv *Interval) *SkipList { + _cret := C.tint_wmin_transfn(state._inner, temp._inner, interv._inner) + return &SkipList{_inner: _cret} +} + + +// TintWsumTransfn wraps MEOS C function tint_wsum_transfn. +func TintWsumTransfn(state *SkipList, temp *Temporal, interv *Interval) *SkipList { + _cret := C.tint_wsum_transfn(state._inner, temp._inner, interv._inner) + return &SkipList{_inner: _cret} +} + + +// TnumberExtentTransfn wraps MEOS C function tnumber_extent_transfn. +func TnumberExtentTransfn(box *TBox, temp *Temporal) *TBox { + _cret := C.tnumber_extent_transfn(box._inner, temp._inner) + return &TBox{_inner: _cret} +} + + +// TnumberTavgFinalfn wraps MEOS C function tnumber_tavg_finalfn. +func TnumberTavgFinalfn(state *SkipList) *Temporal { + _cret := C.tnumber_tavg_finalfn(state._inner) + return &Temporal{_inner: _cret} +} + + +// TnumberTavgTransfn wraps MEOS C function tnumber_tavg_transfn. +func TnumberTavgTransfn(state *SkipList, temp *Temporal) *SkipList { + _cret := C.tnumber_tavg_transfn(state._inner, temp._inner) + return &SkipList{_inner: _cret} +} + + +// TnumberTavgCombinefn wraps MEOS C function tnumber_tavg_combinefn. +func TnumberTavgCombinefn(state1 *SkipList, state2 *SkipList) *SkipList { + _cret := C.tnumber_tavg_combinefn(state1._inner, state2._inner) + return &SkipList{_inner: _cret} +} + + +// TnumberWavgTransfn wraps MEOS C function tnumber_wavg_transfn. +func TnumberWavgTransfn(state *SkipList, temp *Temporal, interv *Interval) *SkipList { + _cret := C.tnumber_wavg_transfn(state._inner, temp._inner, interv._inner) + return &SkipList{_inner: _cret} +} + + +// TstzsetTcountTransfn wraps MEOS C function tstzset_tcount_transfn. +func TstzsetTcountTransfn(state *SkipList, s *Set) *SkipList { + _cret := C.tstzset_tcount_transfn(state._inner, s._inner) + return &SkipList{_inner: _cret} +} + + +// TstzspanTcountTransfn wraps MEOS C function tstzspan_tcount_transfn. +func TstzspanTcountTransfn(state *SkipList, s *Span) *SkipList { + _cret := C.tstzspan_tcount_transfn(state._inner, s._inner) + return &SkipList{_inner: _cret} +} + + +// TstzspansetTcountTransfn wraps MEOS C function tstzspanset_tcount_transfn. +func TstzspansetTcountTransfn(state *SkipList, ss *SpanSet) *SkipList { + _cret := C.tstzspanset_tcount_transfn(state._inner, ss._inner) + return &SkipList{_inner: _cret} +} + + +// TemporalMergeTransfn wraps MEOS C function temporal_merge_transfn. +func TemporalMergeTransfn(state *SkipList, temp *Temporal) *SkipList { + _cret := C.temporal_merge_transfn(state._inner, temp._inner) + return &SkipList{_inner: _cret} +} + + +// TemporalMergeCombinefn wraps MEOS C function temporal_merge_combinefn. +func TemporalMergeCombinefn(state1 *SkipList, state2 *SkipList) *SkipList { + _cret := C.temporal_merge_combinefn(state1._inner, state2._inner) + return &SkipList{_inner: _cret} +} + + +// TtextTmaxTransfn wraps MEOS C function ttext_tmax_transfn. +func TtextTmaxTransfn(state *SkipList, temp *Temporal) *SkipList { + _cret := C.ttext_tmax_transfn(state._inner, temp._inner) + return &SkipList{_inner: _cret} +} + + +// TtextTmaxCombinefn wraps MEOS C function ttext_tmax_combinefn. +func TtextTmaxCombinefn(state1 *SkipList, state2 *SkipList) *SkipList { + _cret := C.ttext_tmax_combinefn(state1._inner, state2._inner) + return &SkipList{_inner: _cret} +} + + +// TtextTminTransfn wraps MEOS C function ttext_tmin_transfn. +func TtextTminTransfn(state *SkipList, temp *Temporal) *SkipList { + _cret := C.ttext_tmin_transfn(state._inner, temp._inner) + return &SkipList{_inner: _cret} +} + + +// TtextTminCombinefn wraps MEOS C function ttext_tmin_combinefn. +func TtextTminCombinefn(state1 *SkipList, state2 *SkipList) *SkipList { + _cret := C.ttext_tmin_combinefn(state1._inner, state2._inner) + return &SkipList{_inner: _cret} +} + + +// TemporalSimplifyDp wraps MEOS C function temporal_simplify_dp. +func TemporalSimplifyDp(temp *Temporal, dist float64, synchronized bool) *Temporal { + _cret := C.temporal_simplify_dp(temp._inner, C.double(dist), C.bool(synchronized)) + return &Temporal{_inner: _cret} +} + + +// TemporalSimplifyMaxDist wraps MEOS C function temporal_simplify_max_dist. +func TemporalSimplifyMaxDist(temp *Temporal, dist float64, synchronized bool) *Temporal { + _cret := C.temporal_simplify_max_dist(temp._inner, C.double(dist), C.bool(synchronized)) + return &Temporal{_inner: _cret} +} + + +// TemporalSimplifyMinDist wraps MEOS C function temporal_simplify_min_dist. +func TemporalSimplifyMinDist(temp *Temporal, dist float64) *Temporal { + _cret := C.temporal_simplify_min_dist(temp._inner, C.double(dist)) + return &Temporal{_inner: _cret} +} + + +// TemporalSimplifyMinTdelta wraps MEOS C function temporal_simplify_min_tdelta. +func TemporalSimplifyMinTdelta(temp *Temporal, mint *Interval) *Temporal { + _cret := C.temporal_simplify_min_tdelta(temp._inner, mint._inner) + return &Temporal{_inner: _cret} +} + + +// TemporalTprecision wraps MEOS C function temporal_tprecision. +func TemporalTprecision(temp *Temporal, duration *Interval, origin int64) *Temporal { + _cret := C.temporal_tprecision(temp._inner, duration._inner, C.TimestampTz(origin)) + return &Temporal{_inner: _cret} +} + + +// TemporalTsample wraps MEOS C function temporal_tsample. +func TemporalTsample(temp *Temporal, duration *Interval, origin int64, interp Interpolation) *Temporal { + _cret := C.temporal_tsample(temp._inner, duration._inner, C.TimestampTz(origin), C.interpType(interp)) + return &Temporal{_inner: _cret} +} + + +// TemporalDyntimewarpDistance wraps MEOS C function temporal_dyntimewarp_distance. +func TemporalDyntimewarpDistance(temp1 *Temporal, temp2 *Temporal) float64 { + _cret := C.temporal_dyntimewarp_distance(temp1._inner, temp2._inner) + return float64(_cret) +} + + +// TemporalDyntimewarpPath wraps MEOS C function temporal_dyntimewarp_path. +func TemporalDyntimewarpPath(temp1 *Temporal, temp2 *Temporal, count unsafe.Pointer) *Match { + _cret := C.temporal_dyntimewarp_path(temp1._inner, temp2._inner, (*C.int)(unsafe.Pointer(count))) + return &Match{_inner: _cret} +} + + +// TemporalFrechetDistance wraps MEOS C function temporal_frechet_distance. +func TemporalFrechetDistance(temp1 *Temporal, temp2 *Temporal) float64 { + _cret := C.temporal_frechet_distance(temp1._inner, temp2._inner) + return float64(_cret) +} + + +// TemporalFrechetPath wraps MEOS C function temporal_frechet_path. +func TemporalFrechetPath(temp1 *Temporal, temp2 *Temporal, count unsafe.Pointer) *Match { + _cret := C.temporal_frechet_path(temp1._inner, temp2._inner, (*C.int)(unsafe.Pointer(count))) + return &Match{_inner: _cret} +} + + +// TemporalHausdorffDistance wraps MEOS C function temporal_hausdorff_distance. +func TemporalHausdorffDistance(temp1 *Temporal, temp2 *Temporal) float64 { + _cret := C.temporal_hausdorff_distance(temp1._inner, temp2._inner) + return float64(_cret) +} + + +// TemporalAverageHausdorffDistance wraps MEOS C function temporal_average_hausdorff_distance. +func TemporalAverageHausdorffDistance(temp1 *Temporal, temp2 *Temporal) float64 { + _cret := C.temporal_average_hausdorff_distance(temp1._inner, temp2._inner) + return float64(_cret) +} + + +// TemporalLcssDistance wraps MEOS C function temporal_lcss_distance. +func TemporalLcssDistance(temp1 *Temporal, temp2 *Temporal, epsilon float64) float64 { + _cret := C.temporal_lcss_distance(temp1._inner, temp2._inner, C.double(epsilon)) + return float64(_cret) +} + + +// TemporalExtKalmanFilter wraps MEOS C function temporal_ext_kalman_filter. +func TemporalExtKalmanFilter(temp *Temporal, gate float64, q float64, variance float64, to_drop bool) *Temporal { + _cret := C.temporal_ext_kalman_filter(temp._inner, C.double(gate), C.double(q), C.double(variance), C.bool(to_drop)) + return &Temporal{_inner: _cret} +} + + +// TemporalTimeBins wraps MEOS C function temporal_time_bins. +func TemporalTimeBins(temp *Temporal, duration *Interval, origin int64, count unsafe.Pointer) *Span { + _cret := C.temporal_time_bins(temp._inner, duration._inner, C.TimestampTz(origin), (*C.int)(unsafe.Pointer(count))) + return &Span{_inner: _cret} +} + + +// TemporalTimeSplit wraps MEOS C function temporal_time_split. +func TemporalTimeSplit(temp *Temporal, duration *Interval, torigin int64, bins unsafe.Pointer, count unsafe.Pointer) unsafe.Pointer { + _cret := C.temporal_time_split(temp._inner, duration._inner, C.TimestampTz(torigin), (**C.TimestampTz)(unsafe.Pointer(bins)), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TfloatTimeBoxes wraps MEOS C function tfloat_time_boxes. +func TfloatTimeBoxes(temp *Temporal, duration *Interval, torigin int64, count unsafe.Pointer) *TBox { + _cret := C.tfloat_time_boxes(temp._inner, duration._inner, C.TimestampTz(torigin), (*C.int)(unsafe.Pointer(count))) + return &TBox{_inner: _cret} +} + + +// TfloatValueBins wraps MEOS C function tfloat_value_bins. +func TfloatValueBins(temp *Temporal, vsize float64, vorigin float64, count unsafe.Pointer) *Span { + _cret := C.tfloat_value_bins(temp._inner, C.double(vsize), C.double(vorigin), (*C.int)(unsafe.Pointer(count))) + return &Span{_inner: _cret} +} + + +// TfloatValueBoxes wraps MEOS C function tfloat_value_boxes. +func TfloatValueBoxes(temp *Temporal, vsize float64, vorigin float64, count unsafe.Pointer) *TBox { + _cret := C.tfloat_value_boxes(temp._inner, C.double(vsize), C.double(vorigin), (*C.int)(unsafe.Pointer(count))) + return &TBox{_inner: _cret} +} + + +// TfloatValueSplit wraps MEOS C function tfloat_value_split. +func TfloatValueSplit(temp *Temporal, size float64, origin float64, bins unsafe.Pointer, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tfloat_value_split(temp._inner, C.double(size), C.double(origin), (**C.double)(unsafe.Pointer(bins)), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TfloatValueTimeBoxes wraps MEOS C function tfloat_value_time_boxes. +func TfloatValueTimeBoxes(temp *Temporal, vsize float64, duration *Interval, vorigin float64, torigin int64, count unsafe.Pointer) *TBox { + _cret := C.tfloat_value_time_boxes(temp._inner, C.double(vsize), duration._inner, C.double(vorigin), C.TimestampTz(torigin), (*C.int)(unsafe.Pointer(count))) + return &TBox{_inner: _cret} +} + + +// TfloatValueTimeSplit wraps MEOS C function tfloat_value_time_split. +func TfloatValueTimeSplit(temp *Temporal, vsize float64, duration *Interval, vorigin float64, torigin int64, value_bins unsafe.Pointer, time_bins unsafe.Pointer, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tfloat_value_time_split(temp._inner, C.double(vsize), duration._inner, C.double(vorigin), C.TimestampTz(torigin), (**C.double)(unsafe.Pointer(value_bins)), (**C.TimestampTz)(unsafe.Pointer(time_bins)), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TfloatboxTimeTiles wraps MEOS C function tfloatbox_time_tiles. +func TfloatboxTimeTiles(box *TBox, duration *Interval, torigin int64, count unsafe.Pointer) *TBox { + _cret := C.tfloatbox_time_tiles(box._inner, duration._inner, C.TimestampTz(torigin), (*C.int)(unsafe.Pointer(count))) + return &TBox{_inner: _cret} +} + + +// TfloatboxValueTiles wraps MEOS C function tfloatbox_value_tiles. +func TfloatboxValueTiles(box *TBox, vsize float64, vorigin float64, count unsafe.Pointer) *TBox { + _cret := C.tfloatbox_value_tiles(box._inner, C.double(vsize), C.double(vorigin), (*C.int)(unsafe.Pointer(count))) + return &TBox{_inner: _cret} +} + + +// TfloatboxValueTimeTiles wraps MEOS C function tfloatbox_value_time_tiles. +func TfloatboxValueTimeTiles(box *TBox, vsize float64, duration *Interval, vorigin float64, torigin int64, count unsafe.Pointer) *TBox { + _cret := C.tfloatbox_value_time_tiles(box._inner, C.double(vsize), duration._inner, C.double(vorigin), C.TimestampTz(torigin), (*C.int)(unsafe.Pointer(count))) + return &TBox{_inner: _cret} +} + + +// TintTimeBoxes wraps MEOS C function tint_time_boxes. +func TintTimeBoxes(temp *Temporal, duration *Interval, torigin int64, count unsafe.Pointer) *TBox { + _cret := C.tint_time_boxes(temp._inner, duration._inner, C.TimestampTz(torigin), (*C.int)(unsafe.Pointer(count))) + return &TBox{_inner: _cret} +} + + +// TintValueBins wraps MEOS C function tint_value_bins. +func TintValueBins(temp *Temporal, vsize int, vorigin int, count unsafe.Pointer) *Span { + _cret := C.tint_value_bins(temp._inner, C.int(vsize), C.int(vorigin), (*C.int)(unsafe.Pointer(count))) + return &Span{_inner: _cret} +} + + +// TintValueBoxes wraps MEOS C function tint_value_boxes. +func TintValueBoxes(temp *Temporal, vsize int, vorigin int, count unsafe.Pointer) *TBox { + _cret := C.tint_value_boxes(temp._inner, C.int(vsize), C.int(vorigin), (*C.int)(unsafe.Pointer(count))) + return &TBox{_inner: _cret} +} + + +// TintValueSplit wraps MEOS C function tint_value_split. +func TintValueSplit(temp *Temporal, vsize int, vorigin int, bins unsafe.Pointer, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tint_value_split(temp._inner, C.int(vsize), C.int(vorigin), (**C.int)(unsafe.Pointer(bins)), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TintValueTimeBoxes wraps MEOS C function tint_value_time_boxes. +func TintValueTimeBoxes(temp *Temporal, vsize int, duration *Interval, vorigin int, torigin int64, count unsafe.Pointer) *TBox { + _cret := C.tint_value_time_boxes(temp._inner, C.int(vsize), duration._inner, C.int(vorigin), C.TimestampTz(torigin), (*C.int)(unsafe.Pointer(count))) + return &TBox{_inner: _cret} +} + + +// TintValueTimeSplit wraps MEOS C function tint_value_time_split. +func TintValueTimeSplit(temp *Temporal, size int, duration *Interval, vorigin int, torigin int64, value_bins unsafe.Pointer, time_bins unsafe.Pointer, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tint_value_time_split(temp._inner, C.int(size), duration._inner, C.int(vorigin), C.TimestampTz(torigin), (**C.int)(unsafe.Pointer(value_bins)), (**C.TimestampTz)(unsafe.Pointer(time_bins)), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TintboxTimeTiles wraps MEOS C function tintbox_time_tiles. +func TintboxTimeTiles(box *TBox, duration *Interval, torigin int64, count unsafe.Pointer) *TBox { + _cret := C.tintbox_time_tiles(box._inner, duration._inner, C.TimestampTz(torigin), (*C.int)(unsafe.Pointer(count))) + return &TBox{_inner: _cret} +} + + +// TintboxValueTiles wraps MEOS C function tintbox_value_tiles. +func TintboxValueTiles(box *TBox, xsize int, xorigin int, count unsafe.Pointer) *TBox { + _cret := C.tintbox_value_tiles(box._inner, C.int(xsize), C.int(xorigin), (*C.int)(unsafe.Pointer(count))) + return &TBox{_inner: _cret} +} + + +// TintboxValueTimeTiles wraps MEOS C function tintbox_value_time_tiles. +func TintboxValueTimeTiles(box *TBox, xsize int, duration *Interval, xorigin int, torigin int64, count unsafe.Pointer) *TBox { + _cret := C.tintbox_value_time_tiles(box._inner, C.int(xsize), duration._inner, C.int(xorigin), C.TimestampTz(torigin), (*C.int)(unsafe.Pointer(count))) + return &TBox{_inner: _cret} +} + diff --git a/functions/meos_meos_arrow.go b/functions/meos_meos_arrow.go new file mode 100644 index 0000000..4cdf682 --- /dev/null +++ b/functions/meos_meos_arrow.go @@ -0,0 +1,213 @@ +package functions + +/* +#include +#include "meos.h" +#include "meos_catalog.h" +#include "meos_geo.h" +#include "meos_internal.h" +#include "meos_internal_geo.h" +#include "meos_npoint.h" +#include "meos_cbuffer.h" +#include "meos_pose.h" +#include "meos_rgeo.h" +#include "meos_h3.h" +#include "meos_quadbin.h" +#include "meos_json.h" +#include "meos_pointcloud.h" +#include "meos_arrow.h" + +// cgo reads C.union_* as a union TYPE; alias the union operators so C.g resolves them as functions. +#define gunion_bigint_set union_bigint_set +#define gunion_bigint_span union_bigint_span +#define gunion_bigint_spanset union_bigint_spanset +#define gunion_cbuffer_set union_cbuffer_set +#define gunion_date_set union_date_set +#define gunion_date_span union_date_span +#define gunion_date_spanset union_date_spanset +#define gunion_float_set union_float_set +#define gunion_float_span union_float_span +#define gunion_float_spanset union_float_spanset +#define gunion_geo_set union_geo_set +#define gunion_int_set union_int_set +#define gunion_int_span union_int_span +#define gunion_int_spanset union_int_spanset +#define gunion_jsonb_set union_jsonb_set +#define gunion_npoint_set union_npoint_set +#define gunion_pcpatch_set union_pcpatch_set +#define gunion_pcpoint_set union_pcpoint_set +#define gunion_pose_set union_pose_set +#define gunion_set_bigint union_set_bigint +#define gunion_set_cbuffer union_set_cbuffer +#define gunion_set_date union_set_date +#define gunion_set_float union_set_float +#define gunion_set_geo union_set_geo +#define gunion_set_int union_set_int +#define gunion_set_jsonb union_set_jsonb +#define gunion_set_npoint union_set_npoint +#define gunion_set_pcpatch union_set_pcpatch +#define gunion_set_pcpoint union_set_pcpoint +#define gunion_set_pose union_set_pose +#define gunion_set_set union_set_set +#define gunion_set_text union_set_text +#define gunion_set_timestamptz union_set_timestamptz +#define gunion_set_value union_set_value +#define gunion_span_bigint union_span_bigint +#define gunion_span_date union_span_date +#define gunion_span_float union_span_float +#define gunion_span_int union_span_int +#define gunion_span_span union_span_span +#define gunion_span_spanset union_span_spanset +#define gunion_span_timestamptz union_span_timestamptz +#define gunion_span_value union_span_value +#define gunion_spanset_bigint union_spanset_bigint +#define gunion_spanset_date union_spanset_date +#define gunion_spanset_float union_spanset_float +#define gunion_spanset_int union_spanset_int +#define gunion_spanset_span union_spanset_span +#define gunion_spanset_spanset union_spanset_spanset +#define gunion_spanset_timestamptz union_spanset_timestamptz +#define gunion_spanset_value union_spanset_value +#define gunion_stbox_stbox union_stbox_stbox +#define gunion_tbox_tbox union_tbox_tbox +#define gunion_text_set union_text_set +#define gunion_timestamptz_set union_timestamptz_set +#define gunion_timestamptz_span union_timestamptz_span +#define gunion_timestamptz_spanset union_timestamptz_spanset +#define gunion_tpcbox_tpcbox union_tpcbox_tpcbox +#define gunion_value_set union_value_set +#define gunion_value_span union_value_span +#define gunion_value_spanset union_value_spanset +*/ +import "C" +import ( + "unsafe" +) + +var _ = unsafe.Pointer(nil) + +// MeosTemporalToArrow wraps MEOS C function meos_temporal_to_arrow. +func MeosTemporalToArrow(temp *Temporal, out_schema unsafe.Pointer, out_array unsafe.Pointer) bool { + _cret := C.meos_temporal_to_arrow(temp._inner, (*C.struct_ArrowSchema)(out_schema), (*C.struct_ArrowArray)(out_array)) + return bool(_cret) +} + + +// MeosTemporalFromArrow wraps MEOS C function meos_temporal_from_arrow. +func MeosTemporalFromArrow(schema unsafe.Pointer, array unsafe.Pointer) *Temporal { + _cret := C.meos_temporal_from_arrow((*C.struct_ArrowSchema)(schema), (*C.struct_ArrowArray)(array)) + return &Temporal{_inner: _cret} +} + + +// MeosTemporalArrowRoundtrip wraps MEOS C function meos_temporal_arrow_roundtrip. +func MeosTemporalArrowRoundtrip(temp *Temporal) *Temporal { + _cret := C.meos_temporal_arrow_roundtrip(temp._inner) + return &Temporal{_inner: _cret} +} + + +// MeosSetToArrow wraps MEOS C function meos_set_to_arrow. +func MeosSetToArrow(s *Set, out_schema unsafe.Pointer, out_array unsafe.Pointer) bool { + _cret := C.meos_set_to_arrow(s._inner, (*C.struct_ArrowSchema)(out_schema), (*C.struct_ArrowArray)(out_array)) + return bool(_cret) +} + + +// MeosSetFromArrow wraps MEOS C function meos_set_from_arrow. +func MeosSetFromArrow(schema unsafe.Pointer, array unsafe.Pointer) *Set { + _cret := C.meos_set_from_arrow((*C.struct_ArrowSchema)(schema), (*C.struct_ArrowArray)(array)) + return &Set{_inner: _cret} +} + + +// MeosSetArrowRoundtrip wraps MEOS C function meos_set_arrow_roundtrip. +func MeosSetArrowRoundtrip(s *Set) *Set { + _cret := C.meos_set_arrow_roundtrip(s._inner) + return &Set{_inner: _cret} +} + + +// MeosSpanToArrow wraps MEOS C function meos_span_to_arrow. +func MeosSpanToArrow(s *Span, out_schema unsafe.Pointer, out_array unsafe.Pointer) bool { + _cret := C.meos_span_to_arrow(s._inner, (*C.struct_ArrowSchema)(out_schema), (*C.struct_ArrowArray)(out_array)) + return bool(_cret) +} + + +// MeosSpanFromArrow wraps MEOS C function meos_span_from_arrow. +func MeosSpanFromArrow(schema unsafe.Pointer, array unsafe.Pointer) *Span { + _cret := C.meos_span_from_arrow((*C.struct_ArrowSchema)(schema), (*C.struct_ArrowArray)(array)) + return &Span{_inner: _cret} +} + + +// MeosSpanArrowRoundtrip wraps MEOS C function meos_span_arrow_roundtrip. +func MeosSpanArrowRoundtrip(s *Span) *Span { + _cret := C.meos_span_arrow_roundtrip(s._inner) + return &Span{_inner: _cret} +} + + +// MeosSpansetToArrow wraps MEOS C function meos_spanset_to_arrow. +func MeosSpansetToArrow(ss *SpanSet, out_schema unsafe.Pointer, out_array unsafe.Pointer) bool { + _cret := C.meos_spanset_to_arrow(ss._inner, (*C.struct_ArrowSchema)(out_schema), (*C.struct_ArrowArray)(out_array)) + return bool(_cret) +} + + +// MeosSpansetFromArrow wraps MEOS C function meos_spanset_from_arrow. +func MeosSpansetFromArrow(schema unsafe.Pointer, array unsafe.Pointer) *SpanSet { + _cret := C.meos_spanset_from_arrow((*C.struct_ArrowSchema)(schema), (*C.struct_ArrowArray)(array)) + return &SpanSet{_inner: _cret} +} + + +// MeosSpansetArrowRoundtrip wraps MEOS C function meos_spanset_arrow_roundtrip. +func MeosSpansetArrowRoundtrip(ss *SpanSet) *SpanSet { + _cret := C.meos_spanset_arrow_roundtrip(ss._inner) + return &SpanSet{_inner: _cret} +} + + +// MeosTBOXToArrow wraps MEOS C function meos_tbox_to_arrow. +func MeosTBOXToArrow(box *TBox, out_schema unsafe.Pointer, out_array unsafe.Pointer) bool { + _cret := C.meos_tbox_to_arrow(box._inner, (*C.struct_ArrowSchema)(out_schema), (*C.struct_ArrowArray)(out_array)) + return bool(_cret) +} + + +// MeosTBOXFromArrow wraps MEOS C function meos_tbox_from_arrow. +func MeosTBOXFromArrow(schema unsafe.Pointer, array unsafe.Pointer) *TBox { + _cret := C.meos_tbox_from_arrow((*C.struct_ArrowSchema)(schema), (*C.struct_ArrowArray)(array)) + return &TBox{_inner: _cret} +} + + +// MeosTBOXArrowRoundtrip wraps MEOS C function meos_tbox_arrow_roundtrip. +func MeosTBOXArrowRoundtrip(box *TBox) *TBox { + _cret := C.meos_tbox_arrow_roundtrip(box._inner) + return &TBox{_inner: _cret} +} + + +// MeosSTBOXToArrow wraps MEOS C function meos_stbox_to_arrow. +func MeosSTBOXToArrow(box *STBox, out_schema unsafe.Pointer, out_array unsafe.Pointer) bool { + _cret := C.meos_stbox_to_arrow(box._inner, (*C.struct_ArrowSchema)(out_schema), (*C.struct_ArrowArray)(out_array)) + return bool(_cret) +} + + +// MeosSTBOXFromArrow wraps MEOS C function meos_stbox_from_arrow. +func MeosSTBOXFromArrow(schema unsafe.Pointer, array unsafe.Pointer) *STBox { + _cret := C.meos_stbox_from_arrow((*C.struct_ArrowSchema)(schema), (*C.struct_ArrowArray)(array)) + return &STBox{_inner: _cret} +} + + +// MeosSTBOXArrowRoundtrip wraps MEOS C function meos_stbox_arrow_roundtrip. +func MeosSTBOXArrowRoundtrip(box *STBox) *STBox { + _cret := C.meos_stbox_arrow_roundtrip(box._inner) + return &STBox{_inner: _cret} +} + diff --git a/functions/meos_meos_catalog.go b/functions/meos_meos_catalog.go new file mode 100644 index 0000000..bcd6077 --- /dev/null +++ b/functions/meos_meos_catalog.go @@ -0,0 +1,641 @@ +package functions + +/* +#include +#include "meos.h" +#include "meos_catalog.h" +#include "meos_geo.h" +#include "meos_internal.h" +#include "meos_internal_geo.h" +#include "meos_npoint.h" +#include "meos_cbuffer.h" +#include "meos_pose.h" +#include "meos_rgeo.h" +#include "meos_h3.h" +#include "meos_quadbin.h" +#include "meos_json.h" +#include "meos_pointcloud.h" +#include "meos_arrow.h" + +// cgo reads C.union_* as a union TYPE; alias the union operators so C.g resolves them as functions. +#define gunion_bigint_set union_bigint_set +#define gunion_bigint_span union_bigint_span +#define gunion_bigint_spanset union_bigint_spanset +#define gunion_cbuffer_set union_cbuffer_set +#define gunion_date_set union_date_set +#define gunion_date_span union_date_span +#define gunion_date_spanset union_date_spanset +#define gunion_float_set union_float_set +#define gunion_float_span union_float_span +#define gunion_float_spanset union_float_spanset +#define gunion_geo_set union_geo_set +#define gunion_int_set union_int_set +#define gunion_int_span union_int_span +#define gunion_int_spanset union_int_spanset +#define gunion_jsonb_set union_jsonb_set +#define gunion_npoint_set union_npoint_set +#define gunion_pcpatch_set union_pcpatch_set +#define gunion_pcpoint_set union_pcpoint_set +#define gunion_pose_set union_pose_set +#define gunion_set_bigint union_set_bigint +#define gunion_set_cbuffer union_set_cbuffer +#define gunion_set_date union_set_date +#define gunion_set_float union_set_float +#define gunion_set_geo union_set_geo +#define gunion_set_int union_set_int +#define gunion_set_jsonb union_set_jsonb +#define gunion_set_npoint union_set_npoint +#define gunion_set_pcpatch union_set_pcpatch +#define gunion_set_pcpoint union_set_pcpoint +#define gunion_set_pose union_set_pose +#define gunion_set_set union_set_set +#define gunion_set_text union_set_text +#define gunion_set_timestamptz union_set_timestamptz +#define gunion_set_value union_set_value +#define gunion_span_bigint union_span_bigint +#define gunion_span_date union_span_date +#define gunion_span_float union_span_float +#define gunion_span_int union_span_int +#define gunion_span_span union_span_span +#define gunion_span_spanset union_span_spanset +#define gunion_span_timestamptz union_span_timestamptz +#define gunion_span_value union_span_value +#define gunion_spanset_bigint union_spanset_bigint +#define gunion_spanset_date union_spanset_date +#define gunion_spanset_float union_spanset_float +#define gunion_spanset_int union_spanset_int +#define gunion_spanset_span union_spanset_span +#define gunion_spanset_spanset union_spanset_spanset +#define gunion_spanset_timestamptz union_spanset_timestamptz +#define gunion_spanset_value union_spanset_value +#define gunion_stbox_stbox union_stbox_stbox +#define gunion_tbox_tbox union_tbox_tbox +#define gunion_text_set union_text_set +#define gunion_timestamptz_set union_timestamptz_set +#define gunion_timestamptz_span union_timestamptz_span +#define gunion_timestamptz_spanset union_timestamptz_spanset +#define gunion_tpcbox_tpcbox union_tpcbox_tpcbox +#define gunion_value_set union_value_set +#define gunion_value_span union_value_span +#define gunion_value_spanset union_value_spanset +*/ +import "C" +import ( + "unsafe" +) + +var _ = unsafe.Pointer(nil) + +// TemptypeSubtype wraps MEOS C function temptype_subtype. +func TemptypeSubtype(subtype TempSubtype) bool { + _cret := C.temptype_subtype(C.tempSubtype(subtype)) + return bool(_cret) +} + + +// TemptypeSubtypeAll wraps MEOS C function temptype_subtype_all. +func TemptypeSubtypeAll(subtype TempSubtype) bool { + _cret := C.temptype_subtype_all(C.tempSubtype(subtype)) + return bool(_cret) +} + + +// TempsubtypeName wraps MEOS C function tempsubtype_name. +func TempsubtypeName(subtype TempSubtype) string { + _cret := C.tempsubtype_name(C.tempSubtype(subtype)) + return C.GoString(_cret) +} + + +// TempsubtypeFromString wraps MEOS C function tempsubtype_from_string. +func TempsubtypeFromString(str string, subtype unsafe.Pointer) bool { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tempsubtype_from_string(_c_str, (*C.int16)(unsafe.Pointer(subtype))) + return bool(_cret) +} + + +// MeosoperName wraps MEOS C function meosoper_name. +func MeosoperName(oper MeosOper) string { + _cret := C.meosoper_name(C.MeosOper(oper)) + return C.GoString(_cret) +} + + +// MeosoperFromString wraps MEOS C function meosoper_from_string. +func MeosoperFromString(name string) MeosOper { + _c_name := C.CString(name) + defer C.free(unsafe.Pointer(_c_name)) + _cret := C.meosoper_from_string(_c_name) + return MeosOper(_cret) +} + + +// InterptypeName wraps MEOS C function interptype_name. +func InterptypeName(interp Interpolation) string { + _cret := C.interptype_name(C.interpType(interp)) + return C.GoString(_cret) +} + + +// InterptypeFromString wraps MEOS C function interptype_from_string. +func InterptypeFromString(interp_str string) Interpolation { + _c_interp_str := C.CString(interp_str) + defer C.free(unsafe.Pointer(_c_interp_str)) + _cret := C.interptype_from_string(_c_interp_str) + return Interpolation(_cret) +} + + +// MeosTypeofHexwkb wraps MEOS C function meos_typeof_hexwkb. +func MeosTypeofHexwkb(hexwkb string) MeosType { + _c_hexwkb := C.CString(hexwkb) + defer C.free(unsafe.Pointer(_c_hexwkb)) + _cret := C.meos_typeof_hexwkb(_c_hexwkb) + return MeosType(_cret) +} + + +// MeostypeName wraps MEOS C function meostype_name. +func MeostypeName(type_ MeosType) string { + _cret := C.meostype_name(C.MeosType(type_)) + return C.GoString(_cret) +} + + +// TemptypeBasetype wraps MEOS C function temptype_basetype. +func TemptypeBasetype(type_ MeosType) MeosType { + _cret := C.temptype_basetype(C.MeosType(type_)) + return MeosType(_cret) +} + + +// SettypeBasetype wraps MEOS C function settype_basetype. +func SettypeBasetype(type_ MeosType) MeosType { + _cret := C.settype_basetype(C.MeosType(type_)) + return MeosType(_cret) +} + + +// SpantypeBasetype wraps MEOS C function spantype_basetype. +func SpantypeBasetype(type_ MeosType) MeosType { + _cret := C.spantype_basetype(C.MeosType(type_)) + return MeosType(_cret) +} + + +// SpantypeSpansettype wraps MEOS C function spantype_spansettype. +func SpantypeSpansettype(type_ MeosType) MeosType { + _cret := C.spantype_spansettype(C.MeosType(type_)) + return MeosType(_cret) +} + + +// SpansettypeSpantype wraps MEOS C function spansettype_spantype. +func SpansettypeSpantype(type_ MeosType) MeosType { + _cret := C.spansettype_spantype(C.MeosType(type_)) + return MeosType(_cret) +} + + +// BasetypeSpantype wraps MEOS C function basetype_spantype. +func BasetypeSpantype(type_ MeosType) MeosType { + _cret := C.basetype_spantype(C.MeosType(type_)) + return MeosType(_cret) +} + + +// BasetypeSettype wraps MEOS C function basetype_settype. +func BasetypeSettype(type_ MeosType) MeosType { + _cret := C.basetype_settype(C.MeosType(type_)) + return MeosType(_cret) +} + + +// TnumberBasetype wraps MEOS C function tnumber_basetype. +func TnumberBasetype(type_ MeosType) bool { + _cret := C.tnumber_basetype(C.MeosType(type_)) + return bool(_cret) +} + + +// GeoBasetype wraps MEOS C function geo_basetype. +func GeoBasetype(type_ MeosType) bool { + _cret := C.geo_basetype(C.MeosType(type_)) + return bool(_cret) +} + + +// MeosBasetype wraps MEOS C function meos_basetype. +func MeosBasetype(type_ MeosType) bool { + _cret := C.meos_basetype(C.MeosType(type_)) + return bool(_cret) +} + + +// AlphanumBasetype wraps MEOS C function alphanum_basetype. +func AlphanumBasetype(type_ MeosType) bool { + _cret := C.alphanum_basetype(C.MeosType(type_)) + return bool(_cret) +} + + +// AlphanumTemptype wraps MEOS C function alphanum_temptype. +func AlphanumTemptype(type_ MeosType) bool { + _cret := C.alphanum_temptype(C.MeosType(type_)) + return bool(_cret) +} + + +// TimeType wraps MEOS C function time_type. +func TimeType(type_ MeosType) bool { + _cret := C.time_type(C.MeosType(type_)) + return bool(_cret) +} + + +// SetBasetype wraps MEOS C function set_basetype. +func SetBasetype(type_ MeosType) bool { + _cret := C.set_basetype(C.MeosType(type_)) + return bool(_cret) +} + + +// SetType wraps MEOS C function set_type. +func SetType(type_ MeosType) bool { + _cret := C.set_type(C.MeosType(type_)) + return bool(_cret) +} + + +// NumsetType wraps MEOS C function numset_type. +func NumsetType(type_ MeosType) bool { + _cret := C.numset_type(C.MeosType(type_)) + return bool(_cret) +} + + +// EnsureNumsetType wraps MEOS C function ensure_numset_type. +func EnsureNumsetType(type_ MeosType) bool { + _cret := C.ensure_numset_type(C.MeosType(type_)) + return bool(_cret) +} + + +// TimesetType wraps MEOS C function timeset_type. +func TimesetType(type_ MeosType) bool { + _cret := C.timeset_type(C.MeosType(type_)) + return bool(_cret) +} + + +// SetSpantype wraps MEOS C function set_spantype. +func SetSpantype(type_ MeosType) bool { + _cret := C.set_spantype(C.MeosType(type_)) + return bool(_cret) +} + + +// EnsureSetSpantype wraps MEOS C function ensure_set_spantype. +func EnsureSetSpantype(type_ MeosType) bool { + _cret := C.ensure_set_spantype(C.MeosType(type_)) + return bool(_cret) +} + + +// AlphanumsetType wraps MEOS C function alphanumset_type. +func AlphanumsetType(settype MeosType) bool { + _cret := C.alphanumset_type(C.MeosType(settype)) + return bool(_cret) +} + + +// GeosetType wraps MEOS C function geoset_type. +func GeosetType(type_ MeosType) bool { + _cret := C.geoset_type(C.MeosType(type_)) + return bool(_cret) +} + + +// EnsureGeosetType wraps MEOS C function ensure_geoset_type. +func EnsureGeosetType(type_ MeosType) bool { + _cret := C.ensure_geoset_type(C.MeosType(type_)) + return bool(_cret) +} + + +// SpatialsetType wraps MEOS C function spatialset_type. +func SpatialsetType(type_ MeosType) bool { + _cret := C.spatialset_type(C.MeosType(type_)) + return bool(_cret) +} + + +// EnsureSpatialsetType wraps MEOS C function ensure_spatialset_type. +func EnsureSpatialsetType(type_ MeosType) bool { + _cret := C.ensure_spatialset_type(C.MeosType(type_)) + return bool(_cret) +} + + +// PointcloudBasetype wraps MEOS C function pointcloud_basetype. +func PointcloudBasetype(type_ MeosType) bool { + _cret := C.pointcloud_basetype(C.MeosType(type_)) + return bool(_cret) +} + + +// PointcloudsetType wraps MEOS C function pointcloudset_type. +func PointcloudsetType(type_ MeosType) bool { + _cret := C.pointcloudset_type(C.MeosType(type_)) + return bool(_cret) +} + + +// TpointcloudTemptype wraps MEOS C function tpointcloud_temptype. +func TpointcloudTemptype(type_ MeosType) bool { + _cret := C.tpointcloud_temptype(C.MeosType(type_)) + return bool(_cret) +} + + +// SpanBasetype wraps MEOS C function span_basetype. +func SpanBasetype(type_ MeosType) bool { + _cret := C.span_basetype(C.MeosType(type_)) + return bool(_cret) +} + + +// SpanCanonBasetype wraps MEOS C function span_canon_basetype. +func SpanCanonBasetype(type_ MeosType) bool { + _cret := C.span_canon_basetype(C.MeosType(type_)) + return bool(_cret) +} + + +// SpanType wraps MEOS C function span_type. +func SpanType(type_ MeosType) bool { + _cret := C.span_type(C.MeosType(type_)) + return bool(_cret) +} + + +// TypeSpanBbox wraps MEOS C function type_span_bbox. +func TypeSpanBbox(type_ MeosType) bool { + _cret := C.type_span_bbox(C.MeosType(type_)) + return bool(_cret) +} + + +// SpanTBOXType wraps MEOS C function span_tbox_type. +func SpanTBOXType(type_ MeosType) bool { + _cret := C.span_tbox_type(C.MeosType(type_)) + return bool(_cret) +} + + +// EnsureSpanTBOXType wraps MEOS C function ensure_span_tbox_type. +func EnsureSpanTBOXType(type_ MeosType) bool { + _cret := C.ensure_span_tbox_type(C.MeosType(type_)) + return bool(_cret) +} + + +// NumspanBasetype wraps MEOS C function numspan_basetype. +func NumspanBasetype(type_ MeosType) bool { + _cret := C.numspan_basetype(C.MeosType(type_)) + return bool(_cret) +} + + +// NumspanType wraps MEOS C function numspan_type. +func NumspanType(type_ MeosType) bool { + _cret := C.numspan_type(C.MeosType(type_)) + return bool(_cret) +} + + +// EnsureNumspanType wraps MEOS C function ensure_numspan_type. +func EnsureNumspanType(type_ MeosType) bool { + _cret := C.ensure_numspan_type(C.MeosType(type_)) + return bool(_cret) +} + + +// TimespanBasetype wraps MEOS C function timespan_basetype. +func TimespanBasetype(type_ MeosType) bool { + _cret := C.timespan_basetype(C.MeosType(type_)) + return bool(_cret) +} + + +// TimespanType wraps MEOS C function timespan_type. +func TimespanType(type_ MeosType) bool { + _cret := C.timespan_type(C.MeosType(type_)) + return bool(_cret) +} + + +// SpansetType wraps MEOS C function spanset_type. +func SpansetType(type_ MeosType) bool { + _cret := C.spanset_type(C.MeosType(type_)) + return bool(_cret) +} + + +// TimespansetType wraps MEOS C function timespanset_type. +func TimespansetType(type_ MeosType) bool { + _cret := C.timespanset_type(C.MeosType(type_)) + return bool(_cret) +} + + +// EnsureTimespansetType wraps MEOS C function ensure_timespanset_type. +func EnsureTimespansetType(type_ MeosType) bool { + _cret := C.ensure_timespanset_type(C.MeosType(type_)) + return bool(_cret) +} + + +// TemporalType wraps MEOS C function temporal_type. +func TemporalType(type_ MeosType) bool { + _cret := C.temporal_type(C.MeosType(type_)) + return bool(_cret) +} + + +// TemporalBasetype wraps MEOS C function temporal_basetype. +func TemporalBasetype(type_ MeosType) bool { + _cret := C.temporal_basetype(C.MeosType(type_)) + return bool(_cret) +} + + +// TemptypeSupportsLinear wraps MEOS C function temptype_supports_linear. +func TemptypeSupportsLinear(type_ MeosType) bool { + _cret := C.temptype_supports_linear(C.MeosType(type_)) + return bool(_cret) +} + + +// BasetypeByvalue wraps MEOS C function basetype_byvalue. +func BasetypeByvalue(type_ MeosType) bool { + _cret := C.basetype_byvalue(C.MeosType(type_)) + return bool(_cret) +} + + +// BasetypeVarlength wraps MEOS C function basetype_varlength. +func BasetypeVarlength(type_ MeosType) bool { + _cret := C.basetype_varlength(C.MeosType(type_)) + return bool(_cret) +} + + +// MeostypeLength wraps MEOS C function meostype_length. +func MeostypeLength(type_ MeosType) int16 { + _cret := C.meostype_length(C.MeosType(type_)) + return int16(_cret) +} + + +// TalphanumType wraps MEOS C function talphanum_type. +func TalphanumType(type_ MeosType) bool { + _cret := C.talphanum_type(C.MeosType(type_)) + return bool(_cret) +} + + +// TalphaType wraps MEOS C function talpha_type. +func TalphaType(type_ MeosType) bool { + _cret := C.talpha_type(C.MeosType(type_)) + return bool(_cret) +} + + +// TnumberType wraps MEOS C function tnumber_type. +func TnumberType(type_ MeosType) bool { + _cret := C.tnumber_type(C.MeosType(type_)) + return bool(_cret) +} + + +// EnsureTnumberType wraps MEOS C function ensure_tnumber_type. +func EnsureTnumberType(type_ MeosType) bool { + _cret := C.ensure_tnumber_type(C.MeosType(type_)) + return bool(_cret) +} + + +// EnsureTnumberBasetype wraps MEOS C function ensure_tnumber_basetype. +func EnsureTnumberBasetype(type_ MeosType) bool { + _cret := C.ensure_tnumber_basetype(C.MeosType(type_)) + return bool(_cret) +} + + +// TnumberSpantype wraps MEOS C function tnumber_spantype. +func TnumberSpantype(type_ MeosType) bool { + _cret := C.tnumber_spantype(C.MeosType(type_)) + return bool(_cret) +} + + +// SpatialBasetype wraps MEOS C function spatial_basetype. +func SpatialBasetype(type_ MeosType) bool { + _cret := C.spatial_basetype(C.MeosType(type_)) + return bool(_cret) +} + + +// TspatialType wraps MEOS C function tspatial_type. +func TspatialType(type_ MeosType) bool { + _cret := C.tspatial_type(C.MeosType(type_)) + return bool(_cret) +} + + +// EnsureTspatialType wraps MEOS C function ensure_tspatial_type. +func EnsureTspatialType(type_ MeosType) bool { + _cret := C.ensure_tspatial_type(C.MeosType(type_)) + return bool(_cret) +} + + +// TpointType wraps MEOS C function tpoint_type. +func TpointType(type_ MeosType) bool { + _cret := C.tpoint_type(C.MeosType(type_)) + return bool(_cret) +} + + +// EnsureTpointType wraps MEOS C function ensure_tpoint_type. +func EnsureTpointType(type_ MeosType) bool { + _cret := C.ensure_tpoint_type(C.MeosType(type_)) + return bool(_cret) +} + + +// TgeoType wraps MEOS C function tgeo_type. +func TgeoType(type_ MeosType) bool { + _cret := C.tgeo_type(C.MeosType(type_)) + return bool(_cret) +} + + +// EnsureTgeoType wraps MEOS C function ensure_tgeo_type. +func EnsureTgeoType(type_ MeosType) bool { + _cret := C.ensure_tgeo_type(C.MeosType(type_)) + return bool(_cret) +} + + +// TgeoTypeAll wraps MEOS C function tgeo_type_all. +func TgeoTypeAll(type_ MeosType) bool { + _cret := C.tgeo_type_all(C.MeosType(type_)) + return bool(_cret) +} + + +// EnsureTgeoTypeAll wraps MEOS C function ensure_tgeo_type_all. +func EnsureTgeoTypeAll(type_ MeosType) bool { + _cret := C.ensure_tgeo_type_all(C.MeosType(type_)) + return bool(_cret) +} + + +// TgeometryType wraps MEOS C function tgeometry_type. +func TgeometryType(type_ MeosType) bool { + _cret := C.tgeometry_type(C.MeosType(type_)) + return bool(_cret) +} + + +// EnsureTgeometryType wraps MEOS C function ensure_tgeometry_type. +func EnsureTgeometryType(type_ MeosType) bool { + _cret := C.ensure_tgeometry_type(C.MeosType(type_)) + return bool(_cret) +} + + +// TgeodeticType wraps MEOS C function tgeodetic_type. +func TgeodeticType(type_ MeosType) bool { + _cret := C.tgeodetic_type(C.MeosType(type_)) + return bool(_cret) +} + + +// EnsureTgeodeticType wraps MEOS C function ensure_tgeodetic_type. +func EnsureTgeodeticType(type_ MeosType) bool { + _cret := C.ensure_tgeodetic_type(C.MeosType(type_)) + return bool(_cret) +} + + +// EnsureTnumberTpointType wraps MEOS C function ensure_tnumber_tpoint_type. +func EnsureTnumberTpointType(type_ MeosType) bool { + _cret := C.ensure_tnumber_tpoint_type(C.MeosType(type_)) + return bool(_cret) +} + diff --git a/functions/meos_meos_cbuffer.go b/functions/meos_meos_cbuffer.go new file mode 100644 index 0000000..e4ed32b --- /dev/null +++ b/functions/meos_meos_cbuffer.go @@ -0,0 +1,1417 @@ +package functions + +/* +#include +#include "meos.h" +#include "meos_catalog.h" +#include "meos_geo.h" +#include "meos_internal.h" +#include "meos_internal_geo.h" +#include "meos_npoint.h" +#include "meos_cbuffer.h" +#include "meos_pose.h" +#include "meos_rgeo.h" +#include "meos_h3.h" +#include "meos_quadbin.h" +#include "meos_json.h" +#include "meos_pointcloud.h" +#include "meos_arrow.h" + +// cgo reads C.union_* as a union TYPE; alias the union operators so C.g resolves them as functions. +#define gunion_bigint_set union_bigint_set +#define gunion_bigint_span union_bigint_span +#define gunion_bigint_spanset union_bigint_spanset +#define gunion_cbuffer_set union_cbuffer_set +#define gunion_date_set union_date_set +#define gunion_date_span union_date_span +#define gunion_date_spanset union_date_spanset +#define gunion_float_set union_float_set +#define gunion_float_span union_float_span +#define gunion_float_spanset union_float_spanset +#define gunion_geo_set union_geo_set +#define gunion_int_set union_int_set +#define gunion_int_span union_int_span +#define gunion_int_spanset union_int_spanset +#define gunion_jsonb_set union_jsonb_set +#define gunion_npoint_set union_npoint_set +#define gunion_pcpatch_set union_pcpatch_set +#define gunion_pcpoint_set union_pcpoint_set +#define gunion_pose_set union_pose_set +#define gunion_set_bigint union_set_bigint +#define gunion_set_cbuffer union_set_cbuffer +#define gunion_set_date union_set_date +#define gunion_set_float union_set_float +#define gunion_set_geo union_set_geo +#define gunion_set_int union_set_int +#define gunion_set_jsonb union_set_jsonb +#define gunion_set_npoint union_set_npoint +#define gunion_set_pcpatch union_set_pcpatch +#define gunion_set_pcpoint union_set_pcpoint +#define gunion_set_pose union_set_pose +#define gunion_set_set union_set_set +#define gunion_set_text union_set_text +#define gunion_set_timestamptz union_set_timestamptz +#define gunion_set_value union_set_value +#define gunion_span_bigint union_span_bigint +#define gunion_span_date union_span_date +#define gunion_span_float union_span_float +#define gunion_span_int union_span_int +#define gunion_span_span union_span_span +#define gunion_span_spanset union_span_spanset +#define gunion_span_timestamptz union_span_timestamptz +#define gunion_span_value union_span_value +#define gunion_spanset_bigint union_spanset_bigint +#define gunion_spanset_date union_spanset_date +#define gunion_spanset_float union_spanset_float +#define gunion_spanset_int union_spanset_int +#define gunion_spanset_span union_spanset_span +#define gunion_spanset_spanset union_spanset_spanset +#define gunion_spanset_timestamptz union_spanset_timestamptz +#define gunion_spanset_value union_spanset_value +#define gunion_stbox_stbox union_stbox_stbox +#define gunion_tbox_tbox union_tbox_tbox +#define gunion_text_set union_text_set +#define gunion_timestamptz_set union_timestamptz_set +#define gunion_timestamptz_span union_timestamptz_span +#define gunion_timestamptz_spanset union_timestamptz_spanset +#define gunion_tpcbox_tpcbox union_tpcbox_tpcbox +#define gunion_value_set union_value_set +#define gunion_value_span union_value_span +#define gunion_value_spanset union_value_spanset +*/ +import "C" +import ( + "unsafe" +) + +var _ = unsafe.Pointer(nil) + +// CbufferAsEWKT wraps MEOS C function cbuffer_as_ewkt. +func CbufferAsEWKT(cb *Cbuffer, maxdd int) string { + _cret := C.cbuffer_as_ewkt(cb._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// CbufferAsHexwkb wraps MEOS C function cbuffer_as_hexwkb. +func CbufferAsHexwkb(cb *Cbuffer, variant uint8, size_out unsafe.Pointer) string { + _cret := C.cbuffer_as_hexwkb(cb._inner, C.uint8_t(variant), (*C.size_t)(unsafe.Pointer(size_out))) + return C.GoString(_cret) +} + + +// CbufferAsText wraps MEOS C function cbuffer_as_text. +func CbufferAsText(cb *Cbuffer, maxdd int) string { + _cret := C.cbuffer_as_text(cb._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// CbufferAsWKB wraps MEOS C function cbuffer_as_wkb. +func CbufferAsWKB(cb *Cbuffer, variant uint8, size_out unsafe.Pointer) unsafe.Pointer { + _cret := C.cbuffer_as_wkb(cb._inner, C.uint8_t(variant), (*C.size_t)(unsafe.Pointer(size_out))) + return unsafe.Pointer(_cret) +} + + +// CbufferFromHexwkb wraps MEOS C function cbuffer_from_hexwkb. +func CbufferFromHexwkb(hexwkb string) *Cbuffer { + _c_hexwkb := C.CString(hexwkb) + defer C.free(unsafe.Pointer(_c_hexwkb)) + _cret := C.cbuffer_from_hexwkb(_c_hexwkb) + return &Cbuffer{_inner: _cret} +} + + +// CbufferFromWKB wraps MEOS C function cbuffer_from_wkb. +func CbufferFromWKB(wkb unsafe.Pointer, size uint) *Cbuffer { + _cret := C.cbuffer_from_wkb((*C.uint8_t)(unsafe.Pointer(wkb)), C.size_t(size)) + return &Cbuffer{_inner: _cret} +} + + +// CbufferIn wraps MEOS C function cbuffer_in. +func CbufferIn(str string) *Cbuffer { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.cbuffer_in(_c_str) + return &Cbuffer{_inner: _cret} +} + + +// CbufferOut wraps MEOS C function cbuffer_out. +func CbufferOut(cb *Cbuffer, maxdd int) string { + _cret := C.cbuffer_out(cb._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// CbufferCopy wraps MEOS C function cbuffer_copy. +func CbufferCopy(cb *Cbuffer) *Cbuffer { + _cret := C.cbuffer_copy(cb._inner) + return &Cbuffer{_inner: _cret} +} + + +// CbufferMake wraps MEOS C function cbuffer_make. +func CbufferMake(point *Geom, radius float64) *Cbuffer { + _cret := C.cbuffer_make(point._inner, C.double(radius)) + return &Cbuffer{_inner: _cret} +} + + +// CbufferToGeom wraps MEOS C function cbuffer_to_geom. +func CbufferToGeom(cb *Cbuffer) *Geom { + _cret := C.cbuffer_to_geom(cb._inner) + return &Geom{_inner: _cret} +} + + +// CbufferToSTBOX wraps MEOS C function cbuffer_to_stbox. +func CbufferToSTBOX(cb *Cbuffer) *STBox { + _cret := C.cbuffer_to_stbox(cb._inner) + return &STBox{_inner: _cret} +} + + +// CbufferarrToGeom wraps MEOS C function cbufferarr_to_geom. +func CbufferarrToGeom(cbarr unsafe.Pointer, count int) *Geom { + _cret := C.cbufferarr_to_geom((**C.Cbuffer)(unsafe.Pointer(cbarr)), C.int(count)) + return &Geom{_inner: _cret} +} + + +// GeomToCbuffer wraps MEOS C function geom_to_cbuffer. +func GeomToCbuffer(gs *Geom) *Cbuffer { + _cret := C.geom_to_cbuffer(gs._inner) + return &Cbuffer{_inner: _cret} +} + + +// CbufferHash wraps MEOS C function cbuffer_hash. +func CbufferHash(cb *Cbuffer) uint32 { + _cret := C.cbuffer_hash(cb._inner) + return uint32(_cret) +} + + +// CbufferHashExtended wraps MEOS C function cbuffer_hash_extended. +func CbufferHashExtended(cb *Cbuffer, seed uint64) uint64 { + _cret := C.cbuffer_hash_extended(cb._inner, C.uint64_t(seed)) + return uint64(_cret) +} + + +// CbufferPoint wraps MEOS C function cbuffer_point. +func CbufferPoint(cb *Cbuffer) *Geom { + _cret := C.cbuffer_point(cb._inner) + return &Geom{_inner: _cret} +} + + +// CbufferRadius wraps MEOS C function cbuffer_radius. +func CbufferRadius(cb *Cbuffer) float64 { + _cret := C.cbuffer_radius(cb._inner) + return float64(_cret) +} + + +// CbufferRound wraps MEOS C function cbuffer_round. +func CbufferRound(cb *Cbuffer, maxdd int) *Cbuffer { + _cret := C.cbuffer_round(cb._inner, C.int(maxdd)) + return &Cbuffer{_inner: _cret} +} + + +// CbufferarrRound wraps MEOS C function cbufferarr_round. +func CbufferarrRound(cbarr unsafe.Pointer, count int, maxdd int) unsafe.Pointer { + _cret := C.cbufferarr_round((**C.Cbuffer)(unsafe.Pointer(cbarr)), C.int(count), C.int(maxdd)) + return unsafe.Pointer(_cret) +} + + +// CbufferSetSRID wraps MEOS C function cbuffer_set_srid. +func CbufferSetSRID(cb *Cbuffer, srid int32) { + C.cbuffer_set_srid(cb._inner, C.int32_t(srid)) +} + + +// CbufferSRID wraps MEOS C function cbuffer_srid. +func CbufferSRID(cb *Cbuffer) int32 { + _cret := C.cbuffer_srid(cb._inner) + return int32(_cret) +} + + +// CbufferTransform wraps MEOS C function cbuffer_transform. +func CbufferTransform(cb *Cbuffer, srid int32) *Cbuffer { + _cret := C.cbuffer_transform(cb._inner, C.int32_t(srid)) + return &Cbuffer{_inner: _cret} +} + + +// CbufferTransformPipeline wraps MEOS C function cbuffer_transform_pipeline. +func CbufferTransformPipeline(cb *Cbuffer, pipelinestr string, srid int32, is_forward bool) *Cbuffer { + _c_pipelinestr := C.CString(pipelinestr) + defer C.free(unsafe.Pointer(_c_pipelinestr)) + _cret := C.cbuffer_transform_pipeline(cb._inner, _c_pipelinestr, C.int32_t(srid), C.bool(is_forward)) + return &Cbuffer{_inner: _cret} +} + + +// ContainsCbufferCbuffer wraps MEOS C function contains_cbuffer_cbuffer. +func ContainsCbufferCbuffer(cb1 *Cbuffer, cb2 *Cbuffer) int { + _cret := C.contains_cbuffer_cbuffer(cb1._inner, cb2._inner) + return int(_cret) +} + + +// CoversCbufferCbuffer wraps MEOS C function covers_cbuffer_cbuffer. +func CoversCbufferCbuffer(cb1 *Cbuffer, cb2 *Cbuffer) int { + _cret := C.covers_cbuffer_cbuffer(cb1._inner, cb2._inner) + return int(_cret) +} + + +// DisjointCbufferCbuffer wraps MEOS C function disjoint_cbuffer_cbuffer. +func DisjointCbufferCbuffer(cb1 *Cbuffer, cb2 *Cbuffer) int { + _cret := C.disjoint_cbuffer_cbuffer(cb1._inner, cb2._inner) + return int(_cret) +} + + +// DwithinCbufferCbuffer wraps MEOS C function dwithin_cbuffer_cbuffer. +func DwithinCbufferCbuffer(cb1 *Cbuffer, cb2 *Cbuffer, dist float64) int { + _cret := C.dwithin_cbuffer_cbuffer(cb1._inner, cb2._inner, C.double(dist)) + return int(_cret) +} + + +// IntersectsCbufferCbuffer wraps MEOS C function intersects_cbuffer_cbuffer. +func IntersectsCbufferCbuffer(cb1 *Cbuffer, cb2 *Cbuffer) int { + _cret := C.intersects_cbuffer_cbuffer(cb1._inner, cb2._inner) + return int(_cret) +} + + +// TouchesCbufferCbuffer wraps MEOS C function touches_cbuffer_cbuffer. +func TouchesCbufferCbuffer(cb1 *Cbuffer, cb2 *Cbuffer) int { + _cret := C.touches_cbuffer_cbuffer(cb1._inner, cb2._inner) + return int(_cret) +} + + +// CbufferTstzspanToSTBOX wraps MEOS C function cbuffer_tstzspan_to_stbox. +func CbufferTstzspanToSTBOX(cb *Cbuffer, s *Span) *STBox { + _cret := C.cbuffer_tstzspan_to_stbox(cb._inner, s._inner) + return &STBox{_inner: _cret} +} + + +// CbufferTimestamptzToSTBOX wraps MEOS C function cbuffer_timestamptz_to_stbox. +func CbufferTimestamptzToSTBOX(cb *Cbuffer, t int64) *STBox { + _cret := C.cbuffer_timestamptz_to_stbox(cb._inner, C.TimestampTz(t)) + return &STBox{_inner: _cret} +} + + +// DistanceCbufferCbuffer wraps MEOS C function distance_cbuffer_cbuffer. +func DistanceCbufferCbuffer(cb1 *Cbuffer, cb2 *Cbuffer) float64 { + _cret := C.distance_cbuffer_cbuffer(cb1._inner, cb2._inner) + return float64(_cret) +} + + +// DistanceCbufferGeo wraps MEOS C function distance_cbuffer_geo. +func DistanceCbufferGeo(cb *Cbuffer, gs *Geom) float64 { + _cret := C.distance_cbuffer_geo(cb._inner, gs._inner) + return float64(_cret) +} + + +// DistanceCbufferSTBOX wraps MEOS C function distance_cbuffer_stbox. +func DistanceCbufferSTBOX(cb *Cbuffer, box *STBox) float64 { + _cret := C.distance_cbuffer_stbox(cb._inner, box._inner) + return float64(_cret) +} + + +// NadCbufferSTBOX wraps MEOS C function nad_cbuffer_stbox. +func NadCbufferSTBOX(cb *Cbuffer, box *STBox) float64 { + _cret := C.nad_cbuffer_stbox(cb._inner, box._inner) + return float64(_cret) +} + + +// CbufferCmp wraps MEOS C function cbuffer_cmp. +func CbufferCmp(cb1 *Cbuffer, cb2 *Cbuffer) int { + _cret := C.cbuffer_cmp(cb1._inner, cb2._inner) + return int(_cret) +} + + +// CbufferEq wraps MEOS C function cbuffer_eq. +func CbufferEq(cb1 *Cbuffer, cb2 *Cbuffer) bool { + _cret := C.cbuffer_eq(cb1._inner, cb2._inner) + return bool(_cret) +} + + +// CbufferGe wraps MEOS C function cbuffer_ge. +func CbufferGe(cb1 *Cbuffer, cb2 *Cbuffer) bool { + _cret := C.cbuffer_ge(cb1._inner, cb2._inner) + return bool(_cret) +} + + +// CbufferGt wraps MEOS C function cbuffer_gt. +func CbufferGt(cb1 *Cbuffer, cb2 *Cbuffer) bool { + _cret := C.cbuffer_gt(cb1._inner, cb2._inner) + return bool(_cret) +} + + +// CbufferLe wraps MEOS C function cbuffer_le. +func CbufferLe(cb1 *Cbuffer, cb2 *Cbuffer) bool { + _cret := C.cbuffer_le(cb1._inner, cb2._inner) + return bool(_cret) +} + + +// CbufferLt wraps MEOS C function cbuffer_lt. +func CbufferLt(cb1 *Cbuffer, cb2 *Cbuffer) bool { + _cret := C.cbuffer_lt(cb1._inner, cb2._inner) + return bool(_cret) +} + + +// CbufferNe wraps MEOS C function cbuffer_ne. +func CbufferNe(cb1 *Cbuffer, cb2 *Cbuffer) bool { + _cret := C.cbuffer_ne(cb1._inner, cb2._inner) + return bool(_cret) +} + + +// CbufferNsame wraps MEOS C function cbuffer_nsame. +func CbufferNsame(cb1 *Cbuffer, cb2 *Cbuffer) bool { + _cret := C.cbuffer_nsame(cb1._inner, cb2._inner) + return bool(_cret) +} + + +// CbufferSame wraps MEOS C function cbuffer_same. +func CbufferSame(cb1 *Cbuffer, cb2 *Cbuffer) bool { + _cret := C.cbuffer_same(cb1._inner, cb2._inner) + return bool(_cret) +} + + +// CbuffersetIn wraps MEOS C function cbufferset_in. +func CbuffersetIn(str string) *Set { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.cbufferset_in(_c_str) + return &Set{_inner: _cret} +} + + +// CbuffersetOut wraps MEOS C function cbufferset_out. +func CbuffersetOut(s *Set, maxdd int) string { + _cret := C.cbufferset_out(s._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// CbuffersetMake wraps MEOS C function cbufferset_make. +func CbuffersetMake(values unsafe.Pointer, count int) *Set { + _cret := C.cbufferset_make((**C.Cbuffer)(unsafe.Pointer(values)), C.int(count)) + return &Set{_inner: _cret} +} + + +// CbufferToSet wraps MEOS C function cbuffer_to_set. +func CbufferToSet(cb *Cbuffer) *Set { + _cret := C.cbuffer_to_set(cb._inner) + return &Set{_inner: _cret} +} + + +// CbuffersetEndValue wraps MEOS C function cbufferset_end_value. +func CbuffersetEndValue(s *Set) *Cbuffer { + _cret := C.cbufferset_end_value(s._inner) + return &Cbuffer{_inner: _cret} +} + + +// CbuffersetStartValue wraps MEOS C function cbufferset_start_value. +func CbuffersetStartValue(s *Set) *Cbuffer { + _cret := C.cbufferset_start_value(s._inner) + return &Cbuffer{_inner: _cret} +} + + +// CbuffersetValueN wraps MEOS C function cbufferset_value_n. +func CbuffersetValueN(s *Set, n int) (bool, *Cbuffer) { + var _out_result *C.Cbuffer + _cret := C.cbufferset_value_n(s._inner, C.int(n), &_out_result) + return bool(_cret), &Cbuffer{_inner: _out_result} +} + + +// CbuffersetValues wraps MEOS C function cbufferset_values. +func CbuffersetValues(s *Set, count unsafe.Pointer) unsafe.Pointer { + _cret := C.cbufferset_values(s._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// CbufferUnionTransfn wraps MEOS C function cbuffer_union_transfn. +func CbufferUnionTransfn(state *Set, cb *Cbuffer) *Set { + _cret := C.cbuffer_union_transfn(state._inner, cb._inner) + return &Set{_inner: _cret} +} + + +// ContainedCbufferSet wraps MEOS C function contained_cbuffer_set. +func ContainedCbufferSet(cb *Cbuffer, s *Set) bool { + _cret := C.contained_cbuffer_set(cb._inner, s._inner) + return bool(_cret) +} + + +// ContainsSetCbuffer wraps MEOS C function contains_set_cbuffer. +func ContainsSetCbuffer(s *Set, cb *Cbuffer) bool { + _cret := C.contains_set_cbuffer(s._inner, cb._inner) + return bool(_cret) +} + + +// IntersectionCbufferSet wraps MEOS C function intersection_cbuffer_set. +func IntersectionCbufferSet(cb *Cbuffer, s *Set) *Set { + _cret := C.intersection_cbuffer_set(cb._inner, s._inner) + return &Set{_inner: _cret} +} + + +// IntersectionSetCbuffer wraps MEOS C function intersection_set_cbuffer. +func IntersectionSetCbuffer(s *Set, cb *Cbuffer) *Set { + _cret := C.intersection_set_cbuffer(s._inner, cb._inner) + return &Set{_inner: _cret} +} + + +// MinusCbufferSet wraps MEOS C function minus_cbuffer_set. +func MinusCbufferSet(cb *Cbuffer, s *Set) *Set { + _cret := C.minus_cbuffer_set(cb._inner, s._inner) + return &Set{_inner: _cret} +} + + +// MinusSetCbuffer wraps MEOS C function minus_set_cbuffer. +func MinusSetCbuffer(s *Set, cb *Cbuffer) *Set { + _cret := C.minus_set_cbuffer(s._inner, cb._inner) + return &Set{_inner: _cret} +} + + +// UnionCbufferSet wraps MEOS C function union_cbuffer_set. +func UnionCbufferSet(cb *Cbuffer, s *Set) *Set { + _cret := C.gunion_cbuffer_set(cb._inner, s._inner) + return &Set{_inner: _cret} +} + + +// UnionSetCbuffer wraps MEOS C function union_set_cbuffer. +func UnionSetCbuffer(s *Set, cb *Cbuffer) *Set { + _cret := C.gunion_set_cbuffer(s._inner, cb._inner) + return &Set{_inner: _cret} +} + + +// TcbufferIn wraps MEOS C function tcbuffer_in. +func TcbufferIn(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tcbuffer_in(_c_str) + return &Temporal{_inner: _cret} +} + + +// TcbufferFromMFJSON wraps MEOS C function tcbuffer_from_mfjson. +func TcbufferFromMFJSON(mfjson string) *Temporal { + _c_mfjson := C.CString(mfjson) + defer C.free(unsafe.Pointer(_c_mfjson)) + _cret := C.tcbuffer_from_mfjson(_c_mfjson) + return &Temporal{_inner: _cret} +} + + +// TcbufferinstMake wraps MEOS C function tcbufferinst_make. +func TcbufferinstMake(cb *Cbuffer, t int64) *TInstant { + _cret := C.tcbufferinst_make(cb._inner, C.TimestampTz(t)) + return &TInstant{_inner: _cret} +} + + +// TcbufferMake wraps MEOS C function tcbuffer_make. +func TcbufferMake(tpoint *Temporal, tfloat *Temporal) *Temporal { + _cret := C.tcbuffer_make(tpoint._inner, tfloat._inner) + return &Temporal{_inner: _cret} +} + + +// TcbufferFromBaseTemp wraps MEOS C function tcbuffer_from_base_temp. +func TcbufferFromBaseTemp(cb *Cbuffer, temp *Temporal) *Temporal { + _cret := C.tcbuffer_from_base_temp(cb._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TcbufferseqFromBaseTstzset wraps MEOS C function tcbufferseq_from_base_tstzset. +func TcbufferseqFromBaseTstzset(cb *Cbuffer, s *Set) *TSequence { + _cret := C.tcbufferseq_from_base_tstzset(cb._inner, s._inner) + return &TSequence{_inner: _cret} +} + + +// TcbufferseqFromBaseTstzspan wraps MEOS C function tcbufferseq_from_base_tstzspan. +func TcbufferseqFromBaseTstzspan(cb *Cbuffer, s *Span, interp Interpolation) *TSequence { + _cret := C.tcbufferseq_from_base_tstzspan(cb._inner, s._inner, C.interpType(interp)) + return &TSequence{_inner: _cret} +} + + +// TcbufferseqsetFromBaseTstzspanset wraps MEOS C function tcbufferseqset_from_base_tstzspanset. +func TcbufferseqsetFromBaseTstzspanset(cb *Cbuffer, ss *SpanSet, interp Interpolation) *TSequenceSet { + _cret := C.tcbufferseqset_from_base_tstzspanset(cb._inner, ss._inner, C.interpType(interp)) + return &TSequenceSet{_inner: _cret} +} + + +// TcbufferEndValue wraps MEOS C function tcbuffer_end_value. +func TcbufferEndValue(temp *Temporal) *Cbuffer { + _cret := C.tcbuffer_end_value(temp._inner) + return &Cbuffer{_inner: _cret} +} + + +// TcbufferPoints wraps MEOS C function tcbuffer_points. +func TcbufferPoints(temp *Temporal) *Set { + _cret := C.tcbuffer_points(temp._inner) + return &Set{_inner: _cret} +} + + +// TcbufferRadius wraps MEOS C function tcbuffer_radius. +func TcbufferRadius(temp *Temporal) *Set { + _cret := C.tcbuffer_radius(temp._inner) + return &Set{_inner: _cret} +} + + +// TcbufferTraversedArea wraps MEOS C function tcbuffer_traversed_area. +func TcbufferTraversedArea(temp *Temporal, unary_union bool) *Geom { + _cret := C.tcbuffer_traversed_area(temp._inner, C.bool(unary_union)) + return &Geom{_inner: _cret} +} + + +// TcbufferConvexHull wraps MEOS C function tcbuffer_convex_hull. +func TcbufferConvexHull(temp *Temporal) *Geom { + _cret := C.tcbuffer_convex_hull(temp._inner) + return &Geom{_inner: _cret} +} + + +// TcbufferStartValue wraps MEOS C function tcbuffer_start_value. +func TcbufferStartValue(temp *Temporal) *Cbuffer { + _cret := C.tcbuffer_start_value(temp._inner) + return &Cbuffer{_inner: _cret} +} + + +// TcbufferValueAtTimestamptz wraps MEOS C function tcbuffer_value_at_timestamptz. +func TcbufferValueAtTimestamptz(temp *Temporal, t int64, strict bool) (bool, *Cbuffer) { + var _out_value *C.Cbuffer + _cret := C.tcbuffer_value_at_timestamptz(temp._inner, C.TimestampTz(t), C.bool(strict), &_out_value) + return bool(_cret), &Cbuffer{_inner: _out_value} +} + + +// TcbufferValueN wraps MEOS C function tcbuffer_value_n. +func TcbufferValueN(temp *Temporal, n int) (bool, *Cbuffer) { + var _out_result *C.Cbuffer + _cret := C.tcbuffer_value_n(temp._inner, C.int(n), &_out_result) + return bool(_cret), &Cbuffer{_inner: _out_result} +} + + +// TcbufferValues wraps MEOS C function tcbuffer_values. +func TcbufferValues(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tcbuffer_values(temp._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TcbufferToTfloat wraps MEOS C function tcbuffer_to_tfloat. +func TcbufferToTfloat(temp *Temporal) *Temporal { + _cret := C.tcbuffer_to_tfloat(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TcbufferToTgeompoint wraps MEOS C function tcbuffer_to_tgeompoint. +func TcbufferToTgeompoint(temp *Temporal) *Temporal { + _cret := C.tcbuffer_to_tgeompoint(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TgeometryToTcbuffer wraps MEOS C function tgeometry_to_tcbuffer. +func TgeometryToTcbuffer(temp *Temporal) *Temporal { + _cret := C.tgeometry_to_tcbuffer(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TcbufferExpand wraps MEOS C function tcbuffer_expand. +func TcbufferExpand(temp *Temporal, dist float64) *Temporal { + _cret := C.tcbuffer_expand(temp._inner, C.double(dist)) + return &Temporal{_inner: _cret} +} + + +// TcbufferAtCbuffer wraps MEOS C function tcbuffer_at_cbuffer. +func TcbufferAtCbuffer(temp *Temporal, cb *Cbuffer) *Temporal { + _cret := C.tcbuffer_at_cbuffer(temp._inner, cb._inner) + return &Temporal{_inner: _cret} +} + + +// TcbufferAtGeom wraps MEOS C function tcbuffer_at_geom. +func TcbufferAtGeom(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tcbuffer_at_geom(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TcbufferAtSTBOX wraps MEOS C function tcbuffer_at_stbox. +func TcbufferAtSTBOX(temp *Temporal, box *STBox, border_inc bool) *Temporal { + _cret := C.tcbuffer_at_stbox(temp._inner, box._inner, C.bool(border_inc)) + return &Temporal{_inner: _cret} +} + + +// TcbufferMinusCbuffer wraps MEOS C function tcbuffer_minus_cbuffer. +func TcbufferMinusCbuffer(temp *Temporal, cb *Cbuffer) *Temporal { + _cret := C.tcbuffer_minus_cbuffer(temp._inner, cb._inner) + return &Temporal{_inner: _cret} +} + + +// TcbufferMinusGeom wraps MEOS C function tcbuffer_minus_geom. +func TcbufferMinusGeom(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tcbuffer_minus_geom(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TcbufferMinusSTBOX wraps MEOS C function tcbuffer_minus_stbox. +func TcbufferMinusSTBOX(temp *Temporal, box *STBox, border_inc bool) *Temporal { + _cret := C.tcbuffer_minus_stbox(temp._inner, box._inner, C.bool(border_inc)) + return &Temporal{_inner: _cret} +} + + +// TdistanceTcbufferCbuffer wraps MEOS C function tdistance_tcbuffer_cbuffer. +func TdistanceTcbufferCbuffer(temp *Temporal, cb *Cbuffer) *Temporal { + _cret := C.tdistance_tcbuffer_cbuffer(temp._inner, cb._inner) + return &Temporal{_inner: _cret} +} + + +// TdistanceTcbufferGeo wraps MEOS C function tdistance_tcbuffer_geo. +func TdistanceTcbufferGeo(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tdistance_tcbuffer_geo(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TdistanceTcbufferTcbuffer wraps MEOS C function tdistance_tcbuffer_tcbuffer. +func TdistanceTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tdistance_tcbuffer_tcbuffer(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// NadTcbufferCbuffer wraps MEOS C function nad_tcbuffer_cbuffer. +func NadTcbufferCbuffer(temp *Temporal, cb *Cbuffer) float64 { + _cret := C.nad_tcbuffer_cbuffer(temp._inner, cb._inner) + return float64(_cret) +} + + +// NadTcbufferGeo wraps MEOS C function nad_tcbuffer_geo. +func NadTcbufferGeo(temp *Temporal, gs *Geom) float64 { + _cret := C.nad_tcbuffer_geo(temp._inner, gs._inner) + return float64(_cret) +} + + +// NadTcbufferSTBOX wraps MEOS C function nad_tcbuffer_stbox. +func NadTcbufferSTBOX(temp *Temporal, box *STBox) float64 { + _cret := C.nad_tcbuffer_stbox(temp._inner, box._inner) + return float64(_cret) +} + + +// NadTcbufferTcbuffer wraps MEOS C function nad_tcbuffer_tcbuffer. +func NadTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal) float64 { + _cret := C.nad_tcbuffer_tcbuffer(temp1._inner, temp2._inner) + return float64(_cret) +} + + +// MindistanceTcbufferTcbuffer wraps MEOS C function mindistance_tcbuffer_tcbuffer. +func MindistanceTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal, threshold float64) float64 { + _cret := C.mindistance_tcbuffer_tcbuffer(temp1._inner, temp2._inner, C.double(threshold)) + return float64(_cret) +} + + +// NaiTcbufferCbuffer wraps MEOS C function nai_tcbuffer_cbuffer. +func NaiTcbufferCbuffer(temp *Temporal, cb *Cbuffer) *TInstant { + _cret := C.nai_tcbuffer_cbuffer(temp._inner, cb._inner) + return &TInstant{_inner: _cret} +} + + +// NaiTcbufferGeo wraps MEOS C function nai_tcbuffer_geo. +func NaiTcbufferGeo(temp *Temporal, gs *Geom) *TInstant { + _cret := C.nai_tcbuffer_geo(temp._inner, gs._inner) + return &TInstant{_inner: _cret} +} + + +// NaiTcbufferTcbuffer wraps MEOS C function nai_tcbuffer_tcbuffer. +func NaiTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal) *TInstant { + _cret := C.nai_tcbuffer_tcbuffer(temp1._inner, temp2._inner) + return &TInstant{_inner: _cret} +} + + +// ShortestlineTcbufferCbuffer wraps MEOS C function shortestline_tcbuffer_cbuffer. +func ShortestlineTcbufferCbuffer(temp *Temporal, cb *Cbuffer) *Geom { + _cret := C.shortestline_tcbuffer_cbuffer(temp._inner, cb._inner) + return &Geom{_inner: _cret} +} + + +// ShortestlineTcbufferGeo wraps MEOS C function shortestline_tcbuffer_geo. +func ShortestlineTcbufferGeo(temp *Temporal, gs *Geom) *Geom { + _cret := C.shortestline_tcbuffer_geo(temp._inner, gs._inner) + return &Geom{_inner: _cret} +} + + +// ShortestlineTcbufferTcbuffer wraps MEOS C function shortestline_tcbuffer_tcbuffer. +func ShortestlineTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal) *Geom { + _cret := C.shortestline_tcbuffer_tcbuffer(temp1._inner, temp2._inner) + return &Geom{_inner: _cret} +} + + +// AlwaysEqCbufferTcbuffer wraps MEOS C function always_eq_cbuffer_tcbuffer. +func AlwaysEqCbufferTcbuffer(cb *Cbuffer, temp *Temporal) int { + _cret := C.always_eq_cbuffer_tcbuffer(cb._inner, temp._inner) + return int(_cret) +} + + +// AlwaysEqTcbufferCbuffer wraps MEOS C function always_eq_tcbuffer_cbuffer. +func AlwaysEqTcbufferCbuffer(temp *Temporal, cb *Cbuffer) int { + _cret := C.always_eq_tcbuffer_cbuffer(temp._inner, cb._inner) + return int(_cret) +} + + +// AlwaysEqTcbufferTcbuffer wraps MEOS C function always_eq_tcbuffer_tcbuffer. +func AlwaysEqTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.always_eq_tcbuffer_tcbuffer(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AlwaysNeCbufferTcbuffer wraps MEOS C function always_ne_cbuffer_tcbuffer. +func AlwaysNeCbufferTcbuffer(cb *Cbuffer, temp *Temporal) int { + _cret := C.always_ne_cbuffer_tcbuffer(cb._inner, temp._inner) + return int(_cret) +} + + +// AlwaysNeTcbufferCbuffer wraps MEOS C function always_ne_tcbuffer_cbuffer. +func AlwaysNeTcbufferCbuffer(temp *Temporal, cb *Cbuffer) int { + _cret := C.always_ne_tcbuffer_cbuffer(temp._inner, cb._inner) + return int(_cret) +} + + +// AlwaysNeTcbufferTcbuffer wraps MEOS C function always_ne_tcbuffer_tcbuffer. +func AlwaysNeTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.always_ne_tcbuffer_tcbuffer(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EverEqCbufferTcbuffer wraps MEOS C function ever_eq_cbuffer_tcbuffer. +func EverEqCbufferTcbuffer(cb *Cbuffer, temp *Temporal) int { + _cret := C.ever_eq_cbuffer_tcbuffer(cb._inner, temp._inner) + return int(_cret) +} + + +// EverEqTcbufferCbuffer wraps MEOS C function ever_eq_tcbuffer_cbuffer. +func EverEqTcbufferCbuffer(temp *Temporal, cb *Cbuffer) int { + _cret := C.ever_eq_tcbuffer_cbuffer(temp._inner, cb._inner) + return int(_cret) +} + + +// EverEqTcbufferTcbuffer wraps MEOS C function ever_eq_tcbuffer_tcbuffer. +func EverEqTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ever_eq_tcbuffer_tcbuffer(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EverNeCbufferTcbuffer wraps MEOS C function ever_ne_cbuffer_tcbuffer. +func EverNeCbufferTcbuffer(cb *Cbuffer, temp *Temporal) int { + _cret := C.ever_ne_cbuffer_tcbuffer(cb._inner, temp._inner) + return int(_cret) +} + + +// EverNeTcbufferCbuffer wraps MEOS C function ever_ne_tcbuffer_cbuffer. +func EverNeTcbufferCbuffer(temp *Temporal, cb *Cbuffer) int { + _cret := C.ever_ne_tcbuffer_cbuffer(temp._inner, cb._inner) + return int(_cret) +} + + +// EverNeTcbufferTcbuffer wraps MEOS C function ever_ne_tcbuffer_tcbuffer. +func EverNeTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ever_ne_tcbuffer_tcbuffer(temp1._inner, temp2._inner) + return int(_cret) +} + + +// TeqCbufferTcbuffer wraps MEOS C function teq_cbuffer_tcbuffer. +func TeqCbufferTcbuffer(cb *Cbuffer, temp *Temporal) *Temporal { + _cret := C.teq_cbuffer_tcbuffer(cb._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TeqTcbufferCbuffer wraps MEOS C function teq_tcbuffer_cbuffer. +func TeqTcbufferCbuffer(temp *Temporal, cb *Cbuffer) *Temporal { + _cret := C.teq_tcbuffer_cbuffer(temp._inner, cb._inner) + return &Temporal{_inner: _cret} +} + + +// TneCbufferTcbuffer wraps MEOS C function tne_cbuffer_tcbuffer. +func TneCbufferTcbuffer(cb *Cbuffer, temp *Temporal) *Temporal { + _cret := C.tne_cbuffer_tcbuffer(cb._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TneTcbufferCbuffer wraps MEOS C function tne_tcbuffer_cbuffer. +func TneTcbufferCbuffer(temp *Temporal, cb *Cbuffer) *Temporal { + _cret := C.tne_tcbuffer_cbuffer(temp._inner, cb._inner) + return &Temporal{_inner: _cret} +} + + +// AcontainsCbufferTcbuffer wraps MEOS C function acontains_cbuffer_tcbuffer. +func AcontainsCbufferTcbuffer(cb *Cbuffer, temp *Temporal) int { + _cret := C.acontains_cbuffer_tcbuffer(cb._inner, temp._inner) + return int(_cret) +} + + +// AcontainsGeoTcbuffer wraps MEOS C function acontains_geo_tcbuffer. +func AcontainsGeoTcbuffer(gs *Geom, temp *Temporal) int { + _cret := C.acontains_geo_tcbuffer(gs._inner, temp._inner) + return int(_cret) +} + + +// AcontainsTcbufferCbuffer wraps MEOS C function acontains_tcbuffer_cbuffer. +func AcontainsTcbufferCbuffer(temp *Temporal, cb *Cbuffer) int { + _cret := C.acontains_tcbuffer_cbuffer(temp._inner, cb._inner) + return int(_cret) +} + + +// AcontainsTcbufferGeo wraps MEOS C function acontains_tcbuffer_geo. +func AcontainsTcbufferGeo(temp *Temporal, gs *Geom) int { + _cret := C.acontains_tcbuffer_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// AcoversCbufferTcbuffer wraps MEOS C function acovers_cbuffer_tcbuffer. +func AcoversCbufferTcbuffer(cb *Cbuffer, temp *Temporal) int { + _cret := C.acovers_cbuffer_tcbuffer(cb._inner, temp._inner) + return int(_cret) +} + + +// AcoversGeoTcbuffer wraps MEOS C function acovers_geo_tcbuffer. +func AcoversGeoTcbuffer(gs *Geom, temp *Temporal) int { + _cret := C.acovers_geo_tcbuffer(gs._inner, temp._inner) + return int(_cret) +} + + +// AcoversTcbufferCbuffer wraps MEOS C function acovers_tcbuffer_cbuffer. +func AcoversTcbufferCbuffer(temp *Temporal, cb *Cbuffer) int { + _cret := C.acovers_tcbuffer_cbuffer(temp._inner, cb._inner) + return int(_cret) +} + + +// AcoversTcbufferGeo wraps MEOS C function acovers_tcbuffer_geo. +func AcoversTcbufferGeo(temp *Temporal, gs *Geom) int { + _cret := C.acovers_tcbuffer_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// AcoversTcbufferTcbuffer wraps MEOS C function acovers_tcbuffer_tcbuffer. +func AcoversTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.acovers_tcbuffer_tcbuffer(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AdisjointTcbufferGeo wraps MEOS C function adisjoint_tcbuffer_geo. +func AdisjointTcbufferGeo(temp *Temporal, gs *Geom) int { + _cret := C.adisjoint_tcbuffer_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// AdisjointTcbufferCbuffer wraps MEOS C function adisjoint_tcbuffer_cbuffer. +func AdisjointTcbufferCbuffer(temp *Temporal, cb *Cbuffer) int { + _cret := C.adisjoint_tcbuffer_cbuffer(temp._inner, cb._inner) + return int(_cret) +} + + +// AdisjointTcbufferTcbuffer wraps MEOS C function adisjoint_tcbuffer_tcbuffer. +func AdisjointTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.adisjoint_tcbuffer_tcbuffer(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AdwithinTcbufferGeo wraps MEOS C function adwithin_tcbuffer_geo. +func AdwithinTcbufferGeo(temp *Temporal, gs *Geom, dist float64) int { + _cret := C.adwithin_tcbuffer_geo(temp._inner, gs._inner, C.double(dist)) + return int(_cret) +} + + +// AdwithinTcbufferCbuffer wraps MEOS C function adwithin_tcbuffer_cbuffer. +func AdwithinTcbufferCbuffer(temp *Temporal, cb *Cbuffer, dist float64) int { + _cret := C.adwithin_tcbuffer_cbuffer(temp._inner, cb._inner, C.double(dist)) + return int(_cret) +} + + +// AdwithinTcbufferTcbuffer wraps MEOS C function adwithin_tcbuffer_tcbuffer. +func AdwithinTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal, dist float64) int { + _cret := C.adwithin_tcbuffer_tcbuffer(temp1._inner, temp2._inner, C.double(dist)) + return int(_cret) +} + + +// AintersectsTcbufferGeo wraps MEOS C function aintersects_tcbuffer_geo. +func AintersectsTcbufferGeo(temp *Temporal, gs *Geom) int { + _cret := C.aintersects_tcbuffer_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// AintersectsTcbufferCbuffer wraps MEOS C function aintersects_tcbuffer_cbuffer. +func AintersectsTcbufferCbuffer(temp *Temporal, cb *Cbuffer) int { + _cret := C.aintersects_tcbuffer_cbuffer(temp._inner, cb._inner) + return int(_cret) +} + + +// AintersectsTcbufferTcbuffer wraps MEOS C function aintersects_tcbuffer_tcbuffer. +func AintersectsTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.aintersects_tcbuffer_tcbuffer(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AtouchesTcbufferGeo wraps MEOS C function atouches_tcbuffer_geo. +func AtouchesTcbufferGeo(temp *Temporal, gs *Geom) int { + _cret := C.atouches_tcbuffer_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// AtouchesTcbufferCbuffer wraps MEOS C function atouches_tcbuffer_cbuffer. +func AtouchesTcbufferCbuffer(temp *Temporal, cb *Cbuffer) int { + _cret := C.atouches_tcbuffer_cbuffer(temp._inner, cb._inner) + return int(_cret) +} + + +// AtouchesTcbufferTcbuffer wraps MEOS C function atouches_tcbuffer_tcbuffer. +func AtouchesTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.atouches_tcbuffer_tcbuffer(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EcontainsCbufferTcbuffer wraps MEOS C function econtains_cbuffer_tcbuffer. +func EcontainsCbufferTcbuffer(cb *Cbuffer, temp *Temporal) int { + _cret := C.econtains_cbuffer_tcbuffer(cb._inner, temp._inner) + return int(_cret) +} + + +// EcontainsTcbufferCbuffer wraps MEOS C function econtains_tcbuffer_cbuffer. +func EcontainsTcbufferCbuffer(temp *Temporal, cb *Cbuffer) int { + _cret := C.econtains_tcbuffer_cbuffer(temp._inner, cb._inner) + return int(_cret) +} + + +// EcontainsTcbufferGeo wraps MEOS C function econtains_tcbuffer_geo. +func EcontainsTcbufferGeo(temp *Temporal, gs *Geom) int { + _cret := C.econtains_tcbuffer_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// EcoversCbufferTcbuffer wraps MEOS C function ecovers_cbuffer_tcbuffer. +func EcoversCbufferTcbuffer(cb *Cbuffer, temp *Temporal) int { + _cret := C.ecovers_cbuffer_tcbuffer(cb._inner, temp._inner) + return int(_cret) +} + + +// EcoversGeoTcbuffer wraps MEOS C function ecovers_geo_tcbuffer. +func EcoversGeoTcbuffer(gs *Geom, temp *Temporal) int { + _cret := C.ecovers_geo_tcbuffer(gs._inner, temp._inner) + return int(_cret) +} + + +// EcoversTcbufferCbuffer wraps MEOS C function ecovers_tcbuffer_cbuffer. +func EcoversTcbufferCbuffer(temp *Temporal, cb *Cbuffer) int { + _cret := C.ecovers_tcbuffer_cbuffer(temp._inner, cb._inner) + return int(_cret) +} + + +// EcoversTcbufferGeo wraps MEOS C function ecovers_tcbuffer_geo. +func EcoversTcbufferGeo(temp *Temporal, gs *Geom) int { + _cret := C.ecovers_tcbuffer_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// EcoversTcbufferTcbuffer wraps MEOS C function ecovers_tcbuffer_tcbuffer. +func EcoversTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ecovers_tcbuffer_tcbuffer(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EdisjointTcbufferGeo wraps MEOS C function edisjoint_tcbuffer_geo. +func EdisjointTcbufferGeo(temp *Temporal, gs *Geom) int { + _cret := C.edisjoint_tcbuffer_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// EdisjointTcbufferCbuffer wraps MEOS C function edisjoint_tcbuffer_cbuffer. +func EdisjointTcbufferCbuffer(temp *Temporal, cb *Cbuffer) int { + _cret := C.edisjoint_tcbuffer_cbuffer(temp._inner, cb._inner) + return int(_cret) +} + + +// EdwithinTcbufferGeo wraps MEOS C function edwithin_tcbuffer_geo. +func EdwithinTcbufferGeo(temp *Temporal, gs *Geom, dist float64) int { + _cret := C.edwithin_tcbuffer_geo(temp._inner, gs._inner, C.double(dist)) + return int(_cret) +} + + +// EdwithinTcbufferCbuffer wraps MEOS C function edwithin_tcbuffer_cbuffer. +func EdwithinTcbufferCbuffer(temp *Temporal, cb *Cbuffer, dist float64) int { + _cret := C.edwithin_tcbuffer_cbuffer(temp._inner, cb._inner, C.double(dist)) + return int(_cret) +} + + +// EdwithinTcbufferTcbuffer wraps MEOS C function edwithin_tcbuffer_tcbuffer. +func EdwithinTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal, dist float64) int { + _cret := C.edwithin_tcbuffer_tcbuffer(temp1._inner, temp2._inner, C.double(dist)) + return int(_cret) +} + + +// EintersectsTcbufferGeo wraps MEOS C function eintersects_tcbuffer_geo. +func EintersectsTcbufferGeo(temp *Temporal, gs *Geom) int { + _cret := C.eintersects_tcbuffer_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// EintersectsTcbufferCbuffer wraps MEOS C function eintersects_tcbuffer_cbuffer. +func EintersectsTcbufferCbuffer(temp *Temporal, cb *Cbuffer) int { + _cret := C.eintersects_tcbuffer_cbuffer(temp._inner, cb._inner) + return int(_cret) +} + + +// EintersectsTcbufferTcbuffer wraps MEOS C function eintersects_tcbuffer_tcbuffer. +func EintersectsTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.eintersects_tcbuffer_tcbuffer(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EtouchesTcbufferGeo wraps MEOS C function etouches_tcbuffer_geo. +func EtouchesTcbufferGeo(temp *Temporal, gs *Geom) int { + _cret := C.etouches_tcbuffer_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// EtouchesTcbufferCbuffer wraps MEOS C function etouches_tcbuffer_cbuffer. +func EtouchesTcbufferCbuffer(temp *Temporal, cb *Cbuffer) int { + _cret := C.etouches_tcbuffer_cbuffer(temp._inner, cb._inner) + return int(_cret) +} + + +// EtouchesTcbufferTcbuffer wraps MEOS C function etouches_tcbuffer_tcbuffer. +func EtouchesTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.etouches_tcbuffer_tcbuffer(temp1._inner, temp2._inner) + return int(_cret) +} + + +// TcontainsCbufferTcbuffer wraps MEOS C function tcontains_cbuffer_tcbuffer. +func TcontainsCbufferTcbuffer(cb *Cbuffer, temp *Temporal) *Temporal { + _cret := C.tcontains_cbuffer_tcbuffer(cb._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TcontainsGeoTcbuffer wraps MEOS C function tcontains_geo_tcbuffer. +func TcontainsGeoTcbuffer(gs *Geom, temp *Temporal) *Temporal { + _cret := C.tcontains_geo_tcbuffer(gs._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TcontainsTcbufferGeo wraps MEOS C function tcontains_tcbuffer_geo. +func TcontainsTcbufferGeo(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tcontains_tcbuffer_geo(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TcontainsTcbufferCbuffer wraps MEOS C function tcontains_tcbuffer_cbuffer. +func TcontainsTcbufferCbuffer(temp *Temporal, cb *Cbuffer) *Temporal { + _cret := C.tcontains_tcbuffer_cbuffer(temp._inner, cb._inner) + return &Temporal{_inner: _cret} +} + + +// TcontainsTcbufferTcbuffer wraps MEOS C function tcontains_tcbuffer_tcbuffer. +func TcontainsTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tcontains_tcbuffer_tcbuffer(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// TcoversCbufferTcbuffer wraps MEOS C function tcovers_cbuffer_tcbuffer. +func TcoversCbufferTcbuffer(cb *Cbuffer, temp *Temporal) *Temporal { + _cret := C.tcovers_cbuffer_tcbuffer(cb._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TcoversGeoTcbuffer wraps MEOS C function tcovers_geo_tcbuffer. +func TcoversGeoTcbuffer(gs *Geom, temp *Temporal) *Temporal { + _cret := C.tcovers_geo_tcbuffer(gs._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TcoversTcbufferGeo wraps MEOS C function tcovers_tcbuffer_geo. +func TcoversTcbufferGeo(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tcovers_tcbuffer_geo(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TcoversTcbufferCbuffer wraps MEOS C function tcovers_tcbuffer_cbuffer. +func TcoversTcbufferCbuffer(temp *Temporal, cb *Cbuffer) *Temporal { + _cret := C.tcovers_tcbuffer_cbuffer(temp._inner, cb._inner) + return &Temporal{_inner: _cret} +} + + +// TcoversTcbufferTcbuffer wraps MEOS C function tcovers_tcbuffer_tcbuffer. +func TcoversTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tcovers_tcbuffer_tcbuffer(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// TdwithinGeoTcbuffer wraps MEOS C function tdwithin_geo_tcbuffer. +func TdwithinGeoTcbuffer(gs *Geom, temp *Temporal, dist float64) *Temporal { + _cret := C.tdwithin_geo_tcbuffer(gs._inner, temp._inner, C.double(dist)) + return &Temporal{_inner: _cret} +} + + +// TdwithinTcbufferGeo wraps MEOS C function tdwithin_tcbuffer_geo. +func TdwithinTcbufferGeo(temp *Temporal, gs *Geom, dist float64) *Temporal { + _cret := C.tdwithin_tcbuffer_geo(temp._inner, gs._inner, C.double(dist)) + return &Temporal{_inner: _cret} +} + + +// TdwithinTcbufferCbuffer wraps MEOS C function tdwithin_tcbuffer_cbuffer. +func TdwithinTcbufferCbuffer(temp *Temporal, cb *Cbuffer, dist float64) *Temporal { + _cret := C.tdwithin_tcbuffer_cbuffer(temp._inner, cb._inner, C.double(dist)) + return &Temporal{_inner: _cret} +} + + +// TdwithinTcbufferTcbuffer wraps MEOS C function tdwithin_tcbuffer_tcbuffer. +func TdwithinTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal, dist float64) *Temporal { + _cret := C.tdwithin_tcbuffer_tcbuffer(temp1._inner, temp2._inner, C.double(dist)) + return &Temporal{_inner: _cret} +} + + +// TdisjointCbufferTcbuffer wraps MEOS C function tdisjoint_cbuffer_tcbuffer. +func TdisjointCbufferTcbuffer(cb *Cbuffer, temp *Temporal) *Temporal { + _cret := C.tdisjoint_cbuffer_tcbuffer(cb._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TdisjointGeoTcbuffer wraps MEOS C function tdisjoint_geo_tcbuffer. +func TdisjointGeoTcbuffer(gs *Geom, temp *Temporal) *Temporal { + _cret := C.tdisjoint_geo_tcbuffer(gs._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TdisjointTcbufferGeo wraps MEOS C function tdisjoint_tcbuffer_geo. +func TdisjointTcbufferGeo(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tdisjoint_tcbuffer_geo(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TdisjointTcbufferCbuffer wraps MEOS C function tdisjoint_tcbuffer_cbuffer. +func TdisjointTcbufferCbuffer(temp *Temporal, cb *Cbuffer) *Temporal { + _cret := C.tdisjoint_tcbuffer_cbuffer(temp._inner, cb._inner) + return &Temporal{_inner: _cret} +} + + +// TdisjointTcbufferTcbuffer wraps MEOS C function tdisjoint_tcbuffer_tcbuffer. +func TdisjointTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tdisjoint_tcbuffer_tcbuffer(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// TintersectsCbufferTcbuffer wraps MEOS C function tintersects_cbuffer_tcbuffer. +func TintersectsCbufferTcbuffer(cb *Cbuffer, temp *Temporal) *Temporal { + _cret := C.tintersects_cbuffer_tcbuffer(cb._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TintersectsGeoTcbuffer wraps MEOS C function tintersects_geo_tcbuffer. +func TintersectsGeoTcbuffer(gs *Geom, temp *Temporal) *Temporal { + _cret := C.tintersects_geo_tcbuffer(gs._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TintersectsTcbufferGeo wraps MEOS C function tintersects_tcbuffer_geo. +func TintersectsTcbufferGeo(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tintersects_tcbuffer_geo(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TintersectsTcbufferCbuffer wraps MEOS C function tintersects_tcbuffer_cbuffer. +func TintersectsTcbufferCbuffer(temp *Temporal, cb *Cbuffer) *Temporal { + _cret := C.tintersects_tcbuffer_cbuffer(temp._inner, cb._inner) + return &Temporal{_inner: _cret} +} + + +// TintersectsTcbufferTcbuffer wraps MEOS C function tintersects_tcbuffer_tcbuffer. +func TintersectsTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tintersects_tcbuffer_tcbuffer(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// TtouchesGeoTcbuffer wraps MEOS C function ttouches_geo_tcbuffer. +func TtouchesGeoTcbuffer(gs *Geom, temp *Temporal) *Temporal { + _cret := C.ttouches_geo_tcbuffer(gs._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TtouchesTcbufferGeo wraps MEOS C function ttouches_tcbuffer_geo. +func TtouchesTcbufferGeo(temp *Temporal, gs *Geom) *Temporal { + _cret := C.ttouches_tcbuffer_geo(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TtouchesCbufferTcbuffer wraps MEOS C function ttouches_cbuffer_tcbuffer. +func TtouchesCbufferTcbuffer(cb *Cbuffer, temp *Temporal) *Temporal { + _cret := C.ttouches_cbuffer_tcbuffer(cb._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TtouchesTcbufferCbuffer wraps MEOS C function ttouches_tcbuffer_cbuffer. +func TtouchesTcbufferCbuffer(temp *Temporal, cb *Cbuffer) *Temporal { + _cret := C.ttouches_tcbuffer_cbuffer(temp._inner, cb._inner) + return &Temporal{_inner: _cret} +} + + +// TtouchesTcbufferTcbuffer wraps MEOS C function ttouches_tcbuffer_tcbuffer. +func TtouchesTcbufferTcbuffer(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.ttouches_tcbuffer_tcbuffer(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + diff --git a/functions/meos_meos_geo.go b/functions/meos_meos_geo.go new file mode 100644 index 0000000..1fa023f --- /dev/null +++ b/functions/meos_meos_geo.go @@ -0,0 +1,3296 @@ +package functions + +/* +#include +#include "meos.h" +#include "meos_catalog.h" +#include "meos_geo.h" +#include "meos_internal.h" +#include "meos_internal_geo.h" +#include "meos_npoint.h" +#include "meos_cbuffer.h" +#include "meos_pose.h" +#include "meos_rgeo.h" +#include "meos_h3.h" +#include "meos_quadbin.h" +#include "meos_json.h" +#include "meos_pointcloud.h" +#include "meos_arrow.h" + +// cgo reads C.union_* as a union TYPE; alias the union operators so C.g resolves them as functions. +#define gunion_bigint_set union_bigint_set +#define gunion_bigint_span union_bigint_span +#define gunion_bigint_spanset union_bigint_spanset +#define gunion_cbuffer_set union_cbuffer_set +#define gunion_date_set union_date_set +#define gunion_date_span union_date_span +#define gunion_date_spanset union_date_spanset +#define gunion_float_set union_float_set +#define gunion_float_span union_float_span +#define gunion_float_spanset union_float_spanset +#define gunion_geo_set union_geo_set +#define gunion_int_set union_int_set +#define gunion_int_span union_int_span +#define gunion_int_spanset union_int_spanset +#define gunion_jsonb_set union_jsonb_set +#define gunion_npoint_set union_npoint_set +#define gunion_pcpatch_set union_pcpatch_set +#define gunion_pcpoint_set union_pcpoint_set +#define gunion_pose_set union_pose_set +#define gunion_set_bigint union_set_bigint +#define gunion_set_cbuffer union_set_cbuffer +#define gunion_set_date union_set_date +#define gunion_set_float union_set_float +#define gunion_set_geo union_set_geo +#define gunion_set_int union_set_int +#define gunion_set_jsonb union_set_jsonb +#define gunion_set_npoint union_set_npoint +#define gunion_set_pcpatch union_set_pcpatch +#define gunion_set_pcpoint union_set_pcpoint +#define gunion_set_pose union_set_pose +#define gunion_set_set union_set_set +#define gunion_set_text union_set_text +#define gunion_set_timestamptz union_set_timestamptz +#define gunion_set_value union_set_value +#define gunion_span_bigint union_span_bigint +#define gunion_span_date union_span_date +#define gunion_span_float union_span_float +#define gunion_span_int union_span_int +#define gunion_span_span union_span_span +#define gunion_span_spanset union_span_spanset +#define gunion_span_timestamptz union_span_timestamptz +#define gunion_span_value union_span_value +#define gunion_spanset_bigint union_spanset_bigint +#define gunion_spanset_date union_spanset_date +#define gunion_spanset_float union_spanset_float +#define gunion_spanset_int union_spanset_int +#define gunion_spanset_span union_spanset_span +#define gunion_spanset_spanset union_spanset_spanset +#define gunion_spanset_timestamptz union_spanset_timestamptz +#define gunion_spanset_value union_spanset_value +#define gunion_stbox_stbox union_stbox_stbox +#define gunion_tbox_tbox union_tbox_tbox +#define gunion_text_set union_text_set +#define gunion_timestamptz_set union_timestamptz_set +#define gunion_timestamptz_span union_timestamptz_span +#define gunion_timestamptz_spanset union_timestamptz_spanset +#define gunion_tpcbox_tpcbox union_tpcbox_tpcbox +#define gunion_value_set union_value_set +#define gunion_value_span union_value_span +#define gunion_value_spanset union_value_spanset +*/ +import "C" +import ( + "unsafe" +) + +var _ = unsafe.Pointer(nil) + +// Box3dFromGbox wraps MEOS C function box3d_from_gbox. +func Box3dFromGbox(box *GBox) *Box3D { + _cret := C.box3d_from_gbox(box._inner) + return &Box3D{_inner: _cret} +} + + +// Box3dMake wraps MEOS C function box3d_make. +func Box3dMake(xmin float64, xmax float64, ymin float64, ymax float64, zmin float64, zmax float64, srid int32) *Box3D { + _cret := C.box3d_make(C.double(xmin), C.double(xmax), C.double(ymin), C.double(ymax), C.double(zmin), C.double(zmax), C.int32_t(srid)) + return &Box3D{_inner: _cret} +} + + +// Box3dIn wraps MEOS C function box3d_in. +func Box3dIn(str string) *Box3D { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.box3d_in(_c_str) + return &Box3D{_inner: _cret} +} + + +// Box3dOut wraps MEOS C function box3d_out. +func Box3dOut(box *Box3D, maxdd int) string { + _cret := C.box3d_out(box._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// GboxMake wraps MEOS C function gbox_make. +func GboxMake(hasz bool, hasm bool, geodetic bool, xmin float64, xmax float64, ymin float64, ymax float64, zmin float64, zmax float64, mmin float64, mmax float64) *GBox { + _cret := C.gbox_make(C.bool(hasz), C.bool(hasm), C.bool(geodetic), C.double(xmin), C.double(xmax), C.double(ymin), C.double(ymax), C.double(zmin), C.double(zmax), C.double(mmin), C.double(mmax)) + return &GBox{_inner: _cret} +} + + +// GboxIn wraps MEOS C function gbox_in. +func GboxIn(str string) *GBox { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.gbox_in(_c_str) + return &GBox{_inner: _cret} +} + + +// GboxOut wraps MEOS C function gbox_out. +func GboxOut(box *GBox, maxdd int) string { + _cret := C.gbox_out(box._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// GeoAsEWKB wraps MEOS C function geo_as_ewkb. +func GeoAsEWKB(gs *Geom, endian string, size unsafe.Pointer) unsafe.Pointer { + _c_endian := C.CString(endian) + defer C.free(unsafe.Pointer(_c_endian)) + _cret := C.geo_as_ewkb(gs._inner, _c_endian, (*C.size_t)(unsafe.Pointer(size))) + return unsafe.Pointer(_cret) +} + + +// GeoAsEWKT wraps MEOS C function geo_as_ewkt. +func GeoAsEWKT(gs *Geom, precision int) string { + _cret := C.geo_as_ewkt(gs._inner, C.int(precision)) + return C.GoString(_cret) +} + + +// GeoAsGeojson wraps MEOS C function geo_as_geojson. +func GeoAsGeojson(gs *Geom, option int, precision int, srs string) string { + _c_srs := C.CString(srs) + defer C.free(unsafe.Pointer(_c_srs)) + _cret := C.geo_as_geojson(gs._inner, C.int(option), C.int(precision), _c_srs) + return C.GoString(_cret) +} + + +// GeoAsHexewkb wraps MEOS C function geo_as_hexewkb. +func GeoAsHexewkb(gs *Geom, endian string) string { + _c_endian := C.CString(endian) + defer C.free(unsafe.Pointer(_c_endian)) + _cret := C.geo_as_hexewkb(gs._inner, _c_endian) + return C.GoString(_cret) +} + + +// GeoAsText wraps MEOS C function geo_as_text. +func GeoAsText(gs *Geom, precision int) string { + _cret := C.geo_as_text(gs._inner, C.int(precision)) + return C.GoString(_cret) +} + + +// GeoFromEWKB wraps MEOS C function geo_from_ewkb. +func GeoFromEWKB(wkb unsafe.Pointer, wkb_size uint, srid int32) *Geom { + _cret := C.geo_from_ewkb((*C.uint8_t)(unsafe.Pointer(wkb)), C.size_t(wkb_size), C.int32_t(srid)) + return &Geom{_inner: _cret} +} + + +// GeoFromGeojson wraps MEOS C function geo_from_geojson. +func GeoFromGeojson(geojson string) *Geom { + _c_geojson := C.CString(geojson) + defer C.free(unsafe.Pointer(_c_geojson)) + _cret := C.geo_from_geojson(_c_geojson) + return &Geom{_inner: _cret} +} + + +// GeoFromText wraps MEOS C function geo_from_text. +func GeoFromText(wkt string, srid int32) *Geom { + _c_wkt := C.CString(wkt) + defer C.free(unsafe.Pointer(_c_wkt)) + _cret := C.geo_from_text(_c_wkt, C.int32_t(srid)) + return &Geom{_inner: _cret} +} + + +// GeoOut wraps MEOS C function geo_out. +func GeoOut(gs *Geom) string { + _cret := C.geo_out(gs._inner) + return C.GoString(_cret) +} + + +// GeogFromHexewkb wraps MEOS C function geog_from_hexewkb. +func GeogFromHexewkb(wkt string) *Geom { + _c_wkt := C.CString(wkt) + defer C.free(unsafe.Pointer(_c_wkt)) + _cret := C.geog_from_hexewkb(_c_wkt) + return &Geom{_inner: _cret} +} + + +// GeogIn wraps MEOS C function geog_in. +func GeogIn(str string, typmod int32) *Geom { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.geog_in(_c_str, C.int32(typmod)) + return &Geom{_inner: _cret} +} + + +// GeomFromHexewkb wraps MEOS C function geom_from_hexewkb. +func GeomFromHexewkb(wkt string) *Geom { + _c_wkt := C.CString(wkt) + defer C.free(unsafe.Pointer(_c_wkt)) + _cret := C.geom_from_hexewkb(_c_wkt) + return &Geom{_inner: _cret} +} + + +// GeomIn wraps MEOS C function geom_in. +func GeomIn(str string, typmod int32) *Geom { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.geom_in(_c_str, C.int32(typmod)) + return &Geom{_inner: _cret} +} + + +// GeoCopy wraps MEOS C function geo_copy. +func GeoCopy(gs *Geom) *Geom { + _cret := C.geo_copy(gs._inner) + return &Geom{_inner: _cret} +} + + +// GeogpointMake2d wraps MEOS C function geogpoint_make2d. +func GeogpointMake2d(srid int32, x float64, y float64) *Geom { + _cret := C.geogpoint_make2d(C.int32_t(srid), C.double(x), C.double(y)) + return &Geom{_inner: _cret} +} + + +// GeogpointMake3dz wraps MEOS C function geogpoint_make3dz. +func GeogpointMake3dz(srid int32, x float64, y float64, z float64) *Geom { + _cret := C.geogpoint_make3dz(C.int32_t(srid), C.double(x), C.double(y), C.double(z)) + return &Geom{_inner: _cret} +} + + +// GeompointMake2d wraps MEOS C function geompoint_make2d. +func GeompointMake2d(srid int32, x float64, y float64) *Geom { + _cret := C.geompoint_make2d(C.int32_t(srid), C.double(x), C.double(y)) + return &Geom{_inner: _cret} +} + + +// GeompointMake3dz wraps MEOS C function geompoint_make3dz. +func GeompointMake3dz(srid int32, x float64, y float64, z float64) *Geom { + _cret := C.geompoint_make3dz(C.int32_t(srid), C.double(x), C.double(y), C.double(z)) + return &Geom{_inner: _cret} +} + + +// GeomToGeog wraps MEOS C function geom_to_geog. +func GeomToGeog(geom *Geom) *Geom { + _cret := C.geom_to_geog(geom._inner) + return &Geom{_inner: _cret} +} + + +// GeogToGeom wraps MEOS C function geog_to_geom. +func GeogToGeom(geog *Geom) *Geom { + _cret := C.geog_to_geom(geog._inner) + return &Geom{_inner: _cret} +} + + +// GeoIsEmpty wraps MEOS C function geo_is_empty. +func GeoIsEmpty(gs *Geom) bool { + _cret := C.geo_is_empty(gs._inner) + return bool(_cret) +} + + +// GeoIsUnitary wraps MEOS C function geo_is_unitary. +func GeoIsUnitary(gs *Geom) bool { + _cret := C.geo_is_unitary(gs._inner) + return bool(_cret) +} + + +// GeoTypename wraps MEOS C function geo_typename. +func GeoTypename(type_ int) string { + _cret := C.geo_typename(C.int(type_)) + return C.GoString(_cret) +} + + +// GeogArea wraps MEOS C function geog_area. +func GeogArea(gs *Geom, use_spheroid bool) float64 { + _cret := C.geog_area(gs._inner, C.bool(use_spheroid)) + return float64(_cret) +} + + +// GeogCentroid wraps MEOS C function geog_centroid. +func GeogCentroid(gs *Geom, use_spheroid bool) *Geom { + _cret := C.geog_centroid(gs._inner, C.bool(use_spheroid)) + return &Geom{_inner: _cret} +} + + +// GeogLength wraps MEOS C function geog_length. +func GeogLength(gs *Geom, use_spheroid bool) float64 { + _cret := C.geog_length(gs._inner, C.bool(use_spheroid)) + return float64(_cret) +} + + +// GeogPerimeter wraps MEOS C function geog_perimeter. +func GeogPerimeter(gs *Geom, use_spheroid bool) float64 { + _cret := C.geog_perimeter(gs._inner, C.bool(use_spheroid)) + return float64(_cret) +} + + +// GeomAzimuth wraps MEOS C function geom_azimuth. +func GeomAzimuth(gs1 *Geom, gs2 *Geom) (bool, float64) { + var _out_result C.double + _cret := C.geom_azimuth(gs1._inner, gs2._inner, &_out_result) + return bool(_cret), float64(_out_result) +} + + +// GeomLength wraps MEOS C function geom_length. +func GeomLength(gs *Geom) float64 { + _cret := C.geom_length(gs._inner) + return float64(_cret) +} + + +// GeomPerimeter wraps MEOS C function geom_perimeter. +func GeomPerimeter(gs *Geom) float64 { + _cret := C.geom_perimeter(gs._inner) + return float64(_cret) +} + + +// LineNumpoints wraps MEOS C function line_numpoints. +func LineNumpoints(gs *Geom) int { + _cret := C.line_numpoints(gs._inner) + return int(_cret) +} + + +// LinePointN wraps MEOS C function line_point_n. +func LinePointN(geom *Geom, n int) *Geom { + _cret := C.line_point_n(geom._inner, C.int(n)) + return &Geom{_inner: _cret} +} + + +// GeoReverse wraps MEOS C function geo_reverse. +func GeoReverse(gs *Geom) *Geom { + _cret := C.geo_reverse(gs._inner) + return &Geom{_inner: _cret} +} + + +// GeoRound wraps MEOS C function geo_round. +func GeoRound(gs *Geom, maxdd int) *Geom { + _cret := C.geo_round(gs._inner, C.int(maxdd)) + return &Geom{_inner: _cret} +} + + +// GeoSetSRID wraps MEOS C function geo_set_srid. +func GeoSetSRID(gs *Geom, srid int32) *Geom { + _cret := C.geo_set_srid(gs._inner, C.int32_t(srid)) + return &Geom{_inner: _cret} +} + + +// GeoSRID wraps MEOS C function geo_srid. +func GeoSRID(gs *Geom) int32 { + _cret := C.geo_srid(gs._inner) + return int32(_cret) +} + + +// GeoTransform wraps MEOS C function geo_transform. +func GeoTransform(geom *Geom, srid_to int32) *Geom { + _cret := C.geo_transform(geom._inner, C.int32_t(srid_to)) + return &Geom{_inner: _cret} +} + + +// GeoTransformPipeline wraps MEOS C function geo_transform_pipeline. +func GeoTransformPipeline(gs *Geom, pipeline string, srid_to int32, is_forward bool) *Geom { + _c_pipeline := C.CString(pipeline) + defer C.free(unsafe.Pointer(_c_pipeline)) + _cret := C.geo_transform_pipeline(gs._inner, _c_pipeline, C.int32_t(srid_to), C.bool(is_forward)) + return &Geom{_inner: _cret} +} + + +// GeoCollectGarray wraps MEOS C function geo_collect_garray. +func GeoCollectGarray(gsarr unsafe.Pointer, count int) *Geom { + _cret := C.geo_collect_garray((**C.GSERIALIZED)(unsafe.Pointer(gsarr)), C.int(count)) + return &Geom{_inner: _cret} +} + + +// GeoMakelineGarray wraps MEOS C function geo_makeline_garray. +func GeoMakelineGarray(gsarr unsafe.Pointer, count int) *Geom { + _cret := C.geo_makeline_garray((**C.GSERIALIZED)(unsafe.Pointer(gsarr)), C.int(count)) + return &Geom{_inner: _cret} +} + + +// GeoNumPoints wraps MEOS C function geo_num_points. +func GeoNumPoints(gs *Geom) int { + _cret := C.geo_num_points(gs._inner) + return int(_cret) +} + + +// GeoNumGeos wraps MEOS C function geo_num_geos. +func GeoNumGeos(gs *Geom) int { + _cret := C.geo_num_geos(gs._inner) + return int(_cret) +} + + +// GeoGeoN wraps MEOS C function geo_geo_n. +func GeoGeoN(geom *Geom, n int) *Geom { + _cret := C.geo_geo_n(geom._inner, C.int(n)) + return &Geom{_inner: _cret} +} + + +// GeoPointarr wraps MEOS C function geo_pointarr. +func GeoPointarr(gs *Geom, count unsafe.Pointer) unsafe.Pointer { + _cret := C.geo_pointarr(gs._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// GeoPoints wraps MEOS C function geo_points. +func GeoPoints(gs *Geom) *Geom { + _cret := C.geo_points(gs._inner) + return &Geom{_inner: _cret} +} + + +// GeomArrayUnion wraps MEOS C function geom_array_union. +func GeomArrayUnion(gsarr unsafe.Pointer, count int) *Geom { + _cret := C.geom_array_union((**C.GSERIALIZED)(unsafe.Pointer(gsarr)), C.int(count)) + return &Geom{_inner: _cret} +} + + +// GeomBoundary wraps MEOS C function geom_boundary. +func GeomBoundary(gs *Geom) *Geom { + _cret := C.geom_boundary(gs._inner) + return &Geom{_inner: _cret} +} + + +// GeomBuffer wraps MEOS C function geom_buffer. +func GeomBuffer(gs *Geom, size float64, params string) *Geom { + _c_params := C.CString(params) + defer C.free(unsafe.Pointer(_c_params)) + _cret := C.geom_buffer(gs._inner, C.double(size), _c_params) + return &Geom{_inner: _cret} +} + + +// GeomCentroid wraps MEOS C function geom_centroid. +func GeomCentroid(gs *Geom) *Geom { + _cret := C.geom_centroid(gs._inner) + return &Geom{_inner: _cret} +} + + +// GeomConvexHull wraps MEOS C function geom_convex_hull. +func GeomConvexHull(gs *Geom) *Geom { + _cret := C.geom_convex_hull(gs._inner) + return &Geom{_inner: _cret} +} + + +// GeomDifference2d wraps MEOS C function geom_difference2d. +func GeomDifference2d(gs1 *Geom, gs2 *Geom) *Geom { + _cret := C.geom_difference2d(gs1._inner, gs2._inner) + return &Geom{_inner: _cret} +} + + +// GeomIntersection2d wraps MEOS C function geom_intersection2d. +func GeomIntersection2d(gs1 *Geom, gs2 *Geom) *Geom { + _cret := C.geom_intersection2d(gs1._inner, gs2._inner) + return &Geom{_inner: _cret} +} + + +// GeomIntersection2dColl wraps MEOS C function geom_intersection2d_coll. +func GeomIntersection2dColl(gs1 *Geom, gs2 *Geom) *Geom { + _cret := C.geom_intersection2d_coll(gs1._inner, gs2._inner) + return &Geom{_inner: _cret} +} + + +// GeomMinBoundingRadius wraps MEOS C function geom_min_bounding_radius. +func GeomMinBoundingRadius(geom *Geom, radius unsafe.Pointer) *Geom { + _cret := C.geom_min_bounding_radius(geom._inner, (*C.double)(unsafe.Pointer(radius))) + return &Geom{_inner: _cret} +} + + +// GeomShortestline2d wraps MEOS C function geom_shortestline2d. +func GeomShortestline2d(gs1 *Geom, gs2 *Geom) *Geom { + _cret := C.geom_shortestline2d(gs1._inner, gs2._inner) + return &Geom{_inner: _cret} +} + + +// GeomShortestline3d wraps MEOS C function geom_shortestline3d. +func GeomShortestline3d(gs1 *Geom, gs2 *Geom) *Geom { + _cret := C.geom_shortestline3d(gs1._inner, gs2._inner) + return &Geom{_inner: _cret} +} + + +// GeomUnaryUnion wraps MEOS C function geom_unary_union. +func GeomUnaryUnion(gs *Geom, prec float64) *Geom { + _cret := C.geom_unary_union(gs._inner, C.double(prec)) + return &Geom{_inner: _cret} +} + + +// LineInterpolatePoint wraps MEOS C function line_interpolate_point. +func LineInterpolatePoint(gs *Geom, distance_fraction float64, repeat bool) *Geom { + _cret := C.line_interpolate_point(gs._inner, C.double(distance_fraction), C.bool(repeat)) + return &Geom{_inner: _cret} +} + + +// LineLocatePoint wraps MEOS C function line_locate_point. +func LineLocatePoint(gs1 *Geom, gs2 *Geom) float64 { + _cret := C.line_locate_point(gs1._inner, gs2._inner) + return float64(_cret) +} + + +// LineSubstring wraps MEOS C function line_substring. +func LineSubstring(gs *Geom, from float64, to float64) *Geom { + _cret := C.line_substring(gs._inner, C.double(from), C.double(to)) + return &Geom{_inner: _cret} +} + + +// GeogDwithin wraps MEOS C function geog_dwithin. +func GeogDwithin(g1 *Geom, g2 *Geom, tolerance float64, use_spheroid bool) bool { + _cret := C.geog_dwithin(g1._inner, g2._inner, C.double(tolerance), C.bool(use_spheroid)) + return bool(_cret) +} + + +// GeogIntersects wraps MEOS C function geog_intersects. +func GeogIntersects(gs1 *Geom, gs2 *Geom, use_spheroid bool) bool { + _cret := C.geog_intersects(gs1._inner, gs2._inner, C.bool(use_spheroid)) + return bool(_cret) +} + + +// GeomContains wraps MEOS C function geom_contains. +func GeomContains(gs1 *Geom, gs2 *Geom) bool { + _cret := C.geom_contains(gs1._inner, gs2._inner) + return bool(_cret) +} + + +// GeomCovers wraps MEOS C function geom_covers. +func GeomCovers(gs1 *Geom, gs2 *Geom) bool { + _cret := C.geom_covers(gs1._inner, gs2._inner) + return bool(_cret) +} + + +// GeomDisjoint2d wraps MEOS C function geom_disjoint2d. +func GeomDisjoint2d(gs1 *Geom, gs2 *Geom) bool { + _cret := C.geom_disjoint2d(gs1._inner, gs2._inner) + return bool(_cret) +} + + +// GeomDwithin wraps MEOS C function geom_dwithin. +func GeomDwithin(gs1 *Geom, gs2 *Geom, tolerance float64) bool { + _cret := C.geom_dwithin(gs1._inner, gs2._inner, C.double(tolerance)) + return bool(_cret) +} + + +// GeomDwithin2d wraps MEOS C function geom_dwithin2d. +func GeomDwithin2d(gs1 *Geom, gs2 *Geom, tolerance float64) bool { + _cret := C.geom_dwithin2d(gs1._inner, gs2._inner, C.double(tolerance)) + return bool(_cret) +} + + +// GeomDwithin3d wraps MEOS C function geom_dwithin3d. +func GeomDwithin3d(gs1 *Geom, gs2 *Geom, tolerance float64) bool { + _cret := C.geom_dwithin3d(gs1._inner, gs2._inner, C.double(tolerance)) + return bool(_cret) +} + + +// GeomIntersects wraps MEOS C function geom_intersects. +func GeomIntersects(gs1 *Geom, gs2 *Geom) bool { + _cret := C.geom_intersects(gs1._inner, gs2._inner) + return bool(_cret) +} + + +// GeomIntersects2d wraps MEOS C function geom_intersects2d. +func GeomIntersects2d(gs1 *Geom, gs2 *Geom) bool { + _cret := C.geom_intersects2d(gs1._inner, gs2._inner) + return bool(_cret) +} + + +// GeomIntersects3d wraps MEOS C function geom_intersects3d. +func GeomIntersects3d(gs1 *Geom, gs2 *Geom) bool { + _cret := C.geom_intersects3d(gs1._inner, gs2._inner) + return bool(_cret) +} + + +// GeomRelatePattern wraps MEOS C function geom_relate_pattern. +func GeomRelatePattern(gs1 *Geom, gs2 *Geom, patt string) bool { + _c_patt := C.CString(patt) + defer C.free(unsafe.Pointer(_c_patt)) + _cret := C.geom_relate_pattern(gs1._inner, gs2._inner, _c_patt) + return bool(_cret) +} + + +// GeomTouches wraps MEOS C function geom_touches. +func GeomTouches(gs1 *Geom, gs2 *Geom) bool { + _cret := C.geom_touches(gs1._inner, gs2._inner) + return bool(_cret) +} + + +// GeoStboxes wraps MEOS C function geo_stboxes. +func GeoStboxes(gs *Geom, count unsafe.Pointer) *STBox { + _cret := C.geo_stboxes(gs._inner, (*C.int)(unsafe.Pointer(count))) + return &STBox{_inner: _cret} +} + + +// GeoSplitEachNStboxes wraps MEOS C function geo_split_each_n_stboxes. +func GeoSplitEachNStboxes(gs *Geom, elem_count int, count unsafe.Pointer) *STBox { + _cret := C.geo_split_each_n_stboxes(gs._inner, C.int(elem_count), (*C.int)(unsafe.Pointer(count))) + return &STBox{_inner: _cret} +} + + +// GeoSplitNStboxes wraps MEOS C function geo_split_n_stboxes. +func GeoSplitNStboxes(gs *Geom, box_count int, count unsafe.Pointer) *STBox { + _cret := C.geo_split_n_stboxes(gs._inner, C.int(box_count), (*C.int)(unsafe.Pointer(count))) + return &STBox{_inner: _cret} +} + + +// GeogDistance wraps MEOS C function geog_distance. +func GeogDistance(g1 *Geom, g2 *Geom) float64 { + _cret := C.geog_distance(g1._inner, g2._inner) + return float64(_cret) +} + + +// GeomDistance2d wraps MEOS C function geom_distance2d. +func GeomDistance2d(gs1 *Geom, gs2 *Geom) float64 { + _cret := C.geom_distance2d(gs1._inner, gs2._inner) + return float64(_cret) +} + + +// GeomDistance3d wraps MEOS C function geom_distance3d. +func GeomDistance3d(gs1 *Geom, gs2 *Geom) float64 { + _cret := C.geom_distance3d(gs1._inner, gs2._inner) + return float64(_cret) +} + + +// GeoEquals wraps MEOS C function geo_equals. +func GeoEquals(gs1 *Geom, gs2 *Geom) int { + _cret := C.geo_equals(gs1._inner, gs2._inner) + return int(_cret) +} + + +// GeoSame wraps MEOS C function geo_same. +func GeoSame(gs1 *Geom, gs2 *Geom) bool { + _cret := C.geo_same(gs1._inner, gs2._inner) + return bool(_cret) +} + + +// GeogsetIn wraps MEOS C function geogset_in. +func GeogsetIn(str string) *Set { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.geogset_in(_c_str) + return &Set{_inner: _cret} +} + + +// GeomsetIn wraps MEOS C function geomset_in. +func GeomsetIn(str string) *Set { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.geomset_in(_c_str) + return &Set{_inner: _cret} +} + + +// SpatialsetOut wraps MEOS C function spatialset_out. +func SpatialsetOut(s *Set, maxdd int) string { + _cret := C.spatialset_out(s._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// SpatialsetAsText wraps MEOS C function spatialset_as_text. +func SpatialsetAsText(set *Set, maxdd int) string { + _cret := C.spatialset_as_text(set._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// SpatialsetAsEWKT wraps MEOS C function spatialset_as_ewkt. +func SpatialsetAsEWKT(set *Set, maxdd int) string { + _cret := C.spatialset_as_ewkt(set._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// GeosetMake wraps MEOS C function geoset_make. +func GeosetMake(values unsafe.Pointer, count int) *Set { + _cret := C.geoset_make((**C.GSERIALIZED)(unsafe.Pointer(values)), C.int(count)) + return &Set{_inner: _cret} +} + + +// GeoToSet wraps MEOS C function geo_to_set. +func GeoToSet(gs *Geom) *Set { + _cret := C.geo_to_set(gs._inner) + return &Set{_inner: _cret} +} + + +// GeosetEndValue wraps MEOS C function geoset_end_value. +func GeosetEndValue(s *Set) *Geom { + _cret := C.geoset_end_value(s._inner) + return &Geom{_inner: _cret} +} + + +// GeosetStartValue wraps MEOS C function geoset_start_value. +func GeosetStartValue(s *Set) *Geom { + _cret := C.geoset_start_value(s._inner) + return &Geom{_inner: _cret} +} + + +// GeosetValueN wraps MEOS C function geoset_value_n. +func GeosetValueN(s *Set, n int) (bool, *Geom) { + var _out_result *C.GSERIALIZED + _cret := C.geoset_value_n(s._inner, C.int(n), &_out_result) + return bool(_cret), &Geom{_inner: _out_result} +} + + +// GeosetValues wraps MEOS C function geoset_values. +func GeosetValues(s *Set, count unsafe.Pointer) unsafe.Pointer { + _cret := C.geoset_values(s._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// ContainedGeoSet wraps MEOS C function contained_geo_set. +func ContainedGeoSet(gs *Geom, s *Set) bool { + _cret := C.contained_geo_set(gs._inner, s._inner) + return bool(_cret) +} + + +// ContainsSetGeo wraps MEOS C function contains_set_geo. +func ContainsSetGeo(s *Set, gs *Geom) bool { + _cret := C.contains_set_geo(s._inner, gs._inner) + return bool(_cret) +} + + +// GeoUnionTransfn wraps MEOS C function geo_union_transfn. +func GeoUnionTransfn(state *Set, gs *Geom) *Set { + _cret := C.geo_union_transfn(state._inner, gs._inner) + return &Set{_inner: _cret} +} + + +// IntersectionGeoSet wraps MEOS C function intersection_geo_set. +func IntersectionGeoSet(gs *Geom, s *Set) *Set { + _cret := C.intersection_geo_set(gs._inner, s._inner) + return &Set{_inner: _cret} +} + + +// IntersectionSetGeo wraps MEOS C function intersection_set_geo. +func IntersectionSetGeo(s *Set, gs *Geom) *Set { + _cret := C.intersection_set_geo(s._inner, gs._inner) + return &Set{_inner: _cret} +} + + +// MinusGeoSet wraps MEOS C function minus_geo_set. +func MinusGeoSet(gs *Geom, s *Set) *Set { + _cret := C.minus_geo_set(gs._inner, s._inner) + return &Set{_inner: _cret} +} + + +// MinusSetGeo wraps MEOS C function minus_set_geo. +func MinusSetGeo(s *Set, gs *Geom) *Set { + _cret := C.minus_set_geo(s._inner, gs._inner) + return &Set{_inner: _cret} +} + + +// UnionGeoSet wraps MEOS C function union_geo_set. +func UnionGeoSet(gs *Geom, s *Set) *Set { + _cret := C.gunion_geo_set(gs._inner, s._inner) + return &Set{_inner: _cret} +} + + +// UnionSetGeo wraps MEOS C function union_set_geo. +func UnionSetGeo(s *Set, gs *Geom) *Set { + _cret := C.gunion_set_geo(s._inner, gs._inner) + return &Set{_inner: _cret} +} + + +// SpatialsetSetSRID wraps MEOS C function spatialset_set_srid. +func SpatialsetSetSRID(s *Set, srid int32) *Set { + _cret := C.spatialset_set_srid(s._inner, C.int32_t(srid)) + return &Set{_inner: _cret} +} + + +// SpatialsetSRID wraps MEOS C function spatialset_srid. +func SpatialsetSRID(s *Set) int32 { + _cret := C.spatialset_srid(s._inner) + return int32(_cret) +} + + +// SpatialsetTransform wraps MEOS C function spatialset_transform. +func SpatialsetTransform(s *Set, srid int32) *Set { + _cret := C.spatialset_transform(s._inner, C.int32_t(srid)) + return &Set{_inner: _cret} +} + + +// SpatialsetTransformPipeline wraps MEOS C function spatialset_transform_pipeline. +func SpatialsetTransformPipeline(s *Set, pipelinestr string, srid int32, is_forward bool) *Set { + _c_pipelinestr := C.CString(pipelinestr) + defer C.free(unsafe.Pointer(_c_pipelinestr)) + _cret := C.spatialset_transform_pipeline(s._inner, _c_pipelinestr, C.int32_t(srid), C.bool(is_forward)) + return &Set{_inner: _cret} +} + + +// STBOXAsHexwkb wraps MEOS C function stbox_as_hexwkb. +func STBOXAsHexwkb(box *STBox, variant uint8, size_out unsafe.Pointer) string { + _cret := C.stbox_as_hexwkb(box._inner, C.uint8_t(variant), (*C.size_t)(unsafe.Pointer(size_out))) + return C.GoString(_cret) +} + + +// STBOXAsWKB wraps MEOS C function stbox_as_wkb. +func STBOXAsWKB(box *STBox, variant uint8, size_out unsafe.Pointer) unsafe.Pointer { + _cret := C.stbox_as_wkb(box._inner, C.uint8_t(variant), (*C.size_t)(unsafe.Pointer(size_out))) + return unsafe.Pointer(_cret) +} + + +// STBOXFromHexwkb wraps MEOS C function stbox_from_hexwkb. +func STBOXFromHexwkb(hexwkb string) *STBox { + _c_hexwkb := C.CString(hexwkb) + defer C.free(unsafe.Pointer(_c_hexwkb)) + _cret := C.stbox_from_hexwkb(_c_hexwkb) + return &STBox{_inner: _cret} +} + + +// STBOXFromWKB wraps MEOS C function stbox_from_wkb. +func STBOXFromWKB(wkb unsafe.Pointer, size uint) *STBox { + _cret := C.stbox_from_wkb((*C.uint8_t)(unsafe.Pointer(wkb)), C.size_t(size)) + return &STBox{_inner: _cret} +} + + +// STBOXIn wraps MEOS C function stbox_in. +func STBOXIn(str string) *STBox { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.stbox_in(_c_str) + return &STBox{_inner: _cret} +} + + +// STBOXOut wraps MEOS C function stbox_out. +func STBOXOut(box *STBox, maxdd int) string { + _cret := C.stbox_out(box._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// GeoTimestamptzToSTBOX wraps MEOS C function geo_timestamptz_to_stbox. +func GeoTimestamptzToSTBOX(gs *Geom, t int64) *STBox { + _cret := C.geo_timestamptz_to_stbox(gs._inner, C.TimestampTz(t)) + return &STBox{_inner: _cret} +} + + +// GeoTstzspanToSTBOX wraps MEOS C function geo_tstzspan_to_stbox. +func GeoTstzspanToSTBOX(gs *Geom, s *Span) *STBox { + _cret := C.geo_tstzspan_to_stbox(gs._inner, s._inner) + return &STBox{_inner: _cret} +} + + +// STBOXCopy wraps MEOS C function stbox_copy. +func STBOXCopy(box *STBox) *STBox { + _cret := C.stbox_copy(box._inner) + return &STBox{_inner: _cret} +} + + +// STBOXMake wraps MEOS C function stbox_make. +func STBOXMake(hasx bool, hasz bool, geodetic bool, srid int32, xmin float64, xmax float64, ymin float64, ymax float64, zmin float64, zmax float64, s *Span) *STBox { + _cret := C.stbox_make(C.bool(hasx), C.bool(hasz), C.bool(geodetic), C.int32_t(srid), C.double(xmin), C.double(xmax), C.double(ymin), C.double(ymax), C.double(zmin), C.double(zmax), s._inner) + return &STBox{_inner: _cret} +} + + +// GeoToSTBOX wraps MEOS C function geo_to_stbox. +func GeoToSTBOX(gs *Geom) *STBox { + _cret := C.geo_to_stbox(gs._inner) + return &STBox{_inner: _cret} +} + + +// SpatialsetToSTBOX wraps MEOS C function spatialset_to_stbox. +func SpatialsetToSTBOX(s *Set) *STBox { + _cret := C.spatialset_to_stbox(s._inner) + return &STBox{_inner: _cret} +} + + +// STBOXToBox3d wraps MEOS C function stbox_to_box3d. +func STBOXToBox3d(box *STBox) *Box3D { + _cret := C.stbox_to_box3d(box._inner) + return &Box3D{_inner: _cret} +} + + +// STBOXToGbox wraps MEOS C function stbox_to_gbox. +func STBOXToGbox(box *STBox) *GBox { + _cret := C.stbox_to_gbox(box._inner) + return &GBox{_inner: _cret} +} + + +// STBOXToGeo wraps MEOS C function stbox_to_geo. +func STBOXToGeo(box *STBox) *Geom { + _cret := C.stbox_to_geo(box._inner) + return &Geom{_inner: _cret} +} + + +// STBOXToTstzspan wraps MEOS C function stbox_to_tstzspan. +func STBOXToTstzspan(box *STBox) *Span { + _cret := C.stbox_to_tstzspan(box._inner) + return &Span{_inner: _cret} +} + + +// TimestamptzToSTBOX wraps MEOS C function timestamptz_to_stbox. +func TimestamptzToSTBOX(t int64) *STBox { + _cret := C.timestamptz_to_stbox(C.TimestampTz(t)) + return &STBox{_inner: _cret} +} + + +// TstzsetToSTBOX wraps MEOS C function tstzset_to_stbox. +func TstzsetToSTBOX(s *Set) *STBox { + _cret := C.tstzset_to_stbox(s._inner) + return &STBox{_inner: _cret} +} + + +// TstzspanToSTBOX wraps MEOS C function tstzspan_to_stbox. +func TstzspanToSTBOX(s *Span) *STBox { + _cret := C.tstzspan_to_stbox(s._inner) + return &STBox{_inner: _cret} +} + + +// TstzspansetToSTBOX wraps MEOS C function tstzspanset_to_stbox. +func TstzspansetToSTBOX(ss *SpanSet) *STBox { + _cret := C.tstzspanset_to_stbox(ss._inner) + return &STBox{_inner: _cret} +} + + +// STBOXArea wraps MEOS C function stbox_area. +func STBOXArea(box *STBox, spheroid bool) float64 { + _cret := C.stbox_area(box._inner, C.bool(spheroid)) + return float64(_cret) +} + + +// STBOXHash wraps MEOS C function stbox_hash. +func STBOXHash(box *STBox) uint32 { + _cret := C.stbox_hash(box._inner) + return uint32(_cret) +} + + +// STBOXHashExtended wraps MEOS C function stbox_hash_extended. +func STBOXHashExtended(box *STBox, seed uint64) uint64 { + _cret := C.stbox_hash_extended(box._inner, C.uint64_t(seed)) + return uint64(_cret) +} + + +// STBOXHast wraps MEOS C function stbox_hast. +func STBOXHast(box *STBox) bool { + _cret := C.stbox_hast(box._inner) + return bool(_cret) +} + + +// STBOXHasx wraps MEOS C function stbox_hasx. +func STBOXHasx(box *STBox) bool { + _cret := C.stbox_hasx(box._inner) + return bool(_cret) +} + + +// STBOXHasz wraps MEOS C function stbox_hasz. +func STBOXHasz(box *STBox) bool { + _cret := C.stbox_hasz(box._inner) + return bool(_cret) +} + + +// STBOXIsgeodetic wraps MEOS C function stbox_isgeodetic. +func STBOXIsgeodetic(box *STBox) bool { + _cret := C.stbox_isgeodetic(box._inner) + return bool(_cret) +} + + +// STBOXPerimeter wraps MEOS C function stbox_perimeter. +func STBOXPerimeter(box *STBox, spheroid bool) float64 { + _cret := C.stbox_perimeter(box._inner, C.bool(spheroid)) + return float64(_cret) +} + + +// STBOXTmax wraps MEOS C function stbox_tmax. +func STBOXTmax(box *STBox) (bool, int64) { + var _out_result C.TimestampTz + _cret := C.stbox_tmax(box._inner, &_out_result) + return bool(_cret), int64(_out_result) +} + + +// STBOXTmaxInc wraps MEOS C function stbox_tmax_inc. +func STBOXTmaxInc(box *STBox) (bool, bool) { + var _out_result C.bool + _cret := C.stbox_tmax_inc(box._inner, &_out_result) + return bool(_cret), bool(_out_result) +} + + +// STBOXTmin wraps MEOS C function stbox_tmin. +func STBOXTmin(box *STBox) (bool, int64) { + var _out_result C.TimestampTz + _cret := C.stbox_tmin(box._inner, &_out_result) + return bool(_cret), int64(_out_result) +} + + +// STBOXTminInc wraps MEOS C function stbox_tmin_inc. +func STBOXTminInc(box *STBox) (bool, bool) { + var _out_result C.bool + _cret := C.stbox_tmin_inc(box._inner, &_out_result) + return bool(_cret), bool(_out_result) +} + + +// STBOXVolume wraps MEOS C function stbox_volume. +func STBOXVolume(box *STBox) float64 { + _cret := C.stbox_volume(box._inner) + return float64(_cret) +} + + +// STBOXXmax wraps MEOS C function stbox_xmax. +func STBOXXmax(box *STBox) (bool, float64) { + var _out_result C.double + _cret := C.stbox_xmax(box._inner, &_out_result) + return bool(_cret), float64(_out_result) +} + + +// STBOXXmin wraps MEOS C function stbox_xmin. +func STBOXXmin(box *STBox) (bool, float64) { + var _out_result C.double + _cret := C.stbox_xmin(box._inner, &_out_result) + return bool(_cret), float64(_out_result) +} + + +// STBOXYmax wraps MEOS C function stbox_ymax. +func STBOXYmax(box *STBox) (bool, float64) { + var _out_result C.double + _cret := C.stbox_ymax(box._inner, &_out_result) + return bool(_cret), float64(_out_result) +} + + +// STBOXYmin wraps MEOS C function stbox_ymin. +func STBOXYmin(box *STBox) (bool, float64) { + var _out_result C.double + _cret := C.stbox_ymin(box._inner, &_out_result) + return bool(_cret), float64(_out_result) +} + + +// STBOXZmax wraps MEOS C function stbox_zmax. +func STBOXZmax(box *STBox) (bool, float64) { + var _out_result C.double + _cret := C.stbox_zmax(box._inner, &_out_result) + return bool(_cret), float64(_out_result) +} + + +// STBOXZmin wraps MEOS C function stbox_zmin. +func STBOXZmin(box *STBox) (bool, float64) { + var _out_result C.double + _cret := C.stbox_zmin(box._inner, &_out_result) + return bool(_cret), float64(_out_result) +} + + +// STBOXExpandSpace wraps MEOS C function stbox_expand_space. +func STBOXExpandSpace(box *STBox, d float64) *STBox { + _cret := C.stbox_expand_space(box._inner, C.double(d)) + return &STBox{_inner: _cret} +} + + +// STBOXExpandTime wraps MEOS C function stbox_expand_time. +func STBOXExpandTime(box *STBox, interv *Interval) *STBox { + _cret := C.stbox_expand_time(box._inner, interv._inner) + return &STBox{_inner: _cret} +} + + +// STBOXGetSpace wraps MEOS C function stbox_get_space. +func STBOXGetSpace(box *STBox) *STBox { + _cret := C.stbox_get_space(box._inner) + return &STBox{_inner: _cret} +} + + +// STBOXQuadSplit wraps MEOS C function stbox_quad_split. +func STBOXQuadSplit(box *STBox, count unsafe.Pointer) *STBox { + _cret := C.stbox_quad_split(box._inner, (*C.int)(unsafe.Pointer(count))) + return &STBox{_inner: _cret} +} + + +// STBOXRound wraps MEOS C function stbox_round. +func STBOXRound(box *STBox, maxdd int) *STBox { + _cret := C.stbox_round(box._inner, C.int(maxdd)) + return &STBox{_inner: _cret} +} + + +// STBOXShiftScaleTime wraps MEOS C function stbox_shift_scale_time. +func STBOXShiftScaleTime(box *STBox, shift *Interval, duration *Interval) *STBox { + _cret := C.stbox_shift_scale_time(box._inner, shift._inner, duration._inner) + return &STBox{_inner: _cret} +} + + +// StboxarrRound wraps MEOS C function stboxarr_round. +func StboxarrRound(boxarr *STBox, count int, maxdd int) *STBox { + _cret := C.stboxarr_round(boxarr._inner, C.int(count), C.int(maxdd)) + return &STBox{_inner: _cret} +} + + +// STBOXSetSRID wraps MEOS C function stbox_set_srid. +func STBOXSetSRID(box *STBox, srid int32) *STBox { + _cret := C.stbox_set_srid(box._inner, C.int32_t(srid)) + return &STBox{_inner: _cret} +} + + +// STBOXSRID wraps MEOS C function stbox_srid. +func STBOXSRID(box *STBox) int32 { + _cret := C.stbox_srid(box._inner) + return int32(_cret) +} + + +// STBOXTransform wraps MEOS C function stbox_transform. +func STBOXTransform(box *STBox, srid int32) *STBox { + _cret := C.stbox_transform(box._inner, C.int32_t(srid)) + return &STBox{_inner: _cret} +} + + +// STBOXTransformPipeline wraps MEOS C function stbox_transform_pipeline. +func STBOXTransformPipeline(box *STBox, pipelinestr string, srid int32, is_forward bool) *STBox { + _c_pipelinestr := C.CString(pipelinestr) + defer C.free(unsafe.Pointer(_c_pipelinestr)) + _cret := C.stbox_transform_pipeline(box._inner, _c_pipelinestr, C.int32_t(srid), C.bool(is_forward)) + return &STBox{_inner: _cret} +} + + +// AdjacentSTBOXSTBOX wraps MEOS C function adjacent_stbox_stbox. +func AdjacentSTBOXSTBOX(box1 *STBox, box2 *STBox) bool { + _cret := C.adjacent_stbox_stbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// ContainedSTBOXSTBOX wraps MEOS C function contained_stbox_stbox. +func ContainedSTBOXSTBOX(box1 *STBox, box2 *STBox) bool { + _cret := C.contained_stbox_stbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// ContainsSTBOXSTBOX wraps MEOS C function contains_stbox_stbox. +func ContainsSTBOXSTBOX(box1 *STBox, box2 *STBox) bool { + _cret := C.contains_stbox_stbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OverlapsSTBOXSTBOX wraps MEOS C function overlaps_stbox_stbox. +func OverlapsSTBOXSTBOX(box1 *STBox, box2 *STBox) bool { + _cret := C.overlaps_stbox_stbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// SameSTBOXSTBOX wraps MEOS C function same_stbox_stbox. +func SameSTBOXSTBOX(box1 *STBox, box2 *STBox) bool { + _cret := C.same_stbox_stbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// AboveSTBOXSTBOX wraps MEOS C function above_stbox_stbox. +func AboveSTBOXSTBOX(box1 *STBox, box2 *STBox) bool { + _cret := C.above_stbox_stbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// AfterSTBOXSTBOX wraps MEOS C function after_stbox_stbox. +func AfterSTBOXSTBOX(box1 *STBox, box2 *STBox) bool { + _cret := C.after_stbox_stbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// BackSTBOXSTBOX wraps MEOS C function back_stbox_stbox. +func BackSTBOXSTBOX(box1 *STBox, box2 *STBox) bool { + _cret := C.back_stbox_stbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// BeforeSTBOXSTBOX wraps MEOS C function before_stbox_stbox. +func BeforeSTBOXSTBOX(box1 *STBox, box2 *STBox) bool { + _cret := C.before_stbox_stbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// BelowSTBOXSTBOX wraps MEOS C function below_stbox_stbox. +func BelowSTBOXSTBOX(box1 *STBox, box2 *STBox) bool { + _cret := C.below_stbox_stbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// FrontSTBOXSTBOX wraps MEOS C function front_stbox_stbox. +func FrontSTBOXSTBOX(box1 *STBox, box2 *STBox) bool { + _cret := C.front_stbox_stbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// LeftSTBOXSTBOX wraps MEOS C function left_stbox_stbox. +func LeftSTBOXSTBOX(box1 *STBox, box2 *STBox) bool { + _cret := C.left_stbox_stbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OveraboveSTBOXSTBOX wraps MEOS C function overabove_stbox_stbox. +func OveraboveSTBOXSTBOX(box1 *STBox, box2 *STBox) bool { + _cret := C.overabove_stbox_stbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OverafterSTBOXSTBOX wraps MEOS C function overafter_stbox_stbox. +func OverafterSTBOXSTBOX(box1 *STBox, box2 *STBox) bool { + _cret := C.overafter_stbox_stbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OverbackSTBOXSTBOX wraps MEOS C function overback_stbox_stbox. +func OverbackSTBOXSTBOX(box1 *STBox, box2 *STBox) bool { + _cret := C.overback_stbox_stbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OverbeforeSTBOXSTBOX wraps MEOS C function overbefore_stbox_stbox. +func OverbeforeSTBOXSTBOX(box1 *STBox, box2 *STBox) bool { + _cret := C.overbefore_stbox_stbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OverbelowSTBOXSTBOX wraps MEOS C function overbelow_stbox_stbox. +func OverbelowSTBOXSTBOX(box1 *STBox, box2 *STBox) bool { + _cret := C.overbelow_stbox_stbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OverfrontSTBOXSTBOX wraps MEOS C function overfront_stbox_stbox. +func OverfrontSTBOXSTBOX(box1 *STBox, box2 *STBox) bool { + _cret := C.overfront_stbox_stbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OverleftSTBOXSTBOX wraps MEOS C function overleft_stbox_stbox. +func OverleftSTBOXSTBOX(box1 *STBox, box2 *STBox) bool { + _cret := C.overleft_stbox_stbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OverrightSTBOXSTBOX wraps MEOS C function overright_stbox_stbox. +func OverrightSTBOXSTBOX(box1 *STBox, box2 *STBox) bool { + _cret := C.overright_stbox_stbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// RightSTBOXSTBOX wraps MEOS C function right_stbox_stbox. +func RightSTBOXSTBOX(box1 *STBox, box2 *STBox) bool { + _cret := C.right_stbox_stbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// UnionSTBOXSTBOX wraps MEOS C function union_stbox_stbox. +func UnionSTBOXSTBOX(box1 *STBox, box2 *STBox, strict bool) *STBox { + _cret := C.gunion_stbox_stbox(box1._inner, box2._inner, C.bool(strict)) + return &STBox{_inner: _cret} +} + + +// IntersectionSTBOXSTBOX wraps MEOS C function intersection_stbox_stbox. +func IntersectionSTBOXSTBOX(box1 *STBox, box2 *STBox) *STBox { + _cret := C.intersection_stbox_stbox(box1._inner, box2._inner) + return &STBox{_inner: _cret} +} + + +// STBOXCmp wraps MEOS C function stbox_cmp. +func STBOXCmp(box1 *STBox, box2 *STBox) int { + _cret := C.stbox_cmp(box1._inner, box2._inner) + return int(_cret) +} + + +// STBOXEq wraps MEOS C function stbox_eq. +func STBOXEq(box1 *STBox, box2 *STBox) bool { + _cret := C.stbox_eq(box1._inner, box2._inner) + return bool(_cret) +} + + +// STBOXGe wraps MEOS C function stbox_ge. +func STBOXGe(box1 *STBox, box2 *STBox) bool { + _cret := C.stbox_ge(box1._inner, box2._inner) + return bool(_cret) +} + + +// STBOXGt wraps MEOS C function stbox_gt. +func STBOXGt(box1 *STBox, box2 *STBox) bool { + _cret := C.stbox_gt(box1._inner, box2._inner) + return bool(_cret) +} + + +// STBOXLe wraps MEOS C function stbox_le. +func STBOXLe(box1 *STBox, box2 *STBox) bool { + _cret := C.stbox_le(box1._inner, box2._inner) + return bool(_cret) +} + + +// STBOXLt wraps MEOS C function stbox_lt. +func STBOXLt(box1 *STBox, box2 *STBox) bool { + _cret := C.stbox_lt(box1._inner, box2._inner) + return bool(_cret) +} + + +// STBOXNe wraps MEOS C function stbox_ne. +func STBOXNe(box1 *STBox, box2 *STBox) bool { + _cret := C.stbox_ne(box1._inner, box2._inner) + return bool(_cret) +} + + +// TspatialOut wraps MEOS C function tspatial_out. +func TspatialOut(temp *Temporal, maxdd int) string { + _cret := C.tspatial_out(temp._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// TgeogpointFromMFJSON wraps MEOS C function tgeogpoint_from_mfjson. +func TgeogpointFromMFJSON(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tgeogpoint_from_mfjson(_c_str) + return &Temporal{_inner: _cret} +} + + +// TgeogpointIn wraps MEOS C function tgeogpoint_in. +func TgeogpointIn(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tgeogpoint_in(_c_str) + return &Temporal{_inner: _cret} +} + + +// TgeographyFromMFJSON wraps MEOS C function tgeography_from_mfjson. +func TgeographyFromMFJSON(mfjson string) *Temporal { + _c_mfjson := C.CString(mfjson) + defer C.free(unsafe.Pointer(_c_mfjson)) + _cret := C.tgeography_from_mfjson(_c_mfjson) + return &Temporal{_inner: _cret} +} + + +// TgeographyIn wraps MEOS C function tgeography_in. +func TgeographyIn(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tgeography_in(_c_str) + return &Temporal{_inner: _cret} +} + + +// TgeometryFromMFJSON wraps MEOS C function tgeometry_from_mfjson. +func TgeometryFromMFJSON(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tgeometry_from_mfjson(_c_str) + return &Temporal{_inner: _cret} +} + + +// TgeometryIn wraps MEOS C function tgeometry_in. +func TgeometryIn(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tgeometry_in(_c_str) + return &Temporal{_inner: _cret} +} + + +// TgeompointFromMFJSON wraps MEOS C function tgeompoint_from_mfjson. +func TgeompointFromMFJSON(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tgeompoint_from_mfjson(_c_str) + return &Temporal{_inner: _cret} +} + + +// TgeompointIn wraps MEOS C function tgeompoint_in. +func TgeompointIn(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tgeompoint_in(_c_str) + return &Temporal{_inner: _cret} +} + + +// TspatialAsEWKT wraps MEOS C function tspatial_as_ewkt. +func TspatialAsEWKT(temp *Temporal, maxdd int) string { + _cret := C.tspatial_as_ewkt(temp._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// TspatialAsText wraps MEOS C function tspatial_as_text. +func TspatialAsText(temp *Temporal, maxdd int) string { + _cret := C.tspatial_as_text(temp._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// TgeoFromBaseTemp wraps MEOS C function tgeo_from_base_temp. +func TgeoFromBaseTemp(gs *Geom, temp *Temporal) *Temporal { + _cret := C.tgeo_from_base_temp(gs._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TgeoinstMake wraps MEOS C function tgeoinst_make. +func TgeoinstMake(gs *Geom, t int64) *TInstant { + _cret := C.tgeoinst_make(gs._inner, C.TimestampTz(t)) + return &TInstant{_inner: _cret} +} + + +// TgeoseqFromBaseTstzset wraps MEOS C function tgeoseq_from_base_tstzset. +func TgeoseqFromBaseTstzset(gs *Geom, s *Set) *TSequence { + _cret := C.tgeoseq_from_base_tstzset(gs._inner, s._inner) + return &TSequence{_inner: _cret} +} + + +// TgeoseqFromBaseTstzspan wraps MEOS C function tgeoseq_from_base_tstzspan. +func TgeoseqFromBaseTstzspan(gs *Geom, s *Span, interp Interpolation) *TSequence { + _cret := C.tgeoseq_from_base_tstzspan(gs._inner, s._inner, C.interpType(interp)) + return &TSequence{_inner: _cret} +} + + +// TgeoseqsetFromBaseTstzspanset wraps MEOS C function tgeoseqset_from_base_tstzspanset. +func TgeoseqsetFromBaseTstzspanset(gs *Geom, ss *SpanSet, interp Interpolation) *TSequenceSet { + _cret := C.tgeoseqset_from_base_tstzspanset(gs._inner, ss._inner, C.interpType(interp)) + return &TSequenceSet{_inner: _cret} +} + + +// TpointFromBaseTemp wraps MEOS C function tpoint_from_base_temp. +func TpointFromBaseTemp(gs *Geom, temp *Temporal) *Temporal { + _cret := C.tpoint_from_base_temp(gs._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TpointinstMake wraps MEOS C function tpointinst_make. +func TpointinstMake(gs *Geom, t int64) *TInstant { + _cret := C.tpointinst_make(gs._inner, C.TimestampTz(t)) + return &TInstant{_inner: _cret} +} + + +// TpointseqFromBaseTstzset wraps MEOS C function tpointseq_from_base_tstzset. +func TpointseqFromBaseTstzset(gs *Geom, s *Set) *TSequence { + _cret := C.tpointseq_from_base_tstzset(gs._inner, s._inner) + return &TSequence{_inner: _cret} +} + + +// TpointseqFromBaseTstzspan wraps MEOS C function tpointseq_from_base_tstzspan. +func TpointseqFromBaseTstzspan(gs *Geom, s *Span, interp Interpolation) *TSequence { + _cret := C.tpointseq_from_base_tstzspan(gs._inner, s._inner, C.interpType(interp)) + return &TSequence{_inner: _cret} +} + + +// TpointseqMakeCoords wraps MEOS C function tpointseq_make_coords. +func TpointseqMakeCoords(xcoords unsafe.Pointer, ycoords unsafe.Pointer, zcoords unsafe.Pointer, times unsafe.Pointer, count int, srid int32, geodetic bool, lower_inc bool, upper_inc bool, interp Interpolation, normalize bool) *TSequence { + _cret := C.tpointseq_make_coords((*C.double)(unsafe.Pointer(xcoords)), (*C.double)(unsafe.Pointer(ycoords)), (*C.double)(unsafe.Pointer(zcoords)), (*C.TimestampTz)(unsafe.Pointer(times)), C.int(count), C.int32_t(srid), C.bool(geodetic), C.bool(lower_inc), C.bool(upper_inc), C.interpType(interp), C.bool(normalize)) + return &TSequence{_inner: _cret} +} + + +// TpointseqsetFromBaseTstzspanset wraps MEOS C function tpointseqset_from_base_tstzspanset. +func TpointseqsetFromBaseTstzspanset(gs *Geom, ss *SpanSet, interp Interpolation) *TSequenceSet { + _cret := C.tpointseqset_from_base_tstzspanset(gs._inner, ss._inner, C.interpType(interp)) + return &TSequenceSet{_inner: _cret} +} + + +// Box3dToSTBOX wraps MEOS C function box3d_to_stbox. +func Box3dToSTBOX(box *Box3D) *STBox { + _cret := C.box3d_to_stbox(box._inner) + return &STBox{_inner: _cret} +} + + +// GboxToSTBOX wraps MEOS C function gbox_to_stbox. +func GboxToSTBOX(box *GBox) *STBox { + _cret := C.gbox_to_stbox(box._inner) + return &STBox{_inner: _cret} +} + + +// GeomeasToTpoint wraps MEOS C function geomeas_to_tpoint. +func GeomeasToTpoint(gs *Geom) *Temporal { + _cret := C.geomeas_to_tpoint(gs._inner) + return &Temporal{_inner: _cret} +} + + +// TgeogpointToTgeography wraps MEOS C function tgeogpoint_to_tgeography. +func TgeogpointToTgeography(temp *Temporal) *Temporal { + _cret := C.tgeogpoint_to_tgeography(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TgeographyToTgeogpoint wraps MEOS C function tgeography_to_tgeogpoint. +func TgeographyToTgeogpoint(temp *Temporal) *Temporal { + _cret := C.tgeography_to_tgeogpoint(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TgeographyToTgeometry wraps MEOS C function tgeography_to_tgeometry. +func TgeographyToTgeometry(temp *Temporal) *Temporal { + _cret := C.tgeography_to_tgeometry(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TgeometryToTgeography wraps MEOS C function tgeometry_to_tgeography. +func TgeometryToTgeography(temp *Temporal) *Temporal { + _cret := C.tgeometry_to_tgeography(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TgeometryToTgeompoint wraps MEOS C function tgeometry_to_tgeompoint. +func TgeometryToTgeompoint(temp *Temporal) *Temporal { + _cret := C.tgeometry_to_tgeompoint(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TgeompointToTgeometry wraps MEOS C function tgeompoint_to_tgeometry. +func TgeompointToTgeometry(temp *Temporal) *Temporal { + _cret := C.tgeompoint_to_tgeometry(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TODO tpoint_as_mvtgeom: unsupported return type MvtGeom +// func TpointAsMvtgeom(...) { /* not yet handled by codegen */ } + + +// TpointTfloatToGeomeas wraps MEOS C function tpoint_tfloat_to_geomeas. +func TpointTfloatToGeomeas(tpoint *Temporal, measure *Temporal, segmentize bool) (bool, *Geom) { + var _out_result *C.GSERIALIZED + _cret := C.tpoint_tfloat_to_geomeas(tpoint._inner, measure._inner, C.bool(segmentize), &_out_result) + return bool(_cret), &Geom{_inner: _out_result} +} + + +// TspatialToSTBOX wraps MEOS C function tspatial_to_stbox. +func TspatialToSTBOX(temp *Temporal) *STBox { + _cret := C.tspatial_to_stbox(temp._inner) + return &STBox{_inner: _cret} +} + + +// BearingPointPoint wraps MEOS C function bearing_point_point. +func BearingPointPoint(gs1 *Geom, gs2 *Geom) (bool, float64) { + var _out_result C.double + _cret := C.bearing_point_point(gs1._inner, gs2._inner, &_out_result) + return bool(_cret), float64(_out_result) +} + + +// BearingTpointPoint wraps MEOS C function bearing_tpoint_point. +func BearingTpointPoint(temp *Temporal, gs *Geom, invert bool) *Temporal { + _cret := C.bearing_tpoint_point(temp._inner, gs._inner, C.bool(invert)) + return &Temporal{_inner: _cret} +} + + +// BearingTpointTpoint wraps MEOS C function bearing_tpoint_tpoint. +func BearingTpointTpoint(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.bearing_tpoint_tpoint(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// TgeoCentroid wraps MEOS C function tgeo_centroid. +func TgeoCentroid(temp *Temporal) *Temporal { + _cret := C.tgeo_centroid(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TgeoConvexHull wraps MEOS C function tgeo_convex_hull. +func TgeoConvexHull(temp *Temporal) *Geom { + _cret := C.tgeo_convex_hull(temp._inner) + return &Geom{_inner: _cret} +} + + +// TgeoEndValue wraps MEOS C function tgeo_end_value. +func TgeoEndValue(temp *Temporal) *Geom { + _cret := C.tgeo_end_value(temp._inner) + return &Geom{_inner: _cret} +} + + +// TgeoStartValue wraps MEOS C function tgeo_start_value. +func TgeoStartValue(temp *Temporal) *Geom { + _cret := C.tgeo_start_value(temp._inner) + return &Geom{_inner: _cret} +} + + +// TgeoTraversedArea wraps MEOS C function tgeo_traversed_area. +func TgeoTraversedArea(temp *Temporal, unary_union bool) *Geom { + _cret := C.tgeo_traversed_area(temp._inner, C.bool(unary_union)) + return &Geom{_inner: _cret} +} + + +// TgeoValueAtTimestamptz wraps MEOS C function tgeo_value_at_timestamptz. +func TgeoValueAtTimestamptz(temp *Temporal, t int64, strict bool) (bool, *Geom) { + var _out_result *C.GSERIALIZED + _cret := C.tgeo_value_at_timestamptz(temp._inner, C.TimestampTz(t), C.bool(strict), &_out_result) + return bool(_cret), &Geom{_inner: _out_result} +} + + +// TgeoValueN wraps MEOS C function tgeo_value_n. +func TgeoValueN(temp *Temporal, n int) (bool, *Geom) { + var _out_result *C.GSERIALIZED + _cret := C.tgeo_value_n(temp._inner, C.int(n), &_out_result) + return bool(_cret), &Geom{_inner: _out_result} +} + + +// TgeoValues wraps MEOS C function tgeo_values. +func TgeoValues(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tgeo_values(temp._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TpointAngularDifference wraps MEOS C function tpoint_angular_difference. +func TpointAngularDifference(temp *Temporal) *Temporal { + _cret := C.tpoint_angular_difference(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TpointAzimuth wraps MEOS C function tpoint_azimuth. +func TpointAzimuth(temp *Temporal) *Temporal { + _cret := C.tpoint_azimuth(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TpointCumulativeLength wraps MEOS C function tpoint_cumulative_length. +func TpointCumulativeLength(temp *Temporal) *Temporal { + _cret := C.tpoint_cumulative_length(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TpointDirection wraps MEOS C function tpoint_direction. +func TpointDirection(temp *Temporal) (bool, float64) { + var _out_result C.double + _cret := C.tpoint_direction(temp._inner, &_out_result) + return bool(_cret), float64(_out_result) +} + + +// TpointGetX wraps MEOS C function tpoint_get_x. +func TpointGetX(temp *Temporal) *Temporal { + _cret := C.tpoint_get_x(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TpointGetY wraps MEOS C function tpoint_get_y. +func TpointGetY(temp *Temporal) *Temporal { + _cret := C.tpoint_get_y(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TpointGetZ wraps MEOS C function tpoint_get_z. +func TpointGetZ(temp *Temporal) *Temporal { + _cret := C.tpoint_get_z(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TpointIsSimple wraps MEOS C function tpoint_is_simple. +func TpointIsSimple(temp *Temporal) bool { + _cret := C.tpoint_is_simple(temp._inner) + return bool(_cret) +} + + +// TpointLength wraps MEOS C function tpoint_length. +func TpointLength(temp *Temporal) float64 { + _cret := C.tpoint_length(temp._inner) + return float64(_cret) +} + + +// TpointSpeed wraps MEOS C function tpoint_speed. +func TpointSpeed(temp *Temporal) *Temporal { + _cret := C.tpoint_speed(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TpointTrajectory wraps MEOS C function tpoint_trajectory. +func TpointTrajectory(temp *Temporal, unary_union bool) *Geom { + _cret := C.tpoint_trajectory(temp._inner, C.bool(unary_union)) + return &Geom{_inner: _cret} +} + + +// TpointTwcentroid wraps MEOS C function tpoint_twcentroid. +func TpointTwcentroid(temp *Temporal) *Geom { + _cret := C.tpoint_twcentroid(temp._inner) + return &Geom{_inner: _cret} +} + + +// TgeoAffine wraps MEOS C function tgeo_affine. +func TgeoAffine(temp *Temporal, a *AFFINE) *Temporal { + _cret := C.tgeo_affine(temp._inner, a._inner) + return &Temporal{_inner: _cret} +} + + +// TgeoScale wraps MEOS C function tgeo_scale. +func TgeoScale(temp *Temporal, scale *Geom, sorigin *Geom) *Temporal { + _cret := C.tgeo_scale(temp._inner, scale._inner, sorigin._inner) + return &Temporal{_inner: _cret} +} + + +// TpointMakeSimple wraps MEOS C function tpoint_make_simple. +func TpointMakeSimple(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tpoint_make_simple(temp._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TspatialSRID wraps MEOS C function tspatial_srid. +func TspatialSRID(temp *Temporal) int32 { + _cret := C.tspatial_srid(temp._inner) + return int32(_cret) +} + + +// TspatialSetSRID wraps MEOS C function tspatial_set_srid. +func TspatialSetSRID(temp *Temporal, srid int32) *Temporal { + _cret := C.tspatial_set_srid(temp._inner, C.int32_t(srid)) + return &Temporal{_inner: _cret} +} + + +// TspatialTransform wraps MEOS C function tspatial_transform. +func TspatialTransform(temp *Temporal, srid int32) *Temporal { + _cret := C.tspatial_transform(temp._inner, C.int32_t(srid)) + return &Temporal{_inner: _cret} +} + + +// TspatialTransformPipeline wraps MEOS C function tspatial_transform_pipeline. +func TspatialTransformPipeline(temp *Temporal, pipelinestr string, srid int32, is_forward bool) *Temporal { + _c_pipelinestr := C.CString(pipelinestr) + defer C.free(unsafe.Pointer(_c_pipelinestr)) + _cret := C.tspatial_transform_pipeline(temp._inner, _c_pipelinestr, C.int32_t(srid), C.bool(is_forward)) + return &Temporal{_inner: _cret} +} + + +// TgeoAtGeom wraps MEOS C function tgeo_at_geom. +func TgeoAtGeom(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tgeo_at_geom(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TgeoAtSTBOX wraps MEOS C function tgeo_at_stbox. +func TgeoAtSTBOX(temp *Temporal, box *STBox, border_inc bool) *Temporal { + _cret := C.tgeo_at_stbox(temp._inner, box._inner, C.bool(border_inc)) + return &Temporal{_inner: _cret} +} + + +// TgeoAtValue wraps MEOS C function tgeo_at_value. +func TgeoAtValue(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tgeo_at_value(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TgeoMinusGeom wraps MEOS C function tgeo_minus_geom. +func TgeoMinusGeom(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tgeo_minus_geom(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TgeoMinusSTBOX wraps MEOS C function tgeo_minus_stbox. +func TgeoMinusSTBOX(temp *Temporal, box *STBox, border_inc bool) *Temporal { + _cret := C.tgeo_minus_stbox(temp._inner, box._inner, C.bool(border_inc)) + return &Temporal{_inner: _cret} +} + + +// TgeoMinusValue wraps MEOS C function tgeo_minus_value. +func TgeoMinusValue(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tgeo_minus_value(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TpointAtElevation wraps MEOS C function tpoint_at_elevation. +func TpointAtElevation(temp *Temporal, s *Span) *Temporal { + _cret := C.tpoint_at_elevation(temp._inner, s._inner) + return &Temporal{_inner: _cret} +} + + +// TpointAtGeom wraps MEOS C function tpoint_at_geom. +func TpointAtGeom(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tpoint_at_geom(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TpointAtValue wraps MEOS C function tpoint_at_value. +func TpointAtValue(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tpoint_at_value(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TpointMinusElevation wraps MEOS C function tpoint_minus_elevation. +func TpointMinusElevation(temp *Temporal, s *Span) *Temporal { + _cret := C.tpoint_minus_elevation(temp._inner, s._inner) + return &Temporal{_inner: _cret} +} + + +// TpointMinusGeom wraps MEOS C function tpoint_minus_geom. +func TpointMinusGeom(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tpoint_minus_geom(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TpointMinusValue wraps MEOS C function tpoint_minus_value. +func TpointMinusValue(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tpoint_minus_value(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// AlwaysEqGeoTgeo wraps MEOS C function always_eq_geo_tgeo. +func AlwaysEqGeoTgeo(gs *Geom, temp *Temporal) int { + _cret := C.always_eq_geo_tgeo(gs._inner, temp._inner) + return int(_cret) +} + + +// AlwaysEqTgeoGeo wraps MEOS C function always_eq_tgeo_geo. +func AlwaysEqTgeoGeo(temp *Temporal, gs *Geom) int { + _cret := C.always_eq_tgeo_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// AlwaysEqTgeoTgeo wraps MEOS C function always_eq_tgeo_tgeo. +func AlwaysEqTgeoTgeo(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.always_eq_tgeo_tgeo(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AlwaysNeGeoTgeo wraps MEOS C function always_ne_geo_tgeo. +func AlwaysNeGeoTgeo(gs *Geom, temp *Temporal) int { + _cret := C.always_ne_geo_tgeo(gs._inner, temp._inner) + return int(_cret) +} + + +// AlwaysNeTgeoGeo wraps MEOS C function always_ne_tgeo_geo. +func AlwaysNeTgeoGeo(temp *Temporal, gs *Geom) int { + _cret := C.always_ne_tgeo_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// AlwaysNeTgeoTgeo wraps MEOS C function always_ne_tgeo_tgeo. +func AlwaysNeTgeoTgeo(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.always_ne_tgeo_tgeo(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EverEqGeoTgeo wraps MEOS C function ever_eq_geo_tgeo. +func EverEqGeoTgeo(gs *Geom, temp *Temporal) int { + _cret := C.ever_eq_geo_tgeo(gs._inner, temp._inner) + return int(_cret) +} + + +// EverEqTgeoGeo wraps MEOS C function ever_eq_tgeo_geo. +func EverEqTgeoGeo(temp *Temporal, gs *Geom) int { + _cret := C.ever_eq_tgeo_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// EverEqTgeoTgeo wraps MEOS C function ever_eq_tgeo_tgeo. +func EverEqTgeoTgeo(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ever_eq_tgeo_tgeo(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EverNeGeoTgeo wraps MEOS C function ever_ne_geo_tgeo. +func EverNeGeoTgeo(gs *Geom, temp *Temporal) int { + _cret := C.ever_ne_geo_tgeo(gs._inner, temp._inner) + return int(_cret) +} + + +// EverNeTgeoGeo wraps MEOS C function ever_ne_tgeo_geo. +func EverNeTgeoGeo(temp *Temporal, gs *Geom) int { + _cret := C.ever_ne_tgeo_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// EverNeTgeoTgeo wraps MEOS C function ever_ne_tgeo_tgeo. +func EverNeTgeoTgeo(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ever_ne_tgeo_tgeo(temp1._inner, temp2._inner) + return int(_cret) +} + + +// TeqGeoTgeo wraps MEOS C function teq_geo_tgeo. +func TeqGeoTgeo(gs *Geom, temp *Temporal) *Temporal { + _cret := C.teq_geo_tgeo(gs._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TeqTgeoGeo wraps MEOS C function teq_tgeo_geo. +func TeqTgeoGeo(temp *Temporal, gs *Geom) *Temporal { + _cret := C.teq_tgeo_geo(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TneGeoTgeo wraps MEOS C function tne_geo_tgeo. +func TneGeoTgeo(gs *Geom, temp *Temporal) *Temporal { + _cret := C.tne_geo_tgeo(gs._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TneTgeoGeo wraps MEOS C function tne_tgeo_geo. +func TneTgeoGeo(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tne_tgeo_geo(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TgeoStboxes wraps MEOS C function tgeo_stboxes. +func TgeoStboxes(temp *Temporal, count unsafe.Pointer) *STBox { + _cret := C.tgeo_stboxes(temp._inner, (*C.int)(unsafe.Pointer(count))) + return &STBox{_inner: _cret} +} + + +// TgeoSpaceBoxes wraps MEOS C function tgeo_space_boxes. +func TgeoSpaceBoxes(temp *Temporal, xsize float64, ysize float64, zsize float64, sorigin *Geom, bitmatrix bool, border_inc bool, count unsafe.Pointer) *STBox { + _cret := C.tgeo_space_boxes(temp._inner, C.double(xsize), C.double(ysize), C.double(zsize), sorigin._inner, C.bool(bitmatrix), C.bool(border_inc), (*C.int)(unsafe.Pointer(count))) + return &STBox{_inner: _cret} +} + + +// TgeoSpaceTimeBoxes wraps MEOS C function tgeo_space_time_boxes. +func TgeoSpaceTimeBoxes(temp *Temporal, xsize float64, ysize float64, zsize float64, duration *Interval, sorigin *Geom, torigin int64, bitmatrix bool, border_inc bool, count unsafe.Pointer) *STBox { + _cret := C.tgeo_space_time_boxes(temp._inner, C.double(xsize), C.double(ysize), C.double(zsize), duration._inner, sorigin._inner, C.TimestampTz(torigin), C.bool(bitmatrix), C.bool(border_inc), (*C.int)(unsafe.Pointer(count))) + return &STBox{_inner: _cret} +} + + +// TgeoSplitEachNStboxes wraps MEOS C function tgeo_split_each_n_stboxes. +func TgeoSplitEachNStboxes(temp *Temporal, elem_count int, count unsafe.Pointer) *STBox { + _cret := C.tgeo_split_each_n_stboxes(temp._inner, C.int(elem_count), (*C.int)(unsafe.Pointer(count))) + return &STBox{_inner: _cret} +} + + +// TgeoSplitNStboxes wraps MEOS C function tgeo_split_n_stboxes. +func TgeoSplitNStboxes(temp *Temporal, box_count int, count unsafe.Pointer) *STBox { + _cret := C.tgeo_split_n_stboxes(temp._inner, C.int(box_count), (*C.int)(unsafe.Pointer(count))) + return &STBox{_inner: _cret} +} + + +// AdjacentSTBOXTspatial wraps MEOS C function adjacent_stbox_tspatial. +func AdjacentSTBOXTspatial(box *STBox, temp *Temporal) bool { + _cret := C.adjacent_stbox_tspatial(box._inner, temp._inner) + return bool(_cret) +} + + +// AdjacentTspatialSTBOX wraps MEOS C function adjacent_tspatial_stbox. +func AdjacentTspatialSTBOX(temp *Temporal, box *STBox) bool { + _cret := C.adjacent_tspatial_stbox(temp._inner, box._inner) + return bool(_cret) +} + + +// AdjacentTspatialTspatial wraps MEOS C function adjacent_tspatial_tspatial. +func AdjacentTspatialTspatial(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.adjacent_tspatial_tspatial(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// ContainedSTBOXTspatial wraps MEOS C function contained_stbox_tspatial. +func ContainedSTBOXTspatial(box *STBox, temp *Temporal) bool { + _cret := C.contained_stbox_tspatial(box._inner, temp._inner) + return bool(_cret) +} + + +// ContainedTspatialSTBOX wraps MEOS C function contained_tspatial_stbox. +func ContainedTspatialSTBOX(temp *Temporal, box *STBox) bool { + _cret := C.contained_tspatial_stbox(temp._inner, box._inner) + return bool(_cret) +} + + +// ContainedTspatialTspatial wraps MEOS C function contained_tspatial_tspatial. +func ContainedTspatialTspatial(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.contained_tspatial_tspatial(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// ContainsSTBOXTspatial wraps MEOS C function contains_stbox_tspatial. +func ContainsSTBOXTspatial(box *STBox, temp *Temporal) bool { + _cret := C.contains_stbox_tspatial(box._inner, temp._inner) + return bool(_cret) +} + + +// ContainsTspatialSTBOX wraps MEOS C function contains_tspatial_stbox. +func ContainsTspatialSTBOX(temp *Temporal, box *STBox) bool { + _cret := C.contains_tspatial_stbox(temp._inner, box._inner) + return bool(_cret) +} + + +// ContainsTspatialTspatial wraps MEOS C function contains_tspatial_tspatial. +func ContainsTspatialTspatial(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.contains_tspatial_tspatial(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// OverlapsSTBOXTspatial wraps MEOS C function overlaps_stbox_tspatial. +func OverlapsSTBOXTspatial(box *STBox, temp *Temporal) bool { + _cret := C.overlaps_stbox_tspatial(box._inner, temp._inner) + return bool(_cret) +} + + +// OverlapsTspatialSTBOX wraps MEOS C function overlaps_tspatial_stbox. +func OverlapsTspatialSTBOX(temp *Temporal, box *STBox) bool { + _cret := C.overlaps_tspatial_stbox(temp._inner, box._inner) + return bool(_cret) +} + + +// OverlapsTspatialTspatial wraps MEOS C function overlaps_tspatial_tspatial. +func OverlapsTspatialTspatial(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.overlaps_tspatial_tspatial(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// SameSTBOXTspatial wraps MEOS C function same_stbox_tspatial. +func SameSTBOXTspatial(box *STBox, temp *Temporal) bool { + _cret := C.same_stbox_tspatial(box._inner, temp._inner) + return bool(_cret) +} + + +// SameTspatialSTBOX wraps MEOS C function same_tspatial_stbox. +func SameTspatialSTBOX(temp *Temporal, box *STBox) bool { + _cret := C.same_tspatial_stbox(temp._inner, box._inner) + return bool(_cret) +} + + +// SameTspatialTspatial wraps MEOS C function same_tspatial_tspatial. +func SameTspatialTspatial(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.same_tspatial_tspatial(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// AboveSTBOXTspatial wraps MEOS C function above_stbox_tspatial. +func AboveSTBOXTspatial(box *STBox, temp *Temporal) bool { + _cret := C.above_stbox_tspatial(box._inner, temp._inner) + return bool(_cret) +} + + +// AboveTspatialSTBOX wraps MEOS C function above_tspatial_stbox. +func AboveTspatialSTBOX(temp *Temporal, box *STBox) bool { + _cret := C.above_tspatial_stbox(temp._inner, box._inner) + return bool(_cret) +} + + +// AboveTspatialTspatial wraps MEOS C function above_tspatial_tspatial. +func AboveTspatialTspatial(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.above_tspatial_tspatial(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// AfterSTBOXTspatial wraps MEOS C function after_stbox_tspatial. +func AfterSTBOXTspatial(box *STBox, temp *Temporal) bool { + _cret := C.after_stbox_tspatial(box._inner, temp._inner) + return bool(_cret) +} + + +// AfterTspatialSTBOX wraps MEOS C function after_tspatial_stbox. +func AfterTspatialSTBOX(temp *Temporal, box *STBox) bool { + _cret := C.after_tspatial_stbox(temp._inner, box._inner) + return bool(_cret) +} + + +// AfterTspatialTspatial wraps MEOS C function after_tspatial_tspatial. +func AfterTspatialTspatial(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.after_tspatial_tspatial(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// BackSTBOXTspatial wraps MEOS C function back_stbox_tspatial. +func BackSTBOXTspatial(box *STBox, temp *Temporal) bool { + _cret := C.back_stbox_tspatial(box._inner, temp._inner) + return bool(_cret) +} + + +// BackTspatialSTBOX wraps MEOS C function back_tspatial_stbox. +func BackTspatialSTBOX(temp *Temporal, box *STBox) bool { + _cret := C.back_tspatial_stbox(temp._inner, box._inner) + return bool(_cret) +} + + +// BackTspatialTspatial wraps MEOS C function back_tspatial_tspatial. +func BackTspatialTspatial(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.back_tspatial_tspatial(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// BeforeSTBOXTspatial wraps MEOS C function before_stbox_tspatial. +func BeforeSTBOXTspatial(box *STBox, temp *Temporal) bool { + _cret := C.before_stbox_tspatial(box._inner, temp._inner) + return bool(_cret) +} + + +// BeforeTspatialSTBOX wraps MEOS C function before_tspatial_stbox. +func BeforeTspatialSTBOX(temp *Temporal, box *STBox) bool { + _cret := C.before_tspatial_stbox(temp._inner, box._inner) + return bool(_cret) +} + + +// BeforeTspatialTspatial wraps MEOS C function before_tspatial_tspatial. +func BeforeTspatialTspatial(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.before_tspatial_tspatial(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// BelowSTBOXTspatial wraps MEOS C function below_stbox_tspatial. +func BelowSTBOXTspatial(box *STBox, temp *Temporal) bool { + _cret := C.below_stbox_tspatial(box._inner, temp._inner) + return bool(_cret) +} + + +// BelowTspatialSTBOX wraps MEOS C function below_tspatial_stbox. +func BelowTspatialSTBOX(temp *Temporal, box *STBox) bool { + _cret := C.below_tspatial_stbox(temp._inner, box._inner) + return bool(_cret) +} + + +// BelowTspatialTspatial wraps MEOS C function below_tspatial_tspatial. +func BelowTspatialTspatial(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.below_tspatial_tspatial(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// FrontSTBOXTspatial wraps MEOS C function front_stbox_tspatial. +func FrontSTBOXTspatial(box *STBox, temp *Temporal) bool { + _cret := C.front_stbox_tspatial(box._inner, temp._inner) + return bool(_cret) +} + + +// FrontTspatialSTBOX wraps MEOS C function front_tspatial_stbox. +func FrontTspatialSTBOX(temp *Temporal, box *STBox) bool { + _cret := C.front_tspatial_stbox(temp._inner, box._inner) + return bool(_cret) +} + + +// FrontTspatialTspatial wraps MEOS C function front_tspatial_tspatial. +func FrontTspatialTspatial(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.front_tspatial_tspatial(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// LeftSTBOXTspatial wraps MEOS C function left_stbox_tspatial. +func LeftSTBOXTspatial(box *STBox, temp *Temporal) bool { + _cret := C.left_stbox_tspatial(box._inner, temp._inner) + return bool(_cret) +} + + +// LeftTspatialSTBOX wraps MEOS C function left_tspatial_stbox. +func LeftTspatialSTBOX(temp *Temporal, box *STBox) bool { + _cret := C.left_tspatial_stbox(temp._inner, box._inner) + return bool(_cret) +} + + +// LeftTspatialTspatial wraps MEOS C function left_tspatial_tspatial. +func LeftTspatialTspatial(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.left_tspatial_tspatial(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// OveraboveSTBOXTspatial wraps MEOS C function overabove_stbox_tspatial. +func OveraboveSTBOXTspatial(box *STBox, temp *Temporal) bool { + _cret := C.overabove_stbox_tspatial(box._inner, temp._inner) + return bool(_cret) +} + + +// OveraboveTspatialSTBOX wraps MEOS C function overabove_tspatial_stbox. +func OveraboveTspatialSTBOX(temp *Temporal, box *STBox) bool { + _cret := C.overabove_tspatial_stbox(temp._inner, box._inner) + return bool(_cret) +} + + +// OveraboveTspatialTspatial wraps MEOS C function overabove_tspatial_tspatial. +func OveraboveTspatialTspatial(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.overabove_tspatial_tspatial(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// OverafterSTBOXTspatial wraps MEOS C function overafter_stbox_tspatial. +func OverafterSTBOXTspatial(box *STBox, temp *Temporal) bool { + _cret := C.overafter_stbox_tspatial(box._inner, temp._inner) + return bool(_cret) +} + + +// OverafterTspatialSTBOX wraps MEOS C function overafter_tspatial_stbox. +func OverafterTspatialSTBOX(temp *Temporal, box *STBox) bool { + _cret := C.overafter_tspatial_stbox(temp._inner, box._inner) + return bool(_cret) +} + + +// OverafterTspatialTspatial wraps MEOS C function overafter_tspatial_tspatial. +func OverafterTspatialTspatial(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.overafter_tspatial_tspatial(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// OverbackSTBOXTspatial wraps MEOS C function overback_stbox_tspatial. +func OverbackSTBOXTspatial(box *STBox, temp *Temporal) bool { + _cret := C.overback_stbox_tspatial(box._inner, temp._inner) + return bool(_cret) +} + + +// OverbackTspatialSTBOX wraps MEOS C function overback_tspatial_stbox. +func OverbackTspatialSTBOX(temp *Temporal, box *STBox) bool { + _cret := C.overback_tspatial_stbox(temp._inner, box._inner) + return bool(_cret) +} + + +// OverbackTspatialTspatial wraps MEOS C function overback_tspatial_tspatial. +func OverbackTspatialTspatial(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.overback_tspatial_tspatial(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// OverbeforeSTBOXTspatial wraps MEOS C function overbefore_stbox_tspatial. +func OverbeforeSTBOXTspatial(box *STBox, temp *Temporal) bool { + _cret := C.overbefore_stbox_tspatial(box._inner, temp._inner) + return bool(_cret) +} + + +// OverbeforeTspatialSTBOX wraps MEOS C function overbefore_tspatial_stbox. +func OverbeforeTspatialSTBOX(temp *Temporal, box *STBox) bool { + _cret := C.overbefore_tspatial_stbox(temp._inner, box._inner) + return bool(_cret) +} + + +// OverbeforeTspatialTspatial wraps MEOS C function overbefore_tspatial_tspatial. +func OverbeforeTspatialTspatial(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.overbefore_tspatial_tspatial(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// OverbelowSTBOXTspatial wraps MEOS C function overbelow_stbox_tspatial. +func OverbelowSTBOXTspatial(box *STBox, temp *Temporal) bool { + _cret := C.overbelow_stbox_tspatial(box._inner, temp._inner) + return bool(_cret) +} + + +// OverbelowTspatialSTBOX wraps MEOS C function overbelow_tspatial_stbox. +func OverbelowTspatialSTBOX(temp *Temporal, box *STBox) bool { + _cret := C.overbelow_tspatial_stbox(temp._inner, box._inner) + return bool(_cret) +} + + +// OverbelowTspatialTspatial wraps MEOS C function overbelow_tspatial_tspatial. +func OverbelowTspatialTspatial(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.overbelow_tspatial_tspatial(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// OverfrontSTBOXTspatial wraps MEOS C function overfront_stbox_tspatial. +func OverfrontSTBOXTspatial(box *STBox, temp *Temporal) bool { + _cret := C.overfront_stbox_tspatial(box._inner, temp._inner) + return bool(_cret) +} + + +// OverfrontTspatialSTBOX wraps MEOS C function overfront_tspatial_stbox. +func OverfrontTspatialSTBOX(temp *Temporal, box *STBox) bool { + _cret := C.overfront_tspatial_stbox(temp._inner, box._inner) + return bool(_cret) +} + + +// OverfrontTspatialTspatial wraps MEOS C function overfront_tspatial_tspatial. +func OverfrontTspatialTspatial(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.overfront_tspatial_tspatial(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// OverleftSTBOXTspatial wraps MEOS C function overleft_stbox_tspatial. +func OverleftSTBOXTspatial(box *STBox, temp *Temporal) bool { + _cret := C.overleft_stbox_tspatial(box._inner, temp._inner) + return bool(_cret) +} + + +// OverleftTspatialSTBOX wraps MEOS C function overleft_tspatial_stbox. +func OverleftTspatialSTBOX(temp *Temporal, box *STBox) bool { + _cret := C.overleft_tspatial_stbox(temp._inner, box._inner) + return bool(_cret) +} + + +// OverleftTspatialTspatial wraps MEOS C function overleft_tspatial_tspatial. +func OverleftTspatialTspatial(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.overleft_tspatial_tspatial(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// OverrightSTBOXTspatial wraps MEOS C function overright_stbox_tspatial. +func OverrightSTBOXTspatial(box *STBox, temp *Temporal) bool { + _cret := C.overright_stbox_tspatial(box._inner, temp._inner) + return bool(_cret) +} + + +// OverrightTspatialSTBOX wraps MEOS C function overright_tspatial_stbox. +func OverrightTspatialSTBOX(temp *Temporal, box *STBox) bool { + _cret := C.overright_tspatial_stbox(temp._inner, box._inner) + return bool(_cret) +} + + +// OverrightTspatialTspatial wraps MEOS C function overright_tspatial_tspatial. +func OverrightTspatialTspatial(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.overright_tspatial_tspatial(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// RightSTBOXTspatial wraps MEOS C function right_stbox_tspatial. +func RightSTBOXTspatial(box *STBox, temp *Temporal) bool { + _cret := C.right_stbox_tspatial(box._inner, temp._inner) + return bool(_cret) +} + + +// RightTspatialSTBOX wraps MEOS C function right_tspatial_stbox. +func RightTspatialSTBOX(temp *Temporal, box *STBox) bool { + _cret := C.right_tspatial_stbox(temp._inner, box._inner) + return bool(_cret) +} + + +// RightTspatialTspatial wraps MEOS C function right_tspatial_tspatial. +func RightTspatialTspatial(temp1 *Temporal, temp2 *Temporal) bool { + _cret := C.right_tspatial_tspatial(temp1._inner, temp2._inner) + return bool(_cret) +} + + +// AcontainsGeoTgeo wraps MEOS C function acontains_geo_tgeo. +func AcontainsGeoTgeo(gs *Geom, temp *Temporal) int { + _cret := C.acontains_geo_tgeo(gs._inner, temp._inner) + return int(_cret) +} + + +// AcontainsTgeoGeo wraps MEOS C function acontains_tgeo_geo. +func AcontainsTgeoGeo(temp *Temporal, gs *Geom) int { + _cret := C.acontains_tgeo_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// AcontainsTgeoTgeo wraps MEOS C function acontains_tgeo_tgeo. +func AcontainsTgeoTgeo(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.acontains_tgeo_tgeo(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AcoversGeoTgeo wraps MEOS C function acovers_geo_tgeo. +func AcoversGeoTgeo(gs *Geom, temp *Temporal) int { + _cret := C.acovers_geo_tgeo(gs._inner, temp._inner) + return int(_cret) +} + + +// AcoversTgeoGeo wraps MEOS C function acovers_tgeo_geo. +func AcoversTgeoGeo(temp *Temporal, gs *Geom) int { + _cret := C.acovers_tgeo_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// AcoversTgeoTgeo wraps MEOS C function acovers_tgeo_tgeo. +func AcoversTgeoTgeo(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.acovers_tgeo_tgeo(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AdisjointGeoTgeo wraps MEOS C function adisjoint_geo_tgeo. +func AdisjointGeoTgeo(gs *Geom, temp *Temporal) int { + _cret := C.adisjoint_geo_tgeo(gs._inner, temp._inner) + return int(_cret) +} + + +// AdisjointTgeoGeo wraps MEOS C function adisjoint_tgeo_geo. +func AdisjointTgeoGeo(temp *Temporal, gs *Geom) int { + _cret := C.adisjoint_tgeo_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// AdisjointTgeoTgeo wraps MEOS C function adisjoint_tgeo_tgeo. +func AdisjointTgeoTgeo(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.adisjoint_tgeo_tgeo(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AdwithinGeoTgeo wraps MEOS C function adwithin_geo_tgeo. +func AdwithinGeoTgeo(gs *Geom, temp *Temporal, dist float64) int { + _cret := C.adwithin_geo_tgeo(gs._inner, temp._inner, C.double(dist)) + return int(_cret) +} + + +// AdwithinTgeoGeo wraps MEOS C function adwithin_tgeo_geo. +func AdwithinTgeoGeo(temp *Temporal, gs *Geom, dist float64) int { + _cret := C.adwithin_tgeo_geo(temp._inner, gs._inner, C.double(dist)) + return int(_cret) +} + + +// AdwithinTgeoTgeo wraps MEOS C function adwithin_tgeo_tgeo. +func AdwithinTgeoTgeo(temp1 *Temporal, temp2 *Temporal, dist float64) int { + _cret := C.adwithin_tgeo_tgeo(temp1._inner, temp2._inner, C.double(dist)) + return int(_cret) +} + + +// AintersectsGeoTgeo wraps MEOS C function aintersects_geo_tgeo. +func AintersectsGeoTgeo(gs *Geom, temp *Temporal) int { + _cret := C.aintersects_geo_tgeo(gs._inner, temp._inner) + return int(_cret) +} + + +// AintersectsTgeoGeo wraps MEOS C function aintersects_tgeo_geo. +func AintersectsTgeoGeo(temp *Temporal, gs *Geom) int { + _cret := C.aintersects_tgeo_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// AintersectsTgeoTgeo wraps MEOS C function aintersects_tgeo_tgeo. +func AintersectsTgeoTgeo(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.aintersects_tgeo_tgeo(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AtouchesGeoTgeo wraps MEOS C function atouches_geo_tgeo. +func AtouchesGeoTgeo(gs *Geom, temp *Temporal) int { + _cret := C.atouches_geo_tgeo(gs._inner, temp._inner) + return int(_cret) +} + + +// AtouchesTgeoGeo wraps MEOS C function atouches_tgeo_geo. +func AtouchesTgeoGeo(temp *Temporal, gs *Geom) int { + _cret := C.atouches_tgeo_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// AtouchesTgeoTgeo wraps MEOS C function atouches_tgeo_tgeo. +func AtouchesTgeoTgeo(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.atouches_tgeo_tgeo(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AtouchesTpointGeo wraps MEOS C function atouches_tpoint_geo. +func AtouchesTpointGeo(temp *Temporal, gs *Geom) int { + _cret := C.atouches_tpoint_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// EcontainsGeoTgeo wraps MEOS C function econtains_geo_tgeo. +func EcontainsGeoTgeo(gs *Geom, temp *Temporal) int { + _cret := C.econtains_geo_tgeo(gs._inner, temp._inner) + return int(_cret) +} + + +// EcontainsTgeoGeo wraps MEOS C function econtains_tgeo_geo. +func EcontainsTgeoGeo(temp *Temporal, gs *Geom) int { + _cret := C.econtains_tgeo_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// EcontainsTgeoTgeo wraps MEOS C function econtains_tgeo_tgeo. +func EcontainsTgeoTgeo(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.econtains_tgeo_tgeo(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EcoversGeoTgeo wraps MEOS C function ecovers_geo_tgeo. +func EcoversGeoTgeo(gs *Geom, temp *Temporal) int { + _cret := C.ecovers_geo_tgeo(gs._inner, temp._inner) + return int(_cret) +} + + +// EcoversTgeoGeo wraps MEOS C function ecovers_tgeo_geo. +func EcoversTgeoGeo(temp *Temporal, gs *Geom) int { + _cret := C.ecovers_tgeo_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// EcoversTgeoTgeo wraps MEOS C function ecovers_tgeo_tgeo. +func EcoversTgeoTgeo(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ecovers_tgeo_tgeo(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EdisjointGeoTgeo wraps MEOS C function edisjoint_geo_tgeo. +func EdisjointGeoTgeo(gs *Geom, temp *Temporal) int { + _cret := C.edisjoint_geo_tgeo(gs._inner, temp._inner) + return int(_cret) +} + + +// EdisjointTgeoGeo wraps MEOS C function edisjoint_tgeo_geo. +func EdisjointTgeoGeo(temp *Temporal, gs *Geom) int { + _cret := C.edisjoint_tgeo_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// EdisjointTgeoTgeo wraps MEOS C function edisjoint_tgeo_tgeo. +func EdisjointTgeoTgeo(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.edisjoint_tgeo_tgeo(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EdwithinGeoTgeo wraps MEOS C function edwithin_geo_tgeo. +func EdwithinGeoTgeo(gs *Geom, temp *Temporal, dist float64) int { + _cret := C.edwithin_geo_tgeo(gs._inner, temp._inner, C.double(dist)) + return int(_cret) +} + + +// EdwithinTgeoGeo wraps MEOS C function edwithin_tgeo_geo. +func EdwithinTgeoGeo(temp *Temporal, gs *Geom, dist float64) int { + _cret := C.edwithin_tgeo_geo(temp._inner, gs._inner, C.double(dist)) + return int(_cret) +} + + +// EdwithinTgeoTgeo wraps MEOS C function edwithin_tgeo_tgeo. +func EdwithinTgeoTgeo(temp1 *Temporal, temp2 *Temporal, dist float64) int { + _cret := C.edwithin_tgeo_tgeo(temp1._inner, temp2._inner, C.double(dist)) + return int(_cret) +} + + +// EintersectsGeoTgeo wraps MEOS C function eintersects_geo_tgeo. +func EintersectsGeoTgeo(gs *Geom, temp *Temporal) int { + _cret := C.eintersects_geo_tgeo(gs._inner, temp._inner) + return int(_cret) +} + + +// EintersectsTgeoGeo wraps MEOS C function eintersects_tgeo_geo. +func EintersectsTgeoGeo(temp *Temporal, gs *Geom) int { + _cret := C.eintersects_tgeo_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// EintersectsTgeoTgeo wraps MEOS C function eintersects_tgeo_tgeo. +func EintersectsTgeoTgeo(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.eintersects_tgeo_tgeo(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EtouchesGeoTgeo wraps MEOS C function etouches_geo_tgeo. +func EtouchesGeoTgeo(gs *Geom, temp *Temporal) int { + _cret := C.etouches_geo_tgeo(gs._inner, temp._inner) + return int(_cret) +} + + +// EtouchesTgeoGeo wraps MEOS C function etouches_tgeo_geo. +func EtouchesTgeoGeo(temp *Temporal, gs *Geom) int { + _cret := C.etouches_tgeo_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// EtouchesTgeoTgeo wraps MEOS C function etouches_tgeo_tgeo. +func EtouchesTgeoTgeo(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.etouches_tgeo_tgeo(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EtouchesTpointGeo wraps MEOS C function etouches_tpoint_geo. +func EtouchesTpointGeo(temp *Temporal, gs *Geom) int { + _cret := C.etouches_tpoint_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// TcontainsGeoTgeo wraps MEOS C function tcontains_geo_tgeo. +func TcontainsGeoTgeo(gs *Geom, temp *Temporal) *Temporal { + _cret := C.tcontains_geo_tgeo(gs._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TcontainsTgeoGeo wraps MEOS C function tcontains_tgeo_geo. +func TcontainsTgeoGeo(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tcontains_tgeo_geo(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TcontainsTgeoTgeo wraps MEOS C function tcontains_tgeo_tgeo. +func TcontainsTgeoTgeo(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tcontains_tgeo_tgeo(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// TcoversGeoTgeo wraps MEOS C function tcovers_geo_tgeo. +func TcoversGeoTgeo(gs *Geom, temp *Temporal) *Temporal { + _cret := C.tcovers_geo_tgeo(gs._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TcoversTgeoGeo wraps MEOS C function tcovers_tgeo_geo. +func TcoversTgeoGeo(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tcovers_tgeo_geo(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TcoversTgeoTgeo wraps MEOS C function tcovers_tgeo_tgeo. +func TcoversTgeoTgeo(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tcovers_tgeo_tgeo(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// TdisjointGeoTgeo wraps MEOS C function tdisjoint_geo_tgeo. +func TdisjointGeoTgeo(gs *Geom, temp *Temporal) *Temporal { + _cret := C.tdisjoint_geo_tgeo(gs._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TdisjointTgeoGeo wraps MEOS C function tdisjoint_tgeo_geo. +func TdisjointTgeoGeo(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tdisjoint_tgeo_geo(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TdisjointTgeoTgeo wraps MEOS C function tdisjoint_tgeo_tgeo. +func TdisjointTgeoTgeo(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tdisjoint_tgeo_tgeo(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// TdwithinGeoTgeo wraps MEOS C function tdwithin_geo_tgeo. +func TdwithinGeoTgeo(gs *Geom, temp *Temporal, dist float64) *Temporal { + _cret := C.tdwithin_geo_tgeo(gs._inner, temp._inner, C.double(dist)) + return &Temporal{_inner: _cret} +} + + +// TdwithinTgeoGeo wraps MEOS C function tdwithin_tgeo_geo. +func TdwithinTgeoGeo(temp *Temporal, gs *Geom, dist float64) *Temporal { + _cret := C.tdwithin_tgeo_geo(temp._inner, gs._inner, C.double(dist)) + return &Temporal{_inner: _cret} +} + + +// TdwithinTgeoTgeo wraps MEOS C function tdwithin_tgeo_tgeo. +func TdwithinTgeoTgeo(temp1 *Temporal, temp2 *Temporal, dist float64) *Temporal { + _cret := C.tdwithin_tgeo_tgeo(temp1._inner, temp2._inner, C.double(dist)) + return &Temporal{_inner: _cret} +} + + +// TintersectsGeoTgeo wraps MEOS C function tintersects_geo_tgeo. +func TintersectsGeoTgeo(gs *Geom, temp *Temporal) *Temporal { + _cret := C.tintersects_geo_tgeo(gs._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TintersectsTgeoGeo wraps MEOS C function tintersects_tgeo_geo. +func TintersectsTgeoGeo(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tintersects_tgeo_geo(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TintersectsTgeoTgeo wraps MEOS C function tintersects_tgeo_tgeo. +func TintersectsTgeoTgeo(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tintersects_tgeo_tgeo(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// TtouchesGeoTgeo wraps MEOS C function ttouches_geo_tgeo. +func TtouchesGeoTgeo(gs *Geom, temp *Temporal) *Temporal { + _cret := C.ttouches_geo_tgeo(gs._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TtouchesTgeoGeo wraps MEOS C function ttouches_tgeo_geo. +func TtouchesTgeoGeo(temp *Temporal, gs *Geom) *Temporal { + _cret := C.ttouches_tgeo_geo(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TtouchesTgeoTgeo wraps MEOS C function ttouches_tgeo_tgeo. +func TtouchesTgeoTgeo(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.ttouches_tgeo_tgeo(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// EdwithinTgeoarrTgeoarr wraps MEOS C function edwithin_tgeoarr_tgeoarr. +func EdwithinTgeoarrTgeoarr(arr1 unsafe.Pointer, count1 int, arr2 unsafe.Pointer, count2 int, dist float64, count unsafe.Pointer) unsafe.Pointer { + _cret := C.edwithin_tgeoarr_tgeoarr((**C.Temporal)(unsafe.Pointer(arr1)), C.int(count1), (**C.Temporal)(unsafe.Pointer(arr2)), C.int(count2), C.double(dist), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// AdwithinTgeoarrTgeoarr wraps MEOS C function adwithin_tgeoarr_tgeoarr. +func AdwithinTgeoarrTgeoarr(arr1 unsafe.Pointer, count1 int, arr2 unsafe.Pointer, count2 int, dist float64, count unsafe.Pointer) unsafe.Pointer { + _cret := C.adwithin_tgeoarr_tgeoarr((**C.Temporal)(unsafe.Pointer(arr1)), C.int(count1), (**C.Temporal)(unsafe.Pointer(arr2)), C.int(count2), C.double(dist), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// EintersectsTgeoarrTgeoarr wraps MEOS C function eintersects_tgeoarr_tgeoarr. +func EintersectsTgeoarrTgeoarr(arr1 unsafe.Pointer, count1 int, arr2 unsafe.Pointer, count2 int, count unsafe.Pointer) unsafe.Pointer { + _cret := C.eintersects_tgeoarr_tgeoarr((**C.Temporal)(unsafe.Pointer(arr1)), C.int(count1), (**C.Temporal)(unsafe.Pointer(arr2)), C.int(count2), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// AintersectsTgeoarrTgeoarr wraps MEOS C function aintersects_tgeoarr_tgeoarr. +func AintersectsTgeoarrTgeoarr(arr1 unsafe.Pointer, count1 int, arr2 unsafe.Pointer, count2 int, count unsafe.Pointer) unsafe.Pointer { + _cret := C.aintersects_tgeoarr_tgeoarr((**C.Temporal)(unsafe.Pointer(arr1)), C.int(count1), (**C.Temporal)(unsafe.Pointer(arr2)), C.int(count2), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// EtouchesTgeoarrTgeoarr wraps MEOS C function etouches_tgeoarr_tgeoarr. +func EtouchesTgeoarrTgeoarr(arr1 unsafe.Pointer, count1 int, arr2 unsafe.Pointer, count2 int, count unsafe.Pointer) unsafe.Pointer { + _cret := C.etouches_tgeoarr_tgeoarr((**C.Temporal)(unsafe.Pointer(arr1)), C.int(count1), (**C.Temporal)(unsafe.Pointer(arr2)), C.int(count2), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// AtouchesTgeoarrTgeoarr wraps MEOS C function atouches_tgeoarr_tgeoarr. +func AtouchesTgeoarrTgeoarr(arr1 unsafe.Pointer, count1 int, arr2 unsafe.Pointer, count2 int, count unsafe.Pointer) unsafe.Pointer { + _cret := C.atouches_tgeoarr_tgeoarr((**C.Temporal)(unsafe.Pointer(arr1)), C.int(count1), (**C.Temporal)(unsafe.Pointer(arr2)), C.int(count2), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// EdisjointTgeoarrTgeoarr wraps MEOS C function edisjoint_tgeoarr_tgeoarr. +func EdisjointTgeoarrTgeoarr(arr1 unsafe.Pointer, count1 int, arr2 unsafe.Pointer, count2 int, count unsafe.Pointer) unsafe.Pointer { + _cret := C.edisjoint_tgeoarr_tgeoarr((**C.Temporal)(unsafe.Pointer(arr1)), C.int(count1), (**C.Temporal)(unsafe.Pointer(arr2)), C.int(count2), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// AdisjointTgeoarrTgeoarr wraps MEOS C function adisjoint_tgeoarr_tgeoarr. +func AdisjointTgeoarrTgeoarr(arr1 unsafe.Pointer, count1 int, arr2 unsafe.Pointer, count2 int, count unsafe.Pointer) unsafe.Pointer { + _cret := C.adisjoint_tgeoarr_tgeoarr((**C.Temporal)(unsafe.Pointer(arr1)), C.int(count1), (**C.Temporal)(unsafe.Pointer(arr2)), C.int(count2), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TdwithinTgeoarrTgeoarr wraps MEOS C function tdwithin_tgeoarr_tgeoarr. +func TdwithinTgeoarrTgeoarr(arr1 unsafe.Pointer, count1 int, arr2 unsafe.Pointer, count2 int, dist float64, count unsafe.Pointer, periods unsafe.Pointer) unsafe.Pointer { + _cret := C.tdwithin_tgeoarr_tgeoarr((**C.Temporal)(unsafe.Pointer(arr1)), C.int(count1), (**C.Temporal)(unsafe.Pointer(arr2)), C.int(count2), C.double(dist), (*C.int)(unsafe.Pointer(count)), (***C.SpanSet)(unsafe.Pointer(periods))) + return unsafe.Pointer(_cret) +} + + +// TintersectsTgeoarrTgeoarr wraps MEOS C function tintersects_tgeoarr_tgeoarr. +func TintersectsTgeoarrTgeoarr(arr1 unsafe.Pointer, count1 int, arr2 unsafe.Pointer, count2 int, count unsafe.Pointer, periods unsafe.Pointer) unsafe.Pointer { + _cret := C.tintersects_tgeoarr_tgeoarr((**C.Temporal)(unsafe.Pointer(arr1)), C.int(count1), (**C.Temporal)(unsafe.Pointer(arr2)), C.int(count2), (*C.int)(unsafe.Pointer(count)), (***C.SpanSet)(unsafe.Pointer(periods))) + return unsafe.Pointer(_cret) +} + + +// TtouchesTgeoarrTgeoarr wraps MEOS C function ttouches_tgeoarr_tgeoarr. +func TtouchesTgeoarrTgeoarr(arr1 unsafe.Pointer, count1 int, arr2 unsafe.Pointer, count2 int, count unsafe.Pointer, periods unsafe.Pointer) unsafe.Pointer { + _cret := C.ttouches_tgeoarr_tgeoarr((**C.Temporal)(unsafe.Pointer(arr1)), C.int(count1), (**C.Temporal)(unsafe.Pointer(arr2)), C.int(count2), (*C.int)(unsafe.Pointer(count)), (***C.SpanSet)(unsafe.Pointer(periods))) + return unsafe.Pointer(_cret) +} + + +// TdisjointTgeoarrTgeoarr wraps MEOS C function tdisjoint_tgeoarr_tgeoarr. +func TdisjointTgeoarrTgeoarr(arr1 unsafe.Pointer, count1 int, arr2 unsafe.Pointer, count2 int, count unsafe.Pointer, periods unsafe.Pointer) unsafe.Pointer { + _cret := C.tdisjoint_tgeoarr_tgeoarr((**C.Temporal)(unsafe.Pointer(arr1)), C.int(count1), (**C.Temporal)(unsafe.Pointer(arr2)), C.int(count2), (*C.int)(unsafe.Pointer(count)), (***C.SpanSet)(unsafe.Pointer(periods))) + return unsafe.Pointer(_cret) +} + + +// TdistanceTgeoGeo wraps MEOS C function tdistance_tgeo_geo. +func TdistanceTgeoGeo(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tdistance_tgeo_geo(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TdistanceTgeoTgeo wraps MEOS C function tdistance_tgeo_tgeo. +func TdistanceTgeoTgeo(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tdistance_tgeo_tgeo(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// NadSTBOXGeo wraps MEOS C function nad_stbox_geo. +func NadSTBOXGeo(box *STBox, gs *Geom) float64 { + _cret := C.nad_stbox_geo(box._inner, gs._inner) + return float64(_cret) +} + + +// NadSTBOXSTBOX wraps MEOS C function nad_stbox_stbox. +func NadSTBOXSTBOX(box1 *STBox, box2 *STBox) float64 { + _cret := C.nad_stbox_stbox(box1._inner, box2._inner) + return float64(_cret) +} + + +// STBOXSpatialDistance wraps MEOS C function stbox_spatial_distance. +func STBOXSpatialDistance(box1 *STBox, box2 *STBox) float64 { + _cret := C.stbox_spatial_distance(box1._inner, box2._inner) + return float64(_cret) +} + + +// NadTgeoGeo wraps MEOS C function nad_tgeo_geo. +func NadTgeoGeo(temp *Temporal, gs *Geom) float64 { + _cret := C.nad_tgeo_geo(temp._inner, gs._inner) + return float64(_cret) +} + + +// NadTgeoSTBOX wraps MEOS C function nad_tgeo_stbox. +func NadTgeoSTBOX(temp *Temporal, box *STBox) float64 { + _cret := C.nad_tgeo_stbox(temp._inner, box._inner) + return float64(_cret) +} + + +// NadTgeoTgeo wraps MEOS C function nad_tgeo_tgeo. +func NadTgeoTgeo(temp1 *Temporal, temp2 *Temporal) float64 { + _cret := C.nad_tgeo_tgeo(temp1._inner, temp2._inner) + return float64(_cret) +} + + +// NaiTgeoGeo wraps MEOS C function nai_tgeo_geo. +func NaiTgeoGeo(temp *Temporal, gs *Geom) *TInstant { + _cret := C.nai_tgeo_geo(temp._inner, gs._inner) + return &TInstant{_inner: _cret} +} + + +// NaiTgeoTgeo wraps MEOS C function nai_tgeo_tgeo. +func NaiTgeoTgeo(temp1 *Temporal, temp2 *Temporal) *TInstant { + _cret := C.nai_tgeo_tgeo(temp1._inner, temp2._inner) + return &TInstant{_inner: _cret} +} + + +// ShortestlineTgeoGeo wraps MEOS C function shortestline_tgeo_geo. +func ShortestlineTgeoGeo(temp *Temporal, gs *Geom) *Geom { + _cret := C.shortestline_tgeo_geo(temp._inner, gs._inner) + return &Geom{_inner: _cret} +} + + +// ShortestlineTgeoTgeo wraps MEOS C function shortestline_tgeo_tgeo. +func ShortestlineTgeoTgeo(temp1 *Temporal, temp2 *Temporal) *Geom { + _cret := C.shortestline_tgeo_tgeo(temp1._inner, temp2._inner) + return &Geom{_inner: _cret} +} + + +// MindistanceTgeoTgeo wraps MEOS C function mindistance_tgeo_tgeo. +func MindistanceTgeoTgeo(temp1 *Temporal, temp2 *Temporal, threshold float64) float64 { + _cret := C.mindistance_tgeo_tgeo(temp1._inner, temp2._inner, C.double(threshold)) + return float64(_cret) +} + + +// MindistanceTgeoarrTgeoarr wraps MEOS C function mindistance_tgeoarr_tgeoarr. +func MindistanceTgeoarrTgeoarr(arr1 unsafe.Pointer, count1 int, arr2 unsafe.Pointer, count2 int) float64 { + _cret := C.mindistance_tgeoarr_tgeoarr((**C.Temporal)(unsafe.Pointer(arr1)), C.int(count1), (**C.Temporal)(unsafe.Pointer(arr2)), C.int(count2)) + return float64(_cret) +} + + +// TpointTcentroidFinalfn wraps MEOS C function tpoint_tcentroid_finalfn. +func TpointTcentroidFinalfn(state *SkipList) *Temporal { + _cret := C.tpoint_tcentroid_finalfn(state._inner) + return &Temporal{_inner: _cret} +} + + +// TpointTcentroidTransfn wraps MEOS C function tpoint_tcentroid_transfn. +func TpointTcentroidTransfn(state *SkipList, temp *Temporal) *SkipList { + _cret := C.tpoint_tcentroid_transfn(state._inner, temp._inner) + return &SkipList{_inner: _cret} +} + + +// TspatialExtentTransfn wraps MEOS C function tspatial_extent_transfn. +func TspatialExtentTransfn(box *STBox, temp *Temporal) *STBox { + _cret := C.tspatial_extent_transfn(box._inner, temp._inner) + return &STBox{_inner: _cret} +} + + +// STBOXGetSpaceTile wraps MEOS C function stbox_get_space_tile. +func STBOXGetSpaceTile(point *Geom, xsize float64, ysize float64, zsize float64, sorigin *Geom) *STBox { + _cret := C.stbox_get_space_tile(point._inner, C.double(xsize), C.double(ysize), C.double(zsize), sorigin._inner) + return &STBox{_inner: _cret} +} + + +// STBOXGetSpaceTimeTile wraps MEOS C function stbox_get_space_time_tile. +func STBOXGetSpaceTimeTile(point *Geom, t int64, xsize float64, ysize float64, zsize float64, duration *Interval, sorigin *Geom, torigin int64) *STBox { + _cret := C.stbox_get_space_time_tile(point._inner, C.TimestampTz(t), C.double(xsize), C.double(ysize), C.double(zsize), duration._inner, sorigin._inner, C.TimestampTz(torigin)) + return &STBox{_inner: _cret} +} + + +// STBOXGetTimeTile wraps MEOS C function stbox_get_time_tile. +func STBOXGetTimeTile(t int64, duration *Interval, torigin int64) *STBox { + _cret := C.stbox_get_time_tile(C.TimestampTz(t), duration._inner, C.TimestampTz(torigin)) + return &STBox{_inner: _cret} +} + + +// STBOXSpaceTiles wraps MEOS C function stbox_space_tiles. +func STBOXSpaceTiles(bounds *STBox, xsize float64, ysize float64, zsize float64, sorigin *Geom, border_inc bool, count unsafe.Pointer) *STBox { + _cret := C.stbox_space_tiles(bounds._inner, C.double(xsize), C.double(ysize), C.double(zsize), sorigin._inner, C.bool(border_inc), (*C.int)(unsafe.Pointer(count))) + return &STBox{_inner: _cret} +} + + +// STBOXSpaceTimeTiles wraps MEOS C function stbox_space_time_tiles. +func STBOXSpaceTimeTiles(bounds *STBox, xsize float64, ysize float64, zsize float64, duration *Interval, sorigin *Geom, torigin int64, border_inc bool, count unsafe.Pointer) *STBox { + _cret := C.stbox_space_time_tiles(bounds._inner, C.double(xsize), C.double(ysize), C.double(zsize), duration._inner, sorigin._inner, C.TimestampTz(torigin), C.bool(border_inc), (*C.int)(unsafe.Pointer(count))) + return &STBox{_inner: _cret} +} + + +// STBOXTimeTiles wraps MEOS C function stbox_time_tiles. +func STBOXTimeTiles(bounds *STBox, duration *Interval, torigin int64, border_inc bool, count unsafe.Pointer) *STBox { + _cret := C.stbox_time_tiles(bounds._inner, duration._inner, C.TimestampTz(torigin), C.bool(border_inc), (*C.int)(unsafe.Pointer(count))) + return &STBox{_inner: _cret} +} + + +// TODO tgeo_space_split: unsupported return type SpaceSplit +// func TgeoSpaceSplit(...) { /* not yet handled by codegen */ } + + +// TODO tgeo_space_time_split: unsupported return type SpaceTimeSplit +// func TgeoSpaceTimeSplit(...) { /* not yet handled by codegen */ } + + +// GeoClusterKmeans wraps MEOS C function geo_cluster_kmeans. +func GeoClusterKmeans(geoms unsafe.Pointer, ngeoms uint32, k uint32, count unsafe.Pointer) unsafe.Pointer { + _cret := C.geo_cluster_kmeans((**C.GSERIALIZED)(unsafe.Pointer(geoms)), C.uint32_t(ngeoms), C.uint32_t(k), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// GeoClusterDbscan wraps MEOS C function geo_cluster_dbscan. +func GeoClusterDbscan(geoms unsafe.Pointer, ngeoms uint32, tolerance float64, minpoints int, count unsafe.Pointer) unsafe.Pointer { + _cret := C.geo_cluster_dbscan((**C.GSERIALIZED)(unsafe.Pointer(geoms)), C.uint32_t(ngeoms), C.double(tolerance), C.int(minpoints), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// GeoClusterIntersecting wraps MEOS C function geo_cluster_intersecting. +func GeoClusterIntersecting(geoms unsafe.Pointer, ngeoms uint32, count unsafe.Pointer) unsafe.Pointer { + _cret := C.geo_cluster_intersecting((**C.GSERIALIZED)(unsafe.Pointer(geoms)), C.uint32_t(ngeoms), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// GeoClusterWithin wraps MEOS C function geo_cluster_within. +func GeoClusterWithin(geoms unsafe.Pointer, ngeoms uint32, tolerance float64, count unsafe.Pointer) unsafe.Pointer { + _cret := C.geo_cluster_within((**C.GSERIALIZED)(unsafe.Pointer(geoms)), C.uint32_t(ngeoms), C.double(tolerance), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + diff --git a/functions/meos_meos_h3.go b/functions/meos_meos_h3.go new file mode 100644 index 0000000..eb99c64 --- /dev/null +++ b/functions/meos_meos_h3.go @@ -0,0 +1,702 @@ +package functions + +/* +#include +#include "meos.h" +#include "meos_catalog.h" +#include "meos_geo.h" +#include "meos_internal.h" +#include "meos_internal_geo.h" +#include "meos_npoint.h" +#include "meos_cbuffer.h" +#include "meos_pose.h" +#include "meos_rgeo.h" +#include "meos_h3.h" +#include "meos_quadbin.h" +#include "meos_json.h" +#include "meos_pointcloud.h" +#include "meos_arrow.h" + +// cgo reads C.union_* as a union TYPE; alias the union operators so C.g resolves them as functions. +#define gunion_bigint_set union_bigint_set +#define gunion_bigint_span union_bigint_span +#define gunion_bigint_spanset union_bigint_spanset +#define gunion_cbuffer_set union_cbuffer_set +#define gunion_date_set union_date_set +#define gunion_date_span union_date_span +#define gunion_date_spanset union_date_spanset +#define gunion_float_set union_float_set +#define gunion_float_span union_float_span +#define gunion_float_spanset union_float_spanset +#define gunion_geo_set union_geo_set +#define gunion_int_set union_int_set +#define gunion_int_span union_int_span +#define gunion_int_spanset union_int_spanset +#define gunion_jsonb_set union_jsonb_set +#define gunion_npoint_set union_npoint_set +#define gunion_pcpatch_set union_pcpatch_set +#define gunion_pcpoint_set union_pcpoint_set +#define gunion_pose_set union_pose_set +#define gunion_set_bigint union_set_bigint +#define gunion_set_cbuffer union_set_cbuffer +#define gunion_set_date union_set_date +#define gunion_set_float union_set_float +#define gunion_set_geo union_set_geo +#define gunion_set_int union_set_int +#define gunion_set_jsonb union_set_jsonb +#define gunion_set_npoint union_set_npoint +#define gunion_set_pcpatch union_set_pcpatch +#define gunion_set_pcpoint union_set_pcpoint +#define gunion_set_pose union_set_pose +#define gunion_set_set union_set_set +#define gunion_set_text union_set_text +#define gunion_set_timestamptz union_set_timestamptz +#define gunion_set_value union_set_value +#define gunion_span_bigint union_span_bigint +#define gunion_span_date union_span_date +#define gunion_span_float union_span_float +#define gunion_span_int union_span_int +#define gunion_span_span union_span_span +#define gunion_span_spanset union_span_spanset +#define gunion_span_timestamptz union_span_timestamptz +#define gunion_span_value union_span_value +#define gunion_spanset_bigint union_spanset_bigint +#define gunion_spanset_date union_spanset_date +#define gunion_spanset_float union_spanset_float +#define gunion_spanset_int union_spanset_int +#define gunion_spanset_span union_spanset_span +#define gunion_spanset_spanset union_spanset_spanset +#define gunion_spanset_timestamptz union_spanset_timestamptz +#define gunion_spanset_value union_spanset_value +#define gunion_stbox_stbox union_stbox_stbox +#define gunion_tbox_tbox union_tbox_tbox +#define gunion_text_set union_text_set +#define gunion_timestamptz_set union_timestamptz_set +#define gunion_timestamptz_span union_timestamptz_span +#define gunion_timestamptz_spanset union_timestamptz_spanset +#define gunion_tpcbox_tpcbox union_tpcbox_tpcbox +#define gunion_value_set union_value_set +#define gunion_value_span union_value_span +#define gunion_value_spanset union_value_spanset +*/ +import "C" +import ( + "unsafe" +) + +var _ = unsafe.Pointer(nil) + +// H3indexIn wraps MEOS C function h3index_in. +func H3indexIn(str string) uint64 { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.h3index_in(_c_str) + return uint64(_cret) +} + + +// H3indexOut wraps MEOS C function h3index_out. +func H3indexOut(cell uint64) string { + _cret := C.h3index_out(C.uint64_t(cell)) + return C.GoString(_cret) +} + + +// H3indexFromWKB wraps MEOS C function h3index_from_wkb. +func H3indexFromWKB(wkb unsafe.Pointer, size uint) uint64 { + _cret := C.h3index_from_wkb((*C.uint8_t)(unsafe.Pointer(wkb)), C.size_t(size)) + return uint64(_cret) +} + + +// H3indexFromHexwkb wraps MEOS C function h3index_from_hexwkb. +func H3indexFromHexwkb(hexwkb string) uint64 { + _c_hexwkb := C.CString(hexwkb) + defer C.free(unsafe.Pointer(_c_hexwkb)) + _cret := C.h3index_from_hexwkb(_c_hexwkb) + return uint64(_cret) +} + + +// H3indexAsWKB wraps MEOS C function h3index_as_wkb. +func H3indexAsWKB(cell uint64, variant uint8, size_out unsafe.Pointer) unsafe.Pointer { + _cret := C.h3index_as_wkb(C.uint64_t(cell), C.uint8_t(variant), (*C.size_t)(unsafe.Pointer(size_out))) + return unsafe.Pointer(_cret) +} + + +// H3indexAsHexwkb wraps MEOS C function h3index_as_hexwkb. +func H3indexAsHexwkb(cell uint64, variant uint8, size_out unsafe.Pointer) string { + _cret := C.h3index_as_hexwkb(C.uint64_t(cell), C.uint8_t(variant), (*C.size_t)(unsafe.Pointer(size_out))) + return C.GoString(_cret) +} + + +// H3indexEq wraps MEOS C function h3index_eq. +func H3indexEq(a uint64, b uint64) bool { + _cret := C.h3index_eq(C.uint64_t(a), C.uint64_t(b)) + return bool(_cret) +} + + +// H3indexNe wraps MEOS C function h3index_ne. +func H3indexNe(a uint64, b uint64) bool { + _cret := C.h3index_ne(C.uint64_t(a), C.uint64_t(b)) + return bool(_cret) +} + + +// H3indexLt wraps MEOS C function h3index_lt. +func H3indexLt(a uint64, b uint64) bool { + _cret := C.h3index_lt(C.uint64_t(a), C.uint64_t(b)) + return bool(_cret) +} + + +// H3indexLe wraps MEOS C function h3index_le. +func H3indexLe(a uint64, b uint64) bool { + _cret := C.h3index_le(C.uint64_t(a), C.uint64_t(b)) + return bool(_cret) +} + + +// H3indexGt wraps MEOS C function h3index_gt. +func H3indexGt(a uint64, b uint64) bool { + _cret := C.h3index_gt(C.uint64_t(a), C.uint64_t(b)) + return bool(_cret) +} + + +// H3indexGe wraps MEOS C function h3index_ge. +func H3indexGe(a uint64, b uint64) bool { + _cret := C.h3index_ge(C.uint64_t(a), C.uint64_t(b)) + return bool(_cret) +} + + +// H3indexCmp wraps MEOS C function h3index_cmp. +func H3indexCmp(a uint64, b uint64) int { + _cret := C.h3index_cmp(C.uint64_t(a), C.uint64_t(b)) + return int(_cret) +} + + +// H3indexHash wraps MEOS C function h3index_hash. +func H3indexHash(cell uint64) uint32 { + _cret := C.h3index_hash(C.uint64_t(cell)) + return uint32(_cret) +} + + +// H3GridDisk wraps MEOS C function h3_grid_disk. +func H3GridDisk(origin uint64, k int) *Set { + _cret := C.h3_grid_disk(C.uint64_t(origin), C.int(k)) + return &Set{_inner: _cret} +} + + +// H3CellToChildren wraps MEOS C function h3_cell_to_children. +func H3CellToChildren(origin uint64, childRes int) *Set { + _cret := C.h3_cell_to_children(C.uint64_t(origin), C.int(childRes)) + return &Set{_inner: _cret} +} + + +// H3CompactCells wraps MEOS C function h3_compact_cells. +func H3CompactCells(cells *Set) *Set { + _cret := C.h3_compact_cells(cells._inner) + return &Set{_inner: _cret} +} + + +// H3UncompactCells wraps MEOS C function h3_uncompact_cells. +func H3UncompactCells(cells *Set, res int) *Set { + _cret := C.h3_uncompact_cells(cells._inner, C.int(res)) + return &Set{_inner: _cret} +} + + +// Th3indexIn wraps MEOS C function th3index_in. +func Th3indexIn(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.th3index_in(_c_str) + return &Temporal{_inner: _cret} +} + + +// Th3indexinstIn wraps MEOS C function th3indexinst_in. +func Th3indexinstIn(str string) *TInstant { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.th3indexinst_in(_c_str) + return &TInstant{_inner: _cret} +} + + +// Th3indexseqIn wraps MEOS C function th3indexseq_in. +func Th3indexseqIn(str string, interp Interpolation) *TSequence { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.th3indexseq_in(_c_str, C.interpType(interp)) + return &TSequence{_inner: _cret} +} + + +// Th3indexseqsetIn wraps MEOS C function th3indexseqset_in. +func Th3indexseqsetIn(str string) *TSequenceSet { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.th3indexseqset_in(_c_str) + return &TSequenceSet{_inner: _cret} +} + + +// Th3indexMake wraps MEOS C function th3index_make. +func Th3indexMake(value uint64, t int64) *Temporal { + _cret := C.th3index_make(C.uint64_t(value), C.TimestampTz(t)) + return &Temporal{_inner: _cret} +} + + +// Th3indexinstMake wraps MEOS C function th3indexinst_make. +func Th3indexinstMake(value uint64, t int64) *TInstant { + _cret := C.th3indexinst_make(C.uint64_t(value), C.TimestampTz(t)) + return &TInstant{_inner: _cret} +} + + +// Th3indexseqMake wraps MEOS C function th3indexseq_make. +func Th3indexseqMake(values unsafe.Pointer, times unsafe.Pointer, count int, lower_inc bool, upper_inc bool) *TSequence { + _cret := C.th3indexseq_make((*C.uint64_t)(unsafe.Pointer(values)), (*C.TimestampTz)(unsafe.Pointer(times)), C.int(count), C.bool(lower_inc), C.bool(upper_inc)) + return &TSequence{_inner: _cret} +} + + +// Th3indexseqsetMake wraps MEOS C function th3indexseqset_make. +func Th3indexseqsetMake(sequences unsafe.Pointer, count int) *TSequenceSet { + _cret := C.th3indexseqset_make((**C.TSequence)(unsafe.Pointer(sequences)), C.int(count)) + return &TSequenceSet{_inner: _cret} +} + + +// Th3indexStartValue wraps MEOS C function th3index_start_value. +func Th3indexStartValue(temp *Temporal) uint64 { + _cret := C.th3index_start_value(temp._inner) + return uint64(_cret) +} + + +// Th3indexEndValue wraps MEOS C function th3index_end_value. +func Th3indexEndValue(temp *Temporal) uint64 { + _cret := C.th3index_end_value(temp._inner) + return uint64(_cret) +} + + +// Th3indexValueN wraps MEOS C function th3index_value_n. +func Th3indexValueN(temp *Temporal, n int) (bool, uint64) { + var _out_result C.uint64_t + _cret := C.th3index_value_n(temp._inner, C.int(n), &_out_result) + return bool(_cret), uint64(_out_result) +} + + +// Th3indexValues wraps MEOS C function th3index_values. +func Th3indexValues(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.th3index_values(temp._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// Th3indexValueAtTimestamptz wraps MEOS C function th3index_value_at_timestamptz. +func Th3indexValueAtTimestamptz(temp *Temporal, t int64, strict bool) (bool, uint64) { + var _out_result C.uint64_t + _cret := C.th3index_value_at_timestamptz(temp._inner, C.TimestampTz(t), C.bool(strict), &_out_result) + return bool(_cret), uint64(_out_result) +} + + +// TbigintToTh3index wraps MEOS C function tbigint_to_th3index. +func TbigintToTh3index(temp *Temporal) *Temporal { + _cret := C.tbigint_to_th3index(temp._inner) + return &Temporal{_inner: _cret} +} + + +// Th3indexToTbigint wraps MEOS C function th3index_to_tbigint. +func Th3indexToTbigint(temp *Temporal) *Temporal { + _cret := C.th3index_to_tbigint(temp._inner) + return &Temporal{_inner: _cret} +} + + +// EverEqH3indexTh3index wraps MEOS C function ever_eq_h3index_th3index. +func EverEqH3indexTh3index(cell uint64, temp *Temporal) int { + _cret := C.ever_eq_h3index_th3index(C.uint64_t(cell), temp._inner) + return int(_cret) +} + + +// EverEqTh3indexH3index wraps MEOS C function ever_eq_th3index_h3index. +func EverEqTh3indexH3index(temp *Temporal, cell uint64) int { + _cret := C.ever_eq_th3index_h3index(temp._inner, C.uint64_t(cell)) + return int(_cret) +} + + +// EverNeH3indexTh3index wraps MEOS C function ever_ne_h3index_th3index. +func EverNeH3indexTh3index(cell uint64, temp *Temporal) int { + _cret := C.ever_ne_h3index_th3index(C.uint64_t(cell), temp._inner) + return int(_cret) +} + + +// EverNeTh3indexH3index wraps MEOS C function ever_ne_th3index_h3index. +func EverNeTh3indexH3index(temp *Temporal, cell uint64) int { + _cret := C.ever_ne_th3index_h3index(temp._inner, C.uint64_t(cell)) + return int(_cret) +} + + +// AlwaysEqH3indexTh3index wraps MEOS C function always_eq_h3index_th3index. +func AlwaysEqH3indexTh3index(cell uint64, temp *Temporal) int { + _cret := C.always_eq_h3index_th3index(C.uint64_t(cell), temp._inner) + return int(_cret) +} + + +// AlwaysEqTh3indexH3index wraps MEOS C function always_eq_th3index_h3index. +func AlwaysEqTh3indexH3index(temp *Temporal, cell uint64) int { + _cret := C.always_eq_th3index_h3index(temp._inner, C.uint64_t(cell)) + return int(_cret) +} + + +// AlwaysNeH3indexTh3index wraps MEOS C function always_ne_h3index_th3index. +func AlwaysNeH3indexTh3index(cell uint64, temp *Temporal) int { + _cret := C.always_ne_h3index_th3index(C.uint64_t(cell), temp._inner) + return int(_cret) +} + + +// AlwaysNeTh3indexH3index wraps MEOS C function always_ne_th3index_h3index. +func AlwaysNeTh3indexH3index(temp *Temporal, cell uint64) int { + _cret := C.always_ne_th3index_h3index(temp._inner, C.uint64_t(cell)) + return int(_cret) +} + + +// EverEqTh3indexTh3index wraps MEOS C function ever_eq_th3index_th3index. +func EverEqTh3indexTh3index(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ever_eq_th3index_th3index(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EverNeTh3indexTh3index wraps MEOS C function ever_ne_th3index_th3index. +func EverNeTh3indexTh3index(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ever_ne_th3index_th3index(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AlwaysEqTh3indexTh3index wraps MEOS C function always_eq_th3index_th3index. +func AlwaysEqTh3indexTh3index(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.always_eq_th3index_th3index(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AlwaysNeTh3indexTh3index wraps MEOS C function always_ne_th3index_th3index. +func AlwaysNeTh3indexTh3index(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.always_ne_th3index_th3index(temp1._inner, temp2._inner) + return int(_cret) +} + + +// TeqH3indexTh3index wraps MEOS C function teq_h3index_th3index. +func TeqH3indexTh3index(cell uint64, temp *Temporal) *Temporal { + _cret := C.teq_h3index_th3index(C.uint64_t(cell), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TeqTh3indexH3index wraps MEOS C function teq_th3index_h3index. +func TeqTh3indexH3index(temp *Temporal, cell uint64) *Temporal { + _cret := C.teq_th3index_h3index(temp._inner, C.uint64_t(cell)) + return &Temporal{_inner: _cret} +} + + +// TeqTh3indexTh3index wraps MEOS C function teq_th3index_th3index. +func TeqTh3indexTh3index(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.teq_th3index_th3index(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// TneH3indexTh3index wraps MEOS C function tne_h3index_th3index. +func TneH3indexTh3index(cell uint64, temp *Temporal) *Temporal { + _cret := C.tne_h3index_th3index(C.uint64_t(cell), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TneTh3indexH3index wraps MEOS C function tne_th3index_h3index. +func TneTh3indexH3index(temp *Temporal, cell uint64) *Temporal { + _cret := C.tne_th3index_h3index(temp._inner, C.uint64_t(cell)) + return &Temporal{_inner: _cret} +} + + +// TneTh3indexTh3index wraps MEOS C function tne_th3index_th3index. +func TneTh3indexTh3index(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tne_th3index_th3index(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// Th3indexGetResolution wraps MEOS C function th3index_get_resolution. +func Th3indexGetResolution(temp *Temporal) *Temporal { + _cret := C.th3index_get_resolution(temp._inner) + return &Temporal{_inner: _cret} +} + + +// Th3indexGetBaseCellNumber wraps MEOS C function th3index_get_base_cell_number. +func Th3indexGetBaseCellNumber(temp *Temporal) *Temporal { + _cret := C.th3index_get_base_cell_number(temp._inner) + return &Temporal{_inner: _cret} +} + + +// Th3indexIsValidCell wraps MEOS C function th3index_is_valid_cell. +func Th3indexIsValidCell(temp *Temporal) *Temporal { + _cret := C.th3index_is_valid_cell(temp._inner) + return &Temporal{_inner: _cret} +} + + +// Th3indexIsResClassIii wraps MEOS C function th3index_is_res_class_iii. +func Th3indexIsResClassIii(temp *Temporal) *Temporal { + _cret := C.th3index_is_res_class_iii(temp._inner) + return &Temporal{_inner: _cret} +} + + +// Th3indexIsPentagon wraps MEOS C function th3index_is_pentagon. +func Th3indexIsPentagon(temp *Temporal) *Temporal { + _cret := C.th3index_is_pentagon(temp._inner) + return &Temporal{_inner: _cret} +} + + +// Th3indexCellToParent wraps MEOS C function th3index_cell_to_parent. +func Th3indexCellToParent(temp *Temporal, resolution int32) *Temporal { + _cret := C.th3index_cell_to_parent(temp._inner, C.int32(resolution)) + return &Temporal{_inner: _cret} +} + + +// Th3indexCellToParentNext wraps MEOS C function th3index_cell_to_parent_next. +func Th3indexCellToParentNext(temp *Temporal) *Temporal { + _cret := C.th3index_cell_to_parent_next(temp._inner) + return &Temporal{_inner: _cret} +} + + +// Th3indexCellToCenterChild wraps MEOS C function th3index_cell_to_center_child. +func Th3indexCellToCenterChild(temp *Temporal, resolution int32) *Temporal { + _cret := C.th3index_cell_to_center_child(temp._inner, C.int32(resolution)) + return &Temporal{_inner: _cret} +} + + +// Th3indexCellToCenterChildNext wraps MEOS C function th3index_cell_to_center_child_next. +func Th3indexCellToCenterChildNext(temp *Temporal) *Temporal { + _cret := C.th3index_cell_to_center_child_next(temp._inner) + return &Temporal{_inner: _cret} +} + + +// Th3indexCellToChildPos wraps MEOS C function th3index_cell_to_child_pos. +func Th3indexCellToChildPos(temp *Temporal, parent_res int32) *Temporal { + _cret := C.th3index_cell_to_child_pos(temp._inner, C.int32(parent_res)) + return &Temporal{_inner: _cret} +} + + +// Th3indexChildPosToCell wraps MEOS C function th3index_child_pos_to_cell. +func Th3indexChildPosToCell(child_pos *Temporal, parent *Temporal, child_res int32) *Temporal { + _cret := C.th3index_child_pos_to_cell(child_pos._inner, parent._inner, C.int32(child_res)) + return &Temporal{_inner: _cret} +} + + +// TgeogpointToTh3index wraps MEOS C function tgeogpoint_to_th3index. +func TgeogpointToTh3index(temp *Temporal, resolution int32) *Temporal { + _cret := C.tgeogpoint_to_th3index(temp._inner, C.int32(resolution)) + return &Temporal{_inner: _cret} +} + + +// TgeompointToTh3index wraps MEOS C function tgeompoint_to_th3index. +func TgeompointToTh3index(temp *Temporal, resolution int32) *Temporal { + _cret := C.tgeompoint_to_th3index(temp._inner, C.int32(resolution)) + return &Temporal{_inner: _cret} +} + + +// Th3indexToTgeogpoint wraps MEOS C function th3index_to_tgeogpoint. +func Th3indexToTgeogpoint(temp *Temporal) *Temporal { + _cret := C.th3index_to_tgeogpoint(temp._inner) + return &Temporal{_inner: _cret} +} + + +// Th3indexToTgeompoint wraps MEOS C function th3index_to_tgeompoint. +func Th3indexToTgeompoint(temp *Temporal) *Temporal { + _cret := C.th3index_to_tgeompoint(temp._inner) + return &Temporal{_inner: _cret} +} + + +// Th3indexCellToBoundary wraps MEOS C function th3index_cell_to_boundary. +func Th3indexCellToBoundary(temp *Temporal) *Temporal { + _cret := C.th3index_cell_to_boundary(temp._inner) + return &Temporal{_inner: _cret} +} + + +// H3GsPointToCell wraps MEOS C function h3_gs_point_to_cell. +func H3GsPointToCell(point *Geom, resolution int32) uint64 { + _cret := C.h3_gs_point_to_cell(point._inner, C.int32(resolution)) + return uint64(_cret) +} + + +// GeoToH3indexSet wraps MEOS C function geo_to_h3index_set. +func GeoToH3indexSet(gs *Geom, resolution int32) *Set { + _cret := C.geo_to_h3index_set(gs._inner, C.int32(resolution)) + return &Set{_inner: _cret} +} + + +// EverEqH3indexsetTh3index wraps MEOS C function ever_eq_h3indexset_th3index. +func EverEqH3indexsetTh3index(cells *Set, th3idx *Temporal) int { + _cret := C.ever_eq_h3indexset_th3index(cells._inner, th3idx._inner) + return int(_cret) +} + + +// Th3indexAreNeighborCells wraps MEOS C function th3index_are_neighbor_cells. +func Th3indexAreNeighborCells(origin *Temporal, dest *Temporal) *Temporal { + _cret := C.th3index_are_neighbor_cells(origin._inner, dest._inner) + return &Temporal{_inner: _cret} +} + + +// Th3indexCellsToDirectedEdge wraps MEOS C function th3index_cells_to_directed_edge. +func Th3indexCellsToDirectedEdge(origin *Temporal, dest *Temporal) *Temporal { + _cret := C.th3index_cells_to_directed_edge(origin._inner, dest._inner) + return &Temporal{_inner: _cret} +} + + +// Th3indexIsValidDirectedEdge wraps MEOS C function th3index_is_valid_directed_edge. +func Th3indexIsValidDirectedEdge(edge *Temporal) *Temporal { + _cret := C.th3index_is_valid_directed_edge(edge._inner) + return &Temporal{_inner: _cret} +} + + +// Th3indexGetDirectedEdgeOrigin wraps MEOS C function th3index_get_directed_edge_origin. +func Th3indexGetDirectedEdgeOrigin(edge *Temporal) *Temporal { + _cret := C.th3index_get_directed_edge_origin(edge._inner) + return &Temporal{_inner: _cret} +} + + +// Th3indexGetDirectedEdgeDestination wraps MEOS C function th3index_get_directed_edge_destination. +func Th3indexGetDirectedEdgeDestination(edge *Temporal) *Temporal { + _cret := C.th3index_get_directed_edge_destination(edge._inner) + return &Temporal{_inner: _cret} +} + + +// Th3indexDirectedEdgeToBoundary wraps MEOS C function th3index_directed_edge_to_boundary. +func Th3indexDirectedEdgeToBoundary(edge *Temporal) *Temporal { + _cret := C.th3index_directed_edge_to_boundary(edge._inner) + return &Temporal{_inner: _cret} +} + + +// Th3indexCellToVertex wraps MEOS C function th3index_cell_to_vertex. +func Th3indexCellToVertex(temp *Temporal, vertex_num int32) *Temporal { + _cret := C.th3index_cell_to_vertex(temp._inner, C.int32(vertex_num)) + return &Temporal{_inner: _cret} +} + + +// Th3indexVertexToLatlng wraps MEOS C function th3index_vertex_to_latlng. +func Th3indexVertexToLatlng(temp *Temporal) *Temporal { + _cret := C.th3index_vertex_to_latlng(temp._inner) + return &Temporal{_inner: _cret} +} + + +// Th3indexIsValidVertex wraps MEOS C function th3index_is_valid_vertex. +func Th3indexIsValidVertex(temp *Temporal) *Temporal { + _cret := C.th3index_is_valid_vertex(temp._inner) + return &Temporal{_inner: _cret} +} + + +// Th3indexGridDistance wraps MEOS C function th3index_grid_distance. +func Th3indexGridDistance(origin *Temporal, dest *Temporal) *Temporal { + _cret := C.th3index_grid_distance(origin._inner, dest._inner) + return &Temporal{_inner: _cret} +} + + +// Th3indexCellToLocalIj wraps MEOS C function th3index_cell_to_local_ij. +func Th3indexCellToLocalIj(origin *Temporal, cell *Temporal) *Temporal { + _cret := C.th3index_cell_to_local_ij(origin._inner, cell._inner) + return &Temporal{_inner: _cret} +} + + +// Th3indexLocalIjToCell wraps MEOS C function th3index_local_ij_to_cell. +func Th3indexLocalIjToCell(origin *Temporal, coord *Temporal) *Temporal { + _cret := C.th3index_local_ij_to_cell(origin._inner, coord._inner) + return &Temporal{_inner: _cret} +} + + +// Th3indexCellArea wraps MEOS C function th3index_cell_area. +func Th3indexCellArea(temp *Temporal, unit string) *Temporal { + _c_unit := C.CString(unit) + defer C.free(unsafe.Pointer(_c_unit)) + _cret := C.th3index_cell_area(temp._inner, _c_unit) + return &Temporal{_inner: _cret} +} + + +// Th3indexEdgeLength wraps MEOS C function th3index_edge_length. +func Th3indexEdgeLength(temp *Temporal, unit string) *Temporal { + _c_unit := C.CString(unit) + defer C.free(unsafe.Pointer(_c_unit)) + _cret := C.th3index_edge_length(temp._inner, _c_unit) + return &Temporal{_inner: _cret} +} + + +// TgeogpointGreatCircleDistance wraps MEOS C function tgeogpoint_great_circle_distance. +func TgeogpointGreatCircleDistance(a *Temporal, b *Temporal, unit string) *Temporal { + _c_unit := C.CString(unit) + defer C.free(unsafe.Pointer(_c_unit)) + _cret := C.tgeogpoint_great_circle_distance(a._inner, b._inner, _c_unit) + return &Temporal{_inner: _cret} +} + diff --git a/functions/meos_meos_internal.go b/functions/meos_meos_internal.go new file mode 100644 index 0000000..2ef0f59 --- /dev/null +++ b/functions/meos_meos_internal.go @@ -0,0 +1,1880 @@ +package functions + +/* +#include +#include "meos.h" +#include "meos_catalog.h" +#include "meos_geo.h" +#include "meos_internal.h" +#include "meos_internal_geo.h" +#include "meos_npoint.h" +#include "meos_cbuffer.h" +#include "meos_pose.h" +#include "meos_rgeo.h" +#include "meos_h3.h" +#include "meos_quadbin.h" +#include "meos_json.h" +#include "meos_pointcloud.h" +#include "meos_arrow.h" + +// cgo reads C.union_* as a union TYPE; alias the union operators so C.g resolves them as functions. +#define gunion_bigint_set union_bigint_set +#define gunion_bigint_span union_bigint_span +#define gunion_bigint_spanset union_bigint_spanset +#define gunion_cbuffer_set union_cbuffer_set +#define gunion_date_set union_date_set +#define gunion_date_span union_date_span +#define gunion_date_spanset union_date_spanset +#define gunion_float_set union_float_set +#define gunion_float_span union_float_span +#define gunion_float_spanset union_float_spanset +#define gunion_geo_set union_geo_set +#define gunion_int_set union_int_set +#define gunion_int_span union_int_span +#define gunion_int_spanset union_int_spanset +#define gunion_jsonb_set union_jsonb_set +#define gunion_npoint_set union_npoint_set +#define gunion_pcpatch_set union_pcpatch_set +#define gunion_pcpoint_set union_pcpoint_set +#define gunion_pose_set union_pose_set +#define gunion_set_bigint union_set_bigint +#define gunion_set_cbuffer union_set_cbuffer +#define gunion_set_date union_set_date +#define gunion_set_float union_set_float +#define gunion_set_geo union_set_geo +#define gunion_set_int union_set_int +#define gunion_set_jsonb union_set_jsonb +#define gunion_set_npoint union_set_npoint +#define gunion_set_pcpatch union_set_pcpatch +#define gunion_set_pcpoint union_set_pcpoint +#define gunion_set_pose union_set_pose +#define gunion_set_set union_set_set +#define gunion_set_text union_set_text +#define gunion_set_timestamptz union_set_timestamptz +#define gunion_set_value union_set_value +#define gunion_span_bigint union_span_bigint +#define gunion_span_date union_span_date +#define gunion_span_float union_span_float +#define gunion_span_int union_span_int +#define gunion_span_span union_span_span +#define gunion_span_spanset union_span_spanset +#define gunion_span_timestamptz union_span_timestamptz +#define gunion_span_value union_span_value +#define gunion_spanset_bigint union_spanset_bigint +#define gunion_spanset_date union_spanset_date +#define gunion_spanset_float union_spanset_float +#define gunion_spanset_int union_spanset_int +#define gunion_spanset_span union_spanset_span +#define gunion_spanset_spanset union_spanset_spanset +#define gunion_spanset_timestamptz union_spanset_timestamptz +#define gunion_spanset_value union_spanset_value +#define gunion_stbox_stbox union_stbox_stbox +#define gunion_tbox_tbox union_tbox_tbox +#define gunion_text_set union_text_set +#define gunion_timestamptz_set union_timestamptz_set +#define gunion_timestamptz_span union_timestamptz_span +#define gunion_timestamptz_spanset union_timestamptz_spanset +#define gunion_tpcbox_tpcbox union_tpcbox_tpcbox +#define gunion_value_set union_value_set +#define gunion_value_span union_value_span +#define gunion_value_spanset union_value_spanset +*/ +import "C" +import ( + "unsafe" +) + +var _ = unsafe.Pointer(nil) + +// GslGetGenerationRng wraps MEOS C function gsl_get_generation_rng. +func GslGetGenerationRng() *GslRng { + _cret := C.gsl_get_generation_rng() + return &GslRng{_inner: _cret} +} + + +// GslGetAggregationRng wraps MEOS C function gsl_get_aggregation_rng. +func GslGetAggregationRng() *GslRng { + _cret := C.gsl_get_aggregation_rng() + return &GslRng{_inner: _cret} +} + + +// FloatspanRoundSet wraps MEOS C function floatspan_round_set. +func FloatspanRoundSet(s *Span, maxdd int) *Span { + var _out_result C.Span + C.floatspan_round_set(s._inner, C.int(maxdd), &_out_result) + return &Span{_inner: &_out_result} +} + + +// SetIn wraps MEOS C function set_in. +func SetIn(str string, basetype MeosType) *Set { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.set_in(_c_str, C.MeosType(basetype)) + return &Set{_inner: _cret} +} + + +// SetOut wraps MEOS C function set_out. +func SetOut(s *Set, maxdd int) string { + _cret := C.set_out(s._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// SpanIn wraps MEOS C function span_in. +func SpanIn(str string, spantype MeosType) *Span { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.span_in(_c_str, C.MeosType(spantype)) + return &Span{_inner: _cret} +} + + +// SpanOut wraps MEOS C function span_out. +func SpanOut(s *Span, maxdd int) string { + _cret := C.span_out(s._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// SpansetIn wraps MEOS C function spanset_in. +func SpansetIn(str string, spantype MeosType) *SpanSet { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.spanset_in(_c_str, C.MeosType(spantype)) + return &SpanSet{_inner: _cret} +} + + +// SpansetOut wraps MEOS C function spanset_out. +func SpansetOut(ss *SpanSet, maxdd int) string { + _cret := C.spanset_out(ss._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// SpansetMakeExp wraps MEOS C function spanset_make_exp. +func SpansetMakeExp(spans *Span, count int, maxcount int, normalize bool, order bool) *SpanSet { + _cret := C.spanset_make_exp(spans._inner, C.int(count), C.int(maxcount), C.bool(normalize), C.bool(order)) + return &SpanSet{_inner: _cret} +} + + +// SpansetMakeFree wraps MEOS C function spanset_make_free. +func SpansetMakeFree(spans *Span, count int, normalize bool, order bool) *SpanSet { + _cret := C.spanset_make_free(spans._inner, C.int(count), C.bool(normalize), C.bool(order)) + return &SpanSet{_inner: _cret} +} + + +// SetSpan wraps MEOS C function set_span. +func SetSpan(s *Set) *Span { + _cret := C.set_span(s._inner) + return &Span{_inner: _cret} +} + + +// SetSpanset wraps MEOS C function set_spanset. +func SetSpanset(s *Set) *SpanSet { + _cret := C.set_spanset(s._inner) + return &SpanSet{_inner: _cret} +} + + +// SetMemSize wraps MEOS C function set_mem_size. +func SetMemSize(s *Set) int { + _cret := C.set_mem_size(s._inner) + return int(_cret) +} + + +// SetSetSubspan wraps MEOS C function set_set_subspan. +func SetSetSubspan(s *Set, minidx int, maxidx int) *Span { + var _out_result C.Span + C.set_set_subspan(s._inner, C.int(minidx), C.int(maxidx), &_out_result) + return &Span{_inner: &_out_result} +} + + +// SetSetSpan wraps MEOS C function set_set_span. +func SetSetSpan(s *Set) *Span { + var _out_result C.Span + C.set_set_span(s._inner, &_out_result) + return &Span{_inner: &_out_result} +} + + +// SpansetMemSize wraps MEOS C function spanset_mem_size. +func SpansetMemSize(ss *SpanSet) int { + _cret := C.spanset_mem_size(ss._inner) + return int(_cret) +} + + +// SpansetSps wraps MEOS C function spanset_sps. +func SpansetSps(ss *SpanSet, count unsafe.Pointer) unsafe.Pointer { + _cret := C.spanset_sps(ss._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// DatespanSetTstzspan wraps MEOS C function datespan_set_tstzspan. +func DatespanSetTstzspan(s1 *Span, s2 *Span) { + C.datespan_set_tstzspan(s1._inner, s2._inner) +} + + +// BigintspanSetFloatspan wraps MEOS C function bigintspan_set_floatspan. +func BigintspanSetFloatspan(s1 *Span, s2 *Span) { + C.bigintspan_set_floatspan(s1._inner, s2._inner) +} + + +// BigintspanSetIntspan wraps MEOS C function bigintspan_set_intspan. +func BigintspanSetIntspan(s1 *Span, s2 *Span) { + C.bigintspan_set_intspan(s1._inner, s2._inner) +} + + +// FloatspanSetBigintspan wraps MEOS C function floatspan_set_bigintspan. +func FloatspanSetBigintspan(s1 *Span, s2 *Span) { + C.floatspan_set_bigintspan(s1._inner, s2._inner) +} + + +// FloatspanSetIntspan wraps MEOS C function floatspan_set_intspan. +func FloatspanSetIntspan(s1 *Span, s2 *Span) { + C.floatspan_set_intspan(s1._inner, s2._inner) +} + + +// IntspanSetBigintspan wraps MEOS C function intspan_set_bigintspan. +func IntspanSetBigintspan(s1 *Span, s2 *Span) { + C.intspan_set_bigintspan(s1._inner, s2._inner) +} + + +// IntspanSetFloatspan wraps MEOS C function intspan_set_floatspan. +func IntspanSetFloatspan(s1 *Span, s2 *Span) { + C.intspan_set_floatspan(s1._inner, s2._inner) +} + + +// SetCompact wraps MEOS C function set_compact. +func SetCompact(s *Set) *Set { + _cret := C.set_compact(s._inner) + return &Set{_inner: _cret} +} + + +// SpanExpand wraps MEOS C function span_expand. +func SpanExpand(s1 *Span, s2 *Span) { + C.span_expand(s1._inner, s2._inner) +} + + +// SpansetCompact wraps MEOS C function spanset_compact. +func SpansetCompact(ss *SpanSet) *SpanSet { + _cret := C.spanset_compact(ss._inner) + return &SpanSet{_inner: _cret} +} + + +// TextcatTextsetTextCommon wraps MEOS C function textcat_textset_text_common. +func TextcatTextsetTextCommon(s *Set, txt string, invert bool) *Set { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.textcat_textset_text_common(s._inner, _c_txt, C.bool(invert)) + return &Set{_inner: _cret} +} + + +// TstzspanSetDatespan wraps MEOS C function tstzspan_set_datespan. +func TstzspanSetDatespan(s1 *Span, s2 *Span) { + C.tstzspan_set_datespan(s1._inner, s2._inner) +} + + +// OvadjSpanSpan wraps MEOS C function ovadj_span_span. +func OvadjSpanSpan(s1 *Span, s2 *Span) bool { + _cret := C.ovadj_span_span(s1._inner, s2._inner) + return bool(_cret) +} + + +// LfnadjSpanSpan wraps MEOS C function lfnadj_span_span. +func LfnadjSpanSpan(s1 *Span, s2 *Span) bool { + _cret := C.lfnadj_span_span(s1._inner, s2._inner) + return bool(_cret) +} + + +// BboxType wraps MEOS C function bbox_type. +func BboxType(bboxtype MeosType) bool { + _cret := C.bbox_type(C.MeosType(bboxtype)) + return bool(_cret) +} + + +// BboxGetSize wraps MEOS C function bbox_get_size. +func BboxGetSize(bboxtype MeosType) uint { + _cret := C.bbox_get_size(C.MeosType(bboxtype)) + return uint(_cret) +} + + +// BboxMaxDims wraps MEOS C function bbox_max_dims. +func BboxMaxDims(bboxtype MeosType) int { + _cret := C.bbox_max_dims(C.MeosType(bboxtype)) + return int(_cret) +} + + +// TemporalBboxEq wraps MEOS C function temporal_bbox_eq. +func TemporalBboxEq(box1 unsafe.Pointer, box2 unsafe.Pointer, temptype MeosType) bool { + _cret := C.temporal_bbox_eq(unsafe.Pointer(box1), unsafe.Pointer(box2), C.MeosType(temptype)) + return bool(_cret) +} + + +// TemporalBboxCmp wraps MEOS C function temporal_bbox_cmp. +func TemporalBboxCmp(box1 unsafe.Pointer, box2 unsafe.Pointer, temptype MeosType) int { + _cret := C.temporal_bbox_cmp(unsafe.Pointer(box1), unsafe.Pointer(box2), C.MeosType(temptype)) + return int(_cret) +} + + +// BboxUnionSpanSpan wraps MEOS C function bbox_union_span_span. +func BboxUnionSpanSpan(s1 *Span, s2 *Span) *Span { + var _out_result C.Span + C.bbox_union_span_span(s1._inner, s2._inner, &_out_result) + return &Span{_inner: &_out_result} +} + + +// InterSpanSpan wraps MEOS C function inter_span_span. +func InterSpanSpan(s1 *Span, s2 *Span) (bool, *Span) { + var _out_result C.Span + _cret := C.inter_span_span(s1._inner, s2._inner, &_out_result) + return bool(_cret), &Span{_inner: &_out_result} +} + + +// MiSpanSpan wraps MEOS C function mi_span_span. +func MiSpanSpan(s1 *Span, s2 *Span) (int, *Span) { + var _out_result C.Span + _cret := C.mi_span_span(s1._inner, s2._inner, &_out_result) + return int(_cret), &Span{_inner: &_out_result} +} + + +// TBOXSet wraps MEOS C function tbox_set. +func TBOXSet(s *Span, p *Span, box *TBox) { + C.tbox_set(s._inner, p._inner, box._inner) +} + + +// FloatSetTBOX wraps MEOS C function float_set_tbox. +func FloatSetTBOX(d float64, box *TBox) { + C.float_set_tbox(C.double(d), box._inner) +} + + +// IntSetTBOX wraps MEOS C function int_set_tbox. +func IntSetTBOX(i int, box *TBox) { + C.int_set_tbox(C.int(i), box._inner) +} + + +// NumsetSetTBOX wraps MEOS C function numset_set_tbox. +func NumsetSetTBOX(s *Set, box *TBox) { + C.numset_set_tbox(s._inner, box._inner) +} + + +// NumspanSetTBOX wraps MEOS C function numspan_set_tbox. +func NumspanSetTBOX(span *Span, box *TBox) { + C.numspan_set_tbox(span._inner, box._inner) +} + + +// TimestamptzSetTBOX wraps MEOS C function timestamptz_set_tbox. +func TimestamptzSetTBOX(t int64, box *TBox) { + C.timestamptz_set_tbox(C.TimestampTz(t), box._inner) +} + + +// TstzsetSetTBOX wraps MEOS C function tstzset_set_tbox. +func TstzsetSetTBOX(s *Set, box *TBox) { + C.tstzset_set_tbox(s._inner, box._inner) +} + + +// TstzspanSetTBOX wraps MEOS C function tstzspan_set_tbox. +func TstzspanSetTBOX(s *Span, box *TBox) { + C.tstzspan_set_tbox(s._inner, box._inner) +} + + +// TBOXExpand wraps MEOS C function tbox_expand. +func TBOXExpand(box1 *TBox, box2 *TBox) { + C.tbox_expand(box1._inner, box2._inner) +} + + +// InterTBOXTBOX wraps MEOS C function inter_tbox_tbox. +func InterTBOXTBOX(box1 *TBox, box2 *TBox) (bool, *TBox) { + var _out_result C.TBox + _cret := C.inter_tbox_tbox(box1._inner, box2._inner, &_out_result) + return bool(_cret), &TBox{_inner: &_out_result} +} + + +// TboolinstIn wraps MEOS C function tboolinst_in. +func TboolinstIn(str string) *TInstant { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tboolinst_in(_c_str) + return &TInstant{_inner: _cret} +} + + +// TboolseqIn wraps MEOS C function tboolseq_in. +func TboolseqIn(str string, interp Interpolation) *TSequence { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tboolseq_in(_c_str, C.interpType(interp)) + return &TSequence{_inner: _cret} +} + + +// TboolseqsetIn wraps MEOS C function tboolseqset_in. +func TboolseqsetIn(str string) *TSequenceSet { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tboolseqset_in(_c_str) + return &TSequenceSet{_inner: _cret} +} + + +// TemporalIn wraps MEOS C function temporal_in. +func TemporalIn(str string, temptype MeosType) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.temporal_in(_c_str, C.MeosType(temptype)) + return &Temporal{_inner: _cret} +} + + +// TemporalOut wraps MEOS C function temporal_out. +func TemporalOut(temp *Temporal, maxdd int) string { + _cret := C.temporal_out(temp._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// TemparrOut wraps MEOS C function temparr_out. +func TemparrOut(temparr unsafe.Pointer, count int, maxdd int) unsafe.Pointer { + _cret := C.temparr_out((**C.Temporal)(unsafe.Pointer(temparr)), C.int(count), C.int(maxdd)) + return unsafe.Pointer(_cret) +} + + +// TfloatinstIn wraps MEOS C function tfloatinst_in. +func TfloatinstIn(str string) *TInstant { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tfloatinst_in(_c_str) + return &TInstant{_inner: _cret} +} + + +// TfloatseqIn wraps MEOS C function tfloatseq_in. +func TfloatseqIn(str string, interp Interpolation) *TSequence { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tfloatseq_in(_c_str, C.interpType(interp)) + return &TSequence{_inner: _cret} +} + + +// TfloatseqsetIn wraps MEOS C function tfloatseqset_in. +func TfloatseqsetIn(str string) *TSequenceSet { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tfloatseqset_in(_c_str) + return &TSequenceSet{_inner: _cret} +} + + +// TinstantIn wraps MEOS C function tinstant_in. +func TinstantIn(str string, temptype MeosType) *TInstant { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tinstant_in(_c_str, C.MeosType(temptype)) + return &TInstant{_inner: _cret} +} + + +// TinstantOut wraps MEOS C function tinstant_out. +func TinstantOut(inst *TInstant, maxdd int) string { + _cret := C.tinstant_out(inst._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// TbigintinstIn wraps MEOS C function tbigintinst_in. +func TbigintinstIn(str string) *TInstant { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tbigintinst_in(_c_str) + return &TInstant{_inner: _cret} +} + + +// TbigintseqsetIn wraps MEOS C function tbigintseqset_in. +func TbigintseqsetIn(str string) *TSequenceSet { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tbigintseqset_in(_c_str) + return &TSequenceSet{_inner: _cret} +} + + +// TintinstIn wraps MEOS C function tintinst_in. +func TintinstIn(str string) *TInstant { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tintinst_in(_c_str) + return &TInstant{_inner: _cret} +} + + +// TintseqIn wraps MEOS C function tintseq_in. +func TintseqIn(str string, interp Interpolation) *TSequence { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tintseq_in(_c_str, C.interpType(interp)) + return &TSequence{_inner: _cret} +} + + +// TintseqsetIn wraps MEOS C function tintseqset_in. +func TintseqsetIn(str string) *TSequenceSet { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tintseqset_in(_c_str) + return &TSequenceSet{_inner: _cret} +} + + +// TsequenceIn wraps MEOS C function tsequence_in. +func TsequenceIn(str string, temptype MeosType, interp Interpolation) *TSequence { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tsequence_in(_c_str, C.MeosType(temptype), C.interpType(interp)) + return &TSequence{_inner: _cret} +} + + +// TsequenceOut wraps MEOS C function tsequence_out. +func TsequenceOut(seq *TSequence, maxdd int) string { + _cret := C.tsequence_out(seq._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// TsequencesetIn wraps MEOS C function tsequenceset_in. +func TsequencesetIn(str string, temptype MeosType, interp Interpolation) *TSequenceSet { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tsequenceset_in(_c_str, C.MeosType(temptype), C.interpType(interp)) + return &TSequenceSet{_inner: _cret} +} + + +// TsequencesetOut wraps MEOS C function tsequenceset_out. +func TsequencesetOut(ss *TSequenceSet, maxdd int) string { + _cret := C.tsequenceset_out(ss._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// TtextinstIn wraps MEOS C function ttextinst_in. +func TtextinstIn(str string) *TInstant { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.ttextinst_in(_c_str) + return &TInstant{_inner: _cret} +} + + +// TtextseqIn wraps MEOS C function ttextseq_in. +func TtextseqIn(str string, interp Interpolation) *TSequence { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.ttextseq_in(_c_str, C.interpType(interp)) + return &TSequence{_inner: _cret} +} + + +// TtextseqsetIn wraps MEOS C function ttextseqset_in. +func TtextseqsetIn(str string) *TSequenceSet { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.ttextseqset_in(_c_str) + return &TSequenceSet{_inner: _cret} +} + + +// TemporalFromMFJSON wraps MEOS C function temporal_from_mfjson. +func TemporalFromMFJSON(mfjson string, temptype MeosType) *Temporal { + _c_mfjson := C.CString(mfjson) + defer C.free(unsafe.Pointer(_c_mfjson)) + _cret := C.temporal_from_mfjson(_c_mfjson, C.MeosType(temptype)) + return &Temporal{_inner: _cret} +} + + +// TinstantCopy wraps MEOS C function tinstant_copy. +func TinstantCopy(inst *TInstant) *TInstant { + _cret := C.tinstant_copy(inst._inner) + return &TInstant{_inner: _cret} +} + + +// TsequenceCopy wraps MEOS C function tsequence_copy. +func TsequenceCopy(seq *TSequence) *TSequence { + _cret := C.tsequence_copy(seq._inner) + return &TSequence{_inner: _cret} +} + + +// TsequenceMakeExp wraps MEOS C function tsequence_make_exp. +func TsequenceMakeExp(instants unsafe.Pointer, count int, maxcount int, lower_inc bool, upper_inc bool, interp Interpolation, normalize bool) *TSequence { + _cret := C.tsequence_make_exp((**C.TInstant)(unsafe.Pointer(instants)), C.int(count), C.int(maxcount), C.bool(lower_inc), C.bool(upper_inc), C.interpType(interp), C.bool(normalize)) + return &TSequence{_inner: _cret} +} + + +// TsequenceMakeFree wraps MEOS C function tsequence_make_free. +func TsequenceMakeFree(instants unsafe.Pointer, count int, lower_inc bool, upper_inc bool, interp Interpolation, normalize bool) *TSequence { + _cret := C.tsequence_make_free((**C.TInstant)(unsafe.Pointer(instants)), C.int(count), C.bool(lower_inc), C.bool(upper_inc), C.interpType(interp), C.bool(normalize)) + return &TSequence{_inner: _cret} +} + + +// TsequencesetCopy wraps MEOS C function tsequenceset_copy. +func TsequencesetCopy(ss *TSequenceSet) *TSequenceSet { + _cret := C.tsequenceset_copy(ss._inner) + return &TSequenceSet{_inner: _cret} +} + + +// TseqsetarrToTseqset wraps MEOS C function tseqsetarr_to_tseqset. +func TseqsetarrToTseqset(seqsets unsafe.Pointer, count int, totalseqs int) *TSequenceSet { + _cret := C.tseqsetarr_to_tseqset((**C.TSequenceSet)(unsafe.Pointer(seqsets)), C.int(count), C.int(totalseqs)) + return &TSequenceSet{_inner: _cret} +} + + +// TsequencesetMakeExp wraps MEOS C function tsequenceset_make_exp. +func TsequencesetMakeExp(sequences unsafe.Pointer, count int, maxcount int, normalize bool) *TSequenceSet { + _cret := C.tsequenceset_make_exp((**C.TSequence)(unsafe.Pointer(sequences)), C.int(count), C.int(maxcount), C.bool(normalize)) + return &TSequenceSet{_inner: _cret} +} + + +// TsequencesetMakeFree wraps MEOS C function tsequenceset_make_free. +func TsequencesetMakeFree(sequences unsafe.Pointer, count int, normalize bool) *TSequenceSet { + _cret := C.tsequenceset_make_free((**C.TSequence)(unsafe.Pointer(sequences)), C.int(count), C.bool(normalize)) + return &TSequenceSet{_inner: _cret} +} + + +// TemporalSetTstzspan wraps MEOS C function temporal_set_tstzspan. +func TemporalSetTstzspan(temp *Temporal, s *Span) { + C.temporal_set_tstzspan(temp._inner, s._inner) +} + + +// TinstantSetTstzspan wraps MEOS C function tinstant_set_tstzspan. +func TinstantSetTstzspan(inst *TInstant, s *Span) { + C.tinstant_set_tstzspan(inst._inner, s._inner) +} + + +// TnumberSetTBOX wraps MEOS C function tnumber_set_tbox. +func TnumberSetTBOX(temp *Temporal, box *TBox) { + C.tnumber_set_tbox(temp._inner, box._inner) +} + + +// TnumberinstSetTBOX wraps MEOS C function tnumberinst_set_tbox. +func TnumberinstSetTBOX(inst *TInstant, box *TBox) { + C.tnumberinst_set_tbox(inst._inner, box._inner) +} + + +// TnumberseqSetTBOX wraps MEOS C function tnumberseq_set_tbox. +func TnumberseqSetTBOX(seq *TSequence, box *TBox) { + C.tnumberseq_set_tbox(seq._inner, box._inner) +} + + +// TnumberseqsetSetTBOX wraps MEOS C function tnumberseqset_set_tbox. +func TnumberseqsetSetTBOX(ss *TSequenceSet, box *TBox) { + C.tnumberseqset_set_tbox(ss._inner, box._inner) +} + + +// TsequenceSetTstzspan wraps MEOS C function tsequence_set_tstzspan. +func TsequenceSetTstzspan(seq *TSequence, s *Span) { + C.tsequence_set_tstzspan(seq._inner, s._inner) +} + + +// TsequencesetSetTstzspan wraps MEOS C function tsequenceset_set_tstzspan. +func TsequencesetSetTstzspan(ss *TSequenceSet, s *Span) { + C.tsequenceset_set_tstzspan(ss._inner, s._inner) +} + + +// TemporalEndInst wraps MEOS C function temporal_end_inst. +func TemporalEndInst(temp *Temporal) *TInstant { + _cret := C.temporal_end_inst(temp._inner) + return &TInstant{_inner: _cret} +} + + +// TemporalInstN wraps MEOS C function temporal_inst_n. +func TemporalInstN(temp *Temporal, n int) *TInstant { + _cret := C.temporal_inst_n(temp._inner, C.int(n)) + return &TInstant{_inner: _cret} +} + + +// TemporalInstsP wraps MEOS C function temporal_insts_p. +func TemporalInstsP(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.temporal_insts_p(temp._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TemporalMaxInstP wraps MEOS C function temporal_max_inst_p. +func TemporalMaxInstP(temp *Temporal) *TInstant { + _cret := C.temporal_max_inst_p(temp._inner) + return &TInstant{_inner: _cret} +} + + +// TemporalMemSize wraps MEOS C function temporal_mem_size. +func TemporalMemSize(temp *Temporal) uint { + _cret := C.temporal_mem_size(temp._inner) + return uint(_cret) +} + + +// TemporalMinInstP wraps MEOS C function temporal_min_inst_p. +func TemporalMinInstP(temp *Temporal) *TInstant { + _cret := C.temporal_min_inst_p(temp._inner) + return &TInstant{_inner: _cret} +} + + +// TemporalSequencesP wraps MEOS C function temporal_sequences_p. +func TemporalSequencesP(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.temporal_sequences_p(temp._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TemporalSetBbox wraps MEOS C function temporal_set_bbox. +func TemporalSetBbox(temp *Temporal, box unsafe.Pointer) { + C.temporal_set_bbox(temp._inner, unsafe.Pointer(box)) +} + + +// TemporalStartInst wraps MEOS C function temporal_start_inst. +func TemporalStartInst(temp *Temporal) *TInstant { + _cret := C.temporal_start_inst(temp._inner) + return &TInstant{_inner: _cret} +} + + +// TinstantHash wraps MEOS C function tinstant_hash. +func TinstantHash(inst *TInstant) uint32 { + _cret := C.tinstant_hash(inst._inner) + return uint32(_cret) +} + + +// TinstantInsts wraps MEOS C function tinstant_insts. +func TinstantInsts(inst *TInstant, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tinstant_insts(inst._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TinstantSetBbox wraps MEOS C function tinstant_set_bbox. +func TinstantSetBbox(inst *TInstant, box unsafe.Pointer) { + C.tinstant_set_bbox(inst._inner, unsafe.Pointer(box)) +} + + +// TinstantTime wraps MEOS C function tinstant_time. +func TinstantTime(inst *TInstant) *SpanSet { + _cret := C.tinstant_time(inst._inner) + return &SpanSet{_inner: _cret} +} + + +// TinstantTimestamps wraps MEOS C function tinstant_timestamps. +func TinstantTimestamps(inst *TInstant, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tinstant_timestamps(inst._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TnumberSetSpan wraps MEOS C function tnumber_set_span. +func TnumberSetSpan(temp *Temporal, s *Span) { + C.tnumber_set_span(temp._inner, s._inner) +} + + +// TnumberinstValuespans wraps MEOS C function tnumberinst_valuespans. +func TnumberinstValuespans(inst *TInstant) *SpanSet { + _cret := C.tnumberinst_valuespans(inst._inner) + return &SpanSet{_inner: _cret} +} + + +// TnumberseqAvgVal wraps MEOS C function tnumberseq_avg_val. +func TnumberseqAvgVal(seq *TSequence) float64 { + _cret := C.tnumberseq_avg_val(seq._inner) + return float64(_cret) +} + + +// TnumberseqValuespans wraps MEOS C function tnumberseq_valuespans. +func TnumberseqValuespans(seq *TSequence) *SpanSet { + _cret := C.tnumberseq_valuespans(seq._inner) + return &SpanSet{_inner: _cret} +} + + +// TnumberseqsetAvgVal wraps MEOS C function tnumberseqset_avg_val. +func TnumberseqsetAvgVal(ss *TSequenceSet) float64 { + _cret := C.tnumberseqset_avg_val(ss._inner) + return float64(_cret) +} + + +// TnumberseqsetValuespans wraps MEOS C function tnumberseqset_valuespans. +func TnumberseqsetValuespans(ss *TSequenceSet) *SpanSet { + _cret := C.tnumberseqset_valuespans(ss._inner) + return &SpanSet{_inner: _cret} +} + + +// TsequenceDuration wraps MEOS C function tsequence_duration. +func TsequenceDuration(seq *TSequence) *Interval { + _cret := C.tsequence_duration(seq._inner) + return &Interval{_inner: _cret} +} + + +// TsequenceEndTimestamptz wraps MEOS C function tsequence_end_timestamptz. +func TsequenceEndTimestamptz(seq *TSequence) int64 { + _cret := C.tsequence_end_timestamptz(seq._inner) + return int64(_cret) +} + + +// TsequenceHash wraps MEOS C function tsequence_hash. +func TsequenceHash(seq *TSequence) uint32 { + _cret := C.tsequence_hash(seq._inner) + return uint32(_cret) +} + + +// TsequenceInstsP wraps MEOS C function tsequence_insts_p. +func TsequenceInstsP(seq *TSequence, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tsequence_insts_p(seq._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TsequenceMaxInstP wraps MEOS C function tsequence_max_inst_p. +func TsequenceMaxInstP(seq *TSequence) *TInstant { + _cret := C.tsequence_max_inst_p(seq._inner) + return &TInstant{_inner: _cret} +} + + +// TsequenceMinInstP wraps MEOS C function tsequence_min_inst_p. +func TsequenceMinInstP(seq *TSequence) *TInstant { + _cret := C.tsequence_min_inst_p(seq._inner) + return &TInstant{_inner: _cret} +} + + +// TsequenceSegments wraps MEOS C function tsequence_segments. +func TsequenceSegments(seq *TSequence, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tsequence_segments(seq._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TsequenceSeqs wraps MEOS C function tsequence_seqs. +func TsequenceSeqs(seq *TSequence, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tsequence_seqs(seq._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TsequenceStartTimestamptz wraps MEOS C function tsequence_start_timestamptz. +func TsequenceStartTimestamptz(seq *TSequence) int64 { + _cret := C.tsequence_start_timestamptz(seq._inner) + return int64(_cret) +} + + +// TsequenceTime wraps MEOS C function tsequence_time. +func TsequenceTime(seq *TSequence) *SpanSet { + _cret := C.tsequence_time(seq._inner) + return &SpanSet{_inner: _cret} +} + + +// TsequenceTimestamps wraps MEOS C function tsequence_timestamps. +func TsequenceTimestamps(seq *TSequence, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tsequence_timestamps(seq._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TsequencesetDuration wraps MEOS C function tsequenceset_duration. +func TsequencesetDuration(ss *TSequenceSet, boundspan bool) *Interval { + _cret := C.tsequenceset_duration(ss._inner, C.bool(boundspan)) + return &Interval{_inner: _cret} +} + + +// TsequencesetEndTimestamptz wraps MEOS C function tsequenceset_end_timestamptz. +func TsequencesetEndTimestamptz(ss *TSequenceSet) int64 { + _cret := C.tsequenceset_end_timestamptz(ss._inner) + return int64(_cret) +} + + +// TsequencesetHash wraps MEOS C function tsequenceset_hash. +func TsequencesetHash(ss *TSequenceSet) uint32 { + _cret := C.tsequenceset_hash(ss._inner) + return uint32(_cret) +} + + +// TsequencesetInstN wraps MEOS C function tsequenceset_inst_n. +func TsequencesetInstN(ss *TSequenceSet, n int) *TInstant { + _cret := C.tsequenceset_inst_n(ss._inner, C.int(n)) + return &TInstant{_inner: _cret} +} + + +// TsequencesetInstsP wraps MEOS C function tsequenceset_insts_p. +func TsequencesetInstsP(ss *TSequenceSet, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tsequenceset_insts_p(ss._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TsequencesetMaxInstP wraps MEOS C function tsequenceset_max_inst_p. +func TsequencesetMaxInstP(ss *TSequenceSet) *TInstant { + _cret := C.tsequenceset_max_inst_p(ss._inner) + return &TInstant{_inner: _cret} +} + + +// TsequencesetMinInstP wraps MEOS C function tsequenceset_min_inst_p. +func TsequencesetMinInstP(ss *TSequenceSet) *TInstant { + _cret := C.tsequenceset_min_inst_p(ss._inner) + return &TInstant{_inner: _cret} +} + + +// TsequencesetNumInstants wraps MEOS C function tsequenceset_num_instants. +func TsequencesetNumInstants(ss *TSequenceSet) int { + _cret := C.tsequenceset_num_instants(ss._inner) + return int(_cret) +} + + +// TsequencesetNumTimestamps wraps MEOS C function tsequenceset_num_timestamps. +func TsequencesetNumTimestamps(ss *TSequenceSet) int { + _cret := C.tsequenceset_num_timestamps(ss._inner) + return int(_cret) +} + + +// TsequencesetSegments wraps MEOS C function tsequenceset_segments. +func TsequencesetSegments(ss *TSequenceSet, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tsequenceset_segments(ss._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TsequencesetSequencesP wraps MEOS C function tsequenceset_sequences_p. +func TsequencesetSequencesP(ss *TSequenceSet) unsafe.Pointer { + _cret := C.tsequenceset_sequences_p(ss._inner) + return unsafe.Pointer(_cret) +} + + +// TsequencesetStartTimestamptz wraps MEOS C function tsequenceset_start_timestamptz. +func TsequencesetStartTimestamptz(ss *TSequenceSet) int64 { + _cret := C.tsequenceset_start_timestamptz(ss._inner) + return int64(_cret) +} + + +// TsequencesetTime wraps MEOS C function tsequenceset_time. +func TsequencesetTime(ss *TSequenceSet) *SpanSet { + _cret := C.tsequenceset_time(ss._inner) + return &SpanSet{_inner: _cret} +} + + +// TsequencesetTimestamptzN wraps MEOS C function tsequenceset_timestamptz_n. +func TsequencesetTimestamptzN(ss *TSequenceSet, n int) (bool, int64) { + var _out_result C.TimestampTz + _cret := C.tsequenceset_timestamptz_n(ss._inner, C.int(n), &_out_result) + return bool(_cret), int64(_out_result) +} + + +// TsequencesetTimestamps wraps MEOS C function tsequenceset_timestamps. +func TsequencesetTimestamps(ss *TSequenceSet, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tsequenceset_timestamps(ss._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TemporalRestart wraps MEOS C function temporal_restart. +func TemporalRestart(temp *Temporal, count int) { + C.temporal_restart(temp._inner, C.int(count)) +} + + +// TemporalTsequence wraps MEOS C function temporal_tsequence. +func TemporalTsequence(temp *Temporal, interp Interpolation) *TSequence { + _cret := C.temporal_tsequence(temp._inner, C.interpType(interp)) + return &TSequence{_inner: _cret} +} + + +// TemporalTsequenceset wraps MEOS C function temporal_tsequenceset. +func TemporalTsequenceset(temp *Temporal, interp Interpolation) *TSequenceSet { + _cret := C.temporal_tsequenceset(temp._inner, C.interpType(interp)) + return &TSequenceSet{_inner: _cret} +} + + +// TinstantShiftTime wraps MEOS C function tinstant_shift_time. +func TinstantShiftTime(inst *TInstant, interv *Interval) *TInstant { + _cret := C.tinstant_shift_time(inst._inner, interv._inner) + return &TInstant{_inner: _cret} +} + + +// TinstantToTsequence wraps MEOS C function tinstant_to_tsequence. +func TinstantToTsequence(inst *TInstant, interp Interpolation) *TSequence { + _cret := C.tinstant_to_tsequence(inst._inner, C.interpType(interp)) + return &TSequence{_inner: _cret} +} + + +// TinstantToTsequenceFree wraps MEOS C function tinstant_to_tsequence_free. +func TinstantToTsequenceFree(inst *TInstant, interp Interpolation) *TSequence { + _cret := C.tinstant_to_tsequence_free(inst._inner, C.interpType(interp)) + return &TSequence{_inner: _cret} +} + + +// TinstantToTsequenceset wraps MEOS C function tinstant_to_tsequenceset. +func TinstantToTsequenceset(inst *TInstant, interp Interpolation) *TSequenceSet { + _cret := C.tinstant_to_tsequenceset(inst._inner, C.interpType(interp)) + return &TSequenceSet{_inner: _cret} +} + + +// TsequenceRestart wraps MEOS C function tsequence_restart. +func TsequenceRestart(seq *TSequence, count int) { + C.tsequence_restart(seq._inner, C.int(count)) +} + + +// TsequenceSetInterp wraps MEOS C function tsequence_set_interp. +func TsequenceSetInterp(seq *TSequence, interp Interpolation) *Temporal { + _cret := C.tsequence_set_interp(seq._inner, C.interpType(interp)) + return &Temporal{_inner: _cret} +} + + +// TsequenceShiftScaleTime wraps MEOS C function tsequence_shift_scale_time. +func TsequenceShiftScaleTime(seq *TSequence, shift *Interval, duration *Interval) *TSequence { + _cret := C.tsequence_shift_scale_time(seq._inner, shift._inner, duration._inner) + return &TSequence{_inner: _cret} +} + + +// TsequenceSubseq wraps MEOS C function tsequence_subseq. +func TsequenceSubseq(seq *TSequence, from int, to int, lower_inc bool, upper_inc bool) *TSequence { + _cret := C.tsequence_subseq(seq._inner, C.int(from), C.int(to), C.bool(lower_inc), C.bool(upper_inc)) + return &TSequence{_inner: _cret} +} + + +// TsequenceToTinstant wraps MEOS C function tsequence_to_tinstant. +func TsequenceToTinstant(seq *TSequence) *TInstant { + _cret := C.tsequence_to_tinstant(seq._inner) + return &TInstant{_inner: _cret} +} + + +// TsequenceToTsequenceset wraps MEOS C function tsequence_to_tsequenceset. +func TsequenceToTsequenceset(seq *TSequence) *TSequenceSet { + _cret := C.tsequence_to_tsequenceset(seq._inner) + return &TSequenceSet{_inner: _cret} +} + + +// TsequenceToTsequencesetFree wraps MEOS C function tsequence_to_tsequenceset_free. +func TsequenceToTsequencesetFree(seq *TSequence) *TSequenceSet { + _cret := C.tsequence_to_tsequenceset_free(seq._inner) + return &TSequenceSet{_inner: _cret} +} + + +// TsequenceToTsequencesetInterp wraps MEOS C function tsequence_to_tsequenceset_interp. +func TsequenceToTsequencesetInterp(seq *TSequence, interp Interpolation) *TSequenceSet { + _cret := C.tsequence_to_tsequenceset_interp(seq._inner, C.interpType(interp)) + return &TSequenceSet{_inner: _cret} +} + + +// TsequencesetRestart wraps MEOS C function tsequenceset_restart. +func TsequencesetRestart(ss *TSequenceSet, count int) { + C.tsequenceset_restart(ss._inner, C.int(count)) +} + + +// TsequencesetSetInterp wraps MEOS C function tsequenceset_set_interp. +func TsequencesetSetInterp(ss *TSequenceSet, interp Interpolation) *Temporal { + _cret := C.tsequenceset_set_interp(ss._inner, C.interpType(interp)) + return &Temporal{_inner: _cret} +} + + +// TsequencesetShiftScaleTime wraps MEOS C function tsequenceset_shift_scale_time. +func TsequencesetShiftScaleTime(ss *TSequenceSet, start *Interval, duration *Interval) *TSequenceSet { + _cret := C.tsequenceset_shift_scale_time(ss._inner, start._inner, duration._inner) + return &TSequenceSet{_inner: _cret} +} + + +// TsequencesetToDiscrete wraps MEOS C function tsequenceset_to_discrete. +func TsequencesetToDiscrete(ss *TSequenceSet) *TSequence { + _cret := C.tsequenceset_to_discrete(ss._inner) + return &TSequence{_inner: _cret} +} + + +// TsequencesetToLinear wraps MEOS C function tsequenceset_to_linear. +func TsequencesetToLinear(ss *TSequenceSet) *TSequenceSet { + _cret := C.tsequenceset_to_linear(ss._inner) + return &TSequenceSet{_inner: _cret} +} + + +// TsequencesetToStep wraps MEOS C function tsequenceset_to_step. +func TsequencesetToStep(ss *TSequenceSet) *TSequenceSet { + _cret := C.tsequenceset_to_step(ss._inner) + return &TSequenceSet{_inner: _cret} +} + + +// TsequencesetToTinstant wraps MEOS C function tsequenceset_to_tinstant. +func TsequencesetToTinstant(ss *TSequenceSet) *TInstant { + _cret := C.tsequenceset_to_tinstant(ss._inner) + return &TInstant{_inner: _cret} +} + + +// TsequencesetToTsequence wraps MEOS C function tsequenceset_to_tsequence. +func TsequencesetToTsequence(ss *TSequenceSet) *TSequence { + _cret := C.tsequenceset_to_tsequence(ss._inner) + return &TSequence{_inner: _cret} +} + + +// TinstantMerge wraps MEOS C function tinstant_merge. +func TinstantMerge(inst1 *TInstant, inst2 *TInstant) *Temporal { + _cret := C.tinstant_merge(inst1._inner, inst2._inner) + return &Temporal{_inner: _cret} +} + + +// TinstantMergeArray wraps MEOS C function tinstant_merge_array. +func TinstantMergeArray(instants unsafe.Pointer, count int) *Temporal { + _cret := C.tinstant_merge_array((**C.TInstant)(unsafe.Pointer(instants)), C.int(count)) + return &Temporal{_inner: _cret} +} + + +// TsequenceAppendTinstant wraps MEOS C function tsequence_append_tinstant. +func TsequenceAppendTinstant(seq *TSequence, inst *TInstant, maxdist float64, maxt *Interval, expand bool) *Temporal { + _cret := C.tsequence_append_tinstant(seq._inner, inst._inner, C.double(maxdist), maxt._inner, C.bool(expand)) + return &Temporal{_inner: _cret} +} + + +// TsequenceAppendTsequence wraps MEOS C function tsequence_append_tsequence. +func TsequenceAppendTsequence(seq1 *TSequence, seq2 *TSequence, expand bool) *Temporal { + _cret := C.tsequence_append_tsequence(seq1._inner, seq2._inner, C.bool(expand)) + return &Temporal{_inner: _cret} +} + + +// TsequenceDeleteTimestamptz wraps MEOS C function tsequence_delete_timestamptz. +func TsequenceDeleteTimestamptz(seq *TSequence, t int64, connect bool) *Temporal { + _cret := C.tsequence_delete_timestamptz(seq._inner, C.TimestampTz(t), C.bool(connect)) + return &Temporal{_inner: _cret} +} + + +// TsequenceDeleteTstzset wraps MEOS C function tsequence_delete_tstzset. +func TsequenceDeleteTstzset(seq *TSequence, s *Set, connect bool) *Temporal { + _cret := C.tsequence_delete_tstzset(seq._inner, s._inner, C.bool(connect)) + return &Temporal{_inner: _cret} +} + + +// TsequenceDeleteTstzspan wraps MEOS C function tsequence_delete_tstzspan. +func TsequenceDeleteTstzspan(seq *TSequence, s *Span, connect bool) *Temporal { + _cret := C.tsequence_delete_tstzspan(seq._inner, s._inner, C.bool(connect)) + return &Temporal{_inner: _cret} +} + + +// TsequenceDeleteTstzspanset wraps MEOS C function tsequence_delete_tstzspanset. +func TsequenceDeleteTstzspanset(seq *TSequence, ss *SpanSet, connect bool) *Temporal { + _cret := C.tsequence_delete_tstzspanset(seq._inner, ss._inner, C.bool(connect)) + return &Temporal{_inner: _cret} +} + + +// TsequenceInsert wraps MEOS C function tsequence_insert. +func TsequenceInsert(seq1 *TSequence, seq2 *TSequence, connect bool) *Temporal { + _cret := C.tsequence_insert(seq1._inner, seq2._inner, C.bool(connect)) + return &Temporal{_inner: _cret} +} + + +// TsequenceMerge wraps MEOS C function tsequence_merge. +func TsequenceMerge(seq1 *TSequence, seq2 *TSequence) *Temporal { + _cret := C.tsequence_merge(seq1._inner, seq2._inner) + return &Temporal{_inner: _cret} +} + + +// TsequenceMergeArray wraps MEOS C function tsequence_merge_array. +func TsequenceMergeArray(sequences unsafe.Pointer, count int) *Temporal { + _cret := C.tsequence_merge_array((**C.TSequence)(unsafe.Pointer(sequences)), C.int(count)) + return &Temporal{_inner: _cret} +} + + +// TsequencesetAppendTinstant wraps MEOS C function tsequenceset_append_tinstant. +func TsequencesetAppendTinstant(ss *TSequenceSet, inst *TInstant, maxdist float64, maxt *Interval, expand bool) *TSequenceSet { + _cret := C.tsequenceset_append_tinstant(ss._inner, inst._inner, C.double(maxdist), maxt._inner, C.bool(expand)) + return &TSequenceSet{_inner: _cret} +} + + +// TsequencesetAppendTsequence wraps MEOS C function tsequenceset_append_tsequence. +func TsequencesetAppendTsequence(ss *TSequenceSet, seq *TSequence, expand bool) *TSequenceSet { + _cret := C.tsequenceset_append_tsequence(ss._inner, seq._inner, C.bool(expand)) + return &TSequenceSet{_inner: _cret} +} + + +// TsequencesetDeleteTimestamptz wraps MEOS C function tsequenceset_delete_timestamptz. +func TsequencesetDeleteTimestamptz(ss *TSequenceSet, t int64) *TSequenceSet { + _cret := C.tsequenceset_delete_timestamptz(ss._inner, C.TimestampTz(t)) + return &TSequenceSet{_inner: _cret} +} + + +// TsequencesetDeleteTstzset wraps MEOS C function tsequenceset_delete_tstzset. +func TsequencesetDeleteTstzset(ss *TSequenceSet, s *Set) *TSequenceSet { + _cret := C.tsequenceset_delete_tstzset(ss._inner, s._inner) + return &TSequenceSet{_inner: _cret} +} + + +// TsequencesetDeleteTstzspan wraps MEOS C function tsequenceset_delete_tstzspan. +func TsequencesetDeleteTstzspan(ss *TSequenceSet, s *Span) *TSequenceSet { + _cret := C.tsequenceset_delete_tstzspan(ss._inner, s._inner) + return &TSequenceSet{_inner: _cret} +} + + +// TsequencesetDeleteTstzspanset wraps MEOS C function tsequenceset_delete_tstzspanset. +func TsequencesetDeleteTstzspanset(ss *TSequenceSet, ps *SpanSet) *TSequenceSet { + _cret := C.tsequenceset_delete_tstzspanset(ss._inner, ps._inner) + return &TSequenceSet{_inner: _cret} +} + + +// TsequencesetInsert wraps MEOS C function tsequenceset_insert. +func TsequencesetInsert(ss1 *TSequenceSet, ss2 *TSequenceSet) *TSequenceSet { + _cret := C.tsequenceset_insert(ss1._inner, ss2._inner) + return &TSequenceSet{_inner: _cret} +} + + +// TsequencesetMerge wraps MEOS C function tsequenceset_merge. +func TsequencesetMerge(ss1 *TSequenceSet, ss2 *TSequenceSet) *TSequenceSet { + _cret := C.tsequenceset_merge(ss1._inner, ss2._inner) + return &TSequenceSet{_inner: _cret} +} + + +// TsequencesetMergeArray wraps MEOS C function tsequenceset_merge_array. +func TsequencesetMergeArray(seqsets unsafe.Pointer, count int) *TSequenceSet { + _cret := C.tsequenceset_merge_array((**C.TSequenceSet)(unsafe.Pointer(seqsets)), C.int(count)) + return &TSequenceSet{_inner: _cret} +} + + +// TsequenceExpandBbox wraps MEOS C function tsequence_expand_bbox. +func TsequenceExpandBbox(seq *TSequence, inst *TInstant) { + C.tsequence_expand_bbox(seq._inner, inst._inner) +} + + +// TsequenceSetBbox wraps MEOS C function tsequence_set_bbox. +func TsequenceSetBbox(seq *TSequence, box unsafe.Pointer) { + C.tsequence_set_bbox(seq._inner, unsafe.Pointer(box)) +} + + +// TsequencesetExpandBbox wraps MEOS C function tsequenceset_expand_bbox. +func TsequencesetExpandBbox(ss *TSequenceSet, seq *TSequence) { + C.tsequenceset_expand_bbox(ss._inner, seq._inner) +} + + +// TsequencesetSetBbox wraps MEOS C function tsequenceset_set_bbox. +func TsequencesetSetBbox(ss *TSequenceSet, box unsafe.Pointer) { + C.tsequenceset_set_bbox(ss._inner, unsafe.Pointer(box)) +} + + +// TcontseqAfterTimestamptz wraps MEOS C function tcontseq_after_timestamptz. +func TcontseqAfterTimestamptz(seq *TSequence, t int64, strict bool) *TSequence { + _cret := C.tcontseq_after_timestamptz(seq._inner, C.TimestampTz(t), C.bool(strict)) + return &TSequence{_inner: _cret} +} + + +// TcontseqBeforeTimestamptz wraps MEOS C function tcontseq_before_timestamptz. +func TcontseqBeforeTimestamptz(seq *TSequence, t int64, strict bool) *TSequence { + _cret := C.tcontseq_before_timestamptz(seq._inner, C.TimestampTz(t), C.bool(strict)) + return &TSequence{_inner: _cret} +} + + +// TcontseqRestrictMinmax wraps MEOS C function tcontseq_restrict_minmax. +func TcontseqRestrictMinmax(seq *TSequence, min bool, atfunc bool) *TSequenceSet { + _cret := C.tcontseq_restrict_minmax(seq._inner, C.bool(min), C.bool(atfunc)) + return &TSequenceSet{_inner: _cret} +} + + +// TdiscseqAfterTimestamptz wraps MEOS C function tdiscseq_after_timestamptz. +func TdiscseqAfterTimestamptz(seq *TSequence, t int64, strict bool) *TSequence { + _cret := C.tdiscseq_after_timestamptz(seq._inner, C.TimestampTz(t), C.bool(strict)) + return &TSequence{_inner: _cret} +} + + +// TdiscseqBeforeTimestamptz wraps MEOS C function tdiscseq_before_timestamptz. +func TdiscseqBeforeTimestamptz(seq *TSequence, t int64, strict bool) *TSequence { + _cret := C.tdiscseq_before_timestamptz(seq._inner, C.TimestampTz(t), C.bool(strict)) + return &TSequence{_inner: _cret} +} + + +// TdiscseqRestrictMinmax wraps MEOS C function tdiscseq_restrict_minmax. +func TdiscseqRestrictMinmax(seq *TSequence, min bool, atfunc bool) *TSequence { + _cret := C.tdiscseq_restrict_minmax(seq._inner, C.bool(min), C.bool(atfunc)) + return &TSequence{_inner: _cret} +} + + +// TemporalBboxRestrictSet wraps MEOS C function temporal_bbox_restrict_set. +func TemporalBboxRestrictSet(temp *Temporal, set *Set) bool { + _cret := C.temporal_bbox_restrict_set(temp._inner, set._inner) + return bool(_cret) +} + + +// TemporalRestrictMinmax wraps MEOS C function temporal_restrict_minmax. +func TemporalRestrictMinmax(temp *Temporal, min bool, atfunc bool) *Temporal { + _cret := C.temporal_restrict_minmax(temp._inner, C.bool(min), C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// TemporalRestrictTimestamptz wraps MEOS C function temporal_restrict_timestamptz. +func TemporalRestrictTimestamptz(temp *Temporal, t int64, atfunc bool) *Temporal { + _cret := C.temporal_restrict_timestamptz(temp._inner, C.TimestampTz(t), C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// TemporalRestrictTstzset wraps MEOS C function temporal_restrict_tstzset. +func TemporalRestrictTstzset(temp *Temporal, s *Set, atfunc bool) *Temporal { + _cret := C.temporal_restrict_tstzset(temp._inner, s._inner, C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// TemporalRestrictTstzspan wraps MEOS C function temporal_restrict_tstzspan. +func TemporalRestrictTstzspan(temp *Temporal, s *Span, atfunc bool) *Temporal { + _cret := C.temporal_restrict_tstzspan(temp._inner, s._inner, C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// TemporalRestrictTstzspanset wraps MEOS C function temporal_restrict_tstzspanset. +func TemporalRestrictTstzspanset(temp *Temporal, ss *SpanSet, atfunc bool) *Temporal { + _cret := C.temporal_restrict_tstzspanset(temp._inner, ss._inner, C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// TemporalRestrictValues wraps MEOS C function temporal_restrict_values. +func TemporalRestrictValues(temp *Temporal, set *Set, atfunc bool) *Temporal { + _cret := C.temporal_restrict_values(temp._inner, set._inner, C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// TinstantAfterTimestamptz wraps MEOS C function tinstant_after_timestamptz. +func TinstantAfterTimestamptz(inst *TInstant, t int64, strict bool) *TInstant { + _cret := C.tinstant_after_timestamptz(inst._inner, C.TimestampTz(t), C.bool(strict)) + return &TInstant{_inner: _cret} +} + + +// TinstantBeforeTimestamptz wraps MEOS C function tinstant_before_timestamptz. +func TinstantBeforeTimestamptz(inst *TInstant, t int64, strict bool) *TInstant { + _cret := C.tinstant_before_timestamptz(inst._inner, C.TimestampTz(t), C.bool(strict)) + return &TInstant{_inner: _cret} +} + + +// TinstantRestrictTstzspan wraps MEOS C function tinstant_restrict_tstzspan. +func TinstantRestrictTstzspan(inst *TInstant, period *Span, atfunc bool) *TInstant { + _cret := C.tinstant_restrict_tstzspan(inst._inner, period._inner, C.bool(atfunc)) + return &TInstant{_inner: _cret} +} + + +// TinstantRestrictTstzspanset wraps MEOS C function tinstant_restrict_tstzspanset. +func TinstantRestrictTstzspanset(inst *TInstant, ss *SpanSet, atfunc bool) *TInstant { + _cret := C.tinstant_restrict_tstzspanset(inst._inner, ss._inner, C.bool(atfunc)) + return &TInstant{_inner: _cret} +} + + +// TinstantRestrictTimestamptz wraps MEOS C function tinstant_restrict_timestamptz. +func TinstantRestrictTimestamptz(inst *TInstant, t int64, atfunc bool) *TInstant { + _cret := C.tinstant_restrict_timestamptz(inst._inner, C.TimestampTz(t), C.bool(atfunc)) + return &TInstant{_inner: _cret} +} + + +// TinstantRestrictTstzset wraps MEOS C function tinstant_restrict_tstzset. +func TinstantRestrictTstzset(inst *TInstant, s *Set, atfunc bool) *TInstant { + _cret := C.tinstant_restrict_tstzset(inst._inner, s._inner, C.bool(atfunc)) + return &TInstant{_inner: _cret} +} + + +// TinstantRestrictValues wraps MEOS C function tinstant_restrict_values. +func TinstantRestrictValues(inst *TInstant, set *Set, atfunc bool) *TInstant { + _cret := C.tinstant_restrict_values(inst._inner, set._inner, C.bool(atfunc)) + return &TInstant{_inner: _cret} +} + + +// TnumberRestrictSpan wraps MEOS C function tnumber_restrict_span. +func TnumberRestrictSpan(temp *Temporal, span *Span, atfunc bool) *Temporal { + _cret := C.tnumber_restrict_span(temp._inner, span._inner, C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// TnumberRestrictSpanset wraps MEOS C function tnumber_restrict_spanset. +func TnumberRestrictSpanset(temp *Temporal, ss *SpanSet, atfunc bool) *Temporal { + _cret := C.tnumber_restrict_spanset(temp._inner, ss._inner, C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// TnumberinstRestrictSpan wraps MEOS C function tnumberinst_restrict_span. +func TnumberinstRestrictSpan(inst *TInstant, span *Span, atfunc bool) *TInstant { + _cret := C.tnumberinst_restrict_span(inst._inner, span._inner, C.bool(atfunc)) + return &TInstant{_inner: _cret} +} + + +// TnumberinstRestrictSpanset wraps MEOS C function tnumberinst_restrict_spanset. +func TnumberinstRestrictSpanset(inst *TInstant, ss *SpanSet, atfunc bool) *TInstant { + _cret := C.tnumberinst_restrict_spanset(inst._inner, ss._inner, C.bool(atfunc)) + return &TInstant{_inner: _cret} +} + + +// TnumberseqsetRestrictSpan wraps MEOS C function tnumberseqset_restrict_span. +func TnumberseqsetRestrictSpan(ss *TSequenceSet, span *Span, atfunc bool) *TSequenceSet { + _cret := C.tnumberseqset_restrict_span(ss._inner, span._inner, C.bool(atfunc)) + return &TSequenceSet{_inner: _cret} +} + + +// TnumberseqsetRestrictSpanset wraps MEOS C function tnumberseqset_restrict_spanset. +func TnumberseqsetRestrictSpanset(ss *TSequenceSet, spanset *SpanSet, atfunc bool) *TSequenceSet { + _cret := C.tnumberseqset_restrict_spanset(ss._inner, spanset._inner, C.bool(atfunc)) + return &TSequenceSet{_inner: _cret} +} + + +// TsequenceAtTimestamptz wraps MEOS C function tsequence_at_timestamptz. +func TsequenceAtTimestamptz(seq *TSequence, t int64) *TInstant { + _cret := C.tsequence_at_timestamptz(seq._inner, C.TimestampTz(t)) + return &TInstant{_inner: _cret} +} + + +// TsequenceRestrictTstzspan wraps MEOS C function tsequence_restrict_tstzspan. +func TsequenceRestrictTstzspan(seq *TSequence, s *Span, atfunc bool) *Temporal { + _cret := C.tsequence_restrict_tstzspan(seq._inner, s._inner, C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// TsequenceRestrictTstzspanset wraps MEOS C function tsequence_restrict_tstzspanset. +func TsequenceRestrictTstzspanset(seq *TSequence, ss *SpanSet, atfunc bool) *Temporal { + _cret := C.tsequence_restrict_tstzspanset(seq._inner, ss._inner, C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// TsequencesetAfterTimestamptz wraps MEOS C function tsequenceset_after_timestamptz. +func TsequencesetAfterTimestamptz(ss *TSequenceSet, t int64, strict bool) *TSequenceSet { + _cret := C.tsequenceset_after_timestamptz(ss._inner, C.TimestampTz(t), C.bool(strict)) + return &TSequenceSet{_inner: _cret} +} + + +// TsequencesetBeforeTimestamptz wraps MEOS C function tsequenceset_before_timestamptz. +func TsequencesetBeforeTimestamptz(ss *TSequenceSet, t int64, strict bool) *TSequenceSet { + _cret := C.tsequenceset_before_timestamptz(ss._inner, C.TimestampTz(t), C.bool(strict)) + return &TSequenceSet{_inner: _cret} +} + + +// TsequencesetRestrictMinmax wraps MEOS C function tsequenceset_restrict_minmax. +func TsequencesetRestrictMinmax(ss *TSequenceSet, min bool, atfunc bool) *TSequenceSet { + _cret := C.tsequenceset_restrict_minmax(ss._inner, C.bool(min), C.bool(atfunc)) + return &TSequenceSet{_inner: _cret} +} + + +// TsequencesetRestrictTstzspan wraps MEOS C function tsequenceset_restrict_tstzspan. +func TsequencesetRestrictTstzspan(ss *TSequenceSet, s *Span, atfunc bool) *TSequenceSet { + _cret := C.tsequenceset_restrict_tstzspan(ss._inner, s._inner, C.bool(atfunc)) + return &TSequenceSet{_inner: _cret} +} + + +// TsequencesetRestrictTstzspanset wraps MEOS C function tsequenceset_restrict_tstzspanset. +func TsequencesetRestrictTstzspanset(ss *TSequenceSet, ps *SpanSet, atfunc bool) *TSequenceSet { + _cret := C.tsequenceset_restrict_tstzspanset(ss._inner, ps._inner, C.bool(atfunc)) + return &TSequenceSet{_inner: _cret} +} + + +// TsequencesetRestrictTimestamptz wraps MEOS C function tsequenceset_restrict_timestamptz. +func TsequencesetRestrictTimestamptz(ss *TSequenceSet, t int64, atfunc bool) *Temporal { + _cret := C.tsequenceset_restrict_timestamptz(ss._inner, C.TimestampTz(t), C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// TsequencesetRestrictTstzset wraps MEOS C function tsequenceset_restrict_tstzset. +func TsequencesetRestrictTstzset(ss *TSequenceSet, s *Set, atfunc bool) *Temporal { + _cret := C.tsequenceset_restrict_tstzset(ss._inner, s._inner, C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// TsequencesetRestrictValues wraps MEOS C function tsequenceset_restrict_values. +func TsequencesetRestrictValues(ss *TSequenceSet, s *Set, atfunc bool) *TSequenceSet { + _cret := C.tsequenceset_restrict_values(ss._inner, s._inner, C.bool(atfunc)) + return &TSequenceSet{_inner: _cret} +} + + +// TinstantCmp wraps MEOS C function tinstant_cmp. +func TinstantCmp(inst1 *TInstant, inst2 *TInstant) int { + _cret := C.tinstant_cmp(inst1._inner, inst2._inner) + return int(_cret) +} + + +// TinstantEq wraps MEOS C function tinstant_eq. +func TinstantEq(inst1 *TInstant, inst2 *TInstant) bool { + _cret := C.tinstant_eq(inst1._inner, inst2._inner) + return bool(_cret) +} + + +// TsequenceCmp wraps MEOS C function tsequence_cmp. +func TsequenceCmp(seq1 *TSequence, seq2 *TSequence) int { + _cret := C.tsequence_cmp(seq1._inner, seq2._inner) + return int(_cret) +} + + +// TsequenceEq wraps MEOS C function tsequence_eq. +func TsequenceEq(seq1 *TSequence, seq2 *TSequence) bool { + _cret := C.tsequence_eq(seq1._inner, seq2._inner) + return bool(_cret) +} + + +// TsequencesetCmp wraps MEOS C function tsequenceset_cmp. +func TsequencesetCmp(ss1 *TSequenceSet, ss2 *TSequenceSet) int { + _cret := C.tsequenceset_cmp(ss1._inner, ss2._inner) + return int(_cret) +} + + +// TsequencesetEq wraps MEOS C function tsequenceset_eq. +func TsequencesetEq(ss1 *TSequenceSet, ss2 *TSequenceSet) bool { + _cret := C.tsequenceset_eq(ss1._inner, ss2._inner) + return bool(_cret) +} + + +// TnumberinstAbs wraps MEOS C function tnumberinst_abs. +func TnumberinstAbs(inst *TInstant) *TInstant { + _cret := C.tnumberinst_abs(inst._inner) + return &TInstant{_inner: _cret} +} + + +// TnumberinstDistance wraps MEOS C function tnumberinst_distance. +func TnumberinstDistance(inst1 *TInstant, inst2 *TInstant) float64 { + _cret := C.tnumberinst_distance(inst1._inner, inst2._inner) + return float64(_cret) +} + + +// TnumberseqAbs wraps MEOS C function tnumberseq_abs. +func TnumberseqAbs(seq *TSequence) *TSequence { + _cret := C.tnumberseq_abs(seq._inner) + return &TSequence{_inner: _cret} +} + + +// TnumberseqAngularDifference wraps MEOS C function tnumberseq_angular_difference. +func TnumberseqAngularDifference(seq *TSequence) *TSequence { + _cret := C.tnumberseq_angular_difference(seq._inner) + return &TSequence{_inner: _cret} +} + + +// TnumberseqDeltaValue wraps MEOS C function tnumberseq_delta_value. +func TnumberseqDeltaValue(seq *TSequence) *TSequence { + _cret := C.tnumberseq_delta_value(seq._inner) + return &TSequence{_inner: _cret} +} + + +// TnumberseqsetAbs wraps MEOS C function tnumberseqset_abs. +func TnumberseqsetAbs(ss *TSequenceSet) *TSequenceSet { + _cret := C.tnumberseqset_abs(ss._inner) + return &TSequenceSet{_inner: _cret} +} + + +// TnumberseqsetAngularDifference wraps MEOS C function tnumberseqset_angular_difference. +func TnumberseqsetAngularDifference(ss *TSequenceSet) *TSequence { + _cret := C.tnumberseqset_angular_difference(ss._inner) + return &TSequence{_inner: _cret} +} + + +// TnumberseqsetDeltaValue wraps MEOS C function tnumberseqset_delta_value. +func TnumberseqsetDeltaValue(ss *TSequenceSet) *TSequenceSet { + _cret := C.tnumberseqset_delta_value(ss._inner) + return &TSequenceSet{_inner: _cret} +} + + +// NadTBOXTBOX wraps MEOS C function nad_tbox_tbox. +func NadTBOXTBOX(box1 *TBox, box2 *TBox) float64 { + _cret := C.nad_tbox_tbox(box1._inner, box2._inner) + return float64(_cret) +} + + +// NadTnumberTBOX wraps MEOS C function nad_tnumber_tbox. +func NadTnumberTBOX(temp *Temporal, box *TBox) float64 { + _cret := C.nad_tnumber_tbox(temp._inner, box._inner) + return float64(_cret) +} + + +// NadTnumberTnumber wraps MEOS C function nad_tnumber_tnumber. +func NadTnumberTnumber(temp1 *Temporal, temp2 *Temporal) float64 { + _cret := C.nad_tnumber_tnumber(temp1._inner, temp2._inner) + return float64(_cret) +} + + +// TnumberseqIntegral wraps MEOS C function tnumberseq_integral. +func TnumberseqIntegral(seq *TSequence) float64 { + _cret := C.tnumberseq_integral(seq._inner) + return float64(_cret) +} + + +// TnumberseqTwavg wraps MEOS C function tnumberseq_twavg. +func TnumberseqTwavg(seq *TSequence) float64 { + _cret := C.tnumberseq_twavg(seq._inner) + return float64(_cret) +} + + +// TnumberseqsetIntegral wraps MEOS C function tnumberseqset_integral. +func TnumberseqsetIntegral(ss *TSequenceSet) float64 { + _cret := C.tnumberseqset_integral(ss._inner) + return float64(_cret) +} + + +// TnumberseqsetTwavg wraps MEOS C function tnumberseqset_twavg. +func TnumberseqsetTwavg(ss *TSequenceSet) float64 { + _cret := C.tnumberseqset_twavg(ss._inner) + return float64(_cret) +} + + +// TemporalCompact wraps MEOS C function temporal_compact. +func TemporalCompact(temp *Temporal) *Temporal { + _cret := C.temporal_compact(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TsequenceCompact wraps MEOS C function tsequence_compact. +func TsequenceCompact(seq *TSequence) *TSequence { + _cret := C.tsequence_compact(seq._inner) + return &TSequence{_inner: _cret} +} + + +// TsequencesetCompact wraps MEOS C function tsequenceset_compact. +func TsequencesetCompact(ss *TSequenceSet) *TSequenceSet { + _cret := C.tsequenceset_compact(ss._inner) + return &TSequenceSet{_inner: _cret} +} + + +// TemporalSkiplistMake wraps MEOS C function temporal_skiplist_make. +func TemporalSkiplistMake() *SkipList { + _cret := C.temporal_skiplist_make() + return &SkipList{_inner: _cret} +} + + +// SkiplistMake wraps MEOS C function skiplist_make. +func SkiplistMake(key_size uint, value_size uint, comp_fn unsafe.Pointer, merge_fn unsafe.Pointer) *SkipList { + _cret := C.skiplist_make(C.size_t(key_size), C.size_t(value_size), (*[0]byte)(comp_fn), (*[0]byte)(merge_fn)) + return &SkipList{_inner: _cret} +} + + +// SkiplistSearch wraps MEOS C function skiplist_search. +func SkiplistSearch(list *SkipList, key unsafe.Pointer, value unsafe.Pointer) int { + _cret := C.skiplist_search(list._inner, unsafe.Pointer(key), unsafe.Pointer(value)) + return int(_cret) +} + + +// SkiplistFree wraps MEOS C function skiplist_free. +func SkiplistFree(list *SkipList) { + C.skiplist_free(list._inner) +} + + +// SkiplistSplice wraps MEOS C function skiplist_splice. +func SkiplistSplice(list *SkipList, keys unsafe.Pointer, values unsafe.Pointer, count int, func_ unsafe.Pointer, crossings bool, sktype SkipListType) { + C.skiplist_splice(list._inner, (*unsafe.Pointer)(unsafe.Pointer(keys)), (*unsafe.Pointer)(unsafe.Pointer(values)), C.int(count), (*[0]byte)(func_), C.bool(crossings), C.SkipListType(sktype)) +} + + +// TemporalSkiplistSplice wraps MEOS C function temporal_skiplist_splice. +func TemporalSkiplistSplice(list *SkipList, values unsafe.Pointer, count int, func_ unsafe.Pointer, crossings bool) { + C.temporal_skiplist_splice(list._inner, (*unsafe.Pointer)(unsafe.Pointer(values)), C.int(count), (*[0]byte)(func_), C.bool(crossings)) +} + + +// SkiplistValues wraps MEOS C function skiplist_values. +func SkiplistValues(list *SkipList) unsafe.Pointer { + _cret := C.skiplist_values(list._inner) + return unsafe.Pointer(_cret) +} + + +// SkiplistKeysValues wraps MEOS C function skiplist_keys_values. +func SkiplistKeysValues(list *SkipList, values unsafe.Pointer) unsafe.Pointer { + _cret := C.skiplist_keys_values(list._inner, (*unsafe.Pointer)(unsafe.Pointer(values))) + return unsafe.Pointer(_cret) +} + + +// TemporalAppTinstTransfn wraps MEOS C function temporal_app_tinst_transfn. +func TemporalAppTinstTransfn(state *Temporal, inst *TInstant, interp Interpolation, maxdist float64, maxt *Interval) *Temporal { + _cret := C.temporal_app_tinst_transfn(state._inner, inst._inner, C.interpType(interp), C.double(maxdist), maxt._inner) + return &Temporal{_inner: _cret} +} + + +// TemporalAppTseqTransfn wraps MEOS C function temporal_app_tseq_transfn. +func TemporalAppTseqTransfn(state *Temporal, seq *TSequence) *Temporal { + _cret := C.temporal_app_tseq_transfn(state._inner, seq._inner) + return &Temporal{_inner: _cret} +} + diff --git a/functions/meos_meos_internal_geo.go b/functions/meos_meos_internal_geo.go new file mode 100644 index 0000000..9da2ee7 --- /dev/null +++ b/functions/meos_meos_internal_geo.go @@ -0,0 +1,612 @@ +package functions + +/* +#include +#include "meos.h" +#include "meos_catalog.h" +#include "meos_geo.h" +#include "meos_internal.h" +#include "meos_internal_geo.h" +#include "meos_npoint.h" +#include "meos_cbuffer.h" +#include "meos_pose.h" +#include "meos_rgeo.h" +#include "meos_h3.h" +#include "meos_quadbin.h" +#include "meos_json.h" +#include "meos_pointcloud.h" +#include "meos_arrow.h" + +// cgo reads C.union_* as a union TYPE; alias the union operators so C.g resolves them as functions. +#define gunion_bigint_set union_bigint_set +#define gunion_bigint_span union_bigint_span +#define gunion_bigint_spanset union_bigint_spanset +#define gunion_cbuffer_set union_cbuffer_set +#define gunion_date_set union_date_set +#define gunion_date_span union_date_span +#define gunion_date_spanset union_date_spanset +#define gunion_float_set union_float_set +#define gunion_float_span union_float_span +#define gunion_float_spanset union_float_spanset +#define gunion_geo_set union_geo_set +#define gunion_int_set union_int_set +#define gunion_int_span union_int_span +#define gunion_int_spanset union_int_spanset +#define gunion_jsonb_set union_jsonb_set +#define gunion_npoint_set union_npoint_set +#define gunion_pcpatch_set union_pcpatch_set +#define gunion_pcpoint_set union_pcpoint_set +#define gunion_pose_set union_pose_set +#define gunion_set_bigint union_set_bigint +#define gunion_set_cbuffer union_set_cbuffer +#define gunion_set_date union_set_date +#define gunion_set_float union_set_float +#define gunion_set_geo union_set_geo +#define gunion_set_int union_set_int +#define gunion_set_jsonb union_set_jsonb +#define gunion_set_npoint union_set_npoint +#define gunion_set_pcpatch union_set_pcpatch +#define gunion_set_pcpoint union_set_pcpoint +#define gunion_set_pose union_set_pose +#define gunion_set_set union_set_set +#define gunion_set_text union_set_text +#define gunion_set_timestamptz union_set_timestamptz +#define gunion_set_value union_set_value +#define gunion_span_bigint union_span_bigint +#define gunion_span_date union_span_date +#define gunion_span_float union_span_float +#define gunion_span_int union_span_int +#define gunion_span_span union_span_span +#define gunion_span_spanset union_span_spanset +#define gunion_span_timestamptz union_span_timestamptz +#define gunion_span_value union_span_value +#define gunion_spanset_bigint union_spanset_bigint +#define gunion_spanset_date union_spanset_date +#define gunion_spanset_float union_spanset_float +#define gunion_spanset_int union_spanset_int +#define gunion_spanset_span union_spanset_span +#define gunion_spanset_spanset union_spanset_spanset +#define gunion_spanset_timestamptz union_spanset_timestamptz +#define gunion_spanset_value union_spanset_value +#define gunion_stbox_stbox union_stbox_stbox +#define gunion_tbox_tbox union_tbox_tbox +#define gunion_text_set union_text_set +#define gunion_timestamptz_set union_timestamptz_set +#define gunion_timestamptz_span union_timestamptz_span +#define gunion_timestamptz_spanset union_timestamptz_spanset +#define gunion_tpcbox_tpcbox union_tpcbox_tpcbox +#define gunion_value_set union_value_set +#define gunion_value_span union_value_span +#define gunion_value_spanset union_value_spanset +*/ +import "C" +import ( + "unsafe" +) + +var _ = unsafe.Pointer(nil) + +// ProjGetContext wraps MEOS C function proj_get_context. +func ProjGetContext() *PJContext { + _cret := C.proj_get_context() + return &PJContext{_inner: _cret} +} + + +// PointRound wraps MEOS C function point_round. +func PointRound(gs *Geom, maxdd int) *Geom { + _cret := C.point_round(gs._inner, C.int(maxdd)) + return &Geom{_inner: _cret} +} + + +// STBOXSet wraps MEOS C function stbox_set. +func STBOXSet(hasx bool, hasz bool, geodetic bool, srid int32, xmin float64, xmax float64, ymin float64, ymax float64, zmin float64, zmax float64, s *Span) *STBox { + var _out_result C.STBox + C.stbox_set(C.bool(hasx), C.bool(hasz), C.bool(geodetic), C.int32(srid), C.double(xmin), C.double(xmax), C.double(ymin), C.double(ymax), C.double(zmin), C.double(zmax), s._inner, &_out_result) + return &STBox{_inner: &_out_result} +} + + +// GboxSetSTBOX wraps MEOS C function gbox_set_stbox. +func GboxSetSTBOX(box *GBox, srid int32) *STBox { + var _out_result C.STBox + C.gbox_set_stbox(box._inner, C.int32_t(srid), &_out_result) + return &STBox{_inner: &_out_result} +} + + +// GeoSetSTBOX wraps MEOS C function geo_set_stbox. +func GeoSetSTBOX(gs *Geom) (bool, *STBox) { + var _out_result C.STBox + _cret := C.geo_set_stbox(gs._inner, &_out_result) + return bool(_cret), &STBox{_inner: &_out_result} +} + + +// SpatialsetSetSTBOX wraps MEOS C function spatialset_set_stbox. +func SpatialsetSetSTBOX(set *Set) *STBox { + var _out_result C.STBox + C.spatialset_set_stbox(set._inner, &_out_result) + return &STBox{_inner: &_out_result} +} + + +// STBOXSetBox3d wraps MEOS C function stbox_set_box3d. +func STBOXSetBox3d(box *STBox) *Box3D { + var _out_result C.BOX3D + C.stbox_set_box3d(box._inner, &_out_result) + return &Box3D{_inner: &_out_result} +} + + +// STBOXSetGbox wraps MEOS C function stbox_set_gbox. +func STBOXSetGbox(box *STBox) *GBox { + var _out_result C.GBOX + C.stbox_set_gbox(box._inner, &_out_result) + return &GBox{_inner: &_out_result} +} + + +// TstzsetSetSTBOX wraps MEOS C function tstzset_set_stbox. +func TstzsetSetSTBOX(s *Set) *STBox { + var _out_result C.STBox + C.tstzset_set_stbox(s._inner, &_out_result) + return &STBox{_inner: &_out_result} +} + + +// TstzspanSetSTBOX wraps MEOS C function tstzspan_set_stbox. +func TstzspanSetSTBOX(s *Span) *STBox { + var _out_result C.STBox + C.tstzspan_set_stbox(s._inner, &_out_result) + return &STBox{_inner: &_out_result} +} + + +// TstzspansetSetSTBOX wraps MEOS C function tstzspanset_set_stbox. +func TstzspansetSetSTBOX(s *SpanSet) *STBox { + var _out_result C.STBox + C.tstzspanset_set_stbox(s._inner, &_out_result) + return &STBox{_inner: &_out_result} +} + + +// STBOXExpand wraps MEOS C function stbox_expand. +func STBOXExpand(box1 *STBox, box2 *STBox) { + C.stbox_expand(box1._inner, box2._inner) +} + + +// InterSTBOXSTBOX wraps MEOS C function inter_stbox_stbox. +func InterSTBOXSTBOX(box1 *STBox, box2 *STBox) (bool, *STBox) { + var _out_result C.STBox + _cret := C.inter_stbox_stbox(box1._inner, box2._inner, &_out_result) + return bool(_cret), &STBox{_inner: &_out_result} +} + + +// STBOXGeo wraps MEOS C function stbox_geo. +func STBOXGeo(box *STBox) *Geom { + _cret := C.stbox_geo(box._inner) + return &Geom{_inner: _cret} +} + + +// TgeogpointinstIn wraps MEOS C function tgeogpointinst_in. +func TgeogpointinstIn(str string) *TInstant { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tgeogpointinst_in(_c_str) + return &TInstant{_inner: _cret} +} + + +// TgeogpointseqIn wraps MEOS C function tgeogpointseq_in. +func TgeogpointseqIn(str string, interp Interpolation) *TSequence { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tgeogpointseq_in(_c_str, C.interpType(interp)) + return &TSequence{_inner: _cret} +} + + +// TgeogpointseqsetIn wraps MEOS C function tgeogpointseqset_in. +func TgeogpointseqsetIn(str string) *TSequenceSet { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tgeogpointseqset_in(_c_str) + return &TSequenceSet{_inner: _cret} +} + + +// TgeompointinstIn wraps MEOS C function tgeompointinst_in. +func TgeompointinstIn(str string) *TInstant { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tgeompointinst_in(_c_str) + return &TInstant{_inner: _cret} +} + + +// TgeompointseqIn wraps MEOS C function tgeompointseq_in. +func TgeompointseqIn(str string, interp Interpolation) *TSequence { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tgeompointseq_in(_c_str, C.interpType(interp)) + return &TSequence{_inner: _cret} +} + + +// TgeompointseqsetIn wraps MEOS C function tgeompointseqset_in. +func TgeompointseqsetIn(str string) *TSequenceSet { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tgeompointseqset_in(_c_str) + return &TSequenceSet{_inner: _cret} +} + + +// TgeographyinstIn wraps MEOS C function tgeographyinst_in. +func TgeographyinstIn(str string) *TInstant { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tgeographyinst_in(_c_str) + return &TInstant{_inner: _cret} +} + + +// TgeographyseqIn wraps MEOS C function tgeographyseq_in. +func TgeographyseqIn(str string, interp Interpolation) *TSequence { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tgeographyseq_in(_c_str, C.interpType(interp)) + return &TSequence{_inner: _cret} +} + + +// TgeographyseqsetIn wraps MEOS C function tgeographyseqset_in. +func TgeographyseqsetIn(str string) *TSequenceSet { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tgeographyseqset_in(_c_str) + return &TSequenceSet{_inner: _cret} +} + + +// TgeometryinstIn wraps MEOS C function tgeometryinst_in. +func TgeometryinstIn(str string) *TInstant { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tgeometryinst_in(_c_str) + return &TInstant{_inner: _cret} +} + + +// TgeometryseqIn wraps MEOS C function tgeometryseq_in. +func TgeometryseqIn(str string, interp Interpolation) *TSequence { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tgeometryseq_in(_c_str, C.interpType(interp)) + return &TSequence{_inner: _cret} +} + + +// TgeometryseqsetIn wraps MEOS C function tgeometryseqset_in. +func TgeometryseqsetIn(str string) *TSequenceSet { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tgeometryseqset_in(_c_str) + return &TSequenceSet{_inner: _cret} +} + + +// TspatialSetSTBOX wraps MEOS C function tspatial_set_stbox. +func TspatialSetSTBOX(temp *Temporal) *STBox { + var _out_result C.STBox + C.tspatial_set_stbox(temp._inner, &_out_result) + return &STBox{_inner: &_out_result} +} + + +// TgeoinstSetSTBOX wraps MEOS C function tgeoinst_set_stbox. +func TgeoinstSetSTBOX(inst *TInstant, box *STBox) { + C.tgeoinst_set_stbox(inst._inner, box._inner) +} + + +// TspatialseqSetSTBOX wraps MEOS C function tspatialseq_set_stbox. +func TspatialseqSetSTBOX(seq *TSequence, box *STBox) { + C.tspatialseq_set_stbox(seq._inner, box._inner) +} + + +// TspatialseqsetSetSTBOX wraps MEOS C function tspatialseqset_set_stbox. +func TspatialseqsetSetSTBOX(ss *TSequenceSet, box *STBox) { + C.tspatialseqset_set_stbox(ss._inner, box._inner) +} + + +// TgeoRestrictElevation wraps MEOS C function tgeo_restrict_elevation. +func TgeoRestrictElevation(temp *Temporal, s *Span, atfunc bool) *Temporal { + _cret := C.tgeo_restrict_elevation(temp._inner, s._inner, C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// TgeoRestrictGeom wraps MEOS C function tgeo_restrict_geom. +func TgeoRestrictGeom(temp *Temporal, gs *Geom, atfunc bool) *Temporal { + _cret := C.tgeo_restrict_geom(temp._inner, gs._inner, C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// TgeoRestrictSTBOX wraps MEOS C function tgeo_restrict_stbox. +func TgeoRestrictSTBOX(temp *Temporal, box *STBox, border_inc bool, atfunc bool) *Temporal { + _cret := C.tgeo_restrict_stbox(temp._inner, box._inner, C.bool(border_inc), C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// TgeoinstRestrictGeom wraps MEOS C function tgeoinst_restrict_geom. +func TgeoinstRestrictGeom(inst *TInstant, gs *Geom, atfunc bool) *TInstant { + _cret := C.tgeoinst_restrict_geom(inst._inner, gs._inner, C.bool(atfunc)) + return &TInstant{_inner: _cret} +} + + +// TgeoinstRestrictSTBOX wraps MEOS C function tgeoinst_restrict_stbox. +func TgeoinstRestrictSTBOX(inst *TInstant, box *STBox, border_inc bool, atfunc bool) *TInstant { + _cret := C.tgeoinst_restrict_stbox(inst._inner, box._inner, C.bool(border_inc), C.bool(atfunc)) + return &TInstant{_inner: _cret} +} + + +// TgeoseqRestrictGeom wraps MEOS C function tgeoseq_restrict_geom. +func TgeoseqRestrictGeom(seq *TSequence, gs *Geom, atfunc bool) *Temporal { + _cret := C.tgeoseq_restrict_geom(seq._inner, gs._inner, C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// TgeoseqRestrictSTBOX wraps MEOS C function tgeoseq_restrict_stbox. +func TgeoseqRestrictSTBOX(seq *TSequence, box *STBox, border_inc bool, atfunc bool) *Temporal { + _cret := C.tgeoseq_restrict_stbox(seq._inner, box._inner, C.bool(border_inc), C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// TgeoseqsetRestrictGeom wraps MEOS C function tgeoseqset_restrict_geom. +func TgeoseqsetRestrictGeom(ss *TSequenceSet, gs *Geom, atfunc bool) *TSequenceSet { + _cret := C.tgeoseqset_restrict_geom(ss._inner, gs._inner, C.bool(atfunc)) + return &TSequenceSet{_inner: _cret} +} + + +// TgeoseqsetRestrictSTBOX wraps MEOS C function tgeoseqset_restrict_stbox. +func TgeoseqsetRestrictSTBOX(ss *TSequenceSet, box *STBox, border_inc bool, atfunc bool) *TSequenceSet { + _cret := C.tgeoseqset_restrict_stbox(ss._inner, box._inner, C.bool(border_inc), C.bool(atfunc)) + return &TSequenceSet{_inner: _cret} +} + + +// TpointLinearInterGeom wraps MEOS C function tpoint_linear_inter_geom. +func TpointLinearInterGeom(temp *Temporal, gs *Geom, clip bool) *Temporal { + _cret := C.tpoint_linear_inter_geom(temp._inner, gs._inner, C.bool(clip)) + return &Temporal{_inner: _cret} +} + + +// TpointLinearDwithinGeom wraps MEOS C function tpoint_linear_dwithin_geom. +func TpointLinearDwithinGeom(temp *Temporal, gs *Geom, dist float64) *Temporal { + _cret := C.tpoint_linear_dwithin_geom(temp._inner, gs._inner, C.double(dist)) + return &Temporal{_inner: _cret} +} + + +// TpointLinearDistanceGeom wraps MEOS C function tpoint_linear_distance_geom. +func TpointLinearDistanceGeom(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tpoint_linear_distance_geom(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TpointLinearRestrictGeom wraps MEOS C function tpoint_linear_restrict_geom. +func TpointLinearRestrictGeom(temp *Temporal, gs *Geom, atfunc bool) *Temporal { + _cret := C.tpoint_linear_restrict_geom(temp._inner, gs._inner, C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// GeomClipSupported wraps MEOS C function geom_clip_supported. +func GeomClipSupported(geom unsafe.Pointer) bool { + _cret := C.geom_clip_supported((*C.LWGEOM)(unsafe.Pointer(geom))) + return bool(_cret) +} + + +// TspatialinstSRID wraps MEOS C function tspatialinst_srid. +func TspatialinstSRID(inst *TInstant) int { + _cret := C.tspatialinst_srid(inst._inner) + return int(_cret) +} + + +// TpointseqAzimuth wraps MEOS C function tpointseq_azimuth. +func TpointseqAzimuth(seq *TSequence) *TSequenceSet { + _cret := C.tpointseq_azimuth(seq._inner) + return &TSequenceSet{_inner: _cret} +} + + +// TpointseqCumulativeLength wraps MEOS C function tpointseq_cumulative_length. +func TpointseqCumulativeLength(seq *TSequence, prevlength float64) *TSequence { + _cret := C.tpointseq_cumulative_length(seq._inner, C.double(prevlength)) + return &TSequence{_inner: _cret} +} + + +// TpointseqIsSimple wraps MEOS C function tpointseq_is_simple. +func TpointseqIsSimple(seq *TSequence) bool { + _cret := C.tpointseq_is_simple(seq._inner) + return bool(_cret) +} + + +// TpointseqLength wraps MEOS C function tpointseq_length. +func TpointseqLength(seq *TSequence) float64 { + _cret := C.tpointseq_length(seq._inner) + return float64(_cret) +} + + +// TpointseqLinearTrajectory wraps MEOS C function tpointseq_linear_trajectory. +func TpointseqLinearTrajectory(seq *TSequence, unary_union bool) *Geom { + _cret := C.tpointseq_linear_trajectory(seq._inner, C.bool(unary_union)) + return &Geom{_inner: _cret} +} + + +// TgeoseqStboxes wraps MEOS C function tgeoseq_stboxes. +func TgeoseqStboxes(seq *TSequence, count unsafe.Pointer) *STBox { + _cret := C.tgeoseq_stboxes(seq._inner, (*C.int)(unsafe.Pointer(count))) + return &STBox{_inner: _cret} +} + + +// TgeoseqSplitNStboxes wraps MEOS C function tgeoseq_split_n_stboxes. +func TgeoseqSplitNStboxes(seq *TSequence, max_count int, count unsafe.Pointer) *STBox { + _cret := C.tgeoseq_split_n_stboxes(seq._inner, C.int(max_count), (*C.int)(unsafe.Pointer(count))) + return &STBox{_inner: _cret} +} + + +// TpointseqsetAzimuth wraps MEOS C function tpointseqset_azimuth. +func TpointseqsetAzimuth(ss *TSequenceSet) *TSequenceSet { + _cret := C.tpointseqset_azimuth(ss._inner) + return &TSequenceSet{_inner: _cret} +} + + +// TpointseqsetCumulativeLength wraps MEOS C function tpointseqset_cumulative_length. +func TpointseqsetCumulativeLength(ss *TSequenceSet) *TSequenceSet { + _cret := C.tpointseqset_cumulative_length(ss._inner) + return &TSequenceSet{_inner: _cret} +} + + +// TpointseqsetIsSimple wraps MEOS C function tpointseqset_is_simple. +func TpointseqsetIsSimple(ss *TSequenceSet) bool { + _cret := C.tpointseqset_is_simple(ss._inner) + return bool(_cret) +} + + +// TpointseqsetLength wraps MEOS C function tpointseqset_length. +func TpointseqsetLength(ss *TSequenceSet) float64 { + _cret := C.tpointseqset_length(ss._inner) + return float64(_cret) +} + + +// TgeoseqsetStboxes wraps MEOS C function tgeoseqset_stboxes. +func TgeoseqsetStboxes(ss *TSequenceSet, count unsafe.Pointer) *STBox { + _cret := C.tgeoseqset_stboxes(ss._inner, (*C.int)(unsafe.Pointer(count))) + return &STBox{_inner: _cret} +} + + +// TgeoseqsetSplitNStboxes wraps MEOS C function tgeoseqset_split_n_stboxes. +func TgeoseqsetSplitNStboxes(ss *TSequenceSet, max_count int, count unsafe.Pointer) *STBox { + _cret := C.tgeoseqset_split_n_stboxes(ss._inner, C.int(max_count), (*C.int)(unsafe.Pointer(count))) + return &STBox{_inner: _cret} +} + + +// TpointGetCoord wraps MEOS C function tpoint_get_coord. +func TpointGetCoord(temp *Temporal, coord int) *Temporal { + _cret := C.tpoint_get_coord(temp._inner, C.int(coord)) + return &Temporal{_inner: _cret} +} + + +// TgeominstTgeoginst wraps MEOS C function tgeominst_tgeoginst. +func TgeominstTgeoginst(inst *TInstant, oper bool) *TInstant { + _cret := C.tgeominst_tgeoginst(inst._inner, C.bool(oper)) + return &TInstant{_inner: _cret} +} + + +// TgeomseqTgeogseq wraps MEOS C function tgeomseq_tgeogseq. +func TgeomseqTgeogseq(seq *TSequence, oper bool) *TSequence { + _cret := C.tgeomseq_tgeogseq(seq._inner, C.bool(oper)) + return &TSequence{_inner: _cret} +} + + +// TgeomseqsetTgeogseqset wraps MEOS C function tgeomseqset_tgeogseqset. +func TgeomseqsetTgeogseqset(ss *TSequenceSet, oper bool) *TSequenceSet { + _cret := C.tgeomseqset_tgeogseqset(ss._inner, C.bool(oper)) + return &TSequenceSet{_inner: _cret} +} + + +// TgeomTgeog wraps MEOS C function tgeom_tgeog. +func TgeomTgeog(temp *Temporal, oper bool) *Temporal { + _cret := C.tgeom_tgeog(temp._inner, C.bool(oper)) + return &Temporal{_inner: _cret} +} + + +// TgeoTpoint wraps MEOS C function tgeo_tpoint. +func TgeoTpoint(temp *Temporal, oper bool) *Temporal { + _cret := C.tgeo_tpoint(temp._inner, C.bool(oper)) + return &Temporal{_inner: _cret} +} + + +// TspatialinstSetSRID wraps MEOS C function tspatialinst_set_srid. +func TspatialinstSetSRID(inst *TInstant, srid int32) { + C.tspatialinst_set_srid(inst._inner, C.int32_t(srid)) +} + + +// TpointseqMakeSimple wraps MEOS C function tpointseq_make_simple. +func TpointseqMakeSimple(seq *TSequence, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tpointseq_make_simple(seq._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TspatialseqSetSRID wraps MEOS C function tspatialseq_set_srid. +func TspatialseqSetSRID(seq *TSequence, srid int32) { + C.tspatialseq_set_srid(seq._inner, C.int32_t(srid)) +} + + +// TpointseqsetMakeSimple wraps MEOS C function tpointseqset_make_simple. +func TpointseqsetMakeSimple(ss *TSequenceSet, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tpointseqset_make_simple(ss._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TspatialseqsetSetSRID wraps MEOS C function tspatialseqset_set_srid. +func TspatialseqsetSetSRID(ss *TSequenceSet, srid int32) { + C.tspatialseqset_set_srid(ss._inner, C.int32_t(srid)) +} + + +// TpointseqTwcentroid wraps MEOS C function tpointseq_twcentroid. +func TpointseqTwcentroid(seq *TSequence) *Geom { + _cret := C.tpointseq_twcentroid(seq._inner) + return &Geom{_inner: _cret} +} + + +// TpointseqsetTwcentroid wraps MEOS C function tpointseqset_twcentroid. +func TpointseqsetTwcentroid(ss *TSequenceSet) *Geom { + _cret := C.tpointseqset_twcentroid(ss._inner) + return &Geom{_inner: _cret} +} + diff --git a/functions/meos_meos_json.go b/functions/meos_meos_json.go new file mode 100644 index 0000000..51a041f --- /dev/null +++ b/functions/meos_meos_json.go @@ -0,0 +1,1469 @@ +package functions + +/* +#include +#include "meos.h" +#include "meos_catalog.h" +#include "meos_geo.h" +#include "meos_internal.h" +#include "meos_internal_geo.h" +#include "meos_npoint.h" +#include "meos_cbuffer.h" +#include "meos_pose.h" +#include "meos_rgeo.h" +#include "meos_h3.h" +#include "meos_quadbin.h" +#include "meos_json.h" +#include "meos_pointcloud.h" +#include "meos_arrow.h" + +// cgo reads C.union_* as a union TYPE; alias the union operators so C.g resolves them as functions. +#define gunion_bigint_set union_bigint_set +#define gunion_bigint_span union_bigint_span +#define gunion_bigint_spanset union_bigint_spanset +#define gunion_cbuffer_set union_cbuffer_set +#define gunion_date_set union_date_set +#define gunion_date_span union_date_span +#define gunion_date_spanset union_date_spanset +#define gunion_float_set union_float_set +#define gunion_float_span union_float_span +#define gunion_float_spanset union_float_spanset +#define gunion_geo_set union_geo_set +#define gunion_int_set union_int_set +#define gunion_int_span union_int_span +#define gunion_int_spanset union_int_spanset +#define gunion_jsonb_set union_jsonb_set +#define gunion_npoint_set union_npoint_set +#define gunion_pcpatch_set union_pcpatch_set +#define gunion_pcpoint_set union_pcpoint_set +#define gunion_pose_set union_pose_set +#define gunion_set_bigint union_set_bigint +#define gunion_set_cbuffer union_set_cbuffer +#define gunion_set_date union_set_date +#define gunion_set_float union_set_float +#define gunion_set_geo union_set_geo +#define gunion_set_int union_set_int +#define gunion_set_jsonb union_set_jsonb +#define gunion_set_npoint union_set_npoint +#define gunion_set_pcpatch union_set_pcpatch +#define gunion_set_pcpoint union_set_pcpoint +#define gunion_set_pose union_set_pose +#define gunion_set_set union_set_set +#define gunion_set_text union_set_text +#define gunion_set_timestamptz union_set_timestamptz +#define gunion_set_value union_set_value +#define gunion_span_bigint union_span_bigint +#define gunion_span_date union_span_date +#define gunion_span_float union_span_float +#define gunion_span_int union_span_int +#define gunion_span_span union_span_span +#define gunion_span_spanset union_span_spanset +#define gunion_span_timestamptz union_span_timestamptz +#define gunion_span_value union_span_value +#define gunion_spanset_bigint union_spanset_bigint +#define gunion_spanset_date union_spanset_date +#define gunion_spanset_float union_spanset_float +#define gunion_spanset_int union_spanset_int +#define gunion_spanset_span union_spanset_span +#define gunion_spanset_spanset union_spanset_spanset +#define gunion_spanset_timestamptz union_spanset_timestamptz +#define gunion_spanset_value union_spanset_value +#define gunion_stbox_stbox union_stbox_stbox +#define gunion_tbox_tbox union_tbox_tbox +#define gunion_text_set union_text_set +#define gunion_timestamptz_set union_timestamptz_set +#define gunion_timestamptz_span union_timestamptz_span +#define gunion_timestamptz_spanset union_timestamptz_spanset +#define gunion_tpcbox_tpcbox union_tpcbox_tpcbox +#define gunion_value_set union_value_set +#define gunion_value_span union_value_span +#define gunion_value_spanset union_value_spanset +*/ +import "C" +import ( + "unsafe" +) + +var _ = unsafe.Pointer(nil) + +// JSONIn wraps MEOS C function json_in. +func JSONIn(str string) string { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.json_in(_c_str) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// JSONOut wraps MEOS C function json_out. +func JSONOut(js string) string { + _c_js := C.cstring_to_text(C.CString(js)) + defer C.free(unsafe.Pointer(_c_js)) + _cret := C.json_out(_c_js) + return C.GoString(_cret) +} + + +// JsonbFromText wraps MEOS C function jsonb_from_text. +func JsonbFromText(txt string, unique_keys bool) *Jsonb { + _c_txt := C.cstring_to_text(C.CString(txt)) + defer C.free(unsafe.Pointer(_c_txt)) + _cret := C.jsonb_from_text(_c_txt, C.bool(unique_keys)) + return &Jsonb{_inner: _cret} +} + + +// JsonbIn wraps MEOS C function jsonb_in. +func JsonbIn(str string) *Jsonb { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.jsonb_in(_c_str) + return &Jsonb{_inner: _cret} +} + + +// JsonbOut wraps MEOS C function jsonb_out. +func JsonbOut(jb *Jsonb) string { + _cret := C.jsonb_out(jb._inner) + return C.GoString(_cret) +} + + +// JSONMake wraps MEOS C function json_make. +func JSONMake(keys_vals unsafe.Pointer, count int) string { + _cret := C.json_make((**C.text)(unsafe.Pointer(keys_vals)), C.int(count)) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// JSONMakeTwoArg wraps MEOS C function json_make_two_arg. +func JSONMakeTwoArg(keys unsafe.Pointer, values unsafe.Pointer, count int) string { + _cret := C.json_make_two_arg((**C.text)(unsafe.Pointer(keys)), (**C.text)(unsafe.Pointer(values)), C.int(count)) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// JsonbCopy wraps MEOS C function jsonb_copy. +func JsonbCopy(jb *Jsonb) *Jsonb { + _cret := C.jsonb_copy(jb._inner) + return &Jsonb{_inner: _cret} +} + + +// JsonbMake wraps MEOS C function jsonb_make. +func JsonbMake(keys_vals unsafe.Pointer, count int) *Jsonb { + _cret := C.jsonb_make((**C.text)(unsafe.Pointer(keys_vals)), C.int(count)) + return &Jsonb{_inner: _cret} +} + + +// JsonbMakeTwoArg wraps MEOS C function jsonb_make_two_arg. +func JsonbMakeTwoArg(keys unsafe.Pointer, values unsafe.Pointer, count int) *Jsonb { + _cret := C.jsonb_make_two_arg((**C.text)(unsafe.Pointer(keys)), (**C.text)(unsafe.Pointer(values)), C.int(count)) + return &Jsonb{_inner: _cret} +} + + +// JsonbToBool wraps MEOS C function jsonb_to_bool. +func JsonbToBool(jb *Jsonb) bool { + _cret := C.jsonb_to_bool(jb._inner) + return bool(_cret) +} + + +// JsonbToCstring wraps MEOS C function jsonb_to_cstring. +func JsonbToCstring(jb *Jsonb) string { + _cret := C.jsonb_to_cstring(jb._inner) + return C.GoString(_cret) +} + + +// TODO jsonb_to_float4: unsupported return type float4 +// func JsonbToFloat4(...) { /* not yet handled by codegen */ } + + +// TODO jsonb_to_float8: unsupported return type float8 +// func JsonbToFloat8(...) { /* not yet handled by codegen */ } + + +// JsonbToInt16 wraps MEOS C function jsonb_to_int16. +func JsonbToInt16(jb *Jsonb) int16 { + _cret := C.jsonb_to_int16(jb._inner) + return int16(_cret) +} + + +// JsonbToInt32 wraps MEOS C function jsonb_to_int32. +func JsonbToInt32(jb *Jsonb) int32 { + _cret := C.jsonb_to_int32(jb._inner) + return int32(_cret) +} + + +// JsonbToInt64 wraps MEOS C function jsonb_to_int64. +func JsonbToInt64(jb *Jsonb) int64 { + _cret := C.jsonb_to_int64(jb._inner) + return int64(_cret) +} + + +// TODO jsonb_to_numeric: unsupported return type Numeric +// func JsonbToNumeric(...) { /* not yet handled by codegen */ } + + +// JsonbToText wraps MEOS C function jsonb_to_text. +func JsonbToText(jb *Jsonb) string { + _cret := C.jsonb_to_text(jb._inner) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// JSONArrayElement wraps MEOS C function json_array_element. +func JSONArrayElement(js string, element int) string { + _c_js := C.cstring_to_text(C.CString(js)) + defer C.free(unsafe.Pointer(_c_js)) + _cret := C.json_array_element(_c_js, C.int(element)) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// JSONArrayElementText wraps MEOS C function json_array_element_text. +func JSONArrayElementText(js string, element int) string { + _c_js := C.cstring_to_text(C.CString(js)) + defer C.free(unsafe.Pointer(_c_js)) + _cret := C.json_array_element_text(_c_js, C.int(element)) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// JSONArrayElements wraps MEOS C function json_array_elements. +func JSONArrayElements(js string, count unsafe.Pointer) unsafe.Pointer { + _c_js := C.cstring_to_text(C.CString(js)) + defer C.free(unsafe.Pointer(_c_js)) + _cret := C.json_array_elements(_c_js, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// JSONArrayElementsText wraps MEOS C function json_array_elements_text. +func JSONArrayElementsText(js string, count unsafe.Pointer) unsafe.Pointer { + _c_js := C.cstring_to_text(C.CString(js)) + defer C.free(unsafe.Pointer(_c_js)) + _cret := C.json_array_elements_text(_c_js, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// JSONArrayLength wraps MEOS C function json_array_length. +func JSONArrayLength(js string) int { + _c_js := C.cstring_to_text(C.CString(js)) + defer C.free(unsafe.Pointer(_c_js)) + _cret := C.json_array_length(_c_js) + return int(_cret) +} + + +// JSONEach wraps MEOS C function json_each. +func JSONEach(js string, values unsafe.Pointer, count unsafe.Pointer) unsafe.Pointer { + _c_js := C.cstring_to_text(C.CString(js)) + defer C.free(unsafe.Pointer(_c_js)) + _cret := C.json_each(_c_js, (**C.text)(unsafe.Pointer(values)), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// JSONEachText wraps MEOS C function json_each_text. +func JSONEachText(js string, values unsafe.Pointer, count unsafe.Pointer) unsafe.Pointer { + _c_js := C.cstring_to_text(C.CString(js)) + defer C.free(unsafe.Pointer(_c_js)) + _cret := C.json_each_text(_c_js, (**C.text)(unsafe.Pointer(values)), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// JSONExtractPath wraps MEOS C function json_extract_path. +func JSONExtractPath(js string, path_elems unsafe.Pointer, path_len int) string { + _c_js := C.cstring_to_text(C.CString(js)) + defer C.free(unsafe.Pointer(_c_js)) + _cret := C.json_extract_path(_c_js, (**C.text)(unsafe.Pointer(path_elems)), C.int(path_len)) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// JSONExtractPathText wraps MEOS C function json_extract_path_text. +func JSONExtractPathText(js string, path_elems unsafe.Pointer, path_len int) string { + _c_js := C.cstring_to_text(C.CString(js)) + defer C.free(unsafe.Pointer(_c_js)) + _cret := C.json_extract_path_text(_c_js, (**C.text)(unsafe.Pointer(path_elems)), C.int(path_len)) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// JSONObjectField wraps MEOS C function json_object_field. +func JSONObjectField(js string, key string) string { + _c_js := C.cstring_to_text(C.CString(js)) + defer C.free(unsafe.Pointer(_c_js)) + _c_key := C.cstring_to_text(C.CString(key)) + defer C.free(unsafe.Pointer(_c_key)) + _cret := C.json_object_field(_c_js, _c_key) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// JSONObjectFieldText wraps MEOS C function json_object_field_text. +func JSONObjectFieldText(js string, key string) string { + _c_js := C.cstring_to_text(C.CString(js)) + defer C.free(unsafe.Pointer(_c_js)) + _c_key := C.cstring_to_text(C.CString(key)) + defer C.free(unsafe.Pointer(_c_key)) + _cret := C.json_object_field_text(_c_js, _c_key) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// JSONObjectKeys wraps MEOS C function json_object_keys. +func JSONObjectKeys(js string, count unsafe.Pointer) unsafe.Pointer { + _c_js := C.cstring_to_text(C.CString(js)) + defer C.free(unsafe.Pointer(_c_js)) + _cret := C.json_object_keys(_c_js, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// JSONTypeof wraps MEOS C function json_typeof. +func JSONTypeof(js string) string { + _c_js := C.cstring_to_text(C.CString(js)) + defer C.free(unsafe.Pointer(_c_js)) + _cret := C.json_typeof(_c_js) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// JsonbArrayElement wraps MEOS C function jsonb_array_element. +func JsonbArrayElement(jb *Jsonb, element int) *Jsonb { + _cret := C.jsonb_array_element(jb._inner, C.int(element)) + return &Jsonb{_inner: _cret} +} + + +// JsonbArrayElementText wraps MEOS C function jsonb_array_element_text. +func JsonbArrayElementText(jb *Jsonb, element int) string { + _cret := C.jsonb_array_element_text(jb._inner, C.int(element)) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// JsonbArrayElements wraps MEOS C function jsonb_array_elements. +func JsonbArrayElements(jb *Jsonb, count unsafe.Pointer) unsafe.Pointer { + _cret := C.jsonb_array_elements(jb._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// JsonbArrayElementsText wraps MEOS C function jsonb_array_elements_text. +func JsonbArrayElementsText(jb *Jsonb, count unsafe.Pointer) unsafe.Pointer { + _cret := C.jsonb_array_elements_text(jb._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// JsonbArrayLength wraps MEOS C function jsonb_array_length. +func JsonbArrayLength(jb *Jsonb) int { + _cret := C.jsonb_array_length(jb._inner) + return int(_cret) +} + + +// JsonbContained wraps MEOS C function jsonb_contained. +func JsonbContained(jb1 *Jsonb, jb2 *Jsonb) bool { + _cret := C.jsonb_contained(jb1._inner, jb2._inner) + return bool(_cret) +} + + +// JsonbContains wraps MEOS C function jsonb_contains. +func JsonbContains(jb1 *Jsonb, jb2 *Jsonb) bool { + _cret := C.jsonb_contains(jb1._inner, jb2._inner) + return bool(_cret) +} + + +// JsonbEach wraps MEOS C function jsonb_each. +func JsonbEach(jb *Jsonb, values unsafe.Pointer, count unsafe.Pointer) unsafe.Pointer { + _cret := C.jsonb_each(jb._inner, (**C.Jsonb)(unsafe.Pointer(values)), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// JsonbEachText wraps MEOS C function jsonb_each_text. +func JsonbEachText(jb *Jsonb, values unsafe.Pointer, count unsafe.Pointer) unsafe.Pointer { + _cret := C.jsonb_each_text(jb._inner, (**C.text)(unsafe.Pointer(values)), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// JsonbExists wraps MEOS C function jsonb_exists. +func JsonbExists(jb *Jsonb, key string) bool { + _c_key := C.cstring_to_text(C.CString(key)) + defer C.free(unsafe.Pointer(_c_key)) + _cret := C.jsonb_exists(jb._inner, _c_key) + return bool(_cret) +} + + +// JsonbExistsArray wraps MEOS C function jsonb_exists_array. +func JsonbExistsArray(jb *Jsonb, keys_elems unsafe.Pointer, keys_len int, any bool) bool { + _cret := C.jsonb_exists_array(jb._inner, (**C.text)(unsafe.Pointer(keys_elems)), C.int(keys_len), C.bool(any)) + return bool(_cret) +} + + +// JsonbExtractPath wraps MEOS C function jsonb_extract_path. +func JsonbExtractPath(jb *Jsonb, path_elems unsafe.Pointer, path_len int) *Jsonb { + _cret := C.jsonb_extract_path(jb._inner, (**C.text)(unsafe.Pointer(path_elems)), C.int(path_len)) + return &Jsonb{_inner: _cret} +} + + +// JsonbExtractPathText wraps MEOS C function jsonb_extract_path_text. +func JsonbExtractPathText(jb *Jsonb, path_elems unsafe.Pointer, path_len int) string { + _cret := C.jsonb_extract_path_text(jb._inner, (**C.text)(unsafe.Pointer(path_elems)), C.int(path_len)) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// JsonbHash wraps MEOS C function jsonb_hash. +func JsonbHash(jb *Jsonb) uint32 { + _cret := C.jsonb_hash(jb._inner) + return uint32(_cret) +} + + +// JsonbHashExtended wraps MEOS C function jsonb_hash_extended. +func JsonbHashExtended(jb *Jsonb, seed uint64) uint64 { + _cret := C.jsonb_hash_extended(jb._inner, C.uint64_t(seed)) + return uint64(_cret) +} + + +// JsonbObjectField wraps MEOS C function jsonb_object_field. +func JsonbObjectField(jb *Jsonb, key string) *Jsonb { + _c_key := C.cstring_to_text(C.CString(key)) + defer C.free(unsafe.Pointer(_c_key)) + _cret := C.jsonb_object_field(jb._inner, _c_key) + return &Jsonb{_inner: _cret} +} + + +// JsonbObjectFieldText wraps MEOS C function jsonb_object_field_text. +func JsonbObjectFieldText(jb *Jsonb, key string) string { + _c_key := C.cstring_to_text(C.CString(key)) + defer C.free(unsafe.Pointer(_c_key)) + _cret := C.jsonb_object_field_text(jb._inner, _c_key) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// JsonbObjectKeys wraps MEOS C function jsonb_object_keys. +func JsonbObjectKeys(jb *Jsonb, count unsafe.Pointer) unsafe.Pointer { + _cret := C.jsonb_object_keys(jb._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// JSONStripNulls wraps MEOS C function json_strip_nulls. +func JSONStripNulls(js string, strip_in_arrays bool) string { + _c_js := C.cstring_to_text(C.CString(js)) + defer C.free(unsafe.Pointer(_c_js)) + _cret := C.json_strip_nulls(_c_js, C.bool(strip_in_arrays)) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// JsonbConcat wraps MEOS C function jsonb_concat. +func JsonbConcat(jb1 *Jsonb, jb2 *Jsonb) *Jsonb { + _cret := C.jsonb_concat(jb1._inner, jb2._inner) + return &Jsonb{_inner: _cret} +} + + +// JsonbDelete wraps MEOS C function jsonb_delete. +func JsonbDelete(jb *Jsonb, key string) *Jsonb { + _c_key := C.cstring_to_text(C.CString(key)) + defer C.free(unsafe.Pointer(_c_key)) + _cret := C.jsonb_delete(jb._inner, _c_key) + return &Jsonb{_inner: _cret} +} + + +// JsonbDeleteArray wraps MEOS C function jsonb_delete_array. +func JsonbDeleteArray(jb *Jsonb, keys_elems unsafe.Pointer, keys_len int) *Jsonb { + _cret := C.jsonb_delete_array(jb._inner, (**C.text)(unsafe.Pointer(keys_elems)), C.int(keys_len)) + return &Jsonb{_inner: _cret} +} + + +// JsonbDeleteIndex wraps MEOS C function jsonb_delete_index. +func JsonbDeleteIndex(jb *Jsonb, idx int) *Jsonb { + _cret := C.jsonb_delete_index(jb._inner, C.int(idx)) + return &Jsonb{_inner: _cret} +} + + +// JsonbDeletePath wraps MEOS C function jsonb_delete_path. +func JsonbDeletePath(jb *Jsonb, path_elems unsafe.Pointer, path_len int) *Jsonb { + _cret := C.jsonb_delete_path(jb._inner, (**C.text)(unsafe.Pointer(path_elems)), C.int(path_len)) + return &Jsonb{_inner: _cret} +} + + +// JsonbInsert wraps MEOS C function jsonb_insert. +func JsonbInsert(jb *Jsonb, path_elems unsafe.Pointer, path_len int, newjb *Jsonb, after bool) *Jsonb { + _cret := C.jsonb_insert(jb._inner, (**C.text)(unsafe.Pointer(path_elems)), C.int(path_len), newjb._inner, C.bool(after)) + return &Jsonb{_inner: _cret} +} + + +// JsonbPretty wraps MEOS C function jsonb_pretty. +func JsonbPretty(jb *Jsonb) string { + _cret := C.jsonb_pretty(jb._inner) + return C.GoString(C.text_to_cstring(_cret)) +} + + +// JsonbSet wraps MEOS C function jsonb_set. +func JsonbSet(jb *Jsonb, path_elems unsafe.Pointer, path_len int, newjb *Jsonb, create bool) *Jsonb { + _cret := C.jsonb_set(jb._inner, (**C.text)(unsafe.Pointer(path_elems)), C.int(path_len), newjb._inner, C.bool(create)) + return &Jsonb{_inner: _cret} +} + + +// JsonbSetLax wraps MEOS C function jsonb_set_lax. +func JsonbSetLax(jb *Jsonb, path_elems unsafe.Pointer, path_len int, newjb *Jsonb, create bool, handle_null string) *Jsonb { + _c_handle_null := C.cstring_to_text(C.CString(handle_null)) + defer C.free(unsafe.Pointer(_c_handle_null)) + _cret := C.jsonb_set_lax(jb._inner, (**C.text)(unsafe.Pointer(path_elems)), C.int(path_len), newjb._inner, C.bool(create), _c_handle_null) + return &Jsonb{_inner: _cret} +} + + +// JsonbStripNulls wraps MEOS C function jsonb_strip_nulls. +func JsonbStripNulls(jb *Jsonb, strip_in_arrays bool) *Jsonb { + _cret := C.jsonb_strip_nulls(jb._inner, C.bool(strip_in_arrays)) + return &Jsonb{_inner: _cret} +} + + +// JsonbCmp wraps MEOS C function jsonb_cmp. +func JsonbCmp(jb1 *Jsonb, jb2 *Jsonb) int { + _cret := C.jsonb_cmp(jb1._inner, jb2._inner) + return int(_cret) +} + + +// JsonbEq wraps MEOS C function jsonb_eq. +func JsonbEq(jb1 *Jsonb, jb2 *Jsonb) bool { + _cret := C.jsonb_eq(jb1._inner, jb2._inner) + return bool(_cret) +} + + +// JsonbGe wraps MEOS C function jsonb_ge. +func JsonbGe(jb1 *Jsonb, jb2 *Jsonb) bool { + _cret := C.jsonb_ge(jb1._inner, jb2._inner) + return bool(_cret) +} + + +// JsonbGt wraps MEOS C function jsonb_gt. +func JsonbGt(jb1 *Jsonb, jb2 *Jsonb) bool { + _cret := C.jsonb_gt(jb1._inner, jb2._inner) + return bool(_cret) +} + + +// JsonbLe wraps MEOS C function jsonb_le. +func JsonbLe(jb1 *Jsonb, jb2 *Jsonb) bool { + _cret := C.jsonb_le(jb1._inner, jb2._inner) + return bool(_cret) +} + + +// JsonbLt wraps MEOS C function jsonb_lt. +func JsonbLt(jb1 *Jsonb, jb2 *Jsonb) bool { + _cret := C.jsonb_lt(jb1._inner, jb2._inner) + return bool(_cret) +} + + +// JsonbNe wraps MEOS C function jsonb_ne. +func JsonbNe(jb1 *Jsonb, jb2 *Jsonb) bool { + _cret := C.jsonb_ne(jb1._inner, jb2._inner) + return bool(_cret) +} + + +// JsonbPathExists wraps MEOS C function jsonb_path_exists. +func JsonbPathExists(jb *Jsonb, jp *JsonPath, vars *Jsonb, silent bool, tz bool) int { + _cret := C.jsonb_path_exists(jb._inner, jp._inner, vars._inner, C.bool(silent), C.bool(tz)) + return int(_cret) +} + + +// JsonbPathMatch wraps MEOS C function jsonb_path_match. +func JsonbPathMatch(jb *Jsonb, jp *JsonPath, vars *Jsonb, silent bool, tz bool) bool { + _cret := C.jsonb_path_match(jb._inner, jp._inner, vars._inner, C.bool(silent), C.bool(tz)) + return bool(_cret) +} + + +// JsonbPathQueryAll wraps MEOS C function jsonb_path_query_all. +func JsonbPathQueryAll(jb *Jsonb, jp *JsonPath, vars *Jsonb, silent bool, tz bool, count unsafe.Pointer) unsafe.Pointer { + _cret := C.jsonb_path_query_all(jb._inner, jp._inner, vars._inner, C.bool(silent), C.bool(tz), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// JsonbPathQueryArray wraps MEOS C function jsonb_path_query_array. +func JsonbPathQueryArray(jb *Jsonb, jp *JsonPath, vars *Jsonb, silent bool, tz bool) *Jsonb { + _cret := C.jsonb_path_query_array(jb._inner, jp._inner, vars._inner, C.bool(silent), C.bool(tz)) + return &Jsonb{_inner: _cret} +} + + +// JsonbPathQueryFirst wraps MEOS C function jsonb_path_query_first. +func JsonbPathQueryFirst(jb *Jsonb, jp *JsonPath, vars *Jsonb, silent bool, tz bool) *Jsonb { + _cret := C.jsonb_path_query_first(jb._inner, jp._inner, vars._inner, C.bool(silent), C.bool(tz)) + return &Jsonb{_inner: _cret} +} + + +// JsonpathIn wraps MEOS C function jsonpath_in. +func JsonpathIn(str string) *JsonPath { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.jsonpath_in(_c_str) + return &JsonPath{_inner: _cret} +} + + +// JsonpathCopy wraps MEOS C function jsonpath_copy. +func JsonpathCopy(jp *JsonPath) *JsonPath { + _cret := C.jsonpath_copy(jp._inner) + return &JsonPath{_inner: _cret} +} + + +// JsonpathOut wraps MEOS C function jsonpath_out. +func JsonpathOut(jp *JsonPath) string { + _cret := C.jsonpath_out(jp._inner) + return C.GoString(_cret) +} + + +// JsonbsetIn wraps MEOS C function jsonbset_in. +func JsonbsetIn(str string) *Set { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.jsonbset_in(_c_str) + return &Set{_inner: _cret} +} + + +// JsonbsetOut wraps MEOS C function jsonbset_out. +func JsonbsetOut(s *Set, maxdd int) string { + _cret := C.jsonbset_out(s._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// JsonbsetMake wraps MEOS C function jsonbset_make. +func JsonbsetMake(values unsafe.Pointer, count int) *Set { + _cret := C.jsonbset_make((**C.Jsonb)(unsafe.Pointer(values)), C.int(count)) + return &Set{_inner: _cret} +} + + +// JsonbToSet wraps MEOS C function jsonb_to_set. +func JsonbToSet(jb *Jsonb) *Set { + _cret := C.jsonb_to_set(jb._inner) + return &Set{_inner: _cret} +} + + +// JsonbsetEndValue wraps MEOS C function jsonbset_end_value. +func JsonbsetEndValue(s *Set) *Jsonb { + _cret := C.jsonbset_end_value(s._inner) + return &Jsonb{_inner: _cret} +} + + +// JsonbsetStartValue wraps MEOS C function jsonbset_start_value. +func JsonbsetStartValue(s *Set) *Jsonb { + _cret := C.jsonbset_start_value(s._inner) + return &Jsonb{_inner: _cret} +} + + +// JsonbsetValueN wraps MEOS C function jsonbset_value_n. +func JsonbsetValueN(s *Set, n int) (bool, *Jsonb) { + var _out_result *C.Jsonb + _cret := C.jsonbset_value_n(s._inner, C.int(n), &_out_result) + return bool(_cret), &Jsonb{_inner: _out_result} +} + + +// JsonbsetValues wraps MEOS C function jsonbset_values. +func JsonbsetValues(s *Set, count unsafe.Pointer) unsafe.Pointer { + _cret := C.jsonbset_values(s._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// ConcatJsonbsetJsonb wraps MEOS C function concat_jsonbset_jsonb. +func ConcatJsonbsetJsonb(s *Set, jb *Jsonb, invert bool) *Set { + _cret := C.concat_jsonbset_jsonb(s._inner, jb._inner, C.bool(invert)) + return &Set{_inner: _cret} +} + + +// JsonbsetArrayLength wraps MEOS C function jsonbset_array_length. +func JsonbsetArrayLength(set *Set) *Set { + _cret := C.jsonbset_array_length(set._inner) + return &Set{_inner: _cret} +} + + +// JsonbsetObjectField wraps MEOS C function jsonbset_object_field. +func JsonbsetObjectField(set *Set, key string, astext bool, null_handle NullHandleType) *Set { + _c_key := C.cstring_to_text(C.CString(key)) + defer C.free(unsafe.Pointer(_c_key)) + _cret := C.jsonbset_object_field(set._inner, _c_key, C.bool(astext), C.nullHandleType(null_handle)) + return &Set{_inner: _cret} +} + + +// JsonbsetArrayElement wraps MEOS C function jsonbset_array_element. +func JsonbsetArrayElement(set *Set, idx int, astext bool, null_handle NullHandleType) *Set { + _cret := C.jsonbset_array_element(set._inner, C.int(idx), C.bool(astext), C.nullHandleType(null_handle)) + return &Set{_inner: _cret} +} + + +// JsonbsetDeleteIndex wraps MEOS C function jsonbset_delete_index. +func JsonbsetDeleteIndex(set *Set, idx int) *Set { + _cret := C.jsonbset_delete_index(set._inner, C.int(idx)) + return &Set{_inner: _cret} +} + + +// JsonbsetDelete wraps MEOS C function jsonbset_delete. +func JsonbsetDelete(set *Set, key string) *Set { + _c_key := C.cstring_to_text(C.CString(key)) + defer C.free(unsafe.Pointer(_c_key)) + _cret := C.jsonbset_delete(set._inner, _c_key) + return &Set{_inner: _cret} +} + + +// JsonbsetDeleteArray wraps MEOS C function jsonbset_delete_array. +func JsonbsetDeleteArray(set *Set, keys unsafe.Pointer, count int) *Set { + _cret := C.jsonbset_delete_array(set._inner, (**C.text)(unsafe.Pointer(keys)), C.int(count)) + return &Set{_inner: _cret} +} + + +// JsonbsetExists wraps MEOS C function jsonbset_exists. +func JsonbsetExists(set *Set, key string) *Set { + _c_key := C.cstring_to_text(C.CString(key)) + defer C.free(unsafe.Pointer(_c_key)) + _cret := C.jsonbset_exists(set._inner, _c_key) + return &Set{_inner: _cret} +} + + +// JsonbsetExistsArray wraps MEOS C function jsonbset_exists_array. +func JsonbsetExistsArray(set *Set, keys unsafe.Pointer, count int, any bool) *Set { + _cret := C.jsonbset_exists_array(set._inner, (**C.text)(unsafe.Pointer(keys)), C.int(count), C.bool(any)) + return &Set{_inner: _cret} +} + + +// JsonbsetSet wraps MEOS C function jsonbset_set. +func JsonbsetSet(set *Set, keys unsafe.Pointer, count int, newjb *Jsonb, create bool, null_handle string, lax bool) *Set { + _c_null_handle := C.cstring_to_text(C.CString(null_handle)) + defer C.free(unsafe.Pointer(_c_null_handle)) + _cret := C.jsonbset_set(set._inner, (**C.text)(unsafe.Pointer(keys)), C.int(count), newjb._inner, C.bool(create), _c_null_handle, C.bool(lax)) + return &Set{_inner: _cret} +} + + +// JsonbsetToAlphanumset wraps MEOS C function jsonbset_to_alphanumset. +func JsonbsetToAlphanumset(set *Set, key string, settype MeosType, null_handle NullHandleType) *Set { + _c_key := C.CString(key) + defer C.free(unsafe.Pointer(_c_key)) + _cret := C.jsonbset_to_alphanumset(set._inner, _c_key, C.MeosType(settype), C.nullHandleType(null_handle)) + return &Set{_inner: _cret} +} + + +// JsonbsetToIntset wraps MEOS C function jsonbset_to_intset. +func JsonbsetToIntset(set *Set, key string, null_handle NullHandleType) *Set { + _c_key := C.CString(key) + defer C.free(unsafe.Pointer(_c_key)) + _cret := C.jsonbset_to_intset(set._inner, _c_key, C.nullHandleType(null_handle)) + return &Set{_inner: _cret} +} + + +// JsonbsetToFloatset wraps MEOS C function jsonbset_to_floatset. +func JsonbsetToFloatset(set *Set, key string, null_handle NullHandleType) *Set { + _c_key := C.CString(key) + defer C.free(unsafe.Pointer(_c_key)) + _cret := C.jsonbset_to_floatset(set._inner, _c_key, C.nullHandleType(null_handle)) + return &Set{_inner: _cret} +} + + +// JsonbsetToTextsetKey wraps MEOS C function jsonbset_to_textset_key. +func JsonbsetToTextsetKey(set *Set, key string, null_handle NullHandleType) *Set { + _c_key := C.CString(key) + defer C.free(unsafe.Pointer(_c_key)) + _cret := C.jsonbset_to_textset_key(set._inner, _c_key, C.nullHandleType(null_handle)) + return &Set{_inner: _cret} +} + + +// JsonbsetStripNulls wraps MEOS C function jsonbset_strip_nulls. +func JsonbsetStripNulls(set *Set, strip_in_arrays bool) *Set { + _cret := C.jsonbset_strip_nulls(set._inner, C.bool(strip_in_arrays)) + return &Set{_inner: _cret} +} + + +// JsonbsetPretty wraps MEOS C function jsonbset_pretty. +func JsonbsetPretty(set *Set) *Set { + _cret := C.jsonbset_pretty(set._inner) + return &Set{_inner: _cret} +} + + +// JsonbsetDeletePath wraps MEOS C function jsonbset_delete_path. +func JsonbsetDeletePath(set *Set, path_elems unsafe.Pointer, path_len int) *Set { + _cret := C.jsonbset_delete_path(set._inner, (**C.text)(unsafe.Pointer(path_elems)), C.int(path_len)) + return &Set{_inner: _cret} +} + + +// JsonbsetExtractPath wraps MEOS C function jsonbset_extract_path. +func JsonbsetExtractPath(set *Set, path_elems unsafe.Pointer, path_len int, astext bool, null_handle NullHandleType) *Set { + _cret := C.jsonbset_extract_path(set._inner, (**C.text)(unsafe.Pointer(path_elems)), C.int(path_len), C.bool(astext), C.nullHandleType(null_handle)) + return &Set{_inner: _cret} +} + + +// JsonbsetInsert wraps MEOS C function jsonbset_insert. +func JsonbsetInsert(set *Set, path_elems unsafe.Pointer, path_len int, newjb *Jsonb, after bool) *Set { + _cret := C.jsonbset_insert(set._inner, (**C.text)(unsafe.Pointer(path_elems)), C.int(path_len), newjb._inner, C.bool(after)) + return &Set{_inner: _cret} +} + + +// JsonbsetPathExists wraps MEOS C function jsonbset_path_exists. +func JsonbsetPathExists(set *Set, jp *JsonPath, vars *Jsonb, silent bool, tz bool) *Set { + _cret := C.jsonbset_path_exists(set._inner, jp._inner, vars._inner, C.bool(silent), C.bool(tz)) + return &Set{_inner: _cret} +} + + +// JsonbsetPathMatch wraps MEOS C function jsonbset_path_match. +func JsonbsetPathMatch(set *Set, jp *JsonPath, vars *Jsonb, silent bool, tz bool) *Set { + _cret := C.jsonbset_path_match(set._inner, jp._inner, vars._inner, C.bool(silent), C.bool(tz)) + return &Set{_inner: _cret} +} + + +// JsonbsetPathQueryArray wraps MEOS C function jsonbset_path_query_array. +func JsonbsetPathQueryArray(set *Set, jp *JsonPath, vars *Jsonb, silent bool, tz bool) *Set { + _cret := C.jsonbset_path_query_array(set._inner, jp._inner, vars._inner, C.bool(silent), C.bool(tz)) + return &Set{_inner: _cret} +} + + +// JsonbsetPathQueryFirst wraps MEOS C function jsonbset_path_query_first. +func JsonbsetPathQueryFirst(set *Set, jp *JsonPath, vars *Jsonb, silent bool, tz bool) *Set { + _cret := C.jsonbset_path_query_first(set._inner, jp._inner, vars._inner, C.bool(silent), C.bool(tz)) + return &Set{_inner: _cret} +} + + +// ContainedJsonbSet wraps MEOS C function contained_jsonb_set. +func ContainedJsonbSet(jb *Jsonb, s *Set) bool { + _cret := C.contained_jsonb_set(jb._inner, s._inner) + return bool(_cret) +} + + +// ContainsSetJsonb wraps MEOS C function contains_set_jsonb. +func ContainsSetJsonb(s *Set, jb *Jsonb) bool { + _cret := C.contains_set_jsonb(s._inner, jb._inner) + return bool(_cret) +} + + +// IntersectionJsonbSet wraps MEOS C function intersection_jsonb_set. +func IntersectionJsonbSet(jb *Jsonb, s *Set) *Set { + _cret := C.intersection_jsonb_set(jb._inner, s._inner) + return &Set{_inner: _cret} +} + + +// IntersectionSetJsonb wraps MEOS C function intersection_set_jsonb. +func IntersectionSetJsonb(s *Set, jb *Jsonb) *Set { + _cret := C.intersection_set_jsonb(s._inner, jb._inner) + return &Set{_inner: _cret} +} + + +// JsonbUnionTransfn wraps MEOS C function jsonb_union_transfn. +func JsonbUnionTransfn(state *Set, jb *Jsonb) *Set { + _cret := C.jsonb_union_transfn(state._inner, jb._inner) + return &Set{_inner: _cret} +} + + +// MinusJsonbSet wraps MEOS C function minus_jsonb_set. +func MinusJsonbSet(jb *Jsonb, s *Set) *Set { + _cret := C.minus_jsonb_set(jb._inner, s._inner) + return &Set{_inner: _cret} +} + + +// MinusSetJsonb wraps MEOS C function minus_set_jsonb. +func MinusSetJsonb(s *Set, jb *Jsonb) *Set { + _cret := C.minus_set_jsonb(s._inner, jb._inner) + return &Set{_inner: _cret} +} + + +// UnionJsonbSet wraps MEOS C function union_jsonb_set. +func UnionJsonbSet(jb *Jsonb, s *Set) *Set { + _cret := C.gunion_jsonb_set(jb._inner, s._inner) + return &Set{_inner: _cret} +} + + +// UnionSetJsonb wraps MEOS C function union_set_jsonb. +func UnionSetJsonb(s *Set, jb *Jsonb) *Set { + _cret := C.gunion_set_jsonb(s._inner, jb._inner) + return &Set{_inner: _cret} +} + + +// TjsonbFromMFJSON wraps MEOS C function tjsonb_from_mfjson. +func TjsonbFromMFJSON(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tjsonb_from_mfjson(_c_str) + return &Temporal{_inner: _cret} +} + + +// TjsonbIn wraps MEOS C function tjsonb_in. +func TjsonbIn(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tjsonb_in(_c_str) + return &Temporal{_inner: _cret} +} + + +// TjsonbOut wraps MEOS C function tjsonb_out. +func TjsonbOut(temp *Temporal) string { + _cret := C.tjsonb_out(temp._inner) + return C.GoString(_cret) +} + + +// TjsonbinstIn wraps MEOS C function tjsonbinst_in. +func TjsonbinstIn(str string) *TInstant { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tjsonbinst_in(_c_str) + return &TInstant{_inner: _cret} +} + + +// TjsonbseqIn wraps MEOS C function tjsonbseq_in. +func TjsonbseqIn(str string, interp Interpolation) *TSequence { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tjsonbseq_in(_c_str, C.interpType(interp)) + return &TSequence{_inner: _cret} +} + + +// TjsonbseqsetIn wraps MEOS C function tjsonbseqset_in. +func TjsonbseqsetIn(str string) *TSequenceSet { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tjsonbseqset_in(_c_str) + return &TSequenceSet{_inner: _cret} +} + + +// TjsonbFromBaseTemp wraps MEOS C function tjsonb_from_base_temp. +func TjsonbFromBaseTemp(jsonb *Jsonb, temp *Temporal) *Temporal { + _cret := C.tjsonb_from_base_temp(jsonb._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TjsonbinstMake wraps MEOS C function tjsonbinst_make. +func TjsonbinstMake(jsonb *Jsonb, t int64) *TInstant { + _cret := C.tjsonbinst_make(jsonb._inner, C.TimestampTz(t)) + return &TInstant{_inner: _cret} +} + + +// TjsonbseqFromBaseTstzset wraps MEOS C function tjsonbseq_from_base_tstzset. +func TjsonbseqFromBaseTstzset(jsonb *Jsonb, s *Set) *TSequence { + _cret := C.tjsonbseq_from_base_tstzset(jsonb._inner, s._inner) + return &TSequence{_inner: _cret} +} + + +// TjsonbseqFromBaseTstzspan wraps MEOS C function tjsonbseq_from_base_tstzspan. +func TjsonbseqFromBaseTstzspan(jsonb *Jsonb, sp *Span) *TSequence { + _cret := C.tjsonbseq_from_base_tstzspan(jsonb._inner, sp._inner) + return &TSequence{_inner: _cret} +} + + +// TjsonbseqsetFromBaseTstzspanset wraps MEOS C function tjsonbseqset_from_base_tstzspanset. +func TjsonbseqsetFromBaseTstzspanset(jsonb *Jsonb, ss *SpanSet) *TSequenceSet { + _cret := C.tjsonbseqset_from_base_tstzspanset(jsonb._inner, ss._inner) + return &TSequenceSet{_inner: _cret} +} + + +// TjsonbToTtext wraps MEOS C function tjsonb_to_ttext. +func TjsonbToTtext(temp *Temporal) *Temporal { + _cret := C.tjsonb_to_ttext(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TtextToTjsonb wraps MEOS C function ttext_to_tjsonb. +func TtextToTjsonb(temp *Temporal) *Temporal { + _cret := C.ttext_to_tjsonb(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TjsonbEndValue wraps MEOS C function tjsonb_end_value. +func TjsonbEndValue(temp *Temporal) *Jsonb { + _cret := C.tjsonb_end_value(temp._inner) + return &Jsonb{_inner: _cret} +} + + +// TjsonbStartValue wraps MEOS C function tjsonb_start_value. +func TjsonbStartValue(temp *Temporal) *Jsonb { + _cret := C.tjsonb_start_value(temp._inner) + return &Jsonb{_inner: _cret} +} + + +// TjsonbValueAtTimestamptz wraps MEOS C function tjsonb_value_at_timestamptz. +func TjsonbValueAtTimestamptz(temp *Temporal, t int64, strict bool) (bool, *Jsonb) { + var _out_value *C.Jsonb + _cret := C.tjsonb_value_at_timestamptz(temp._inner, C.TimestampTz(t), C.bool(strict), &_out_value) + return bool(_cret), &Jsonb{_inner: _out_value} +} + + +// TjsonbValueN wraps MEOS C function tjsonb_value_n. +func TjsonbValueN(temp *Temporal, n int) (bool, *Jsonb) { + var _out_result *C.Jsonb + _cret := C.tjsonb_value_n(temp._inner, C.int(n), &_out_result) + return bool(_cret), &Jsonb{_inner: _out_result} +} + + +// TjsonbValues wraps MEOS C function tjsonb_values. +func TjsonbValues(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tjsonb_values(temp._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// ConcatTjsonbJsonb wraps MEOS C function concat_tjsonb_jsonb. +func ConcatTjsonbJsonb(temp *Temporal, jb *Jsonb, invert bool) *Temporal { + _cret := C.concat_tjsonb_jsonb(temp._inner, jb._inner, C.bool(invert)) + return &Temporal{_inner: _cret} +} + + +// ConcatTjsonbTjsonb wraps MEOS C function concat_tjsonb_tjsonb. +func ConcatTjsonbTjsonb(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.concat_tjsonb_tjsonb(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// ContainsTjsonbJsonb wraps MEOS C function contains_tjsonb_jsonb. +func ContainsTjsonbJsonb(temp *Temporal, jb *Jsonb, invert bool) *Temporal { + _cret := C.contains_tjsonb_jsonb(temp._inner, jb._inner, C.bool(invert)) + return &Temporal{_inner: _cret} +} + + +// ContainsTjsonbTjsonb wraps MEOS C function contains_tjsonb_tjsonb. +func ContainsTjsonbTjsonb(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.contains_tjsonb_tjsonb(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// NullHandleTypeFromString wraps MEOS C function null_handle_type_from_string. +func NullHandleTypeFromString(str string) NullHandleType { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.null_handle_type_from_string(_c_str) + return NullHandleType(_cret) +} + + +// TjsonArrayElement wraps MEOS C function tjson_array_element. +func TjsonArrayElement(temp *Temporal, idx int, null_handle NullHandleType) *Temporal { + _cret := C.tjson_array_element(temp._inner, C.int(idx), C.nullHandleType(null_handle)) + return &Temporal{_inner: _cret} +} + + +// TjsonArrayLength wraps MEOS C function tjson_array_length. +func TjsonArrayLength(temp *Temporal) *Temporal { + _cret := C.tjson_array_length(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TjsonExtractPath wraps MEOS C function tjson_extract_path. +func TjsonExtractPath(temp *Temporal, path_elems unsafe.Pointer, path_len int, null_handle NullHandleType) *Temporal { + _cret := C.tjson_extract_path(temp._inner, (**C.text)(unsafe.Pointer(path_elems)), C.int(path_len), C.nullHandleType(null_handle)) + return &Temporal{_inner: _cret} +} + + +// TjsonObjectField wraps MEOS C function tjson_object_field. +func TjsonObjectField(temp *Temporal, key string, astext bool, null_handle NullHandleType) *Temporal { + _c_key := C.cstring_to_text(C.CString(key)) + defer C.free(unsafe.Pointer(_c_key)) + _cret := C.tjson_object_field(temp._inner, _c_key, C.bool(astext), C.nullHandleType(null_handle)) + return &Temporal{_inner: _cret} +} + + +// TjsonStripNulls wraps MEOS C function tjson_strip_nulls. +func TjsonStripNulls(temp *Temporal, strip_in_arrays bool) *Temporal { + _cret := C.tjson_strip_nulls(temp._inner, C.bool(strip_in_arrays)) + return &Temporal{_inner: _cret} +} + + +// TjsonbArrayElement wraps MEOS C function tjsonb_array_element. +func TjsonbArrayElement(temp *Temporal, idx int, astext bool, null_handle NullHandleType) *Temporal { + _cret := C.tjsonb_array_element(temp._inner, C.int(idx), C.bool(astext), C.nullHandleType(null_handle)) + return &Temporal{_inner: _cret} +} + + +// TjsonbArrayLength wraps MEOS C function tjsonb_array_length. +func TjsonbArrayLength(temp *Temporal) *Temporal { + _cret := C.tjsonb_array_length(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TjsonbDelete wraps MEOS C function tjsonb_delete. +func TjsonbDelete(temp *Temporal, key string) *Temporal { + _c_key := C.cstring_to_text(C.CString(key)) + defer C.free(unsafe.Pointer(_c_key)) + _cret := C.tjsonb_delete(temp._inner, _c_key) + return &Temporal{_inner: _cret} +} + + +// TjsonbDeleteArray wraps MEOS C function tjsonb_delete_array. +func TjsonbDeleteArray(temp *Temporal, keys unsafe.Pointer, count int) *Temporal { + _cret := C.tjsonb_delete_array(temp._inner, (**C.text)(unsafe.Pointer(keys)), C.int(count)) + return &Temporal{_inner: _cret} +} + + +// TjsonbDeleteIndex wraps MEOS C function tjsonb_delete_index. +func TjsonbDeleteIndex(temp *Temporal, idx int) *Temporal { + _cret := C.tjsonb_delete_index(temp._inner, C.int(idx)) + return &Temporal{_inner: _cret} +} + + +// TjsonbDeletePath wraps MEOS C function tjsonb_delete_path. +func TjsonbDeletePath(temp *Temporal, path_elems unsafe.Pointer, path_len int) *Temporal { + _cret := C.tjsonb_delete_path(temp._inner, (**C.text)(unsafe.Pointer(path_elems)), C.int(path_len)) + return &Temporal{_inner: _cret} +} + + +// TjsonbExists wraps MEOS C function tjsonb_exists. +func TjsonbExists(temp *Temporal, key string) *Temporal { + _c_key := C.cstring_to_text(C.CString(key)) + defer C.free(unsafe.Pointer(_c_key)) + _cret := C.tjsonb_exists(temp._inner, _c_key) + return &Temporal{_inner: _cret} +} + + +// TjsonbExistsArray wraps MEOS C function tjsonb_exists_array. +func TjsonbExistsArray(temp *Temporal, keys unsafe.Pointer, count int, any bool) *Temporal { + _cret := C.tjsonb_exists_array(temp._inner, (**C.text)(unsafe.Pointer(keys)), C.int(count), C.bool(any)) + return &Temporal{_inner: _cret} +} + + +// TjsonbExtractPath wraps MEOS C function tjsonb_extract_path. +func TjsonbExtractPath(temp *Temporal, path_elems unsafe.Pointer, path_len int, astext bool, null_handle NullHandleType) *Temporal { + _cret := C.tjsonb_extract_path(temp._inner, (**C.text)(unsafe.Pointer(path_elems)), C.int(path_len), C.bool(astext), C.nullHandleType(null_handle)) + return &Temporal{_inner: _cret} +} + + +// TjsonbInsert wraps MEOS C function tjsonb_insert. +func TjsonbInsert(temp *Temporal, keys unsafe.Pointer, count int, newjb *Jsonb, after bool) *Temporal { + _cret := C.tjsonb_insert(temp._inner, (**C.text)(unsafe.Pointer(keys)), C.int(count), newjb._inner, C.bool(after)) + return &Temporal{_inner: _cret} +} + + +// TjsonbObjectField wraps MEOS C function tjsonb_object_field. +func TjsonbObjectField(temp *Temporal, key string, astext bool, null_handle NullHandleType) *Temporal { + _c_key := C.cstring_to_text(C.CString(key)) + defer C.free(unsafe.Pointer(_c_key)) + _cret := C.tjsonb_object_field(temp._inner, _c_key, C.bool(astext), C.nullHandleType(null_handle)) + return &Temporal{_inner: _cret} +} + + +// TjsonbPathExists wraps MEOS C function tjsonb_path_exists. +func TjsonbPathExists(temp *Temporal, jp *JsonPath, vars *Jsonb, silent bool, tz bool) *Temporal { + _cret := C.tjsonb_path_exists(temp._inner, jp._inner, vars._inner, C.bool(silent), C.bool(tz)) + return &Temporal{_inner: _cret} +} + + +// TjsonbPathMatch wraps MEOS C function tjsonb_path_match. +func TjsonbPathMatch(temp *Temporal, jp *JsonPath, vars *Jsonb, silent bool, tz bool) *Temporal { + _cret := C.tjsonb_path_match(temp._inner, jp._inner, vars._inner, C.bool(silent), C.bool(tz)) + return &Temporal{_inner: _cret} +} + + +// TjsonbPathQueryArray wraps MEOS C function tjsonb_path_query_array. +func TjsonbPathQueryArray(temp *Temporal, jp *JsonPath, vars *Jsonb, silent bool, tz bool) *Temporal { + _cret := C.tjsonb_path_query_array(temp._inner, jp._inner, vars._inner, C.bool(silent), C.bool(tz)) + return &Temporal{_inner: _cret} +} + + +// TjsonbPathQueryFirst wraps MEOS C function tjsonb_path_query_first. +func TjsonbPathQueryFirst(temp *Temporal, jp *JsonPath, vars *Jsonb, silent bool, tz bool) *Temporal { + _cret := C.tjsonb_path_query_first(temp._inner, jp._inner, vars._inner, C.bool(silent), C.bool(tz)) + return &Temporal{_inner: _cret} +} + + +// TjsonbPretty wraps MEOS C function tjsonb_pretty. +func TjsonbPretty(temp *Temporal) *Temporal { + _cret := C.tjsonb_pretty(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TjsonbSet wraps MEOS C function tjsonb_set. +func TjsonbSet(temp *Temporal, keys unsafe.Pointer, count int, newjb *Jsonb, create bool, handle_null string, lax bool) *Temporal { + _c_handle_null := C.cstring_to_text(C.CString(handle_null)) + defer C.free(unsafe.Pointer(_c_handle_null)) + _cret := C.tjsonb_set(temp._inner, (**C.text)(unsafe.Pointer(keys)), C.int(count), newjb._inner, C.bool(create), _c_handle_null, C.bool(lax)) + return &Temporal{_inner: _cret} +} + + +// TjsonbStripNulls wraps MEOS C function tjsonb_strip_nulls. +func TjsonbStripNulls(temp *Temporal, strip_in_arrays bool) *Temporal { + _cret := C.tjsonb_strip_nulls(temp._inner, C.bool(strip_in_arrays)) + return &Temporal{_inner: _cret} +} + + +// TjsonbToTbool wraps MEOS C function tjsonb_to_tbool. +func TjsonbToTbool(temp *Temporal, key string, null_handle NullHandleType) *Temporal { + _c_key := C.CString(key) + defer C.free(unsafe.Pointer(_c_key)) + _cret := C.tjsonb_to_tbool(temp._inner, _c_key, C.nullHandleType(null_handle)) + return &Temporal{_inner: _cret} +} + + +// TjsonbToTfloat wraps MEOS C function tjsonb_to_tfloat. +func TjsonbToTfloat(temp *Temporal, key string, interp Interpolation, null_handle NullHandleType) *Temporal { + _c_key := C.CString(key) + defer C.free(unsafe.Pointer(_c_key)) + _cret := C.tjsonb_to_tfloat(temp._inner, _c_key, C.interpType(interp), C.nullHandleType(null_handle)) + return &Temporal{_inner: _cret} +} + + +// TjsonbToTint wraps MEOS C function tjsonb_to_tint. +func TjsonbToTint(temp *Temporal, key string, null_handle NullHandleType) *Temporal { + _c_key := C.CString(key) + defer C.free(unsafe.Pointer(_c_key)) + _cret := C.tjsonb_to_tint(temp._inner, _c_key, C.nullHandleType(null_handle)) + return &Temporal{_inner: _cret} +} + + +// TjsonbToTtextKey wraps MEOS C function tjsonb_to_ttext_key. +func TjsonbToTtextKey(temp *Temporal, key string, null_handle NullHandleType) *Temporal { + _c_key := C.CString(key) + defer C.free(unsafe.Pointer(_c_key)) + _cret := C.tjsonb_to_ttext_key(temp._inner, _c_key, C.nullHandleType(null_handle)) + return &Temporal{_inner: _cret} +} + + +// TjsonbAtValue wraps MEOS C function tjsonb_at_value. +func TjsonbAtValue(temp *Temporal, jsb *Jsonb) *Temporal { + _cret := C.tjsonb_at_value(temp._inner, jsb._inner) + return &Temporal{_inner: _cret} +} + + +// TjsonbMinusValue wraps MEOS C function tjsonb_minus_value. +func TjsonbMinusValue(temp *Temporal, jsb *Jsonb) *Temporal { + _cret := C.tjsonb_minus_value(temp._inner, jsb._inner) + return &Temporal{_inner: _cret} +} + + +// AlwaysEqJsonbTjsonb wraps MEOS C function always_eq_jsonb_tjsonb. +func AlwaysEqJsonbTjsonb(jb *Jsonb, temp *Temporal) int { + _cret := C.always_eq_jsonb_tjsonb(jb._inner, temp._inner) + return int(_cret) +} + + +// AlwaysEqTjsonbJsonb wraps MEOS C function always_eq_tjsonb_jsonb. +func AlwaysEqTjsonbJsonb(temp *Temporal, jb *Jsonb) int { + _cret := C.always_eq_tjsonb_jsonb(temp._inner, jb._inner) + return int(_cret) +} + + +// AlwaysEqTjsonbTjsonb wraps MEOS C function always_eq_tjsonb_tjsonb. +func AlwaysEqTjsonbTjsonb(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.always_eq_tjsonb_tjsonb(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AlwaysNeJsonbTjsonb wraps MEOS C function always_ne_jsonb_tjsonb. +func AlwaysNeJsonbTjsonb(jb *Jsonb, temp *Temporal) int { + _cret := C.always_ne_jsonb_tjsonb(jb._inner, temp._inner) + return int(_cret) +} + + +// AlwaysNeTjsonbJsonb wraps MEOS C function always_ne_tjsonb_jsonb. +func AlwaysNeTjsonbJsonb(temp *Temporal, jb *Jsonb) int { + _cret := C.always_ne_tjsonb_jsonb(temp._inner, jb._inner) + return int(_cret) +} + + +// AlwaysNeTjsonbTjsonb wraps MEOS C function always_ne_tjsonb_tjsonb. +func AlwaysNeTjsonbTjsonb(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.always_ne_tjsonb_tjsonb(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EverEqJsonbTjsonb wraps MEOS C function ever_eq_jsonb_tjsonb. +func EverEqJsonbTjsonb(jb *Jsonb, temp *Temporal) int { + _cret := C.ever_eq_jsonb_tjsonb(jb._inner, temp._inner) + return int(_cret) +} + + +// EverEqTjsonbJsonb wraps MEOS C function ever_eq_tjsonb_jsonb. +func EverEqTjsonbJsonb(temp *Temporal, jb *Jsonb) int { + _cret := C.ever_eq_tjsonb_jsonb(temp._inner, jb._inner) + return int(_cret) +} + + +// EverEqTjsonbTjsonb wraps MEOS C function ever_eq_tjsonb_tjsonb. +func EverEqTjsonbTjsonb(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ever_eq_tjsonb_tjsonb(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EverNeJsonbTjsonb wraps MEOS C function ever_ne_jsonb_tjsonb. +func EverNeJsonbTjsonb(jb *Jsonb, temp *Temporal) int { + _cret := C.ever_ne_jsonb_tjsonb(jb._inner, temp._inner) + return int(_cret) +} + + +// EverNeTjsonbJsonb wraps MEOS C function ever_ne_tjsonb_jsonb. +func EverNeTjsonbJsonb(temp *Temporal, jb *Jsonb) int { + _cret := C.ever_ne_tjsonb_jsonb(temp._inner, jb._inner) + return int(_cret) +} + + +// EverNeTjsonbTjsonb wraps MEOS C function ever_ne_tjsonb_tjsonb. +func EverNeTjsonbTjsonb(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ever_ne_tjsonb_tjsonb(temp1._inner, temp2._inner) + return int(_cret) +} + + +// TeqJsonbTjsonb wraps MEOS C function teq_jsonb_tjsonb. +func TeqJsonbTjsonb(jb *Jsonb, temp *Temporal) *Temporal { + _cret := C.teq_jsonb_tjsonb(jb._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TeqTjsonbJsonb wraps MEOS C function teq_tjsonb_jsonb. +func TeqTjsonbJsonb(temp *Temporal, jb *Jsonb) *Temporal { + _cret := C.teq_tjsonb_jsonb(temp._inner, jb._inner) + return &Temporal{_inner: _cret} +} + + +// TneJsonbTjsonb wraps MEOS C function tne_jsonb_tjsonb. +func TneJsonbTjsonb(jb *Jsonb, temp *Temporal) *Temporal { + _cret := C.tne_jsonb_tjsonb(jb._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TneTjsonbJsonb wraps MEOS C function tne_tjsonb_jsonb. +func TneTjsonbJsonb(temp *Temporal, jb *Jsonb) *Temporal { + _cret := C.tne_tjsonb_jsonb(temp._inner, jb._inner) + return &Temporal{_inner: _cret} +} + diff --git a/functions/meos_meos_npoint.go b/functions/meos_meos_npoint.go new file mode 100644 index 0000000..66cccfc --- /dev/null +++ b/functions/meos_meos_npoint.go @@ -0,0 +1,998 @@ +package functions + +/* +#include +#include "meos.h" +#include "meos_catalog.h" +#include "meos_geo.h" +#include "meos_internal.h" +#include "meos_internal_geo.h" +#include "meos_npoint.h" +#include "meos_cbuffer.h" +#include "meos_pose.h" +#include "meos_rgeo.h" +#include "meos_h3.h" +#include "meos_quadbin.h" +#include "meos_json.h" +#include "meos_pointcloud.h" +#include "meos_arrow.h" + +// cgo reads C.union_* as a union TYPE; alias the union operators so C.g resolves them as functions. +#define gunion_bigint_set union_bigint_set +#define gunion_bigint_span union_bigint_span +#define gunion_bigint_spanset union_bigint_spanset +#define gunion_cbuffer_set union_cbuffer_set +#define gunion_date_set union_date_set +#define gunion_date_span union_date_span +#define gunion_date_spanset union_date_spanset +#define gunion_float_set union_float_set +#define gunion_float_span union_float_span +#define gunion_float_spanset union_float_spanset +#define gunion_geo_set union_geo_set +#define gunion_int_set union_int_set +#define gunion_int_span union_int_span +#define gunion_int_spanset union_int_spanset +#define gunion_jsonb_set union_jsonb_set +#define gunion_npoint_set union_npoint_set +#define gunion_pcpatch_set union_pcpatch_set +#define gunion_pcpoint_set union_pcpoint_set +#define gunion_pose_set union_pose_set +#define gunion_set_bigint union_set_bigint +#define gunion_set_cbuffer union_set_cbuffer +#define gunion_set_date union_set_date +#define gunion_set_float union_set_float +#define gunion_set_geo union_set_geo +#define gunion_set_int union_set_int +#define gunion_set_jsonb union_set_jsonb +#define gunion_set_npoint union_set_npoint +#define gunion_set_pcpatch union_set_pcpatch +#define gunion_set_pcpoint union_set_pcpoint +#define gunion_set_pose union_set_pose +#define gunion_set_set union_set_set +#define gunion_set_text union_set_text +#define gunion_set_timestamptz union_set_timestamptz +#define gunion_set_value union_set_value +#define gunion_span_bigint union_span_bigint +#define gunion_span_date union_span_date +#define gunion_span_float union_span_float +#define gunion_span_int union_span_int +#define gunion_span_span union_span_span +#define gunion_span_spanset union_span_spanset +#define gunion_span_timestamptz union_span_timestamptz +#define gunion_span_value union_span_value +#define gunion_spanset_bigint union_spanset_bigint +#define gunion_spanset_date union_spanset_date +#define gunion_spanset_float union_spanset_float +#define gunion_spanset_int union_spanset_int +#define gunion_spanset_span union_spanset_span +#define gunion_spanset_spanset union_spanset_spanset +#define gunion_spanset_timestamptz union_spanset_timestamptz +#define gunion_spanset_value union_spanset_value +#define gunion_stbox_stbox union_stbox_stbox +#define gunion_tbox_tbox union_tbox_tbox +#define gunion_text_set union_text_set +#define gunion_timestamptz_set union_timestamptz_set +#define gunion_timestamptz_span union_timestamptz_span +#define gunion_timestamptz_spanset union_timestamptz_spanset +#define gunion_tpcbox_tpcbox union_tpcbox_tpcbox +#define gunion_value_set union_value_set +#define gunion_value_span union_value_span +#define gunion_value_spanset union_value_spanset +*/ +import "C" +import ( + "unsafe" +) + +var _ = unsafe.Pointer(nil) + +// NpointAsEWKT wraps MEOS C function npoint_as_ewkt. +func NpointAsEWKT(np *Npoint, maxdd int) string { + _cret := C.npoint_as_ewkt(np._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// NpointAsHexwkb wraps MEOS C function npoint_as_hexwkb. +func NpointAsHexwkb(np *Npoint, variant uint8, size_out unsafe.Pointer) string { + _cret := C.npoint_as_hexwkb(np._inner, C.uint8_t(variant), (*C.size_t)(unsafe.Pointer(size_out))) + return C.GoString(_cret) +} + + +// NpointAsText wraps MEOS C function npoint_as_text. +func NpointAsText(np *Npoint, maxdd int) string { + _cret := C.npoint_as_text(np._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// NpointAsWKB wraps MEOS C function npoint_as_wkb. +func NpointAsWKB(np *Npoint, variant uint8, size_out unsafe.Pointer) unsafe.Pointer { + _cret := C.npoint_as_wkb(np._inner, C.uint8_t(variant), (*C.size_t)(unsafe.Pointer(size_out))) + return unsafe.Pointer(_cret) +} + + +// NpointFromHexwkb wraps MEOS C function npoint_from_hexwkb. +func NpointFromHexwkb(hexwkb string) *Npoint { + _c_hexwkb := C.CString(hexwkb) + defer C.free(unsafe.Pointer(_c_hexwkb)) + _cret := C.npoint_from_hexwkb(_c_hexwkb) + return &Npoint{_inner: _cret} +} + + +// NpointFromWKB wraps MEOS C function npoint_from_wkb. +func NpointFromWKB(wkb unsafe.Pointer, size uint) *Npoint { + _cret := C.npoint_from_wkb((*C.uint8_t)(unsafe.Pointer(wkb)), C.size_t(size)) + return &Npoint{_inner: _cret} +} + + +// NpointIn wraps MEOS C function npoint_in. +func NpointIn(str string) *Npoint { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.npoint_in(_c_str) + return &Npoint{_inner: _cret} +} + + +// NpointOut wraps MEOS C function npoint_out. +func NpointOut(np *Npoint, maxdd int) string { + _cret := C.npoint_out(np._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// NsegmentIn wraps MEOS C function nsegment_in. +func NsegmentIn(str string) *Nsegment { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.nsegment_in(_c_str) + return &Nsegment{_inner: _cret} +} + + +// NsegmentOut wraps MEOS C function nsegment_out. +func NsegmentOut(ns *Nsegment, maxdd int) string { + _cret := C.nsegment_out(ns._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// NpointMake wraps MEOS C function npoint_make. +func NpointMake(rid int64, pos float64) *Npoint { + _cret := C.npoint_make(C.int64_t(rid), C.double(pos)) + return &Npoint{_inner: _cret} +} + + +// NsegmentMake wraps MEOS C function nsegment_make. +func NsegmentMake(rid int64, pos1 float64, pos2 float64) *Nsegment { + _cret := C.nsegment_make(C.int64_t(rid), C.double(pos1), C.double(pos2)) + return &Nsegment{_inner: _cret} +} + + +// GeompointToNpoint wraps MEOS C function geompoint_to_npoint. +func GeompointToNpoint(gs *Geom) *Npoint { + _cret := C.geompoint_to_npoint(gs._inner) + return &Npoint{_inner: _cret} +} + + +// GeomToNsegment wraps MEOS C function geom_to_nsegment. +func GeomToNsegment(gs *Geom) *Nsegment { + _cret := C.geom_to_nsegment(gs._inner) + return &Nsegment{_inner: _cret} +} + + +// NpointToGeompoint wraps MEOS C function npoint_to_geompoint. +func NpointToGeompoint(np *Npoint) *Geom { + _cret := C.npoint_to_geompoint(np._inner) + return &Geom{_inner: _cret} +} + + +// NpointToNsegment wraps MEOS C function npoint_to_nsegment. +func NpointToNsegment(np *Npoint) *Nsegment { + _cret := C.npoint_to_nsegment(np._inner) + return &Nsegment{_inner: _cret} +} + + +// NpointToSTBOX wraps MEOS C function npoint_to_stbox. +func NpointToSTBOX(np *Npoint) *STBox { + _cret := C.npoint_to_stbox(np._inner) + return &STBox{_inner: _cret} +} + + +// NsegmentToGeom wraps MEOS C function nsegment_to_geom. +func NsegmentToGeom(ns *Nsegment) *Geom { + _cret := C.nsegment_to_geom(ns._inner) + return &Geom{_inner: _cret} +} + + +// NsegmentToSTBOX wraps MEOS C function nsegment_to_stbox. +func NsegmentToSTBOX(ns *Nsegment) *STBox { + _cret := C.nsegment_to_stbox(ns._inner) + return &STBox{_inner: _cret} +} + + +// NpointHash wraps MEOS C function npoint_hash. +func NpointHash(np *Npoint) uint32 { + _cret := C.npoint_hash(np._inner) + return uint32(_cret) +} + + +// NpointHashExtended wraps MEOS C function npoint_hash_extended. +func NpointHashExtended(np *Npoint, seed uint64) uint64 { + _cret := C.npoint_hash_extended(np._inner, C.uint64_t(seed)) + return uint64(_cret) +} + + +// NpointPosition wraps MEOS C function npoint_position. +func NpointPosition(np *Npoint) float64 { + _cret := C.npoint_position(np._inner) + return float64(_cret) +} + + +// NpointRoute wraps MEOS C function npoint_route. +func NpointRoute(np *Npoint) int64 { + _cret := C.npoint_route(np._inner) + return int64(_cret) +} + + +// NsegmentEndPosition wraps MEOS C function nsegment_end_position. +func NsegmentEndPosition(ns *Nsegment) float64 { + _cret := C.nsegment_end_position(ns._inner) + return float64(_cret) +} + + +// NsegmentRoute wraps MEOS C function nsegment_route. +func NsegmentRoute(ns *Nsegment) int64 { + _cret := C.nsegment_route(ns._inner) + return int64(_cret) +} + + +// NsegmentStartPosition wraps MEOS C function nsegment_start_position. +func NsegmentStartPosition(ns *Nsegment) float64 { + _cret := C.nsegment_start_position(ns._inner) + return float64(_cret) +} + + +// RouteExists wraps MEOS C function route_exists. +func RouteExists(rid int64) bool { + _cret := C.route_exists(C.int64_t(rid)) + return bool(_cret) +} + + +// RouteGeom wraps MEOS C function route_geom. +func RouteGeom(rid int64) *Geom { + _cret := C.route_geom(C.int64_t(rid)) + return &Geom{_inner: _cret} +} + + +// RouteLength wraps MEOS C function route_length. +func RouteLength(rid int64) float64 { + _cret := C.route_length(C.int64_t(rid)) + return float64(_cret) +} + + +// NpointRound wraps MEOS C function npoint_round. +func NpointRound(np *Npoint, maxdd int) *Npoint { + _cret := C.npoint_round(np._inner, C.int(maxdd)) + return &Npoint{_inner: _cret} +} + + +// NsegmentRound wraps MEOS C function nsegment_round. +func NsegmentRound(ns *Nsegment, maxdd int) *Nsegment { + _cret := C.nsegment_round(ns._inner, C.int(maxdd)) + return &Nsegment{_inner: _cret} +} + + +// GetSRIDWays wraps MEOS C function get_srid_ways. +func GetSRIDWays() int32 { + _cret := C.get_srid_ways() + return int32(_cret) +} + + +// NpointSRID wraps MEOS C function npoint_srid. +func NpointSRID(np *Npoint) int32 { + _cret := C.npoint_srid(np._inner) + return int32(_cret) +} + + +// NsegmentSRID wraps MEOS C function nsegment_srid. +func NsegmentSRID(ns *Nsegment) int32 { + _cret := C.nsegment_srid(ns._inner) + return int32(_cret) +} + + +// NpointTimestamptzToSTBOX wraps MEOS C function npoint_timestamptz_to_stbox. +func NpointTimestamptzToSTBOX(np *Npoint, t int64) *STBox { + _cret := C.npoint_timestamptz_to_stbox(np._inner, C.TimestampTz(t)) + return &STBox{_inner: _cret} +} + + +// NpointTstzspanToSTBOX wraps MEOS C function npoint_tstzspan_to_stbox. +func NpointTstzspanToSTBOX(np *Npoint, s *Span) *STBox { + _cret := C.npoint_tstzspan_to_stbox(np._inner, s._inner) + return &STBox{_inner: _cret} +} + + +// NpointCmp wraps MEOS C function npoint_cmp. +func NpointCmp(np1 *Npoint, np2 *Npoint) int { + _cret := C.npoint_cmp(np1._inner, np2._inner) + return int(_cret) +} + + +// NpointEq wraps MEOS C function npoint_eq. +func NpointEq(np1 *Npoint, np2 *Npoint) bool { + _cret := C.npoint_eq(np1._inner, np2._inner) + return bool(_cret) +} + + +// NpointGe wraps MEOS C function npoint_ge. +func NpointGe(np1 *Npoint, np2 *Npoint) bool { + _cret := C.npoint_ge(np1._inner, np2._inner) + return bool(_cret) +} + + +// NpointGt wraps MEOS C function npoint_gt. +func NpointGt(np1 *Npoint, np2 *Npoint) bool { + _cret := C.npoint_gt(np1._inner, np2._inner) + return bool(_cret) +} + + +// NpointLe wraps MEOS C function npoint_le. +func NpointLe(np1 *Npoint, np2 *Npoint) bool { + _cret := C.npoint_le(np1._inner, np2._inner) + return bool(_cret) +} + + +// NpointLt wraps MEOS C function npoint_lt. +func NpointLt(np1 *Npoint, np2 *Npoint) bool { + _cret := C.npoint_lt(np1._inner, np2._inner) + return bool(_cret) +} + + +// NpointNe wraps MEOS C function npoint_ne. +func NpointNe(np1 *Npoint, np2 *Npoint) bool { + _cret := C.npoint_ne(np1._inner, np2._inner) + return bool(_cret) +} + + +// NpointSame wraps MEOS C function npoint_same. +func NpointSame(np1 *Npoint, np2 *Npoint) bool { + _cret := C.npoint_same(np1._inner, np2._inner) + return bool(_cret) +} + + +// NsegmentCmp wraps MEOS C function nsegment_cmp. +func NsegmentCmp(ns1 *Nsegment, ns2 *Nsegment) int { + _cret := C.nsegment_cmp(ns1._inner, ns2._inner) + return int(_cret) +} + + +// NsegmentEq wraps MEOS C function nsegment_eq. +func NsegmentEq(ns1 *Nsegment, ns2 *Nsegment) bool { + _cret := C.nsegment_eq(ns1._inner, ns2._inner) + return bool(_cret) +} + + +// NsegmentGe wraps MEOS C function nsegment_ge. +func NsegmentGe(ns1 *Nsegment, ns2 *Nsegment) bool { + _cret := C.nsegment_ge(ns1._inner, ns2._inner) + return bool(_cret) +} + + +// NsegmentGt wraps MEOS C function nsegment_gt. +func NsegmentGt(ns1 *Nsegment, ns2 *Nsegment) bool { + _cret := C.nsegment_gt(ns1._inner, ns2._inner) + return bool(_cret) +} + + +// NsegmentLe wraps MEOS C function nsegment_le. +func NsegmentLe(ns1 *Nsegment, ns2 *Nsegment) bool { + _cret := C.nsegment_le(ns1._inner, ns2._inner) + return bool(_cret) +} + + +// NsegmentLt wraps MEOS C function nsegment_lt. +func NsegmentLt(ns1 *Nsegment, ns2 *Nsegment) bool { + _cret := C.nsegment_lt(ns1._inner, ns2._inner) + return bool(_cret) +} + + +// NsegmentNe wraps MEOS C function nsegment_ne. +func NsegmentNe(ns1 *Nsegment, ns2 *Nsegment) bool { + _cret := C.nsegment_ne(ns1._inner, ns2._inner) + return bool(_cret) +} + + +// NpointsetIn wraps MEOS C function npointset_in. +func NpointsetIn(str string) *Set { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.npointset_in(_c_str) + return &Set{_inner: _cret} +} + + +// NpointsetOut wraps MEOS C function npointset_out. +func NpointsetOut(s *Set, maxdd int) string { + _cret := C.npointset_out(s._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// NpointsetMake wraps MEOS C function npointset_make. +func NpointsetMake(values unsafe.Pointer, count int) *Set { + _cret := C.npointset_make((**C.Npoint)(unsafe.Pointer(values)), C.int(count)) + return &Set{_inner: _cret} +} + + +// NpointToSet wraps MEOS C function npoint_to_set. +func NpointToSet(np *Npoint) *Set { + _cret := C.npoint_to_set(np._inner) + return &Set{_inner: _cret} +} + + +// NpointsetEndValue wraps MEOS C function npointset_end_value. +func NpointsetEndValue(s *Set) *Npoint { + _cret := C.npointset_end_value(s._inner) + return &Npoint{_inner: _cret} +} + + +// NpointsetRoutes wraps MEOS C function npointset_routes. +func NpointsetRoutes(s *Set) *Set { + _cret := C.npointset_routes(s._inner) + return &Set{_inner: _cret} +} + + +// NpointsetStartValue wraps MEOS C function npointset_start_value. +func NpointsetStartValue(s *Set) *Npoint { + _cret := C.npointset_start_value(s._inner) + return &Npoint{_inner: _cret} +} + + +// NpointsetValueN wraps MEOS C function npointset_value_n. +func NpointsetValueN(s *Set, n int) (bool, *Npoint) { + var _out_result *C.Npoint + _cret := C.npointset_value_n(s._inner, C.int(n), &_out_result) + return bool(_cret), &Npoint{_inner: _out_result} +} + + +// NpointsetValues wraps MEOS C function npointset_values. +func NpointsetValues(s *Set, count unsafe.Pointer) unsafe.Pointer { + _cret := C.npointset_values(s._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// ContainedNpointSet wraps MEOS C function contained_npoint_set. +func ContainedNpointSet(np *Npoint, s *Set) bool { + _cret := C.contained_npoint_set(np._inner, s._inner) + return bool(_cret) +} + + +// ContainsSetNpoint wraps MEOS C function contains_set_npoint. +func ContainsSetNpoint(s *Set, np *Npoint) bool { + _cret := C.contains_set_npoint(s._inner, np._inner) + return bool(_cret) +} + + +// IntersectionNpointSet wraps MEOS C function intersection_npoint_set. +func IntersectionNpointSet(np *Npoint, s *Set) *Set { + _cret := C.intersection_npoint_set(np._inner, s._inner) + return &Set{_inner: _cret} +} + + +// IntersectionSetNpoint wraps MEOS C function intersection_set_npoint. +func IntersectionSetNpoint(s *Set, np *Npoint) *Set { + _cret := C.intersection_set_npoint(s._inner, np._inner) + return &Set{_inner: _cret} +} + + +// MinusNpointSet wraps MEOS C function minus_npoint_set. +func MinusNpointSet(np *Npoint, s *Set) *Set { + _cret := C.minus_npoint_set(np._inner, s._inner) + return &Set{_inner: _cret} +} + + +// MinusSetNpoint wraps MEOS C function minus_set_npoint. +func MinusSetNpoint(s *Set, np *Npoint) *Set { + _cret := C.minus_set_npoint(s._inner, np._inner) + return &Set{_inner: _cret} +} + + +// NpointUnionTransfn wraps MEOS C function npoint_union_transfn. +func NpointUnionTransfn(state *Set, np *Npoint) *Set { + _cret := C.npoint_union_transfn(state._inner, np._inner) + return &Set{_inner: _cret} +} + + +// UnionNpointSet wraps MEOS C function union_npoint_set. +func UnionNpointSet(np *Npoint, s *Set) *Set { + _cret := C.gunion_npoint_set(np._inner, s._inner) + return &Set{_inner: _cret} +} + + +// UnionSetNpoint wraps MEOS C function union_set_npoint. +func UnionSetNpoint(s *Set, np *Npoint) *Set { + _cret := C.gunion_set_npoint(s._inner, np._inner) + return &Set{_inner: _cret} +} + + +// TnpointIn wraps MEOS C function tnpoint_in. +func TnpointIn(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tnpoint_in(_c_str) + return &Temporal{_inner: _cret} +} + + +// TnpointFromMFJSON wraps MEOS C function tnpoint_from_mfjson. +func TnpointFromMFJSON(mfjson string) *Temporal { + _c_mfjson := C.CString(mfjson) + defer C.free(unsafe.Pointer(_c_mfjson)) + _cret := C.tnpoint_from_mfjson(_c_mfjson) + return &Temporal{_inner: _cret} +} + + +// TnpointOut wraps MEOS C function tnpoint_out. +func TnpointOut(temp *Temporal, maxdd int) string { + _cret := C.tnpoint_out(temp._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// TnpointinstMake wraps MEOS C function tnpointinst_make. +func TnpointinstMake(np *Npoint, t int64) *TInstant { + _cret := C.tnpointinst_make(np._inner, C.TimestampTz(t)) + return &TInstant{_inner: _cret} +} + + +// TnpointFromBaseTemp wraps MEOS C function tnpoint_from_base_temp. +func TnpointFromBaseTemp(np *Npoint, temp *Temporal) *Temporal { + _cret := C.tnpoint_from_base_temp(np._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TnpointseqFromBaseTstzset wraps MEOS C function tnpointseq_from_base_tstzset. +func TnpointseqFromBaseTstzset(np *Npoint, s *Set) *TSequence { + _cret := C.tnpointseq_from_base_tstzset(np._inner, s._inner) + return &TSequence{_inner: _cret} +} + + +// TnpointseqFromBaseTstzspan wraps MEOS C function tnpointseq_from_base_tstzspan. +func TnpointseqFromBaseTstzspan(np *Npoint, s *Span, interp Interpolation) *TSequence { + _cret := C.tnpointseq_from_base_tstzspan(np._inner, s._inner, C.interpType(interp)) + return &TSequence{_inner: _cret} +} + + +// TnpointseqsetFromBaseTstzspanset wraps MEOS C function tnpointseqset_from_base_tstzspanset. +func TnpointseqsetFromBaseTstzspanset(np *Npoint, ss *SpanSet, interp Interpolation) *TSequenceSet { + _cret := C.tnpointseqset_from_base_tstzspanset(np._inner, ss._inner, C.interpType(interp)) + return &TSequenceSet{_inner: _cret} +} + + +// TgeompointToTnpoint wraps MEOS C function tgeompoint_to_tnpoint. +func TgeompointToTnpoint(temp *Temporal) *Temporal { + _cret := C.tgeompoint_to_tnpoint(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TnpointToTgeompoint wraps MEOS C function tnpoint_to_tgeompoint. +func TnpointToTgeompoint(temp *Temporal) *Temporal { + _cret := C.tnpoint_to_tgeompoint(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TnpointCumulativeLength wraps MEOS C function tnpoint_cumulative_length. +func TnpointCumulativeLength(temp *Temporal) *Temporal { + _cret := C.tnpoint_cumulative_length(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TnpointEndValue wraps MEOS C function tnpoint_end_value. +func TnpointEndValue(temp *Temporal) *Npoint { + _cret := C.tnpoint_end_value(temp._inner) + return &Npoint{_inner: _cret} +} + + +// TnpointLength wraps MEOS C function tnpoint_length. +func TnpointLength(temp *Temporal) float64 { + _cret := C.tnpoint_length(temp._inner) + return float64(_cret) +} + + +// TnpointPositions wraps MEOS C function tnpoint_positions. +func TnpointPositions(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tnpoint_positions(temp._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TnpointRoute wraps MEOS C function tnpoint_route. +func TnpointRoute(temp *Temporal) int64 { + _cret := C.tnpoint_route(temp._inner) + return int64(_cret) +} + + +// TnpointRoutes wraps MEOS C function tnpoint_routes. +func TnpointRoutes(temp *Temporal) *Set { + _cret := C.tnpoint_routes(temp._inner) + return &Set{_inner: _cret} +} + + +// TnpointSpeed wraps MEOS C function tnpoint_speed. +func TnpointSpeed(temp *Temporal) *Temporal { + _cret := C.tnpoint_speed(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TnpointStartValue wraps MEOS C function tnpoint_start_value. +func TnpointStartValue(temp *Temporal) *Npoint { + _cret := C.tnpoint_start_value(temp._inner) + return &Npoint{_inner: _cret} +} + + +// TnpointTrajectory wraps MEOS C function tnpoint_trajectory. +func TnpointTrajectory(temp *Temporal) *Geom { + _cret := C.tnpoint_trajectory(temp._inner) + return &Geom{_inner: _cret} +} + + +// TnpointValueAtTimestamptz wraps MEOS C function tnpoint_value_at_timestamptz. +func TnpointValueAtTimestamptz(temp *Temporal, t int64, strict bool) (bool, *Npoint) { + var _out_value *C.Npoint + _cret := C.tnpoint_value_at_timestamptz(temp._inner, C.TimestampTz(t), C.bool(strict), &_out_value) + return bool(_cret), &Npoint{_inner: _out_value} +} + + +// TnpointValueN wraps MEOS C function tnpoint_value_n. +func TnpointValueN(temp *Temporal, n int) (bool, *Npoint) { + var _out_result *C.Npoint + _cret := C.tnpoint_value_n(temp._inner, C.int(n), &_out_result) + return bool(_cret), &Npoint{_inner: _out_result} +} + + +// TnpointValues wraps MEOS C function tnpoint_values. +func TnpointValues(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tnpoint_values(temp._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TnpointTwcentroid wraps MEOS C function tnpoint_twcentroid. +func TnpointTwcentroid(temp *Temporal) *Geom { + _cret := C.tnpoint_twcentroid(temp._inner) + return &Geom{_inner: _cret} +} + + +// TnpointAtGeom wraps MEOS C function tnpoint_at_geom. +func TnpointAtGeom(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tnpoint_at_geom(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TnpointAtNpoint wraps MEOS C function tnpoint_at_npoint. +func TnpointAtNpoint(temp *Temporal, np *Npoint) *Temporal { + _cret := C.tnpoint_at_npoint(temp._inner, np._inner) + return &Temporal{_inner: _cret} +} + + +// TnpointAtNpointset wraps MEOS C function tnpoint_at_npointset. +func TnpointAtNpointset(temp *Temporal, s *Set) *Temporal { + _cret := C.tnpoint_at_npointset(temp._inner, s._inner) + return &Temporal{_inner: _cret} +} + + +// TnpointAtSTBOX wraps MEOS C function tnpoint_at_stbox. +func TnpointAtSTBOX(temp *Temporal, box *STBox, border_inc bool) *Temporal { + _cret := C.tnpoint_at_stbox(temp._inner, box._inner, C.bool(border_inc)) + return &Temporal{_inner: _cret} +} + + +// TnpointMinusGeom wraps MEOS C function tnpoint_minus_geom. +func TnpointMinusGeom(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tnpoint_minus_geom(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TnpointMinusNpoint wraps MEOS C function tnpoint_minus_npoint. +func TnpointMinusNpoint(temp *Temporal, np *Npoint) *Temporal { + _cret := C.tnpoint_minus_npoint(temp._inner, np._inner) + return &Temporal{_inner: _cret} +} + + +// TnpointMinusNpointset wraps MEOS C function tnpoint_minus_npointset. +func TnpointMinusNpointset(temp *Temporal, s *Set) *Temporal { + _cret := C.tnpoint_minus_npointset(temp._inner, s._inner) + return &Temporal{_inner: _cret} +} + + +// TnpointMinusSTBOX wraps MEOS C function tnpoint_minus_stbox. +func TnpointMinusSTBOX(temp *Temporal, box *STBox, border_inc bool) *Temporal { + _cret := C.tnpoint_minus_stbox(temp._inner, box._inner, C.bool(border_inc)) + return &Temporal{_inner: _cret} +} + + +// TdistanceTnpointNpoint wraps MEOS C function tdistance_tnpoint_npoint. +func TdistanceTnpointNpoint(temp *Temporal, np *Npoint) *Temporal { + _cret := C.tdistance_tnpoint_npoint(temp._inner, np._inner) + return &Temporal{_inner: _cret} +} + + +// TdistanceTnpointGeo wraps MEOS C function tdistance_tnpoint_geo. +func TdistanceTnpointGeo(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tdistance_tnpoint_geo(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TdistanceTnpointTnpoint wraps MEOS C function tdistance_tnpoint_tnpoint. +func TdistanceTnpointTnpoint(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tdistance_tnpoint_tnpoint(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// NadTnpointGeo wraps MEOS C function nad_tnpoint_geo. +func NadTnpointGeo(temp *Temporal, gs *Geom) float64 { + _cret := C.nad_tnpoint_geo(temp._inner, gs._inner) + return float64(_cret) +} + + +// NadTnpointNpoint wraps MEOS C function nad_tnpoint_npoint. +func NadTnpointNpoint(temp *Temporal, np *Npoint) float64 { + _cret := C.nad_tnpoint_npoint(temp._inner, np._inner) + return float64(_cret) +} + + +// NadTnpointSTBOX wraps MEOS C function nad_tnpoint_stbox. +func NadTnpointSTBOX(temp *Temporal, box *STBox) float64 { + _cret := C.nad_tnpoint_stbox(temp._inner, box._inner) + return float64(_cret) +} + + +// NadTnpointTnpoint wraps MEOS C function nad_tnpoint_tnpoint. +func NadTnpointTnpoint(temp1 *Temporal, temp2 *Temporal) float64 { + _cret := C.nad_tnpoint_tnpoint(temp1._inner, temp2._inner) + return float64(_cret) +} + + +// NaiTnpointGeo wraps MEOS C function nai_tnpoint_geo. +func NaiTnpointGeo(temp *Temporal, gs *Geom) *TInstant { + _cret := C.nai_tnpoint_geo(temp._inner, gs._inner) + return &TInstant{_inner: _cret} +} + + +// NaiTnpointNpoint wraps MEOS C function nai_tnpoint_npoint. +func NaiTnpointNpoint(temp *Temporal, np *Npoint) *TInstant { + _cret := C.nai_tnpoint_npoint(temp._inner, np._inner) + return &TInstant{_inner: _cret} +} + + +// NaiTnpointTnpoint wraps MEOS C function nai_tnpoint_tnpoint. +func NaiTnpointTnpoint(temp1 *Temporal, temp2 *Temporal) *TInstant { + _cret := C.nai_tnpoint_tnpoint(temp1._inner, temp2._inner) + return &TInstant{_inner: _cret} +} + + +// ShortestlineTnpointGeo wraps MEOS C function shortestline_tnpoint_geo. +func ShortestlineTnpointGeo(temp *Temporal, gs *Geom) *Geom { + _cret := C.shortestline_tnpoint_geo(temp._inner, gs._inner) + return &Geom{_inner: _cret} +} + + +// ShortestlineTnpointNpoint wraps MEOS C function shortestline_tnpoint_npoint. +func ShortestlineTnpointNpoint(temp *Temporal, np *Npoint) *Geom { + _cret := C.shortestline_tnpoint_npoint(temp._inner, np._inner) + return &Geom{_inner: _cret} +} + + +// ShortestlineTnpointTnpoint wraps MEOS C function shortestline_tnpoint_tnpoint. +func ShortestlineTnpointTnpoint(temp1 *Temporal, temp2 *Temporal) *Geom { + _cret := C.shortestline_tnpoint_tnpoint(temp1._inner, temp2._inner) + return &Geom{_inner: _cret} +} + + +// TnpointTcentroidTransfn wraps MEOS C function tnpoint_tcentroid_transfn. +func TnpointTcentroidTransfn(state *SkipList, temp *Temporal) *SkipList { + _cret := C.tnpoint_tcentroid_transfn(state._inner, temp._inner) + return &SkipList{_inner: _cret} +} + + +// AlwaysEqNpointTnpoint wraps MEOS C function always_eq_npoint_tnpoint. +func AlwaysEqNpointTnpoint(np *Npoint, temp *Temporal) int { + _cret := C.always_eq_npoint_tnpoint(np._inner, temp._inner) + return int(_cret) +} + + +// AlwaysEqTnpointNpoint wraps MEOS C function always_eq_tnpoint_npoint. +func AlwaysEqTnpointNpoint(temp *Temporal, np *Npoint) int { + _cret := C.always_eq_tnpoint_npoint(temp._inner, np._inner) + return int(_cret) +} + + +// AlwaysEqTnpointTnpoint wraps MEOS C function always_eq_tnpoint_tnpoint. +func AlwaysEqTnpointTnpoint(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.always_eq_tnpoint_tnpoint(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AlwaysNeNpointTnpoint wraps MEOS C function always_ne_npoint_tnpoint. +func AlwaysNeNpointTnpoint(np *Npoint, temp *Temporal) int { + _cret := C.always_ne_npoint_tnpoint(np._inner, temp._inner) + return int(_cret) +} + + +// AlwaysNeTnpointNpoint wraps MEOS C function always_ne_tnpoint_npoint. +func AlwaysNeTnpointNpoint(temp *Temporal, np *Npoint) int { + _cret := C.always_ne_tnpoint_npoint(temp._inner, np._inner) + return int(_cret) +} + + +// AlwaysNeTnpointTnpoint wraps MEOS C function always_ne_tnpoint_tnpoint. +func AlwaysNeTnpointTnpoint(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.always_ne_tnpoint_tnpoint(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EverEqNpointTnpoint wraps MEOS C function ever_eq_npoint_tnpoint. +func EverEqNpointTnpoint(np *Npoint, temp *Temporal) int { + _cret := C.ever_eq_npoint_tnpoint(np._inner, temp._inner) + return int(_cret) +} + + +// EverEqTnpointNpoint wraps MEOS C function ever_eq_tnpoint_npoint. +func EverEqTnpointNpoint(temp *Temporal, np *Npoint) int { + _cret := C.ever_eq_tnpoint_npoint(temp._inner, np._inner) + return int(_cret) +} + + +// EverEqTnpointTnpoint wraps MEOS C function ever_eq_tnpoint_tnpoint. +func EverEqTnpointTnpoint(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ever_eq_tnpoint_tnpoint(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EverNeNpointTnpoint wraps MEOS C function ever_ne_npoint_tnpoint. +func EverNeNpointTnpoint(np *Npoint, temp *Temporal) int { + _cret := C.ever_ne_npoint_tnpoint(np._inner, temp._inner) + return int(_cret) +} + + +// EverNeTnpointNpoint wraps MEOS C function ever_ne_tnpoint_npoint. +func EverNeTnpointNpoint(temp *Temporal, np *Npoint) int { + _cret := C.ever_ne_tnpoint_npoint(temp._inner, np._inner) + return int(_cret) +} + + +// EverNeTnpointTnpoint wraps MEOS C function ever_ne_tnpoint_tnpoint. +func EverNeTnpointTnpoint(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ever_ne_tnpoint_tnpoint(temp1._inner, temp2._inner) + return int(_cret) +} + + +// TeqTnpointNpoint wraps MEOS C function teq_tnpoint_npoint. +func TeqTnpointNpoint(temp *Temporal, np *Npoint) *Temporal { + _cret := C.teq_tnpoint_npoint(temp._inner, np._inner) + return &Temporal{_inner: _cret} +} + + +// TneTnpointNpoint wraps MEOS C function tne_tnpoint_npoint. +func TneTnpointNpoint(temp *Temporal, np *Npoint) *Temporal { + _cret := C.tne_tnpoint_npoint(temp._inner, np._inner) + return &Temporal{_inner: _cret} +} + diff --git a/functions/meos_meos_pointcloud.go b/functions/meos_meos_pointcloud.go new file mode 100644 index 0000000..3dc1b00 --- /dev/null +++ b/functions/meos_meos_pointcloud.go @@ -0,0 +1,1059 @@ +package functions + +/* +#include +#include "meos.h" +#include "meos_catalog.h" +#include "meos_geo.h" +#include "meos_internal.h" +#include "meos_internal_geo.h" +#include "meos_npoint.h" +#include "meos_cbuffer.h" +#include "meos_pose.h" +#include "meos_rgeo.h" +#include "meos_h3.h" +#include "meos_quadbin.h" +#include "meos_json.h" +#include "meos_pointcloud.h" +#include "meos_arrow.h" + +// cgo reads C.union_* as a union TYPE; alias the union operators so C.g resolves them as functions. +#define gunion_bigint_set union_bigint_set +#define gunion_bigint_span union_bigint_span +#define gunion_bigint_spanset union_bigint_spanset +#define gunion_cbuffer_set union_cbuffer_set +#define gunion_date_set union_date_set +#define gunion_date_span union_date_span +#define gunion_date_spanset union_date_spanset +#define gunion_float_set union_float_set +#define gunion_float_span union_float_span +#define gunion_float_spanset union_float_spanset +#define gunion_geo_set union_geo_set +#define gunion_int_set union_int_set +#define gunion_int_span union_int_span +#define gunion_int_spanset union_int_spanset +#define gunion_jsonb_set union_jsonb_set +#define gunion_npoint_set union_npoint_set +#define gunion_pcpatch_set union_pcpatch_set +#define gunion_pcpoint_set union_pcpoint_set +#define gunion_pose_set union_pose_set +#define gunion_set_bigint union_set_bigint +#define gunion_set_cbuffer union_set_cbuffer +#define gunion_set_date union_set_date +#define gunion_set_float union_set_float +#define gunion_set_geo union_set_geo +#define gunion_set_int union_set_int +#define gunion_set_jsonb union_set_jsonb +#define gunion_set_npoint union_set_npoint +#define gunion_set_pcpatch union_set_pcpatch +#define gunion_set_pcpoint union_set_pcpoint +#define gunion_set_pose union_set_pose +#define gunion_set_set union_set_set +#define gunion_set_text union_set_text +#define gunion_set_timestamptz union_set_timestamptz +#define gunion_set_value union_set_value +#define gunion_span_bigint union_span_bigint +#define gunion_span_date union_span_date +#define gunion_span_float union_span_float +#define gunion_span_int union_span_int +#define gunion_span_span union_span_span +#define gunion_span_spanset union_span_spanset +#define gunion_span_timestamptz union_span_timestamptz +#define gunion_span_value union_span_value +#define gunion_spanset_bigint union_spanset_bigint +#define gunion_spanset_date union_spanset_date +#define gunion_spanset_float union_spanset_float +#define gunion_spanset_int union_spanset_int +#define gunion_spanset_span union_spanset_span +#define gunion_spanset_spanset union_spanset_spanset +#define gunion_spanset_timestamptz union_spanset_timestamptz +#define gunion_spanset_value union_spanset_value +#define gunion_stbox_stbox union_stbox_stbox +#define gunion_tbox_tbox union_tbox_tbox +#define gunion_text_set union_text_set +#define gunion_timestamptz_set union_timestamptz_set +#define gunion_timestamptz_span union_timestamptz_span +#define gunion_timestamptz_spanset union_timestamptz_spanset +#define gunion_tpcbox_tpcbox union_tpcbox_tpcbox +#define gunion_value_set union_value_set +#define gunion_value_span union_value_span +#define gunion_value_spanset union_value_spanset +*/ +import "C" +import ( + "unsafe" +) + +var _ = unsafe.Pointer(nil) + +// PcpointHexIn wraps MEOS C function pcpoint_hex_in. +func PcpointHexIn(str string) *Pcpoint { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.pcpoint_hex_in(_c_str) + return &Pcpoint{_inner: _cret} +} + + +// PcpointHexOut wraps MEOS C function pcpoint_hex_out. +func PcpointHexOut(pt *Pcpoint, maxdd int) string { + _cret := C.pcpoint_hex_out(pt._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// PcpointFromHexwkb wraps MEOS C function pcpoint_from_hexwkb. +func PcpointFromHexwkb(hexwkb string) *Pcpoint { + _c_hexwkb := C.CString(hexwkb) + defer C.free(unsafe.Pointer(_c_hexwkb)) + _cret := C.pcpoint_from_hexwkb(_c_hexwkb) + return &Pcpoint{_inner: _cret} +} + + +// PcpointAsHexwkb wraps MEOS C function pcpoint_as_hexwkb. +func PcpointAsHexwkb(pt *Pcpoint) string { + _cret := C.pcpoint_as_hexwkb(pt._inner) + return C.GoString(_cret) +} + + +// PcpointCopy wraps MEOS C function pcpoint_copy. +func PcpointCopy(pt *Pcpoint) *Pcpoint { + _cret := C.pcpoint_copy(pt._inner) + return &Pcpoint{_inner: _cret} +} + + +// PcpointGetPcid wraps MEOS C function pcpoint_get_pcid. +func PcpointGetPcid(pt *Pcpoint) uint32 { + _cret := C.pcpoint_get_pcid(pt._inner) + return uint32(_cret) +} + + +// PcpointHash wraps MEOS C function pcpoint_hash. +func PcpointHash(pt *Pcpoint) uint32 { + _cret := C.pcpoint_hash(pt._inner) + return uint32(_cret) +} + + +// PcpointHashExtended wraps MEOS C function pcpoint_hash_extended. +func PcpointHashExtended(pt *Pcpoint, seed uint64) uint64 { + _cret := C.pcpoint_hash_extended(pt._inner, C.uint64_t(seed)) + return uint64(_cret) +} + + +// PcpointGetX wraps MEOS C function pcpoint_get_x. +func PcpointGetX(pt *Pcpoint, schema *PCSchema, out unsafe.Pointer) bool { + _cret := C.pcpoint_get_x(pt._inner, schema._inner, (*C.double)(unsafe.Pointer(out))) + return bool(_cret) +} + + +// PcpointGetY wraps MEOS C function pcpoint_get_y. +func PcpointGetY(pt *Pcpoint, schema *PCSchema, out unsafe.Pointer) bool { + _cret := C.pcpoint_get_y(pt._inner, schema._inner, (*C.double)(unsafe.Pointer(out))) + return bool(_cret) +} + + +// PcpointGetZ wraps MEOS C function pcpoint_get_z. +func PcpointGetZ(pt *Pcpoint, schema *PCSchema, out unsafe.Pointer) bool { + _cret := C.pcpoint_get_z(pt._inner, schema._inner, (*C.double)(unsafe.Pointer(out))) + return bool(_cret) +} + + +// PcpointGetDim wraps MEOS C function pcpoint_get_dim. +func PcpointGetDim(pt *Pcpoint, schema *PCSchema, name string, out unsafe.Pointer) bool { + _c_name := C.CString(name) + defer C.free(unsafe.Pointer(_c_name)) + _cret := C.pcpoint_get_dim(pt._inner, schema._inner, _c_name, (*C.double)(unsafe.Pointer(out))) + return bool(_cret) +} + + +// PcpointToTpcbox wraps MEOS C function pcpoint_to_tpcbox. +func PcpointToTpcbox(pt *Pcpoint, schema *PCSchema) *TPCBox { + _cret := C.pcpoint_to_tpcbox(pt._inner, schema._inner) + return &TPCBox{_inner: _cret} +} + + +// MeosPcSchema wraps MEOS C function meos_pc_schema. +func MeosPcSchema(pcid uint32) *PCSchema { + _cret := C.meos_pc_schema(C.uint32_t(pcid)) + return &PCSchema{_inner: _cret} +} + + +// MeosPcSchemaRegister wraps MEOS C function meos_pc_schema_register. +func MeosPcSchemaRegister(pcid uint32, schema *PCSchema) { + C.meos_pc_schema_register(C.uint32_t(pcid), schema._inner) +} + + +// MeosPcSchemaRegisterXml wraps MEOS C function meos_pc_schema_register_xml. +func MeosPcSchemaRegisterXml(pcid uint32, schema *PCSchema, xml_text string) { + _c_xml_text := C.CString(xml_text) + defer C.free(unsafe.Pointer(_c_xml_text)) + C.meos_pc_schema_register_xml(C.uint32_t(pcid), schema._inner, _c_xml_text) +} + + +// MeosPcSchemaXml wraps MEOS C function meos_pc_schema_xml. +func MeosPcSchemaXml(pcid uint32) string { + _cret := C.meos_pc_schema_xml(C.uint32_t(pcid)) + return C.GoString(_cret) +} + + +// MeosPcSchemaClear wraps MEOS C function meos_pc_schema_clear. +func MeosPcSchemaClear() { + C.meos_pc_schema_clear() +} + + +// PcpointCmp wraps MEOS C function pcpoint_cmp. +func PcpointCmp(pt1 *Pcpoint, pt2 *Pcpoint) int { + _cret := C.pcpoint_cmp(pt1._inner, pt2._inner) + return int(_cret) +} + + +// PcpointEq wraps MEOS C function pcpoint_eq. +func PcpointEq(pt1 *Pcpoint, pt2 *Pcpoint) bool { + _cret := C.pcpoint_eq(pt1._inner, pt2._inner) + return bool(_cret) +} + + +// PcpointNe wraps MEOS C function pcpoint_ne. +func PcpointNe(pt1 *Pcpoint, pt2 *Pcpoint) bool { + _cret := C.pcpoint_ne(pt1._inner, pt2._inner) + return bool(_cret) +} + + +// PcpointLt wraps MEOS C function pcpoint_lt. +func PcpointLt(pt1 *Pcpoint, pt2 *Pcpoint) bool { + _cret := C.pcpoint_lt(pt1._inner, pt2._inner) + return bool(_cret) +} + + +// PcpointLe wraps MEOS C function pcpoint_le. +func PcpointLe(pt1 *Pcpoint, pt2 *Pcpoint) bool { + _cret := C.pcpoint_le(pt1._inner, pt2._inner) + return bool(_cret) +} + + +// PcpointGt wraps MEOS C function pcpoint_gt. +func PcpointGt(pt1 *Pcpoint, pt2 *Pcpoint) bool { + _cret := C.pcpoint_gt(pt1._inner, pt2._inner) + return bool(_cret) +} + + +// PcpointGe wraps MEOS C function pcpoint_ge. +func PcpointGe(pt1 *Pcpoint, pt2 *Pcpoint) bool { + _cret := C.pcpoint_ge(pt1._inner, pt2._inner) + return bool(_cret) +} + + +// PcpatchHexIn wraps MEOS C function pcpatch_hex_in. +func PcpatchHexIn(str string) *Pcpatch { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.pcpatch_hex_in(_c_str) + return &Pcpatch{_inner: _cret} +} + + +// PcpatchHexOut wraps MEOS C function pcpatch_hex_out. +func PcpatchHexOut(pa *Pcpatch, maxdd int) string { + _cret := C.pcpatch_hex_out(pa._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// PcpatchFromHexwkb wraps MEOS C function pcpatch_from_hexwkb. +func PcpatchFromHexwkb(hexwkb string) *Pcpatch { + _c_hexwkb := C.CString(hexwkb) + defer C.free(unsafe.Pointer(_c_hexwkb)) + _cret := C.pcpatch_from_hexwkb(_c_hexwkb) + return &Pcpatch{_inner: _cret} +} + + +// PcpatchAsHexwkb wraps MEOS C function pcpatch_as_hexwkb. +func PcpatchAsHexwkb(pa *Pcpatch) string { + _cret := C.pcpatch_as_hexwkb(pa._inner) + return C.GoString(_cret) +} + + +// PcpatchCopy wraps MEOS C function pcpatch_copy. +func PcpatchCopy(pa *Pcpatch) *Pcpatch { + _cret := C.pcpatch_copy(pa._inner) + return &Pcpatch{_inner: _cret} +} + + +// PcpatchGetPcid wraps MEOS C function pcpatch_get_pcid. +func PcpatchGetPcid(pa *Pcpatch) uint32 { + _cret := C.pcpatch_get_pcid(pa._inner) + return uint32(_cret) +} + + +// PcpatchNpoints wraps MEOS C function pcpatch_npoints. +func PcpatchNpoints(pa *Pcpatch) uint32 { + _cret := C.pcpatch_npoints(pa._inner) + return uint32(_cret) +} + + +// PcpatchHash wraps MEOS C function pcpatch_hash. +func PcpatchHash(pa *Pcpatch) uint32 { + _cret := C.pcpatch_hash(pa._inner) + return uint32(_cret) +} + + +// PcpatchHashExtended wraps MEOS C function pcpatch_hash_extended. +func PcpatchHashExtended(pa *Pcpatch, seed uint64) uint64 { + _cret := C.pcpatch_hash_extended(pa._inner, C.uint64_t(seed)) + return uint64(_cret) +} + + +// PcpatchCmp wraps MEOS C function pcpatch_cmp. +func PcpatchCmp(pa1 *Pcpatch, pa2 *Pcpatch) int { + _cret := C.pcpatch_cmp(pa1._inner, pa2._inner) + return int(_cret) +} + + +// PcpatchEq wraps MEOS C function pcpatch_eq. +func PcpatchEq(pa1 *Pcpatch, pa2 *Pcpatch) bool { + _cret := C.pcpatch_eq(pa1._inner, pa2._inner) + return bool(_cret) +} + + +// PcpatchNe wraps MEOS C function pcpatch_ne. +func PcpatchNe(pa1 *Pcpatch, pa2 *Pcpatch) bool { + _cret := C.pcpatch_ne(pa1._inner, pa2._inner) + return bool(_cret) +} + + +// PcpatchLt wraps MEOS C function pcpatch_lt. +func PcpatchLt(pa1 *Pcpatch, pa2 *Pcpatch) bool { + _cret := C.pcpatch_lt(pa1._inner, pa2._inner) + return bool(_cret) +} + + +// PcpatchLe wraps MEOS C function pcpatch_le. +func PcpatchLe(pa1 *Pcpatch, pa2 *Pcpatch) bool { + _cret := C.pcpatch_le(pa1._inner, pa2._inner) + return bool(_cret) +} + + +// PcpatchGt wraps MEOS C function pcpatch_gt. +func PcpatchGt(pa1 *Pcpatch, pa2 *Pcpatch) bool { + _cret := C.pcpatch_gt(pa1._inner, pa2._inner) + return bool(_cret) +} + + +// PcpatchGe wraps MEOS C function pcpatch_ge. +func PcpatchGe(pa1 *Pcpatch, pa2 *Pcpatch) bool { + _cret := C.pcpatch_ge(pa1._inner, pa2._inner) + return bool(_cret) +} + + +// PcpointsetIn wraps MEOS C function pcpointset_in. +func PcpointsetIn(str string) *Set { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.pcpointset_in(_c_str) + return &Set{_inner: _cret} +} + + +// PcpointsetOut wraps MEOS C function pcpointset_out. +func PcpointsetOut(s *Set, maxdd int) string { + _cret := C.pcpointset_out(s._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// PcpointsetMake wraps MEOS C function pcpointset_make. +func PcpointsetMake(values unsafe.Pointer, count int) *Set { + _cret := C.pcpointset_make((**C.Pcpoint)(unsafe.Pointer(values)), C.int(count)) + return &Set{_inner: _cret} +} + + +// PcpointToSet wraps MEOS C function pcpoint_to_set. +func PcpointToSet(pt *Pcpoint) *Set { + _cret := C.pcpoint_to_set(pt._inner) + return &Set{_inner: _cret} +} + + +// PcpointsetStartValue wraps MEOS C function pcpointset_start_value. +func PcpointsetStartValue(s *Set) *Pcpoint { + _cret := C.pcpointset_start_value(s._inner) + return &Pcpoint{_inner: _cret} +} + + +// PcpointsetEndValue wraps MEOS C function pcpointset_end_value. +func PcpointsetEndValue(s *Set) *Pcpoint { + _cret := C.pcpointset_end_value(s._inner) + return &Pcpoint{_inner: _cret} +} + + +// PcpointsetValueN wraps MEOS C function pcpointset_value_n. +func PcpointsetValueN(s *Set, n int) (bool, *Pcpoint) { + var _out_result *C.Pcpoint + _cret := C.pcpointset_value_n(s._inner, C.int(n), &_out_result) + return bool(_cret), &Pcpoint{_inner: _out_result} +} + + +// PcpointsetValues wraps MEOS C function pcpointset_values. +func PcpointsetValues(s *Set, count unsafe.Pointer) unsafe.Pointer { + _cret := C.pcpointset_values(s._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// ContainsSetPcpoint wraps MEOS C function contains_set_pcpoint. +func ContainsSetPcpoint(s *Set, pt *Pcpoint) bool { + _cret := C.contains_set_pcpoint(s._inner, pt._inner) + return bool(_cret) +} + + +// ContainedPcpointSet wraps MEOS C function contained_pcpoint_set. +func ContainedPcpointSet(pt *Pcpoint, s *Set) bool { + _cret := C.contained_pcpoint_set(pt._inner, s._inner) + return bool(_cret) +} + + +// IntersectionPcpointSet wraps MEOS C function intersection_pcpoint_set. +func IntersectionPcpointSet(pt *Pcpoint, s *Set) *Set { + _cret := C.intersection_pcpoint_set(pt._inner, s._inner) + return &Set{_inner: _cret} +} + + +// IntersectionSetPcpoint wraps MEOS C function intersection_set_pcpoint. +func IntersectionSetPcpoint(s *Set, pt *Pcpoint) *Set { + _cret := C.intersection_set_pcpoint(s._inner, pt._inner) + return &Set{_inner: _cret} +} + + +// MinusPcpointSet wraps MEOS C function minus_pcpoint_set. +func MinusPcpointSet(pt *Pcpoint, s *Set) *Set { + _cret := C.minus_pcpoint_set(pt._inner, s._inner) + return &Set{_inner: _cret} +} + + +// MinusSetPcpoint wraps MEOS C function minus_set_pcpoint. +func MinusSetPcpoint(s *Set, pt *Pcpoint) *Set { + _cret := C.minus_set_pcpoint(s._inner, pt._inner) + return &Set{_inner: _cret} +} + + +// UnionPcpointSet wraps MEOS C function union_pcpoint_set. +func UnionPcpointSet(pt *Pcpoint, s *Set) *Set { + _cret := C.gunion_pcpoint_set(pt._inner, s._inner) + return &Set{_inner: _cret} +} + + +// UnionSetPcpoint wraps MEOS C function union_set_pcpoint. +func UnionSetPcpoint(s *Set, pt *Pcpoint) *Set { + _cret := C.gunion_set_pcpoint(s._inner, pt._inner) + return &Set{_inner: _cret} +} + + +// PcpointUnionTransfn wraps MEOS C function pcpoint_union_transfn. +func PcpointUnionTransfn(state *Set, pt *Pcpoint) *Set { + _cret := C.pcpoint_union_transfn(state._inner, pt._inner) + return &Set{_inner: _cret} +} + + +// PcpatchsetIn wraps MEOS C function pcpatchset_in. +func PcpatchsetIn(str string) *Set { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.pcpatchset_in(_c_str) + return &Set{_inner: _cret} +} + + +// PcpatchsetOut wraps MEOS C function pcpatchset_out. +func PcpatchsetOut(s *Set, maxdd int) string { + _cret := C.pcpatchset_out(s._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// PcpatchsetMake wraps MEOS C function pcpatchset_make. +func PcpatchsetMake(values unsafe.Pointer, count int) *Set { + _cret := C.pcpatchset_make((**C.Pcpatch)(unsafe.Pointer(values)), C.int(count)) + return &Set{_inner: _cret} +} + + +// PcpatchToSet wraps MEOS C function pcpatch_to_set. +func PcpatchToSet(pa *Pcpatch) *Set { + _cret := C.pcpatch_to_set(pa._inner) + return &Set{_inner: _cret} +} + + +// PcpatchsetStartValue wraps MEOS C function pcpatchset_start_value. +func PcpatchsetStartValue(s *Set) *Pcpatch { + _cret := C.pcpatchset_start_value(s._inner) + return &Pcpatch{_inner: _cret} +} + + +// PcpatchsetEndValue wraps MEOS C function pcpatchset_end_value. +func PcpatchsetEndValue(s *Set) *Pcpatch { + _cret := C.pcpatchset_end_value(s._inner) + return &Pcpatch{_inner: _cret} +} + + +// PcpatchsetValueN wraps MEOS C function pcpatchset_value_n. +func PcpatchsetValueN(s *Set, n int) (bool, *Pcpatch) { + var _out_result *C.Pcpatch + _cret := C.pcpatchset_value_n(s._inner, C.int(n), &_out_result) + return bool(_cret), &Pcpatch{_inner: _out_result} +} + + +// PcpatchsetValues wraps MEOS C function pcpatchset_values. +func PcpatchsetValues(s *Set, count unsafe.Pointer) unsafe.Pointer { + _cret := C.pcpatchset_values(s._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// ContainsSetPcpatch wraps MEOS C function contains_set_pcpatch. +func ContainsSetPcpatch(s *Set, pa *Pcpatch) bool { + _cret := C.contains_set_pcpatch(s._inner, pa._inner) + return bool(_cret) +} + + +// ContainedPcpatchSet wraps MEOS C function contained_pcpatch_set. +func ContainedPcpatchSet(pa *Pcpatch, s *Set) bool { + _cret := C.contained_pcpatch_set(pa._inner, s._inner) + return bool(_cret) +} + + +// IntersectionPcpatchSet wraps MEOS C function intersection_pcpatch_set. +func IntersectionPcpatchSet(pa *Pcpatch, s *Set) *Set { + _cret := C.intersection_pcpatch_set(pa._inner, s._inner) + return &Set{_inner: _cret} +} + + +// IntersectionSetPcpatch wraps MEOS C function intersection_set_pcpatch. +func IntersectionSetPcpatch(s *Set, pa *Pcpatch) *Set { + _cret := C.intersection_set_pcpatch(s._inner, pa._inner) + return &Set{_inner: _cret} +} + + +// MinusPcpatchSet wraps MEOS C function minus_pcpatch_set. +func MinusPcpatchSet(pa *Pcpatch, s *Set) *Set { + _cret := C.minus_pcpatch_set(pa._inner, s._inner) + return &Set{_inner: _cret} +} + + +// MinusSetPcpatch wraps MEOS C function minus_set_pcpatch. +func MinusSetPcpatch(s *Set, pa *Pcpatch) *Set { + _cret := C.minus_set_pcpatch(s._inner, pa._inner) + return &Set{_inner: _cret} +} + + +// UnionPcpatchSet wraps MEOS C function union_pcpatch_set. +func UnionPcpatchSet(pa *Pcpatch, s *Set) *Set { + _cret := C.gunion_pcpatch_set(pa._inner, s._inner) + return &Set{_inner: _cret} +} + + +// UnionSetPcpatch wraps MEOS C function union_set_pcpatch. +func UnionSetPcpatch(s *Set, pa *Pcpatch) *Set { + _cret := C.gunion_set_pcpatch(s._inner, pa._inner) + return &Set{_inner: _cret} +} + + +// PcpatchUnionTransfn wraps MEOS C function pcpatch_union_transfn. +func PcpatchUnionTransfn(state *Set, pa *Pcpatch) *Set { + _cret := C.pcpatch_union_transfn(state._inner, pa._inner) + return &Set{_inner: _cret} +} + + +// TpcboxIn wraps MEOS C function tpcbox_in. +func TpcboxIn(str string) *TPCBox { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tpcbox_in(_c_str) + return &TPCBox{_inner: _cret} +} + + +// TpcboxOut wraps MEOS C function tpcbox_out. +func TpcboxOut(box *TPCBox, maxdd int) string { + _cret := C.tpcbox_out(box._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// TpcboxMake wraps MEOS C function tpcbox_make. +func TpcboxMake(hasx bool, hasz bool, hast bool, geodetic bool, srid int32, pcid uint32, xmin float64, xmax float64, ymin float64, ymax float64, zmin float64, zmax float64, period *Span) *TPCBox { + _cret := C.tpcbox_make(C.bool(hasx), C.bool(hasz), C.bool(hast), C.bool(geodetic), C.int32_t(srid), C.uint32_t(pcid), C.double(xmin), C.double(xmax), C.double(ymin), C.double(ymax), C.double(zmin), C.double(zmax), period._inner) + return &TPCBox{_inner: _cret} +} + + +// TpcboxCopy wraps MEOS C function tpcbox_copy. +func TpcboxCopy(box *TPCBox) *TPCBox { + _cret := C.tpcbox_copy(box._inner) + return &TPCBox{_inner: _cret} +} + + +// PcpatchToTpcbox wraps MEOS C function pcpatch_to_tpcbox. +func PcpatchToTpcbox(pa *Pcpatch, srid int32) *TPCBox { + _cret := C.pcpatch_to_tpcbox(pa._inner, C.int32_t(srid)) + return &TPCBox{_inner: _cret} +} + + +// TpcboxHasx wraps MEOS C function tpcbox_hasx. +func TpcboxHasx(box *TPCBox) bool { + _cret := C.tpcbox_hasx(box._inner) + return bool(_cret) +} + + +// TpcboxHasz wraps MEOS C function tpcbox_hasz. +func TpcboxHasz(box *TPCBox) bool { + _cret := C.tpcbox_hasz(box._inner) + return bool(_cret) +} + + +// TpcboxHast wraps MEOS C function tpcbox_hast. +func TpcboxHast(box *TPCBox) bool { + _cret := C.tpcbox_hast(box._inner) + return bool(_cret) +} + + +// TpcboxGeodetic wraps MEOS C function tpcbox_geodetic. +func TpcboxGeodetic(box *TPCBox) bool { + _cret := C.tpcbox_geodetic(box._inner) + return bool(_cret) +} + + +// TpcboxXmin wraps MEOS C function tpcbox_xmin. +func TpcboxXmin(box *TPCBox) (bool, float64) { + var _out_result C.double + _cret := C.tpcbox_xmin(box._inner, &_out_result) + return bool(_cret), float64(_out_result) +} + + +// TpcboxXmax wraps MEOS C function tpcbox_xmax. +func TpcboxXmax(box *TPCBox) (bool, float64) { + var _out_result C.double + _cret := C.tpcbox_xmax(box._inner, &_out_result) + return bool(_cret), float64(_out_result) +} + + +// TpcboxYmin wraps MEOS C function tpcbox_ymin. +func TpcboxYmin(box *TPCBox) (bool, float64) { + var _out_result C.double + _cret := C.tpcbox_ymin(box._inner, &_out_result) + return bool(_cret), float64(_out_result) +} + + +// TpcboxYmax wraps MEOS C function tpcbox_ymax. +func TpcboxYmax(box *TPCBox) (bool, float64) { + var _out_result C.double + _cret := C.tpcbox_ymax(box._inner, &_out_result) + return bool(_cret), float64(_out_result) +} + + +// TpcboxZmin wraps MEOS C function tpcbox_zmin. +func TpcboxZmin(box *TPCBox) (bool, float64) { + var _out_result C.double + _cret := C.tpcbox_zmin(box._inner, &_out_result) + return bool(_cret), float64(_out_result) +} + + +// TpcboxZmax wraps MEOS C function tpcbox_zmax. +func TpcboxZmax(box *TPCBox) (bool, float64) { + var _out_result C.double + _cret := C.tpcbox_zmax(box._inner, &_out_result) + return bool(_cret), float64(_out_result) +} + + +// TpcboxTmin wraps MEOS C function tpcbox_tmin. +func TpcboxTmin(box *TPCBox) (bool, int64) { + var _out_result C.TimestampTz + _cret := C.tpcbox_tmin(box._inner, &_out_result) + return bool(_cret), int64(_out_result) +} + + +// TpcboxTminInc wraps MEOS C function tpcbox_tmin_inc. +func TpcboxTminInc(box *TPCBox) (bool, bool) { + var _out_result C.bool + _cret := C.tpcbox_tmin_inc(box._inner, &_out_result) + return bool(_cret), bool(_out_result) +} + + +// TpcboxTmax wraps MEOS C function tpcbox_tmax. +func TpcboxTmax(box *TPCBox) (bool, int64) { + var _out_result C.TimestampTz + _cret := C.tpcbox_tmax(box._inner, &_out_result) + return bool(_cret), int64(_out_result) +} + + +// TpcboxTmaxInc wraps MEOS C function tpcbox_tmax_inc. +func TpcboxTmaxInc(box *TPCBox) (bool, bool) { + var _out_result C.bool + _cret := C.tpcbox_tmax_inc(box._inner, &_out_result) + return bool(_cret), bool(_out_result) +} + + +// TpcboxSRID wraps MEOS C function tpcbox_srid. +func TpcboxSRID(box *TPCBox) int32 { + _cret := C.tpcbox_srid(box._inner) + return int32(_cret) +} + + +// TpcboxPcid wraps MEOS C function tpcbox_pcid. +func TpcboxPcid(box *TPCBox) uint32 { + _cret := C.tpcbox_pcid(box._inner) + return uint32(_cret) +} + + +// TpcboxToSTBOX wraps MEOS C function tpcbox_to_stbox. +func TpcboxToSTBOX(box *TPCBox) *STBox { + _cret := C.tpcbox_to_stbox(box._inner) + return &STBox{_inner: _cret} +} + + +// TpcboxExpand wraps MEOS C function tpcbox_expand. +func TpcboxExpand(box1 *TPCBox, box2 *TPCBox) { + C.tpcbox_expand(box1._inner, box2._inner) +} + + +// TpcboxRound wraps MEOS C function tpcbox_round. +func TpcboxRound(box *TPCBox, maxdd int) *TPCBox { + _cret := C.tpcbox_round(box._inner, C.int(maxdd)) + return &TPCBox{_inner: _cret} +} + + +// TpcboxSetSRID wraps MEOS C function tpcbox_set_srid. +func TpcboxSetSRID(box *TPCBox, srid int32) *TPCBox { + _cret := C.tpcbox_set_srid(box._inner, C.int32_t(srid)) + return &TPCBox{_inner: _cret} +} + + +// UnionTpcboxTpcbox wraps MEOS C function union_tpcbox_tpcbox. +func UnionTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox, strict bool) *TPCBox { + _cret := C.gunion_tpcbox_tpcbox(box1._inner, box2._inner, C.bool(strict)) + return &TPCBox{_inner: _cret} +} + + +// InterTpcboxTpcbox wraps MEOS C function inter_tpcbox_tpcbox. +func InterTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) (bool, *TPCBox) { + var _out_result C.TPCBox + _cret := C.inter_tpcbox_tpcbox(box1._inner, box2._inner, &_out_result) + return bool(_cret), &TPCBox{_inner: &_out_result} +} + + +// IntersectionTpcboxTpcbox wraps MEOS C function intersection_tpcbox_tpcbox. +func IntersectionTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) *TPCBox { + _cret := C.intersection_tpcbox_tpcbox(box1._inner, box2._inner) + return &TPCBox{_inner: _cret} +} + + +// ContainsTpcboxTpcbox wraps MEOS C function contains_tpcbox_tpcbox. +func ContainsTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.contains_tpcbox_tpcbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// ContainedTpcboxTpcbox wraps MEOS C function contained_tpcbox_tpcbox. +func ContainedTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.contained_tpcbox_tpcbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OverlapsTpcboxTpcbox wraps MEOS C function overlaps_tpcbox_tpcbox. +func OverlapsTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.overlaps_tpcbox_tpcbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// SameTpcboxTpcbox wraps MEOS C function same_tpcbox_tpcbox. +func SameTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.same_tpcbox_tpcbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// AdjacentTpcboxTpcbox wraps MEOS C function adjacent_tpcbox_tpcbox. +func AdjacentTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.adjacent_tpcbox_tpcbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// TpcboxCmp wraps MEOS C function tpcbox_cmp. +func TpcboxCmp(box1 *TPCBox, box2 *TPCBox) int { + _cret := C.tpcbox_cmp(box1._inner, box2._inner) + return int(_cret) +} + + +// TpcboxEq wraps MEOS C function tpcbox_eq. +func TpcboxEq(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.tpcbox_eq(box1._inner, box2._inner) + return bool(_cret) +} + + +// TpcboxNe wraps MEOS C function tpcbox_ne. +func TpcboxNe(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.tpcbox_ne(box1._inner, box2._inner) + return bool(_cret) +} + + +// TpcboxLt wraps MEOS C function tpcbox_lt. +func TpcboxLt(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.tpcbox_lt(box1._inner, box2._inner) + return bool(_cret) +} + + +// TpcboxLe wraps MEOS C function tpcbox_le. +func TpcboxLe(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.tpcbox_le(box1._inner, box2._inner) + return bool(_cret) +} + + +// TpcboxGt wraps MEOS C function tpcbox_gt. +func TpcboxGt(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.tpcbox_gt(box1._inner, box2._inner) + return bool(_cret) +} + + +// TpcboxGe wraps MEOS C function tpcbox_ge. +func TpcboxGe(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.tpcbox_ge(box1._inner, box2._inner) + return bool(_cret) +} + + +// LeftTpcboxTpcbox wraps MEOS C function left_tpcbox_tpcbox. +func LeftTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.left_tpcbox_tpcbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OverleftTpcboxTpcbox wraps MEOS C function overleft_tpcbox_tpcbox. +func OverleftTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.overleft_tpcbox_tpcbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// RightTpcboxTpcbox wraps MEOS C function right_tpcbox_tpcbox. +func RightTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.right_tpcbox_tpcbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OverrightTpcboxTpcbox wraps MEOS C function overright_tpcbox_tpcbox. +func OverrightTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.overright_tpcbox_tpcbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// BelowTpcboxTpcbox wraps MEOS C function below_tpcbox_tpcbox. +func BelowTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.below_tpcbox_tpcbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OverbelowTpcboxTpcbox wraps MEOS C function overbelow_tpcbox_tpcbox. +func OverbelowTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.overbelow_tpcbox_tpcbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// AboveTpcboxTpcbox wraps MEOS C function above_tpcbox_tpcbox. +func AboveTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.above_tpcbox_tpcbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OveraboveTpcboxTpcbox wraps MEOS C function overabove_tpcbox_tpcbox. +func OveraboveTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.overabove_tpcbox_tpcbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// FrontTpcboxTpcbox wraps MEOS C function front_tpcbox_tpcbox. +func FrontTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.front_tpcbox_tpcbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OverfrontTpcboxTpcbox wraps MEOS C function overfront_tpcbox_tpcbox. +func OverfrontTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.overfront_tpcbox_tpcbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// BackTpcboxTpcbox wraps MEOS C function back_tpcbox_tpcbox. +func BackTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.back_tpcbox_tpcbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OverbackTpcboxTpcbox wraps MEOS C function overback_tpcbox_tpcbox. +func OverbackTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.overback_tpcbox_tpcbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// BeforeTpcboxTpcbox wraps MEOS C function before_tpcbox_tpcbox. +func BeforeTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.before_tpcbox_tpcbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OverbeforeTpcboxTpcbox wraps MEOS C function overbefore_tpcbox_tpcbox. +func OverbeforeTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.overbefore_tpcbox_tpcbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// AfterTpcboxTpcbox wraps MEOS C function after_tpcbox_tpcbox. +func AfterTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.after_tpcbox_tpcbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// OverafterTpcboxTpcbox wraps MEOS C function overafter_tpcbox_tpcbox. +func OverafterTpcboxTpcbox(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.overafter_tpcbox_tpcbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// EnsureSamePcidTpcbox wraps MEOS C function ensure_same_pcid_tpcbox. +func EnsureSamePcidTpcbox(box1 *TPCBox, box2 *TPCBox) bool { + _cret := C.ensure_same_pcid_tpcbox(box1._inner, box2._inner) + return bool(_cret) +} + + +// TpointcloudinstMake wraps MEOS C function tpointcloudinst_make. +func TpointcloudinstMake(pt *Pcpoint, t int64) *TInstant { + _cret := C.tpointcloudinst_make(pt._inner, C.TimestampTz(t)) + return &TInstant{_inner: _cret} +} + + +// EintersectsTpcpointGeo wraps MEOS C function eintersects_tpcpoint_geo. +func EintersectsTpcpointGeo(temp *Temporal, gs *Geom) bool { + _cret := C.eintersects_tpcpoint_geo(temp._inner, gs._inner) + return bool(_cret) +} + + +// NadTpcpointGeo wraps MEOS C function nad_tpcpoint_geo. +func NadTpcpointGeo(temp *Temporal, gs *Geom) float64 { + _cret := C.nad_tpcpoint_geo(temp._inner, gs._inner) + return float64(_cret) +} + diff --git a/functions/meos_meos_pose.go b/functions/meos_meos_pose.go new file mode 100644 index 0000000..4b43966 --- /dev/null +++ b/functions/meos_meos_pose.go @@ -0,0 +1,973 @@ +package functions + +/* +#include +#include "meos.h" +#include "meos_catalog.h" +#include "meos_geo.h" +#include "meos_internal.h" +#include "meos_internal_geo.h" +#include "meos_npoint.h" +#include "meos_cbuffer.h" +#include "meos_pose.h" +#include "meos_rgeo.h" +#include "meos_h3.h" +#include "meos_quadbin.h" +#include "meos_json.h" +#include "meos_pointcloud.h" +#include "meos_arrow.h" + +// cgo reads C.union_* as a union TYPE; alias the union operators so C.g resolves them as functions. +#define gunion_bigint_set union_bigint_set +#define gunion_bigint_span union_bigint_span +#define gunion_bigint_spanset union_bigint_spanset +#define gunion_cbuffer_set union_cbuffer_set +#define gunion_date_set union_date_set +#define gunion_date_span union_date_span +#define gunion_date_spanset union_date_spanset +#define gunion_float_set union_float_set +#define gunion_float_span union_float_span +#define gunion_float_spanset union_float_spanset +#define gunion_geo_set union_geo_set +#define gunion_int_set union_int_set +#define gunion_int_span union_int_span +#define gunion_int_spanset union_int_spanset +#define gunion_jsonb_set union_jsonb_set +#define gunion_npoint_set union_npoint_set +#define gunion_pcpatch_set union_pcpatch_set +#define gunion_pcpoint_set union_pcpoint_set +#define gunion_pose_set union_pose_set +#define gunion_set_bigint union_set_bigint +#define gunion_set_cbuffer union_set_cbuffer +#define gunion_set_date union_set_date +#define gunion_set_float union_set_float +#define gunion_set_geo union_set_geo +#define gunion_set_int union_set_int +#define gunion_set_jsonb union_set_jsonb +#define gunion_set_npoint union_set_npoint +#define gunion_set_pcpatch union_set_pcpatch +#define gunion_set_pcpoint union_set_pcpoint +#define gunion_set_pose union_set_pose +#define gunion_set_set union_set_set +#define gunion_set_text union_set_text +#define gunion_set_timestamptz union_set_timestamptz +#define gunion_set_value union_set_value +#define gunion_span_bigint union_span_bigint +#define gunion_span_date union_span_date +#define gunion_span_float union_span_float +#define gunion_span_int union_span_int +#define gunion_span_span union_span_span +#define gunion_span_spanset union_span_spanset +#define gunion_span_timestamptz union_span_timestamptz +#define gunion_span_value union_span_value +#define gunion_spanset_bigint union_spanset_bigint +#define gunion_spanset_date union_spanset_date +#define gunion_spanset_float union_spanset_float +#define gunion_spanset_int union_spanset_int +#define gunion_spanset_span union_spanset_span +#define gunion_spanset_spanset union_spanset_spanset +#define gunion_spanset_timestamptz union_spanset_timestamptz +#define gunion_spanset_value union_spanset_value +#define gunion_stbox_stbox union_stbox_stbox +#define gunion_tbox_tbox union_tbox_tbox +#define gunion_text_set union_text_set +#define gunion_timestamptz_set union_timestamptz_set +#define gunion_timestamptz_span union_timestamptz_span +#define gunion_timestamptz_spanset union_timestamptz_spanset +#define gunion_tpcbox_tpcbox union_tpcbox_tpcbox +#define gunion_value_set union_value_set +#define gunion_value_span union_value_span +#define gunion_value_spanset union_value_spanset +*/ +import "C" +import ( + "unsafe" +) + +var _ = unsafe.Pointer(nil) + +// PoseAsEWKT wraps MEOS C function pose_as_ewkt. +func PoseAsEWKT(pose *Pose, maxdd int) string { + _cret := C.pose_as_ewkt(pose._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// PoseAsHexwkb wraps MEOS C function pose_as_hexwkb. +func PoseAsHexwkb(pose *Pose, variant uint8, size_out unsafe.Pointer) string { + _cret := C.pose_as_hexwkb(pose._inner, C.uint8_t(variant), (*C.size_t)(unsafe.Pointer(size_out))) + return C.GoString(_cret) +} + + +// PoseAsText wraps MEOS C function pose_as_text. +func PoseAsText(pose *Pose, maxdd int) string { + _cret := C.pose_as_text(pose._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// PoseAsWKB wraps MEOS C function pose_as_wkb. +func PoseAsWKB(pose *Pose, variant uint8, size_out unsafe.Pointer) unsafe.Pointer { + _cret := C.pose_as_wkb(pose._inner, C.uint8_t(variant), (*C.size_t)(unsafe.Pointer(size_out))) + return unsafe.Pointer(_cret) +} + + +// PoseFromWKB wraps MEOS C function pose_from_wkb. +func PoseFromWKB(wkb unsafe.Pointer, size uint) *Pose { + _cret := C.pose_from_wkb((*C.uint8_t)(unsafe.Pointer(wkb)), C.size_t(size)) + return &Pose{_inner: _cret} +} + + +// PoseFromHexwkb wraps MEOS C function pose_from_hexwkb. +func PoseFromHexwkb(hexwkb string) *Pose { + _c_hexwkb := C.CString(hexwkb) + defer C.free(unsafe.Pointer(_c_hexwkb)) + _cret := C.pose_from_hexwkb(_c_hexwkb) + return &Pose{_inner: _cret} +} + + +// PoseIn wraps MEOS C function pose_in. +func PoseIn(str string) *Pose { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.pose_in(_c_str) + return &Pose{_inner: _cret} +} + + +// PoseOut wraps MEOS C function pose_out. +func PoseOut(pose *Pose, maxdd int) string { + _cret := C.pose_out(pose._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// PoseFromGeopose wraps MEOS C function pose_from_geopose. +func PoseFromGeopose(json string) *Pose { + _c_json := C.CString(json) + defer C.free(unsafe.Pointer(_c_json)) + _cret := C.pose_from_geopose(_c_json) + return &Pose{_inner: _cret} +} + + +// PoseAsGeopose wraps MEOS C function pose_as_geopose. +func PoseAsGeopose(pose *Pose, conformance int, precision int) string { + _cret := C.pose_as_geopose(pose._inner, C.int(conformance), C.int(precision)) + return C.GoString(_cret) +} + + +// TposeFromGeopose wraps MEOS C function tpose_from_geopose. +func TposeFromGeopose(json string) *Temporal { + _c_json := C.CString(json) + defer C.free(unsafe.Pointer(_c_json)) + _cret := C.tpose_from_geopose(_c_json) + return &Temporal{_inner: _cret} +} + + +// TposeAsGeopose wraps MEOS C function tpose_as_geopose. +func TposeAsGeopose(temp *Temporal, conformance int, precision int) string { + _cret := C.tpose_as_geopose(temp._inner, C.int(conformance), C.int(precision)) + return C.GoString(_cret) +} + + +// PoseApplyGeo wraps MEOS C function pose_apply_geo. +func PoseApplyGeo(pose *Pose, body *Geom) *Geom { + _cret := C.pose_apply_geo(pose._inner, body._inner) + return &Geom{_inner: _cret} +} + + +// TposeApplyGeo wraps MEOS C function tpose_apply_geo. +func TposeApplyGeo(temp *Temporal, body *Geom) *Temporal { + _cret := C.tpose_apply_geo(temp._inner, body._inner) + return &Temporal{_inner: _cret} +} + + +// PoseCopy wraps MEOS C function pose_copy. +func PoseCopy(pose *Pose) *Pose { + _cret := C.pose_copy(pose._inner) + return &Pose{_inner: _cret} +} + + +// PoseMake2d wraps MEOS C function pose_make_2d. +func PoseMake2d(x float64, y float64, theta float64, geodetic bool, srid int32) *Pose { + _cret := C.pose_make_2d(C.double(x), C.double(y), C.double(theta), C.bool(geodetic), C.int32_t(srid)) + return &Pose{_inner: _cret} +} + + +// PoseMake3d wraps MEOS C function pose_make_3d. +func PoseMake3d(x float64, y float64, z float64, W float64, X float64, Y float64, Z float64, geodetic bool, srid int32) *Pose { + _cret := C.pose_make_3d(C.double(x), C.double(y), C.double(z), C.double(W), C.double(X), C.double(Y), C.double(Z), C.bool(geodetic), C.int32_t(srid)) + return &Pose{_inner: _cret} +} + + +// PoseMakePoint2d wraps MEOS C function pose_make_point2d. +func PoseMakePoint2d(gs *Geom, theta float64) *Pose { + _cret := C.pose_make_point2d(gs._inner, C.double(theta)) + return &Pose{_inner: _cret} +} + + +// PoseMakePoint3d wraps MEOS C function pose_make_point3d. +func PoseMakePoint3d(gs *Geom, W float64, X float64, Y float64, Z float64) *Pose { + _cret := C.pose_make_point3d(gs._inner, C.double(W), C.double(X), C.double(Y), C.double(Z)) + return &Pose{_inner: _cret} +} + + +// PoseToPoint wraps MEOS C function pose_to_point. +func PoseToPoint(pose *Pose) *Geom { + _cret := C.pose_to_point(pose._inner) + return &Geom{_inner: _cret} +} + + +// PoseToSTBOX wraps MEOS C function pose_to_stbox. +func PoseToSTBOX(pose *Pose) *STBox { + _cret := C.pose_to_stbox(pose._inner) + return &STBox{_inner: _cret} +} + + +// PoseHash wraps MEOS C function pose_hash. +func PoseHash(pose *Pose) uint32 { + _cret := C.pose_hash(pose._inner) + return uint32(_cret) +} + + +// PoseHashExtended wraps MEOS C function pose_hash_extended. +func PoseHashExtended(pose *Pose, seed uint64) uint64 { + _cret := C.pose_hash_extended(pose._inner, C.uint64_t(seed)) + return uint64(_cret) +} + + +// PoseOrientation wraps MEOS C function pose_orientation. +func PoseOrientation(pose *Pose, count unsafe.Pointer) unsafe.Pointer { + _cret := C.pose_orientation(pose._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// PoseRotation wraps MEOS C function pose_rotation. +func PoseRotation(pose *Pose) float64 { + _cret := C.pose_rotation(pose._inner) + return float64(_cret) +} + + +// PoseYaw wraps MEOS C function pose_yaw. +func PoseYaw(pose *Pose) float64 { + _cret := C.pose_yaw(pose._inner) + return float64(_cret) +} + + +// PosePitch wraps MEOS C function pose_pitch. +func PosePitch(pose *Pose) float64 { + _cret := C.pose_pitch(pose._inner) + return float64(_cret) +} + + +// PoseRoll wraps MEOS C function pose_roll. +func PoseRoll(pose *Pose) float64 { + _cret := C.pose_roll(pose._inner) + return float64(_cret) +} + + +// PoseAngularDistance wraps MEOS C function pose_angular_distance. +func PoseAngularDistance(pose1 *Pose, pose2 *Pose) float64 { + _cret := C.pose_angular_distance(pose1._inner, pose2._inner) + return float64(_cret) +} + + +// PoseNormalize wraps MEOS C function pose_normalize. +func PoseNormalize(pose *Pose) *Pose { + _cret := C.pose_normalize(pose._inner) + return &Pose{_inner: _cret} +} + + +// PoseRound wraps MEOS C function pose_round. +func PoseRound(pose *Pose, maxdd int) *Pose { + _cret := C.pose_round(pose._inner, C.int(maxdd)) + return &Pose{_inner: _cret} +} + + +// PosearrRound wraps MEOS C function posearr_round. +func PosearrRound(posearr unsafe.Pointer, count int, maxdd int) unsafe.Pointer { + _cret := C.posearr_round((**C.Pose)(unsafe.Pointer(posearr)), C.int(count), C.int(maxdd)) + return unsafe.Pointer(_cret) +} + + +// PoseSetSRID wraps MEOS C function pose_set_srid. +func PoseSetSRID(pose *Pose, srid int32) { + C.pose_set_srid(pose._inner, C.int32_t(srid)) +} + + +// PoseSRID wraps MEOS C function pose_srid. +func PoseSRID(pose *Pose) int32 { + _cret := C.pose_srid(pose._inner) + return int32(_cret) +} + + +// PoseTransform wraps MEOS C function pose_transform. +func PoseTransform(pose *Pose, srid int32) *Pose { + _cret := C.pose_transform(pose._inner, C.int32_t(srid)) + return &Pose{_inner: _cret} +} + + +// PoseTransformPipeline wraps MEOS C function pose_transform_pipeline. +func PoseTransformPipeline(pose *Pose, pipelinestr string, srid int32, is_forward bool) *Pose { + _c_pipelinestr := C.CString(pipelinestr) + defer C.free(unsafe.Pointer(_c_pipelinestr)) + _cret := C.pose_transform_pipeline(pose._inner, _c_pipelinestr, C.int32_t(srid), C.bool(is_forward)) + return &Pose{_inner: _cret} +} + + +// PoseTstzspanToSTBOX wraps MEOS C function pose_tstzspan_to_stbox. +func PoseTstzspanToSTBOX(pose *Pose, s *Span) *STBox { + _cret := C.pose_tstzspan_to_stbox(pose._inner, s._inner) + return &STBox{_inner: _cret} +} + + +// PoseTimestamptzToSTBOX wraps MEOS C function pose_timestamptz_to_stbox. +func PoseTimestamptzToSTBOX(pose *Pose, t int64) *STBox { + _cret := C.pose_timestamptz_to_stbox(pose._inner, C.TimestampTz(t)) + return &STBox{_inner: _cret} +} + + +// DistancePoseGeo wraps MEOS C function distance_pose_geo. +func DistancePoseGeo(pose *Pose, gs *Geom) float64 { + _cret := C.distance_pose_geo(pose._inner, gs._inner) + return float64(_cret) +} + + +// DistancePosePose wraps MEOS C function distance_pose_pose. +func DistancePosePose(pose1 *Pose, pose2 *Pose) float64 { + _cret := C.distance_pose_pose(pose1._inner, pose2._inner) + return float64(_cret) +} + + +// DistancePoseSTBOX wraps MEOS C function distance_pose_stbox. +func DistancePoseSTBOX(pose *Pose, box *STBox) float64 { + _cret := C.distance_pose_stbox(pose._inner, box._inner) + return float64(_cret) +} + + +// PoseCmp wraps MEOS C function pose_cmp. +func PoseCmp(pose1 *Pose, pose2 *Pose) int { + _cret := C.pose_cmp(pose1._inner, pose2._inner) + return int(_cret) +} + + +// PoseEq wraps MEOS C function pose_eq. +func PoseEq(pose1 *Pose, pose2 *Pose) bool { + _cret := C.pose_eq(pose1._inner, pose2._inner) + return bool(_cret) +} + + +// PoseGe wraps MEOS C function pose_ge. +func PoseGe(pose1 *Pose, pose2 *Pose) bool { + _cret := C.pose_ge(pose1._inner, pose2._inner) + return bool(_cret) +} + + +// PoseGt wraps MEOS C function pose_gt. +func PoseGt(pose1 *Pose, pose2 *Pose) bool { + _cret := C.pose_gt(pose1._inner, pose2._inner) + return bool(_cret) +} + + +// PoseLe wraps MEOS C function pose_le. +func PoseLe(pose1 *Pose, pose2 *Pose) bool { + _cret := C.pose_le(pose1._inner, pose2._inner) + return bool(_cret) +} + + +// PoseLt wraps MEOS C function pose_lt. +func PoseLt(pose1 *Pose, pose2 *Pose) bool { + _cret := C.pose_lt(pose1._inner, pose2._inner) + return bool(_cret) +} + + +// PoseNe wraps MEOS C function pose_ne. +func PoseNe(pose1 *Pose, pose2 *Pose) bool { + _cret := C.pose_ne(pose1._inner, pose2._inner) + return bool(_cret) +} + + +// PoseNsame wraps MEOS C function pose_nsame. +func PoseNsame(pose1 *Pose, pose2 *Pose) bool { + _cret := C.pose_nsame(pose1._inner, pose2._inner) + return bool(_cret) +} + + +// PoseSame wraps MEOS C function pose_same. +func PoseSame(pose1 *Pose, pose2 *Pose) bool { + _cret := C.pose_same(pose1._inner, pose2._inner) + return bool(_cret) +} + + +// PosesetIn wraps MEOS C function poseset_in. +func PosesetIn(str string) *Set { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.poseset_in(_c_str) + return &Set{_inner: _cret} +} + + +// PosesetOut wraps MEOS C function poseset_out. +func PosesetOut(s *Set, maxdd int) string { + _cret := C.poseset_out(s._inner, C.int(maxdd)) + return C.GoString(_cret) +} + + +// PosesetMake wraps MEOS C function poseset_make. +func PosesetMake(values unsafe.Pointer, count int) *Set { + _cret := C.poseset_make((**C.Pose)(unsafe.Pointer(values)), C.int(count)) + return &Set{_inner: _cret} +} + + +// PoseToSet wraps MEOS C function pose_to_set. +func PoseToSet(pose *Pose) *Set { + _cret := C.pose_to_set(pose._inner) + return &Set{_inner: _cret} +} + + +// PosesetEndValue wraps MEOS C function poseset_end_value. +func PosesetEndValue(s *Set) *Pose { + _cret := C.poseset_end_value(s._inner) + return &Pose{_inner: _cret} +} + + +// PosesetStartValue wraps MEOS C function poseset_start_value. +func PosesetStartValue(s *Set) *Pose { + _cret := C.poseset_start_value(s._inner) + return &Pose{_inner: _cret} +} + + +// PosesetValueN wraps MEOS C function poseset_value_n. +func PosesetValueN(s *Set, n int) (bool, *Pose) { + var _out_result *C.Pose + _cret := C.poseset_value_n(s._inner, C.int(n), &_out_result) + return bool(_cret), &Pose{_inner: _out_result} +} + + +// PosesetValues wraps MEOS C function poseset_values. +func PosesetValues(s *Set, count unsafe.Pointer) unsafe.Pointer { + _cret := C.poseset_values(s._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// ContainedPoseSet wraps MEOS C function contained_pose_set. +func ContainedPoseSet(pose *Pose, s *Set) bool { + _cret := C.contained_pose_set(pose._inner, s._inner) + return bool(_cret) +} + + +// ContainsSetPose wraps MEOS C function contains_set_pose. +func ContainsSetPose(s *Set, pose *Pose) bool { + _cret := C.contains_set_pose(s._inner, pose._inner) + return bool(_cret) +} + + +// IntersectionPoseSet wraps MEOS C function intersection_pose_set. +func IntersectionPoseSet(pose *Pose, s *Set) *Set { + _cret := C.intersection_pose_set(pose._inner, s._inner) + return &Set{_inner: _cret} +} + + +// IntersectionSetPose wraps MEOS C function intersection_set_pose. +func IntersectionSetPose(s *Set, pose *Pose) *Set { + _cret := C.intersection_set_pose(s._inner, pose._inner) + return &Set{_inner: _cret} +} + + +// MinusPoseSet wraps MEOS C function minus_pose_set. +func MinusPoseSet(pose *Pose, s *Set) *Set { + _cret := C.minus_pose_set(pose._inner, s._inner) + return &Set{_inner: _cret} +} + + +// MinusSetPose wraps MEOS C function minus_set_pose. +func MinusSetPose(s *Set, pose *Pose) *Set { + _cret := C.minus_set_pose(s._inner, pose._inner) + return &Set{_inner: _cret} +} + + +// PoseUnionTransfn wraps MEOS C function pose_union_transfn. +func PoseUnionTransfn(state *Set, pose *Pose) *Set { + _cret := C.pose_union_transfn(state._inner, pose._inner) + return &Set{_inner: _cret} +} + + +// UnionPoseSet wraps MEOS C function union_pose_set. +func UnionPoseSet(pose *Pose, s *Set) *Set { + _cret := C.gunion_pose_set(pose._inner, s._inner) + return &Set{_inner: _cret} +} + + +// UnionSetPose wraps MEOS C function union_set_pose. +func UnionSetPose(s *Set, pose *Pose) *Set { + _cret := C.gunion_set_pose(s._inner, pose._inner) + return &Set{_inner: _cret} +} + + +// TposeFromMFJSON wraps MEOS C function tpose_from_mfjson. +func TposeFromMFJSON(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tpose_from_mfjson(_c_str) + return &Temporal{_inner: _cret} +} + + +// TposeIn wraps MEOS C function tpose_in. +func TposeIn(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tpose_in(_c_str) + return &Temporal{_inner: _cret} +} + + +// TposeinstMake wraps MEOS C function tposeinst_make. +func TposeinstMake(pose *Pose, t int64) *TInstant { + _cret := C.tposeinst_make(pose._inner, C.TimestampTz(t)) + return &TInstant{_inner: _cret} +} + + +// TposeFromBaseTemp wraps MEOS C function tpose_from_base_temp. +func TposeFromBaseTemp(pose *Pose, temp *Temporal) *Temporal { + _cret := C.tpose_from_base_temp(pose._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TposeseqFromBaseTstzset wraps MEOS C function tposeseq_from_base_tstzset. +func TposeseqFromBaseTstzset(pose *Pose, s *Set) *TSequence { + _cret := C.tposeseq_from_base_tstzset(pose._inner, s._inner) + return &TSequence{_inner: _cret} +} + + +// TposeseqFromBaseTstzspan wraps MEOS C function tposeseq_from_base_tstzspan. +func TposeseqFromBaseTstzspan(pose *Pose, s *Span, interp Interpolation) *TSequence { + _cret := C.tposeseq_from_base_tstzspan(pose._inner, s._inner, C.interpType(interp)) + return &TSequence{_inner: _cret} +} + + +// TposeseqsetFromBaseTstzspanset wraps MEOS C function tposeseqset_from_base_tstzspanset. +func TposeseqsetFromBaseTstzspanset(pose *Pose, ss *SpanSet, interp Interpolation) *TSequenceSet { + _cret := C.tposeseqset_from_base_tstzspanset(pose._inner, ss._inner, C.interpType(interp)) + return &TSequenceSet{_inner: _cret} +} + + +// TposeMake wraps MEOS C function tpose_make. +func TposeMake(tpoint *Temporal, tradius *Temporal) *Temporal { + _cret := C.tpose_make(tpoint._inner, tradius._inner) + return &Temporal{_inner: _cret} +} + + +// TposeToTpoint wraps MEOS C function tpose_to_tpoint. +func TposeToTpoint(temp *Temporal) *Temporal { + _cret := C.tpose_to_tpoint(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TposeEndValue wraps MEOS C function tpose_end_value. +func TposeEndValue(temp *Temporal) *Pose { + _cret := C.tpose_end_value(temp._inner) + return &Pose{_inner: _cret} +} + + +// TposePoints wraps MEOS C function tpose_points. +func TposePoints(temp *Temporal) *Set { + _cret := C.tpose_points(temp._inner) + return &Set{_inner: _cret} +} + + +// TposeRotation wraps MEOS C function tpose_rotation. +func TposeRotation(temp *Temporal) *Temporal { + _cret := C.tpose_rotation(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TposeYaw wraps MEOS C function tpose_yaw. +func TposeYaw(temp *Temporal) *Temporal { + _cret := C.tpose_yaw(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TposePitch wraps MEOS C function tpose_pitch. +func TposePitch(temp *Temporal) *Temporal { + _cret := C.tpose_pitch(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TposeRoll wraps MEOS C function tpose_roll. +func TposeRoll(temp *Temporal) *Temporal { + _cret := C.tpose_roll(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TposeSpeed wraps MEOS C function tpose_speed. +func TposeSpeed(temp *Temporal) *Temporal { + _cret := C.tpose_speed(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TposeAngularSpeed wraps MEOS C function tpose_angular_speed. +func TposeAngularSpeed(temp *Temporal) *Temporal { + _cret := C.tpose_angular_speed(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TposeStartValue wraps MEOS C function tpose_start_value. +func TposeStartValue(temp *Temporal) *Pose { + _cret := C.tpose_start_value(temp._inner) + return &Pose{_inner: _cret} +} + + +// TposeTrajectory wraps MEOS C function tpose_trajectory. +func TposeTrajectory(temp *Temporal) *Geom { + _cret := C.tpose_trajectory(temp._inner) + return &Geom{_inner: _cret} +} + + +// TposeValueAtTimestamptz wraps MEOS C function tpose_value_at_timestamptz. +func TposeValueAtTimestamptz(temp *Temporal, t int64, strict bool) (bool, *Pose) { + var _out_result *C.Pose + _cret := C.tpose_value_at_timestamptz(temp._inner, C.TimestampTz(t), C.bool(strict), &_out_result) + return bool(_cret), &Pose{_inner: _out_result} +} + + +// TposeValueN wraps MEOS C function tpose_value_n. +func TposeValueN(temp *Temporal, n int) (bool, *Pose) { + var _out_result *C.Pose + _cret := C.tpose_value_n(temp._inner, C.int(n), &_out_result) + return bool(_cret), &Pose{_inner: _out_result} +} + + +// TposeValues wraps MEOS C function tpose_values. +func TposeValues(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tpose_values(temp._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TposeAtGeom wraps MEOS C function tpose_at_geom. +func TposeAtGeom(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tpose_at_geom(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TposeAtSTBOX wraps MEOS C function tpose_at_stbox. +func TposeAtSTBOX(temp *Temporal, box *STBox, border_inc bool) *Temporal { + _cret := C.tpose_at_stbox(temp._inner, box._inner, C.bool(border_inc)) + return &Temporal{_inner: _cret} +} + + +// TposeAtPose wraps MEOS C function tpose_at_pose. +func TposeAtPose(temp *Temporal, pose *Pose) *Temporal { + _cret := C.tpose_at_pose(temp._inner, pose._inner) + return &Temporal{_inner: _cret} +} + + +// TposeMinusGeom wraps MEOS C function tpose_minus_geom. +func TposeMinusGeom(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tpose_minus_geom(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TposeMinusPose wraps MEOS C function tpose_minus_pose. +func TposeMinusPose(temp *Temporal, pose *Pose) *Temporal { + _cret := C.tpose_minus_pose(temp._inner, pose._inner) + return &Temporal{_inner: _cret} +} + + +// TposeMinusSTBOX wraps MEOS C function tpose_minus_stbox. +func TposeMinusSTBOX(temp *Temporal, box *STBox, border_inc bool) *Temporal { + _cret := C.tpose_minus_stbox(temp._inner, box._inner, C.bool(border_inc)) + return &Temporal{_inner: _cret} +} + + +// TdistanceTposePose wraps MEOS C function tdistance_tpose_pose. +func TdistanceTposePose(temp *Temporal, pose *Pose) *Temporal { + _cret := C.tdistance_tpose_pose(temp._inner, pose._inner) + return &Temporal{_inner: _cret} +} + + +// TdistanceTposeGeo wraps MEOS C function tdistance_tpose_geo. +func TdistanceTposeGeo(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tdistance_tpose_geo(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TdistanceTposeTpose wraps MEOS C function tdistance_tpose_tpose. +func TdistanceTposeTpose(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tdistance_tpose_tpose(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// NadTposeGeo wraps MEOS C function nad_tpose_geo. +func NadTposeGeo(temp *Temporal, gs *Geom) float64 { + _cret := C.nad_tpose_geo(temp._inner, gs._inner) + return float64(_cret) +} + + +// NadTposePose wraps MEOS C function nad_tpose_pose. +func NadTposePose(temp *Temporal, pose *Pose) float64 { + _cret := C.nad_tpose_pose(temp._inner, pose._inner) + return float64(_cret) +} + + +// NadTposeSTBOX wraps MEOS C function nad_tpose_stbox. +func NadTposeSTBOX(temp *Temporal, box *STBox) float64 { + _cret := C.nad_tpose_stbox(temp._inner, box._inner) + return float64(_cret) +} + + +// NadTposeTpose wraps MEOS C function nad_tpose_tpose. +func NadTposeTpose(temp1 *Temporal, temp2 *Temporal) float64 { + _cret := C.nad_tpose_tpose(temp1._inner, temp2._inner) + return float64(_cret) +} + + +// NaiTposeGeo wraps MEOS C function nai_tpose_geo. +func NaiTposeGeo(temp *Temporal, gs *Geom) *TInstant { + _cret := C.nai_tpose_geo(temp._inner, gs._inner) + return &TInstant{_inner: _cret} +} + + +// NaiTposePose wraps MEOS C function nai_tpose_pose. +func NaiTposePose(temp *Temporal, pose *Pose) *TInstant { + _cret := C.nai_tpose_pose(temp._inner, pose._inner) + return &TInstant{_inner: _cret} +} + + +// NaiTposeTpose wraps MEOS C function nai_tpose_tpose. +func NaiTposeTpose(temp1 *Temporal, temp2 *Temporal) *TInstant { + _cret := C.nai_tpose_tpose(temp1._inner, temp2._inner) + return &TInstant{_inner: _cret} +} + + +// ShortestlineTposeGeo wraps MEOS C function shortestline_tpose_geo. +func ShortestlineTposeGeo(temp *Temporal, gs *Geom) *Geom { + _cret := C.shortestline_tpose_geo(temp._inner, gs._inner) + return &Geom{_inner: _cret} +} + + +// ShortestlineTposePose wraps MEOS C function shortestline_tpose_pose. +func ShortestlineTposePose(temp *Temporal, pose *Pose) *Geom { + _cret := C.shortestline_tpose_pose(temp._inner, pose._inner) + return &Geom{_inner: _cret} +} + + +// ShortestlineTposeTpose wraps MEOS C function shortestline_tpose_tpose. +func ShortestlineTposeTpose(temp1 *Temporal, temp2 *Temporal) *Geom { + _cret := C.shortestline_tpose_tpose(temp1._inner, temp2._inner) + return &Geom{_inner: _cret} +} + + +// AlwaysEqPoseTpose wraps MEOS C function always_eq_pose_tpose. +func AlwaysEqPoseTpose(pose *Pose, temp *Temporal) int { + _cret := C.always_eq_pose_tpose(pose._inner, temp._inner) + return int(_cret) +} + + +// AlwaysEqTposePose wraps MEOS C function always_eq_tpose_pose. +func AlwaysEqTposePose(temp *Temporal, pose *Pose) int { + _cret := C.always_eq_tpose_pose(temp._inner, pose._inner) + return int(_cret) +} + + +// AlwaysEqTposeTpose wraps MEOS C function always_eq_tpose_tpose. +func AlwaysEqTposeTpose(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.always_eq_tpose_tpose(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AlwaysNePoseTpose wraps MEOS C function always_ne_pose_tpose. +func AlwaysNePoseTpose(pose *Pose, temp *Temporal) int { + _cret := C.always_ne_pose_tpose(pose._inner, temp._inner) + return int(_cret) +} + + +// AlwaysNeTposePose wraps MEOS C function always_ne_tpose_pose. +func AlwaysNeTposePose(temp *Temporal, pose *Pose) int { + _cret := C.always_ne_tpose_pose(temp._inner, pose._inner) + return int(_cret) +} + + +// AlwaysNeTposeTpose wraps MEOS C function always_ne_tpose_tpose. +func AlwaysNeTposeTpose(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.always_ne_tpose_tpose(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EverEqPoseTpose wraps MEOS C function ever_eq_pose_tpose. +func EverEqPoseTpose(pose *Pose, temp *Temporal) int { + _cret := C.ever_eq_pose_tpose(pose._inner, temp._inner) + return int(_cret) +} + + +// EverEqTposePose wraps MEOS C function ever_eq_tpose_pose. +func EverEqTposePose(temp *Temporal, pose *Pose) int { + _cret := C.ever_eq_tpose_pose(temp._inner, pose._inner) + return int(_cret) +} + + +// EverEqTposeTpose wraps MEOS C function ever_eq_tpose_tpose. +func EverEqTposeTpose(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ever_eq_tpose_tpose(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EverNePoseTpose wraps MEOS C function ever_ne_pose_tpose. +func EverNePoseTpose(pose *Pose, temp *Temporal) int { + _cret := C.ever_ne_pose_tpose(pose._inner, temp._inner) + return int(_cret) +} + + +// EverNeTposePose wraps MEOS C function ever_ne_tpose_pose. +func EverNeTposePose(temp *Temporal, pose *Pose) int { + _cret := C.ever_ne_tpose_pose(temp._inner, pose._inner) + return int(_cret) +} + + +// EverNeTposeTpose wraps MEOS C function ever_ne_tpose_tpose. +func EverNeTposeTpose(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ever_ne_tpose_tpose(temp1._inner, temp2._inner) + return int(_cret) +} + + +// TeqPoseTpose wraps MEOS C function teq_pose_tpose. +func TeqPoseTpose(pose *Pose, temp *Temporal) *Temporal { + _cret := C.teq_pose_tpose(pose._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TeqTposePose wraps MEOS C function teq_tpose_pose. +func TeqTposePose(temp *Temporal, pose *Pose) *Temporal { + _cret := C.teq_tpose_pose(temp._inner, pose._inner) + return &Temporal{_inner: _cret} +} + + +// TnePoseTpose wraps MEOS C function tne_pose_tpose. +func TnePoseTpose(pose *Pose, temp *Temporal) *Temporal { + _cret := C.tne_pose_tpose(pose._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TneTposePose wraps MEOS C function tne_tpose_pose. +func TneTposePose(temp *Temporal, pose *Pose) *Temporal { + _cret := C.tne_tpose_pose(temp._inner, pose._inner) + return &Temporal{_inner: _cret} +} + diff --git a/functions/meos_meos_quadbin.go b/functions/meos_meos_quadbin.go new file mode 100644 index 0000000..6254845 --- /dev/null +++ b/functions/meos_meos_quadbin.go @@ -0,0 +1,527 @@ +package functions + +/* +#include +#include "meos.h" +#include "meos_catalog.h" +#include "meos_geo.h" +#include "meos_internal.h" +#include "meos_internal_geo.h" +#include "meos_npoint.h" +#include "meos_cbuffer.h" +#include "meos_pose.h" +#include "meos_rgeo.h" +#include "meos_h3.h" +#include "meos_quadbin.h" +#include "meos_json.h" +#include "meos_pointcloud.h" +#include "meos_arrow.h" + +// cgo reads C.union_* as a union TYPE; alias the union operators so C.g resolves them as functions. +#define gunion_bigint_set union_bigint_set +#define gunion_bigint_span union_bigint_span +#define gunion_bigint_spanset union_bigint_spanset +#define gunion_cbuffer_set union_cbuffer_set +#define gunion_date_set union_date_set +#define gunion_date_span union_date_span +#define gunion_date_spanset union_date_spanset +#define gunion_float_set union_float_set +#define gunion_float_span union_float_span +#define gunion_float_spanset union_float_spanset +#define gunion_geo_set union_geo_set +#define gunion_int_set union_int_set +#define gunion_int_span union_int_span +#define gunion_int_spanset union_int_spanset +#define gunion_jsonb_set union_jsonb_set +#define gunion_npoint_set union_npoint_set +#define gunion_pcpatch_set union_pcpatch_set +#define gunion_pcpoint_set union_pcpoint_set +#define gunion_pose_set union_pose_set +#define gunion_set_bigint union_set_bigint +#define gunion_set_cbuffer union_set_cbuffer +#define gunion_set_date union_set_date +#define gunion_set_float union_set_float +#define gunion_set_geo union_set_geo +#define gunion_set_int union_set_int +#define gunion_set_jsonb union_set_jsonb +#define gunion_set_npoint union_set_npoint +#define gunion_set_pcpatch union_set_pcpatch +#define gunion_set_pcpoint union_set_pcpoint +#define gunion_set_pose union_set_pose +#define gunion_set_set union_set_set +#define gunion_set_text union_set_text +#define gunion_set_timestamptz union_set_timestamptz +#define gunion_set_value union_set_value +#define gunion_span_bigint union_span_bigint +#define gunion_span_date union_span_date +#define gunion_span_float union_span_float +#define gunion_span_int union_span_int +#define gunion_span_span union_span_span +#define gunion_span_spanset union_span_spanset +#define gunion_span_timestamptz union_span_timestamptz +#define gunion_span_value union_span_value +#define gunion_spanset_bigint union_spanset_bigint +#define gunion_spanset_date union_spanset_date +#define gunion_spanset_float union_spanset_float +#define gunion_spanset_int union_spanset_int +#define gunion_spanset_span union_spanset_span +#define gunion_spanset_spanset union_spanset_spanset +#define gunion_spanset_timestamptz union_spanset_timestamptz +#define gunion_spanset_value union_spanset_value +#define gunion_stbox_stbox union_stbox_stbox +#define gunion_tbox_tbox union_tbox_tbox +#define gunion_text_set union_text_set +#define gunion_timestamptz_set union_timestamptz_set +#define gunion_timestamptz_span union_timestamptz_span +#define gunion_timestamptz_spanset union_timestamptz_spanset +#define gunion_tpcbox_tpcbox union_tpcbox_tpcbox +#define gunion_value_set union_value_set +#define gunion_value_span union_value_span +#define gunion_value_spanset union_value_spanset +*/ +import "C" +import ( + "unsafe" +) + +var _ = unsafe.Pointer(nil) + +// QuadbinIsValidIndex wraps MEOS C function quadbin_is_valid_index. +func QuadbinIsValidIndex(index uint64) bool { + _cret := C.quadbin_is_valid_index(C.uint64_t(index)) + return bool(_cret) +} + + +// QuadbinIsValidCell wraps MEOS C function quadbin_is_valid_cell. +func QuadbinIsValidCell(cell uint64) bool { + _cret := C.quadbin_is_valid_cell(C.uint64_t(cell)) + return bool(_cret) +} + + +// QuadbinTileToCell wraps MEOS C function quadbin_tile_to_cell. +func QuadbinTileToCell(x uint32, y uint32, z uint32) uint64 { + _cret := C.quadbin_tile_to_cell(C.uint32_t(x), C.uint32_t(y), C.uint32_t(z)) + return uint64(_cret) +} + + +// QuadbinCellToTile wraps MEOS C function quadbin_cell_to_tile. +func QuadbinCellToTile(cell uint64, x unsafe.Pointer, y unsafe.Pointer, z unsafe.Pointer) { + C.quadbin_cell_to_tile(C.uint64_t(cell), (*C.uint32_t)(unsafe.Pointer(x)), (*C.uint32_t)(unsafe.Pointer(y)), (*C.uint32_t)(unsafe.Pointer(z))) +} + + +// QuadbinGetResolution wraps MEOS C function quadbin_get_resolution. +func QuadbinGetResolution(cell uint64) uint32 { + _cret := C.quadbin_get_resolution(C.uint64_t(cell)) + return uint32(_cret) +} + + +// QuadbinCellToParent wraps MEOS C function quadbin_cell_to_parent. +func QuadbinCellToParent(cell uint64, parent_resolution uint32) uint64 { + _cret := C.quadbin_cell_to_parent(C.uint64_t(cell), C.uint32_t(parent_resolution)) + return uint64(_cret) +} + + +// QuadbinCellToChildren wraps MEOS C function quadbin_cell_to_children. +func QuadbinCellToChildren(cell uint64, children_resolution uint32, count unsafe.Pointer) unsafe.Pointer { + _cret := C.quadbin_cell_to_children(C.uint64_t(cell), C.uint32_t(children_resolution), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// QuadbinCellSibling wraps MEOS C function quadbin_cell_sibling. +func QuadbinCellSibling(cell uint64, direction string) uint64 { + _c_direction := C.CString(direction) + defer C.free(unsafe.Pointer(_c_direction)) + _cret := C.quadbin_cell_sibling(C.uint64_t(cell), _c_direction) + return uint64(_cret) +} + + +// QuadbinKRing wraps MEOS C function quadbin_k_ring. +func QuadbinKRing(cell uint64, k int, count unsafe.Pointer) unsafe.Pointer { + _cret := C.quadbin_k_ring(C.uint64_t(cell), C.int(k), (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// QuadbinPointToCell wraps MEOS C function quadbin_point_to_cell. +func QuadbinPointToCell(longitude float64, latitude float64, resolution uint32) uint64 { + _cret := C.quadbin_point_to_cell(C.double(longitude), C.double(latitude), C.uint32_t(resolution)) + return uint64(_cret) +} + + +// QuadbinCellToPoint wraps MEOS C function quadbin_cell_to_point. +func QuadbinCellToPoint(cell uint64, longitude unsafe.Pointer, latitude unsafe.Pointer) { + C.quadbin_cell_to_point(C.uint64_t(cell), (*C.double)(unsafe.Pointer(longitude)), (*C.double)(unsafe.Pointer(latitude))) +} + + +// QuadbinCellToBoundingBox wraps MEOS C function quadbin_cell_to_bounding_box. +func QuadbinCellToBoundingBox(cell uint64, xmin unsafe.Pointer, ymin unsafe.Pointer, xmax unsafe.Pointer, ymax unsafe.Pointer) { + C.quadbin_cell_to_bounding_box(C.uint64_t(cell), (*C.double)(unsafe.Pointer(xmin)), (*C.double)(unsafe.Pointer(ymin)), (*C.double)(unsafe.Pointer(xmax)), (*C.double)(unsafe.Pointer(ymax))) +} + + +// QuadbinCellArea wraps MEOS C function quadbin_cell_area. +func QuadbinCellArea(cell uint64) float64 { + _cret := C.quadbin_cell_area(C.uint64_t(cell)) + return float64(_cret) +} + + +// QuadbinIndexToString wraps MEOS C function quadbin_index_to_string. +func QuadbinIndexToString(index uint64) string { + _cret := C.quadbin_index_to_string(C.uint64_t(index)) + return C.GoString(_cret) +} + + +// QuadbinStringToIndex wraps MEOS C function quadbin_string_to_index. +func QuadbinStringToIndex(str string) uint64 { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.quadbin_string_to_index(_c_str) + return uint64(_cret) +} + + +// QuadbinCellToQuadkey wraps MEOS C function quadbin_cell_to_quadkey. +func QuadbinCellToQuadkey(cell uint64) string { + _cret := C.quadbin_cell_to_quadkey(C.uint64_t(cell)) + return C.GoString(_cret) +} + + +// QuadbinParse wraps MEOS C function quadbin_parse. +func QuadbinParse(str string) uint64 { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.quadbin_parse(_c_str) + return uint64(_cret) +} + + +// QuadbinEq wraps MEOS C function quadbin_eq. +func QuadbinEq(a uint64, b uint64) bool { + _cret := C.quadbin_eq(C.uint64_t(a), C.uint64_t(b)) + return bool(_cret) +} + + +// QuadbinNe wraps MEOS C function quadbin_ne. +func QuadbinNe(a uint64, b uint64) bool { + _cret := C.quadbin_ne(C.uint64_t(a), C.uint64_t(b)) + return bool(_cret) +} + + +// QuadbinLt wraps MEOS C function quadbin_lt. +func QuadbinLt(a uint64, b uint64) bool { + _cret := C.quadbin_lt(C.uint64_t(a), C.uint64_t(b)) + return bool(_cret) +} + + +// QuadbinLe wraps MEOS C function quadbin_le. +func QuadbinLe(a uint64, b uint64) bool { + _cret := C.quadbin_le(C.uint64_t(a), C.uint64_t(b)) + return bool(_cret) +} + + +// QuadbinGt wraps MEOS C function quadbin_gt. +func QuadbinGt(a uint64, b uint64) bool { + _cret := C.quadbin_gt(C.uint64_t(a), C.uint64_t(b)) + return bool(_cret) +} + + +// QuadbinGe wraps MEOS C function quadbin_ge. +func QuadbinGe(a uint64, b uint64) bool { + _cret := C.quadbin_ge(C.uint64_t(a), C.uint64_t(b)) + return bool(_cret) +} + + +// QuadbinCmp wraps MEOS C function quadbin_cmp. +func QuadbinCmp(a uint64, b uint64) int { + _cret := C.quadbin_cmp(C.uint64_t(a), C.uint64_t(b)) + return int(_cret) +} + + +// QuadbinHash wraps MEOS C function quadbin_hash. +func QuadbinHash(cell uint64) uint32 { + _cret := C.quadbin_hash(C.uint64_t(cell)) + return uint32(_cret) +} + + +// QuadbinGridDisk wraps MEOS C function quadbin_grid_disk. +func QuadbinGridDisk(origin uint64, k int) *Set { + _cret := C.quadbin_grid_disk(C.uint64_t(origin), C.int(k)) + return &Set{_inner: _cret} +} + + +// QuadbinCellToChildrenSet wraps MEOS C function quadbin_cell_to_children_set. +func QuadbinCellToChildrenSet(origin uint64, children_resolution int) *Set { + _cret := C.quadbin_cell_to_children_set(C.uint64_t(origin), C.int(children_resolution)) + return &Set{_inner: _cret} +} + + +// TquadbinIn wraps MEOS C function tquadbin_in. +func TquadbinIn(str string) *Temporal { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tquadbin_in(_c_str) + return &Temporal{_inner: _cret} +} + + +// TquadbininstIn wraps MEOS C function tquadbininst_in. +func TquadbininstIn(str string) *TInstant { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tquadbininst_in(_c_str) + return &TInstant{_inner: _cret} +} + + +// TquadbinseqIn wraps MEOS C function tquadbinseq_in. +func TquadbinseqIn(str string, interp Interpolation) *TSequence { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tquadbinseq_in(_c_str, C.interpType(interp)) + return &TSequence{_inner: _cret} +} + + +// TquadbinseqsetIn wraps MEOS C function tquadbinseqset_in. +func TquadbinseqsetIn(str string) *TSequenceSet { + _c_str := C.CString(str) + defer C.free(unsafe.Pointer(_c_str)) + _cret := C.tquadbinseqset_in(_c_str) + return &TSequenceSet{_inner: _cret} +} + + +// TquadbinMake wraps MEOS C function tquadbin_make. +func TquadbinMake(value uint64, t int64) *Temporal { + _cret := C.tquadbin_make(C.uint64_t(value), C.TimestampTz(t)) + return &Temporal{_inner: _cret} +} + + +// TquadbininstMake wraps MEOS C function tquadbininst_make. +func TquadbininstMake(value uint64, t int64) *TInstant { + _cret := C.tquadbininst_make(C.uint64_t(value), C.TimestampTz(t)) + return &TInstant{_inner: _cret} +} + + +// TquadbinseqMake wraps MEOS C function tquadbinseq_make. +func TquadbinseqMake(values unsafe.Pointer, times unsafe.Pointer, count int, lower_inc bool, upper_inc bool) *TSequence { + _cret := C.tquadbinseq_make((*C.uint64_t)(unsafe.Pointer(values)), (*C.TimestampTz)(unsafe.Pointer(times)), C.int(count), C.bool(lower_inc), C.bool(upper_inc)) + return &TSequence{_inner: _cret} +} + + +// TquadbinseqsetMake wraps MEOS C function tquadbinseqset_make. +func TquadbinseqsetMake(sequences unsafe.Pointer, count int) *TSequenceSet { + _cret := C.tquadbinseqset_make((**C.TSequence)(unsafe.Pointer(sequences)), C.int(count)) + return &TSequenceSet{_inner: _cret} +} + + +// TquadbinStartValue wraps MEOS C function tquadbin_start_value. +func TquadbinStartValue(temp *Temporal) uint64 { + _cret := C.tquadbin_start_value(temp._inner) + return uint64(_cret) +} + + +// TquadbinEndValue wraps MEOS C function tquadbin_end_value. +func TquadbinEndValue(temp *Temporal) uint64 { + _cret := C.tquadbin_end_value(temp._inner) + return uint64(_cret) +} + + +// TquadbinValueN wraps MEOS C function tquadbin_value_n. +func TquadbinValueN(temp *Temporal, n int) (bool, uint64) { + var _out_result C.uint64_t + _cret := C.tquadbin_value_n(temp._inner, C.int(n), &_out_result) + return bool(_cret), uint64(_out_result) +} + + +// TquadbinValues wraps MEOS C function tquadbin_values. +func TquadbinValues(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.tquadbin_values(temp._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TquadbinValueAtTimestamptz wraps MEOS C function tquadbin_value_at_timestamptz. +func TquadbinValueAtTimestamptz(temp *Temporal, t int64, strict bool) (bool, uint64) { + var _out_result C.uint64_t + _cret := C.tquadbin_value_at_timestamptz(temp._inner, C.TimestampTz(t), C.bool(strict), &_out_result) + return bool(_cret), uint64(_out_result) +} + + +// TbigintToTquadbin wraps MEOS C function tbigint_to_tquadbin. +func TbigintToTquadbin(temp *Temporal) *Temporal { + _cret := C.tbigint_to_tquadbin(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TquadbinToTbigint wraps MEOS C function tquadbin_to_tbigint. +func TquadbinToTbigint(temp *Temporal) *Temporal { + _cret := C.tquadbin_to_tbigint(temp._inner) + return &Temporal{_inner: _cret} +} + + +// EverEqQuadbinTquadbin wraps MEOS C function ever_eq_quadbin_tquadbin. +func EverEqQuadbinTquadbin(cell uint64, temp *Temporal) int { + _cret := C.ever_eq_quadbin_tquadbin(C.uint64_t(cell), temp._inner) + return int(_cret) +} + + +// EverEqTquadbinQuadbin wraps MEOS C function ever_eq_tquadbin_quadbin. +func EverEqTquadbinQuadbin(temp *Temporal, cell uint64) int { + _cret := C.ever_eq_tquadbin_quadbin(temp._inner, C.uint64_t(cell)) + return int(_cret) +} + + +// EverNeQuadbinTquadbin wraps MEOS C function ever_ne_quadbin_tquadbin. +func EverNeQuadbinTquadbin(cell uint64, temp *Temporal) int { + _cret := C.ever_ne_quadbin_tquadbin(C.uint64_t(cell), temp._inner) + return int(_cret) +} + + +// EverNeTquadbinQuadbin wraps MEOS C function ever_ne_tquadbin_quadbin. +func EverNeTquadbinQuadbin(temp *Temporal, cell uint64) int { + _cret := C.ever_ne_tquadbin_quadbin(temp._inner, C.uint64_t(cell)) + return int(_cret) +} + + +// AlwaysEqQuadbinTquadbin wraps MEOS C function always_eq_quadbin_tquadbin. +func AlwaysEqQuadbinTquadbin(cell uint64, temp *Temporal) int { + _cret := C.always_eq_quadbin_tquadbin(C.uint64_t(cell), temp._inner) + return int(_cret) +} + + +// AlwaysEqTquadbinQuadbin wraps MEOS C function always_eq_tquadbin_quadbin. +func AlwaysEqTquadbinQuadbin(temp *Temporal, cell uint64) int { + _cret := C.always_eq_tquadbin_quadbin(temp._inner, C.uint64_t(cell)) + return int(_cret) +} + + +// AlwaysNeQuadbinTquadbin wraps MEOS C function always_ne_quadbin_tquadbin. +func AlwaysNeQuadbinTquadbin(cell uint64, temp *Temporal) int { + _cret := C.always_ne_quadbin_tquadbin(C.uint64_t(cell), temp._inner) + return int(_cret) +} + + +// AlwaysNeTquadbinQuadbin wraps MEOS C function always_ne_tquadbin_quadbin. +func AlwaysNeTquadbinQuadbin(temp *Temporal, cell uint64) int { + _cret := C.always_ne_tquadbin_quadbin(temp._inner, C.uint64_t(cell)) + return int(_cret) +} + + +// EverEqTquadbinTquadbin wraps MEOS C function ever_eq_tquadbin_tquadbin. +func EverEqTquadbinTquadbin(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ever_eq_tquadbin_tquadbin(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EverNeTquadbinTquadbin wraps MEOS C function ever_ne_tquadbin_tquadbin. +func EverNeTquadbinTquadbin(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ever_ne_tquadbin_tquadbin(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AlwaysEqTquadbinTquadbin wraps MEOS C function always_eq_tquadbin_tquadbin. +func AlwaysEqTquadbinTquadbin(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.always_eq_tquadbin_tquadbin(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AlwaysNeTquadbinTquadbin wraps MEOS C function always_ne_tquadbin_tquadbin. +func AlwaysNeTquadbinTquadbin(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.always_ne_tquadbin_tquadbin(temp1._inner, temp2._inner) + return int(_cret) +} + + +// TeqQuadbinTquadbin wraps MEOS C function teq_quadbin_tquadbin. +func TeqQuadbinTquadbin(cell uint64, temp *Temporal) *Temporal { + _cret := C.teq_quadbin_tquadbin(C.uint64_t(cell), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TeqTquadbinQuadbin wraps MEOS C function teq_tquadbin_quadbin. +func TeqTquadbinQuadbin(temp *Temporal, cell uint64) *Temporal { + _cret := C.teq_tquadbin_quadbin(temp._inner, C.uint64_t(cell)) + return &Temporal{_inner: _cret} +} + + +// TeqTquadbinTquadbin wraps MEOS C function teq_tquadbin_tquadbin. +func TeqTquadbinTquadbin(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.teq_tquadbin_tquadbin(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// TneQuadbinTquadbin wraps MEOS C function tne_quadbin_tquadbin. +func TneQuadbinTquadbin(cell uint64, temp *Temporal) *Temporal { + _cret := C.tne_quadbin_tquadbin(C.uint64_t(cell), temp._inner) + return &Temporal{_inner: _cret} +} + + +// TneTquadbinQuadbin wraps MEOS C function tne_tquadbin_quadbin. +func TneTquadbinQuadbin(temp *Temporal, cell uint64) *Temporal { + _cret := C.tne_tquadbin_quadbin(temp._inner, C.uint64_t(cell)) + return &Temporal{_inner: _cret} +} + + +// TneTquadbinTquadbin wraps MEOS C function tne_tquadbin_tquadbin. +func TneTquadbinTquadbin(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tne_tquadbin_tquadbin(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// TquadbinCellToQuadkey wraps MEOS C function tquadbin_cell_to_quadkey. +func TquadbinCellToQuadkey(temp *Temporal) *Temporal { + _cret := C.tquadbin_cell_to_quadkey(temp._inner) + return &Temporal{_inner: _cret} +} + diff --git a/functions/meos_meos_rgeo.go b/functions/meos_meos_rgeo.go new file mode 100644 index 0000000..3c5dbb4 --- /dev/null +++ b/functions/meos_meos_rgeo.go @@ -0,0 +1,851 @@ +package functions + +/* +#include +#include "meos.h" +#include "meos_catalog.h" +#include "meos_geo.h" +#include "meos_internal.h" +#include "meos_internal_geo.h" +#include "meos_npoint.h" +#include "meos_cbuffer.h" +#include "meos_pose.h" +#include "meos_rgeo.h" +#include "meos_h3.h" +#include "meos_quadbin.h" +#include "meos_json.h" +#include "meos_pointcloud.h" +#include "meos_arrow.h" + +// cgo reads C.union_* as a union TYPE; alias the union operators so C.g resolves them as functions. +#define gunion_bigint_set union_bigint_set +#define gunion_bigint_span union_bigint_span +#define gunion_bigint_spanset union_bigint_spanset +#define gunion_cbuffer_set union_cbuffer_set +#define gunion_date_set union_date_set +#define gunion_date_span union_date_span +#define gunion_date_spanset union_date_spanset +#define gunion_float_set union_float_set +#define gunion_float_span union_float_span +#define gunion_float_spanset union_float_spanset +#define gunion_geo_set union_geo_set +#define gunion_int_set union_int_set +#define gunion_int_span union_int_span +#define gunion_int_spanset union_int_spanset +#define gunion_jsonb_set union_jsonb_set +#define gunion_npoint_set union_npoint_set +#define gunion_pcpatch_set union_pcpatch_set +#define gunion_pcpoint_set union_pcpoint_set +#define gunion_pose_set union_pose_set +#define gunion_set_bigint union_set_bigint +#define gunion_set_cbuffer union_set_cbuffer +#define gunion_set_date union_set_date +#define gunion_set_float union_set_float +#define gunion_set_geo union_set_geo +#define gunion_set_int union_set_int +#define gunion_set_jsonb union_set_jsonb +#define gunion_set_npoint union_set_npoint +#define gunion_set_pcpatch union_set_pcpatch +#define gunion_set_pcpoint union_set_pcpoint +#define gunion_set_pose union_set_pose +#define gunion_set_set union_set_set +#define gunion_set_text union_set_text +#define gunion_set_timestamptz union_set_timestamptz +#define gunion_set_value union_set_value +#define gunion_span_bigint union_span_bigint +#define gunion_span_date union_span_date +#define gunion_span_float union_span_float +#define gunion_span_int union_span_int +#define gunion_span_span union_span_span +#define gunion_span_spanset union_span_spanset +#define gunion_span_timestamptz union_span_timestamptz +#define gunion_span_value union_span_value +#define gunion_spanset_bigint union_spanset_bigint +#define gunion_spanset_date union_spanset_date +#define gunion_spanset_float union_spanset_float +#define gunion_spanset_int union_spanset_int +#define gunion_spanset_span union_spanset_span +#define gunion_spanset_spanset union_spanset_spanset +#define gunion_spanset_timestamptz union_spanset_timestamptz +#define gunion_spanset_value union_spanset_value +#define gunion_stbox_stbox union_stbox_stbox +#define gunion_tbox_tbox union_tbox_tbox +#define gunion_text_set union_text_set +#define gunion_timestamptz_set union_timestamptz_set +#define gunion_timestamptz_span union_timestamptz_span +#define gunion_timestamptz_spanset union_timestamptz_spanset +#define gunion_tpcbox_tpcbox union_tpcbox_tpcbox +#define gunion_value_set union_value_set +#define gunion_value_span union_value_span +#define gunion_value_spanset union_value_spanset +*/ +import "C" +import ( + "unsafe" +) + +var _ = unsafe.Pointer(nil) + +// TrgeometryOut wraps MEOS C function trgeometry_out. +func TrgeometryOut(temp *Temporal) string { + _cret := C.trgeometry_out(temp._inner) + return C.GoString(_cret) +} + + +// TrgeometryinstMake wraps MEOS C function trgeometryinst_make. +func TrgeometryinstMake(geom *Geom, pose *Pose, t int64) *TInstant { + _cret := C.trgeometryinst_make(geom._inner, pose._inner, C.TimestampTz(t)) + return &TInstant{_inner: _cret} +} + + +// GeoTposeToTrgeometry wraps MEOS C function geo_tpose_to_trgeometry. +func GeoTposeToTrgeometry(gs *Geom, temp *Temporal) *Temporal { + _cret := C.geo_tpose_to_trgeometry(gs._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TrgeometryToTpose wraps MEOS C function trgeometry_to_tpose. +func TrgeometryToTpose(temp *Temporal) *Temporal { + _cret := C.trgeometry_to_tpose(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TrgeometryToTpoint wraps MEOS C function trgeometry_to_tpoint. +func TrgeometryToTpoint(temp *Temporal) *Temporal { + _cret := C.trgeometry_to_tpoint(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TrgeometryToTgeometry wraps MEOS C function trgeometry_to_tgeometry. +func TrgeometryToTgeometry(temp *Temporal) *Temporal { + _cret := C.trgeometry_to_tgeometry(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TrgeometryEndInstant wraps MEOS C function trgeometry_end_instant. +func TrgeometryEndInstant(temp *Temporal) *TInstant { + _cret := C.trgeometry_end_instant(temp._inner) + return &TInstant{_inner: _cret} +} + + +// TrgeometryEndSequence wraps MEOS C function trgeometry_end_sequence. +func TrgeometryEndSequence(temp *Temporal) *TSequence { + _cret := C.trgeometry_end_sequence(temp._inner) + return &TSequence{_inner: _cret} +} + + +// TrgeometryEndValue wraps MEOS C function trgeometry_end_value. +func TrgeometryEndValue(temp *Temporal) *Geom { + _cret := C.trgeometry_end_value(temp._inner) + return &Geom{_inner: _cret} +} + + +// TrgeometryGeom wraps MEOS C function trgeometry_geom. +func TrgeometryGeom(temp *Temporal) *Geom { + _cret := C.trgeometry_geom(temp._inner) + return &Geom{_inner: _cret} +} + + +// TrgeometryInstantN wraps MEOS C function trgeometry_instant_n. +func TrgeometryInstantN(temp *Temporal, n int) *TInstant { + _cret := C.trgeometry_instant_n(temp._inner, C.int(n)) + return &TInstant{_inner: _cret} +} + + +// TrgeometryInstants wraps MEOS C function trgeometry_instants. +func TrgeometryInstants(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.trgeometry_instants(temp._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TrgeometryPoints wraps MEOS C function trgeometry_points. +func TrgeometryPoints(temp *Temporal) *Set { + _cret := C.trgeometry_points(temp._inner) + return &Set{_inner: _cret} +} + + +// TrgeometryRotation wraps MEOS C function trgeometry_rotation. +func TrgeometryRotation(temp *Temporal) *Temporal { + _cret := C.trgeometry_rotation(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TrgeometrySegments wraps MEOS C function trgeometry_segments. +func TrgeometrySegments(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.trgeometry_segments(temp._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TrgeometrySequenceN wraps MEOS C function trgeometry_sequence_n. +func TrgeometrySequenceN(temp *Temporal, i int) *TSequence { + _cret := C.trgeometry_sequence_n(temp._inner, C.int(i)) + return &TSequence{_inner: _cret} +} + + +// TrgeometrySequences wraps MEOS C function trgeometry_sequences. +func TrgeometrySequences(temp *Temporal, count unsafe.Pointer) unsafe.Pointer { + _cret := C.trgeometry_sequences(temp._inner, (*C.int)(unsafe.Pointer(count))) + return unsafe.Pointer(_cret) +} + + +// TrgeometryStartInstant wraps MEOS C function trgeometry_start_instant. +func TrgeometryStartInstant(temp *Temporal) *TInstant { + _cret := C.trgeometry_start_instant(temp._inner) + return &TInstant{_inner: _cret} +} + + +// TrgeometryStartSequence wraps MEOS C function trgeometry_start_sequence. +func TrgeometryStartSequence(temp *Temporal) *TSequence { + _cret := C.trgeometry_start_sequence(temp._inner) + return &TSequence{_inner: _cret} +} + + +// TrgeometryStartValue wraps MEOS C function trgeometry_start_value. +func TrgeometryStartValue(temp *Temporal) *Geom { + _cret := C.trgeometry_start_value(temp._inner) + return &Geom{_inner: _cret} +} + + +// TrgeometryValueN wraps MEOS C function trgeometry_value_n. +func TrgeometryValueN(temp *Temporal, n int) (bool, *Geom) { + var _out_result *C.GSERIALIZED + _cret := C.trgeometry_value_n(temp._inner, C.int(n), &_out_result) + return bool(_cret), &Geom{_inner: _out_result} +} + + +// TrgeometryTraversedArea wraps MEOS C function trgeometry_traversed_area. +func TrgeometryTraversedArea(temp *Temporal, unary_union bool) *Geom { + _cret := C.trgeometry_traversed_area(temp._inner, C.bool(unary_union)) + return &Geom{_inner: _cret} +} + + +// TrgeometryCentroid wraps MEOS C function trgeometry_centroid. +func TrgeometryCentroid(temp *Temporal) *Temporal { + _cret := C.trgeometry_centroid(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TrgeometryConvexHull wraps MEOS C function trgeometry_convex_hull. +func TrgeometryConvexHull(temp *Temporal) *Geom { + _cret := C.trgeometry_convex_hull(temp._inner) + return &Geom{_inner: _cret} +} + + +// TrgeometryBodyPointTrajectory wraps MEOS C function trgeometry_body_point_trajectory. +func TrgeometryBodyPointTrajectory(temp *Temporal, gs *Geom) *Temporal { + _cret := C.trgeometry_body_point_trajectory(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TrgeometrySpaceBoxes wraps MEOS C function trgeometry_space_boxes. +func TrgeometrySpaceBoxes(temp *Temporal, xsize float64, ysize float64, zsize float64, sorigin *Geom, bitmatrix bool, border_inc bool, count unsafe.Pointer) *STBox { + _cret := C.trgeometry_space_boxes(temp._inner, C.double(xsize), C.double(ysize), C.double(zsize), sorigin._inner, C.bool(bitmatrix), C.bool(border_inc), (*C.int)(unsafe.Pointer(count))) + return &STBox{_inner: _cret} +} + + +// TrgeometrySpaceTimeBoxes wraps MEOS C function trgeometry_space_time_boxes. +func TrgeometrySpaceTimeBoxes(temp *Temporal, xsize float64, ysize float64, zsize float64, duration *Interval, sorigin *Geom, torigin int64, bitmatrix bool, border_inc bool, count unsafe.Pointer) *STBox { + _cret := C.trgeometry_space_time_boxes(temp._inner, C.double(xsize), C.double(ysize), C.double(zsize), duration._inner, sorigin._inner, C.TimestampTz(torigin), C.bool(bitmatrix), C.bool(border_inc), (*C.int)(unsafe.Pointer(count))) + return &STBox{_inner: _cret} +} + + +// TrgeometryStboxes wraps MEOS C function trgeometry_stboxes. +func TrgeometryStboxes(temp *Temporal, count unsafe.Pointer) *STBox { + _cret := C.trgeometry_stboxes(temp._inner, (*C.int)(unsafe.Pointer(count))) + return &STBox{_inner: _cret} +} + + +// TrgeometrySplitNStboxes wraps MEOS C function trgeometry_split_n_stboxes. +func TrgeometrySplitNStboxes(temp *Temporal, box_count int, count unsafe.Pointer) *STBox { + _cret := C.trgeometry_split_n_stboxes(temp._inner, C.int(box_count), (*C.int)(unsafe.Pointer(count))) + return &STBox{_inner: _cret} +} + + +// TrgeometrySplitEachNStboxes wraps MEOS C function trgeometry_split_each_n_stboxes. +func TrgeometrySplitEachNStboxes(temp *Temporal, elem_count int, count unsafe.Pointer) *STBox { + _cret := C.trgeometry_split_each_n_stboxes(temp._inner, C.int(elem_count), (*C.int)(unsafe.Pointer(count))) + return &STBox{_inner: _cret} +} + + +// TrgeometryHausdorffDistance wraps MEOS C function trgeometry_hausdorff_distance. +func TrgeometryHausdorffDistance(temp1 *Temporal, temp2 *Temporal) float64 { + _cret := C.trgeometry_hausdorff_distance(temp1._inner, temp2._inner) + return float64(_cret) +} + + +// TrgeometryFrechetDistance wraps MEOS C function trgeometry_frechet_distance. +func TrgeometryFrechetDistance(temp1 *Temporal, temp2 *Temporal) float64 { + _cret := C.trgeometry_frechet_distance(temp1._inner, temp2._inner) + return float64(_cret) +} + + +// TrgeometryDyntimewarpDistance wraps MEOS C function trgeometry_dyntimewarp_distance. +func TrgeometryDyntimewarpDistance(temp1 *Temporal, temp2 *Temporal) float64 { + _cret := C.trgeometry_dyntimewarp_distance(temp1._inner, temp2._inner) + return float64(_cret) +} + + +// TrgeometryFrechetPath wraps MEOS C function trgeometry_frechet_path. +func TrgeometryFrechetPath(temp1 *Temporal, temp2 *Temporal, count unsafe.Pointer) *Match { + _cret := C.trgeometry_frechet_path(temp1._inner, temp2._inner, (*C.int)(unsafe.Pointer(count))) + return &Match{_inner: _cret} +} + + +// TrgeometryDyntimewarpPath wraps MEOS C function trgeometry_dyntimewarp_path. +func TrgeometryDyntimewarpPath(temp1 *Temporal, temp2 *Temporal, count unsafe.Pointer) *Match { + _cret := C.trgeometry_dyntimewarp_path(temp1._inner, temp2._inner, (*C.int)(unsafe.Pointer(count))) + return &Match{_inner: _cret} +} + + +// TrgeometryLength wraps MEOS C function trgeometry_length. +func TrgeometryLength(temp *Temporal) float64 { + _cret := C.trgeometry_length(temp._inner) + return float64(_cret) +} + + +// TrgeometryCumulativeLength wraps MEOS C function trgeometry_cumulative_length. +func TrgeometryCumulativeLength(temp *Temporal) *Temporal { + _cret := C.trgeometry_cumulative_length(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TrgeometrySpeed wraps MEOS C function trgeometry_speed. +func TrgeometrySpeed(temp *Temporal) *Temporal { + _cret := C.trgeometry_speed(temp._inner) + return &Temporal{_inner: _cret} +} + + +// TrgeometryTwcentroid wraps MEOS C function trgeometry_twcentroid. +func TrgeometryTwcentroid(temp *Temporal) *Geom { + _cret := C.trgeometry_twcentroid(temp._inner) + return &Geom{_inner: _cret} +} + + +// TrgeometryAppendTinstant wraps MEOS C function trgeometry_append_tinstant. +func TrgeometryAppendTinstant(temp *Temporal, inst *TInstant, interp Interpolation, maxdist float64, maxt *Interval, expand bool) *Temporal { + _cret := C.trgeometry_append_tinstant(temp._inner, inst._inner, C.interpType(interp), C.double(maxdist), maxt._inner, C.bool(expand)) + return &Temporal{_inner: _cret} +} + + +// TrgeometryAppendTsequence wraps MEOS C function trgeometry_append_tsequence. +func TrgeometryAppendTsequence(temp *Temporal, seq *TSequence, expand bool) *Temporal { + _cret := C.trgeometry_append_tsequence(temp._inner, seq._inner, C.bool(expand)) + return &Temporal{_inner: _cret} +} + + +// TrgeometryDeleteTimestamptz wraps MEOS C function trgeometry_delete_timestamptz. +func TrgeometryDeleteTimestamptz(temp *Temporal, t int64, connect bool) *Temporal { + _cret := C.trgeometry_delete_timestamptz(temp._inner, C.TimestampTz(t), C.bool(connect)) + return &Temporal{_inner: _cret} +} + + +// TrgeometryDeleteTstzset wraps MEOS C function trgeometry_delete_tstzset. +func TrgeometryDeleteTstzset(temp *Temporal, s *Set, connect bool) *Temporal { + _cret := C.trgeometry_delete_tstzset(temp._inner, s._inner, C.bool(connect)) + return &Temporal{_inner: _cret} +} + + +// TrgeometryDeleteTstzspan wraps MEOS C function trgeometry_delete_tstzspan. +func TrgeometryDeleteTstzspan(temp *Temporal, s *Span, connect bool) *Temporal { + _cret := C.trgeometry_delete_tstzspan(temp._inner, s._inner, C.bool(connect)) + return &Temporal{_inner: _cret} +} + + +// TrgeometryDeleteTstzspanset wraps MEOS C function trgeometry_delete_tstzspanset. +func TrgeometryDeleteTstzspanset(temp *Temporal, ss *SpanSet, connect bool) *Temporal { + _cret := C.trgeometry_delete_tstzspanset(temp._inner, ss._inner, C.bool(connect)) + return &Temporal{_inner: _cret} +} + + +// TrgeometryRound wraps MEOS C function trgeometry_round. +func TrgeometryRound(temp *Temporal, maxdd int) *Temporal { + _cret := C.trgeometry_round(temp._inner, C.int(maxdd)) + return &Temporal{_inner: _cret} +} + + +// TrgeometrySetInterp wraps MEOS C function trgeometry_set_interp. +func TrgeometrySetInterp(temp *Temporal, interp Interpolation) *Temporal { + _cret := C.trgeometry_set_interp(temp._inner, C.interpType(interp)) + return &Temporal{_inner: _cret} +} + + +// TrgeometryToTinstant wraps MEOS C function trgeometry_to_tinstant. +func TrgeometryToTinstant(temp *Temporal) *TInstant { + _cret := C.trgeometry_to_tinstant(temp._inner) + return &TInstant{_inner: _cret} +} + + +// TrgeometryAfterTimestamptz wraps MEOS C function trgeometry_after_timestamptz. +func TrgeometryAfterTimestamptz(temp *Temporal, t int64, strict bool) *Temporal { + _cret := C.trgeometry_after_timestamptz(temp._inner, C.TimestampTz(t), C.bool(strict)) + return &Temporal{_inner: _cret} +} + + +// TrgeometryBeforeTimestamptz wraps MEOS C function trgeometry_before_timestamptz. +func TrgeometryBeforeTimestamptz(temp *Temporal, t int64, strict bool) *Temporal { + _cret := C.trgeometry_before_timestamptz(temp._inner, C.TimestampTz(t), C.bool(strict)) + return &Temporal{_inner: _cret} +} + + +// TrgeometryRestrictValues wraps MEOS C function trgeometry_restrict_values. +func TrgeometryRestrictValues(temp *Temporal, s *Set, atfunc bool) *Temporal { + _cret := C.trgeometry_restrict_values(temp._inner, s._inner, C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// TrgeometryRestrictTimestamptz wraps MEOS C function trgeometry_restrict_timestamptz. +func TrgeometryRestrictTimestamptz(temp *Temporal, t int64, atfunc bool) *Temporal { + _cret := C.trgeometry_restrict_timestamptz(temp._inner, C.TimestampTz(t), C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// TrgeometryRestrictTstzset wraps MEOS C function trgeometry_restrict_tstzset. +func TrgeometryRestrictTstzset(temp *Temporal, s *Set, atfunc bool) *Temporal { + _cret := C.trgeometry_restrict_tstzset(temp._inner, s._inner, C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// TrgeometryRestrictTstzspan wraps MEOS C function trgeometry_restrict_tstzspan. +func TrgeometryRestrictTstzspan(temp *Temporal, s *Span, atfunc bool) *Temporal { + _cret := C.trgeometry_restrict_tstzspan(temp._inner, s._inner, C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// TrgeometryRestrictTstzspanset wraps MEOS C function trgeometry_restrict_tstzspanset. +func TrgeometryRestrictTstzspanset(temp *Temporal, ss *SpanSet, atfunc bool) *Temporal { + _cret := C.trgeometry_restrict_tstzspanset(temp._inner, ss._inner, C.bool(atfunc)) + return &Temporal{_inner: _cret} +} + + +// TrgeometryAtGeom wraps MEOS C function trgeometry_at_geom. +func TrgeometryAtGeom(temp *Temporal, gs *Geom) *Temporal { + _cret := C.trgeometry_at_geom(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TrgeometryMinusGeom wraps MEOS C function trgeometry_minus_geom. +func TrgeometryMinusGeom(temp *Temporal, gs *Geom) *Temporal { + _cret := C.trgeometry_minus_geom(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TrgeometryAtSTBOX wraps MEOS C function trgeometry_at_stbox. +func TrgeometryAtSTBOX(temp *Temporal, box *STBox, border_inc bool) *Temporal { + _cret := C.trgeometry_at_stbox(temp._inner, box._inner, C.bool(border_inc)) + return &Temporal{_inner: _cret} +} + + +// TrgeometryMinusSTBOX wraps MEOS C function trgeometry_minus_stbox. +func TrgeometryMinusSTBOX(temp *Temporal, box *STBox, border_inc bool) *Temporal { + _cret := C.trgeometry_minus_stbox(temp._inner, box._inner, C.bool(border_inc)) + return &Temporal{_inner: _cret} +} + + +// TdistanceTrgeometryGeo wraps MEOS C function tdistance_trgeometry_geo. +func TdistanceTrgeometryGeo(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tdistance_trgeometry_geo(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TdistanceTrgeometryTpoint wraps MEOS C function tdistance_trgeometry_tpoint. +func TdistanceTrgeometryTpoint(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tdistance_trgeometry_tpoint(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// TdistanceTrgeometryTrgeometry wraps MEOS C function tdistance_trgeometry_trgeometry. +func TdistanceTrgeometryTrgeometry(temp1 *Temporal, temp2 *Temporal) *Temporal { + _cret := C.tdistance_trgeometry_trgeometry(temp1._inner, temp2._inner) + return &Temporal{_inner: _cret} +} + + +// NadSTBOXTrgeometry wraps MEOS C function nad_stbox_trgeometry. +func NadSTBOXTrgeometry(box *STBox, temp *Temporal) float64 { + _cret := C.nad_stbox_trgeometry(box._inner, temp._inner) + return float64(_cret) +} + + +// NadTrgeometryGeo wraps MEOS C function nad_trgeometry_geo. +func NadTrgeometryGeo(temp *Temporal, gs *Geom) float64 { + _cret := C.nad_trgeometry_geo(temp._inner, gs._inner) + return float64(_cret) +} + + +// NadTrgeometrySTBOX wraps MEOS C function nad_trgeometry_stbox. +func NadTrgeometrySTBOX(temp *Temporal, box *STBox) float64 { + _cret := C.nad_trgeometry_stbox(temp._inner, box._inner) + return float64(_cret) +} + + +// NadTrgeometryTpoint wraps MEOS C function nad_trgeometry_tpoint. +func NadTrgeometryTpoint(temp1 *Temporal, temp2 *Temporal) float64 { + _cret := C.nad_trgeometry_tpoint(temp1._inner, temp2._inner) + return float64(_cret) +} + + +// NadTrgeometryTrgeometry wraps MEOS C function nad_trgeometry_trgeometry. +func NadTrgeometryTrgeometry(temp1 *Temporal, temp2 *Temporal) float64 { + _cret := C.nad_trgeometry_trgeometry(temp1._inner, temp2._inner) + return float64(_cret) +} + + +// NaiTrgeometryGeo wraps MEOS C function nai_trgeometry_geo. +func NaiTrgeometryGeo(temp *Temporal, gs *Geom) *TInstant { + _cret := C.nai_trgeometry_geo(temp._inner, gs._inner) + return &TInstant{_inner: _cret} +} + + +// NaiTrgeometryTpoint wraps MEOS C function nai_trgeometry_tpoint. +func NaiTrgeometryTpoint(temp1 *Temporal, temp2 *Temporal) *TInstant { + _cret := C.nai_trgeometry_tpoint(temp1._inner, temp2._inner) + return &TInstant{_inner: _cret} +} + + +// NaiTrgeometryTrgeometry wraps MEOS C function nai_trgeometry_trgeometry. +func NaiTrgeometryTrgeometry(temp1 *Temporal, temp2 *Temporal) *TInstant { + _cret := C.nai_trgeometry_trgeometry(temp1._inner, temp2._inner) + return &TInstant{_inner: _cret} +} + + +// ShortestlineTrgeometryGeo wraps MEOS C function shortestline_trgeometry_geo. +func ShortestlineTrgeometryGeo(temp *Temporal, gs *Geom) *Geom { + _cret := C.shortestline_trgeometry_geo(temp._inner, gs._inner) + return &Geom{_inner: _cret} +} + + +// ShortestlineTrgeometryTpoint wraps MEOS C function shortestline_trgeometry_tpoint. +func ShortestlineTrgeometryTpoint(temp1 *Temporal, temp2 *Temporal) *Geom { + _cret := C.shortestline_trgeometry_tpoint(temp1._inner, temp2._inner) + return &Geom{_inner: _cret} +} + + +// ShortestlineTrgeometryTrgeometry wraps MEOS C function shortestline_trgeometry_trgeometry. +func ShortestlineTrgeometryTrgeometry(temp1 *Temporal, temp2 *Temporal) *Geom { + _cret := C.shortestline_trgeometry_trgeometry(temp1._inner, temp2._inner) + return &Geom{_inner: _cret} +} + + +// AlwaysEqGeoTrgeometry wraps MEOS C function always_eq_geo_trgeometry. +func AlwaysEqGeoTrgeometry(gs *Geom, temp *Temporal) int { + _cret := C.always_eq_geo_trgeometry(gs._inner, temp._inner) + return int(_cret) +} + + +// AlwaysEqTrgeometryGeo wraps MEOS C function always_eq_trgeometry_geo. +func AlwaysEqTrgeometryGeo(temp *Temporal, gs *Geom) int { + _cret := C.always_eq_trgeometry_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// AlwaysEqTrgeometryTrgeometry wraps MEOS C function always_eq_trgeometry_trgeometry. +func AlwaysEqTrgeometryTrgeometry(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.always_eq_trgeometry_trgeometry(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AlwaysNeGeoTrgeometry wraps MEOS C function always_ne_geo_trgeometry. +func AlwaysNeGeoTrgeometry(gs *Geom, temp *Temporal) int { + _cret := C.always_ne_geo_trgeometry(gs._inner, temp._inner) + return int(_cret) +} + + +// AlwaysNeTrgeometryGeo wraps MEOS C function always_ne_trgeometry_geo. +func AlwaysNeTrgeometryGeo(temp *Temporal, gs *Geom) int { + _cret := C.always_ne_trgeometry_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// AlwaysNeTrgeometryTrgeometry wraps MEOS C function always_ne_trgeometry_trgeometry. +func AlwaysNeTrgeometryTrgeometry(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.always_ne_trgeometry_trgeometry(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EverEqGeoTrgeometry wraps MEOS C function ever_eq_geo_trgeometry. +func EverEqGeoTrgeometry(gs *Geom, temp *Temporal) int { + _cret := C.ever_eq_geo_trgeometry(gs._inner, temp._inner) + return int(_cret) +} + + +// EverEqTrgeometryGeo wraps MEOS C function ever_eq_trgeometry_geo. +func EverEqTrgeometryGeo(temp *Temporal, gs *Geom) int { + _cret := C.ever_eq_trgeometry_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// EverEqTrgeometryTrgeometry wraps MEOS C function ever_eq_trgeometry_trgeometry. +func EverEqTrgeometryTrgeometry(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ever_eq_trgeometry_trgeometry(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EverNeGeoTrgeometry wraps MEOS C function ever_ne_geo_trgeometry. +func EverNeGeoTrgeometry(gs *Geom, temp *Temporal) int { + _cret := C.ever_ne_geo_trgeometry(gs._inner, temp._inner) + return int(_cret) +} + + +// EverNeTrgeometryGeo wraps MEOS C function ever_ne_trgeometry_geo. +func EverNeTrgeometryGeo(temp *Temporal, gs *Geom) int { + _cret := C.ever_ne_trgeometry_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// EverNeTrgeometryTrgeometry wraps MEOS C function ever_ne_trgeometry_trgeometry. +func EverNeTrgeometryTrgeometry(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.ever_ne_trgeometry_trgeometry(temp1._inner, temp2._inner) + return int(_cret) +} + + +// TeqGeoTrgeometry wraps MEOS C function teq_geo_trgeometry. +func TeqGeoTrgeometry(gs *Geom, temp *Temporal) *Temporal { + _cret := C.teq_geo_trgeometry(gs._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TeqTrgeometryGeo wraps MEOS C function teq_trgeometry_geo. +func TeqTrgeometryGeo(temp *Temporal, gs *Geom) *Temporal { + _cret := C.teq_trgeometry_geo(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// TneGeoTrgeometry wraps MEOS C function tne_geo_trgeometry. +func TneGeoTrgeometry(gs *Geom, temp *Temporal) *Temporal { + _cret := C.tne_geo_trgeometry(gs._inner, temp._inner) + return &Temporal{_inner: _cret} +} + + +// TneTrgeometryGeo wraps MEOS C function tne_trgeometry_geo. +func TneTrgeometryGeo(temp *Temporal, gs *Geom) *Temporal { + _cret := C.tne_trgeometry_geo(temp._inner, gs._inner) + return &Temporal{_inner: _cret} +} + + +// EcontainsGeoTrgeometry wraps MEOS C function econtains_geo_trgeometry. +func EcontainsGeoTrgeometry(gs *Geom, temp *Temporal) int { + _cret := C.econtains_geo_trgeometry(gs._inner, temp._inner) + return int(_cret) +} + + +// AcontainsGeoTrgeometry wraps MEOS C function acontains_geo_trgeometry. +func AcontainsGeoTrgeometry(gs *Geom, temp *Temporal) int { + _cret := C.acontains_geo_trgeometry(gs._inner, temp._inner) + return int(_cret) +} + + +// EcoversGeoTrgeometry wraps MEOS C function ecovers_geo_trgeometry. +func EcoversGeoTrgeometry(gs *Geom, temp *Temporal) int { + _cret := C.ecovers_geo_trgeometry(gs._inner, temp._inner) + return int(_cret) +} + + +// AcoversGeoTrgeometry wraps MEOS C function acovers_geo_trgeometry. +func AcoversGeoTrgeometry(gs *Geom, temp *Temporal) int { + _cret := C.acovers_geo_trgeometry(gs._inner, temp._inner) + return int(_cret) +} + + +// EcoversTrgeometryGeo wraps MEOS C function ecovers_trgeometry_geo. +func EcoversTrgeometryGeo(temp *Temporal, gs *Geom) int { + _cret := C.ecovers_trgeometry_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// AcoversTrgeometryGeo wraps MEOS C function acovers_trgeometry_geo. +func AcoversTrgeometryGeo(temp *Temporal, gs *Geom) int { + _cret := C.acovers_trgeometry_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// EdisjointTrgeometryGeo wraps MEOS C function edisjoint_trgeometry_geo. +func EdisjointTrgeometryGeo(temp *Temporal, gs *Geom) int { + _cret := C.edisjoint_trgeometry_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// AdisjointTrgeometryGeo wraps MEOS C function adisjoint_trgeometry_geo. +func AdisjointTrgeometryGeo(temp *Temporal, gs *Geom) int { + _cret := C.adisjoint_trgeometry_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// EintersectsTrgeometryGeo wraps MEOS C function eintersects_trgeometry_geo. +func EintersectsTrgeometryGeo(temp *Temporal, gs *Geom) int { + _cret := C.eintersects_trgeometry_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// AintersectsTrgeometryGeo wraps MEOS C function aintersects_trgeometry_geo. +func AintersectsTrgeometryGeo(temp *Temporal, gs *Geom) int { + _cret := C.aintersects_trgeometry_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// EtouchesTrgeometryGeo wraps MEOS C function etouches_trgeometry_geo. +func EtouchesTrgeometryGeo(temp *Temporal, gs *Geom) int { + _cret := C.etouches_trgeometry_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// AtouchesTrgeometryGeo wraps MEOS C function atouches_trgeometry_geo. +func AtouchesTrgeometryGeo(temp *Temporal, gs *Geom) int { + _cret := C.atouches_trgeometry_geo(temp._inner, gs._inner) + return int(_cret) +} + + +// EdwithinTrgeometryGeo wraps MEOS C function edwithin_trgeometry_geo. +func EdwithinTrgeometryGeo(temp *Temporal, gs *Geom, dist float64) int { + _cret := C.edwithin_trgeometry_geo(temp._inner, gs._inner, C.double(dist)) + return int(_cret) +} + + +// AdwithinTrgeometryGeo wraps MEOS C function adwithin_trgeometry_geo. +func AdwithinTrgeometryGeo(temp *Temporal, gs *Geom, dist float64) int { + _cret := C.adwithin_trgeometry_geo(temp._inner, gs._inner, C.double(dist)) + return int(_cret) +} + + +// EdisjointTrgeometryTrgeometry wraps MEOS C function edisjoint_trgeometry_trgeometry. +func EdisjointTrgeometryTrgeometry(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.edisjoint_trgeometry_trgeometry(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AdisjointTrgeometryTrgeometry wraps MEOS C function adisjoint_trgeometry_trgeometry. +func AdisjointTrgeometryTrgeometry(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.adisjoint_trgeometry_trgeometry(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EintersectsTrgeometryTrgeometry wraps MEOS C function eintersects_trgeometry_trgeometry. +func EintersectsTrgeometryTrgeometry(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.eintersects_trgeometry_trgeometry(temp1._inner, temp2._inner) + return int(_cret) +} + + +// AintersectsTrgeometryTrgeometry wraps MEOS C function aintersects_trgeometry_trgeometry. +func AintersectsTrgeometryTrgeometry(temp1 *Temporal, temp2 *Temporal) int { + _cret := C.aintersects_trgeometry_trgeometry(temp1._inner, temp2._inner) + return int(_cret) +} + + +// EdwithinTrgeometryTrgeometry wraps MEOS C function edwithin_trgeometry_trgeometry. +func EdwithinTrgeometryTrgeometry(temp1 *Temporal, temp2 *Temporal, dist float64) int { + _cret := C.edwithin_trgeometry_trgeometry(temp1._inner, temp2._inner, C.double(dist)) + return int(_cret) +} + + +// AdwithinTrgeometryTrgeometry wraps MEOS C function adwithin_trgeometry_trgeometry. +func AdwithinTrgeometryTrgeometry(temp1 *Temporal, temp2 *Temporal, dist float64) int { + _cret := C.adwithin_trgeometry_trgeometry(temp1._inner, temp2._inner, C.double(dist)) + return int(_cret) +} + diff --git a/functions/types.go b/functions/types.go new file mode 100644 index 0000000..fc26dcc --- /dev/null +++ b/functions/types.go @@ -0,0 +1,256 @@ +package functions + +/* +#include +#include "meos.h" +#include "meos_catalog.h" +#include "meos_geo.h" +#include "meos_internal.h" +#include "meos_internal_geo.h" +#include "meos_npoint.h" +#include "meos_cbuffer.h" +#include "meos_pose.h" +#include "meos_rgeo.h" +#include "meos_h3.h" +#include "meos_quadbin.h" +#include "meos_json.h" +#include "meos_pointcloud.h" +#include "meos_arrow.h" +*/ +import "C" +import ( + "unsafe" +) + +var _ = unsafe.Pointer(nil) + +// -------------------- opaque handle types -------------------- +type Temporal struct { _inner *C.Temporal } +func (x *Temporal) Inner() *C.Temporal { if x == nil { return nil }; return x._inner } +type TInstant struct { _inner *C.TInstant } +func (x *TInstant) Inner() *C.TInstant { if x == nil { return nil }; return x._inner } +type TSequence struct { _inner *C.TSequence } +func (x *TSequence) Inner() *C.TSequence { if x == nil { return nil }; return x._inner } +type TSequenceSet struct { _inner *C.TSequenceSet } +func (x *TSequenceSet) Inner() *C.TSequenceSet { if x == nil { return nil }; return x._inner } +type STBox struct { _inner *C.STBox } +func (x *STBox) Inner() *C.STBox { if x == nil { return nil }; return x._inner } +type TBox struct { _inner *C.TBox } +func (x *TBox) Inner() *C.TBox { if x == nil { return nil }; return x._inner } +type Span struct { _inner *C.Span } +func (x *Span) Inner() *C.Span { if x == nil { return nil }; return x._inner } +type SpanSet struct { _inner *C.SpanSet } +func (x *SpanSet) Inner() *C.SpanSet { if x == nil { return nil }; return x._inner } +type Set struct { _inner *C.Set } +func (x *Set) Inner() *C.Set { if x == nil { return nil }; return x._inner } +type Geom struct { _inner *C.GSERIALIZED } +func (x *Geom) Inner() *C.GSERIALIZED { if x == nil { return nil }; return x._inner } +type Interval struct { _inner *C.Interval } +func (x *Interval) Inner() *C.Interval { if x == nil { return nil }; return x._inner } +type Npoint struct { _inner *C.Npoint } +func (x *Npoint) Inner() *C.Npoint { if x == nil { return nil }; return x._inner } +type Nsegment struct { _inner *C.Nsegment } +func (x *Nsegment) Inner() *C.Nsegment { if x == nil { return nil }; return x._inner } +type Cbuffer struct { _inner *C.Cbuffer } +func (x *Cbuffer) Inner() *C.Cbuffer { if x == nil { return nil }; return x._inner } +type Pose struct { _inner *C.Pose } +func (x *Pose) Inner() *C.Pose { if x == nil { return nil }; return x._inner } +type Jsonb struct { _inner *C.Jsonb } +func (x *Jsonb) Inner() *C.Jsonb { if x == nil { return nil }; return x._inner } +type JsonPath struct { _inner *C.JsonPath } +func (x *JsonPath) Inner() *C.JsonPath { if x == nil { return nil }; return x._inner } +type Pcpoint struct { _inner *C.Pcpoint } +func (x *Pcpoint) Inner() *C.Pcpoint { if x == nil { return nil }; return x._inner } +type Pcpatch struct { _inner *C.Pcpatch } +func (x *Pcpatch) Inner() *C.Pcpatch { if x == nil { return nil }; return x._inner } +type TPCBox struct { _inner *C.TPCBox } +func (x *TPCBox) Inner() *C.TPCBox { if x == nil { return nil }; return x._inner } +type MeosArray struct { _inner *C.MeosArray } +func (x *MeosArray) Inner() *C.MeosArray { if x == nil { return nil }; return x._inner } +type PCSchema struct { _inner *C.PCSCHEMA } +func (x *PCSchema) Inner() *C.PCSCHEMA { if x == nil { return nil }; return x._inner } +type SkipList struct { _inner *C.SkipList } +func (x *SkipList) Inner() *C.SkipList { if x == nil { return nil }; return x._inner } +type RTree struct { _inner *C.RTree } +func (x *RTree) Inner() *C.RTree { if x == nil { return nil }; return x._inner } +type Match struct { _inner *C.Match } +func (x *Match) Inner() *C.Match { if x == nil { return nil }; return x._inner } +type Box3D struct { _inner *C.BOX3D } +func (x *Box3D) Inner() *C.BOX3D { if x == nil { return nil }; return x._inner } +type GBox struct { _inner *C.GBOX } +func (x *GBox) Inner() *C.GBOX { if x == nil { return nil }; return x._inner } +type AFFINE struct { _inner *C.AFFINE } +func (x *AFFINE) Inner() *C.AFFINE { if x == nil { return nil }; return x._inner } +type PJContext struct { _inner *C.PJ_CONTEXT } +func (x *PJContext) Inner() *C.PJ_CONTEXT { if x == nil { return nil }; return x._inner } +type GslRng struct { _inner *C.gsl_rng } +func (x *GslRng) Inner() *C.gsl_rng { if x == nil { return nil }; return x._inner } + +// -------------------- enums -------------------- +type TempSubtype C.tempSubtype +const ( + TempSubtype_ANYTEMPSUBTYPE TempSubtype = 0 + TempSubtype_TINSTANT TempSubtype = 1 + TempSubtype_TSEQUENCE TempSubtype = 2 + TempSubtype_TSEQUENCESET TempSubtype = 3 +) +type Interpolation C.interpType +const ( + Interpolation_INTERP_NONE Interpolation = 0 + Interpolation_DISCRETE Interpolation = 1 + Interpolation_STEP Interpolation = 2 + Interpolation_LINEAR Interpolation = 3 +) +type RTreeSearchOp C.RTreeSearchOp +const ( + RTreeSearchOp_RTREE_OVERLAPS RTreeSearchOp = 0 + RTreeSearchOp_RTREE_CONTAINS RTreeSearchOp = 1 + RTreeSearchOp_RTREE_CONTAINED_BY RTreeSearchOp = 2 +) +type MeosType C.MeosType +const ( + MeosType_T_UNKNOWN MeosType = 0 + MeosType_T_BOOL MeosType = 1 + MeosType_T_DATE MeosType = 2 + MeosType_T_DATEMULTIRANGE MeosType = 3 + MeosType_T_DATERANGE MeosType = 4 + MeosType_T_DATESET MeosType = 5 + MeosType_T_DATESPAN MeosType = 6 + MeosType_T_DATESPANSET MeosType = 7 + MeosType_T_DOUBLE2 MeosType = 8 + MeosType_T_DOUBLE3 MeosType = 9 + MeosType_T_DOUBLE4 MeosType = 10 + MeosType_T_FLOAT8 MeosType = 11 + MeosType_T_FLOATSET MeosType = 12 + MeosType_T_FLOATSPAN MeosType = 13 + MeosType_T_FLOATSPANSET MeosType = 14 + MeosType_T_INT4 MeosType = 15 + MeosType_T_INT4MULTIRANGE MeosType = 16 + MeosType_T_INT4RANGE MeosType = 17 + MeosType_T_INTSET MeosType = 18 + MeosType_T_INTSPAN MeosType = 19 + MeosType_T_INTSPANSET MeosType = 20 + MeosType_T_INT8 MeosType = 21 + MeosType_T_INT8MULTIRANGE MeosType = 52 + MeosType_T_INT8RANGE MeosType = 53 + MeosType_T_BIGINTSET MeosType = 22 + MeosType_T_BIGINTSPAN MeosType = 23 + MeosType_T_BIGINTSPANSET MeosType = 24 + MeosType_T_STBOX MeosType = 25 + MeosType_T_TBOOL MeosType = 26 + MeosType_T_TBOX MeosType = 27 + MeosType_T_TDOUBLE2 MeosType = 28 + MeosType_T_TDOUBLE3 MeosType = 29 + MeosType_T_TDOUBLE4 MeosType = 30 + MeosType_T_TEXT MeosType = 31 + MeosType_T_TEXTSET MeosType = 32 + MeosType_T_TFLOAT MeosType = 33 + MeosType_T_TIMESTAMPTZ MeosType = 34 + MeosType_T_TINT MeosType = 35 + MeosType_T_TSTZMULTIRANGE MeosType = 36 + MeosType_T_TSTZRANGE MeosType = 37 + MeosType_T_TSTZSET MeosType = 38 + MeosType_T_TSTZSPAN MeosType = 39 + MeosType_T_TSTZSPANSET MeosType = 40 + MeosType_T_TTEXT MeosType = 41 + MeosType_T_GEOMETRY MeosType = 42 + MeosType_T_GEOMSET MeosType = 43 + MeosType_T_GEOGRAPHY MeosType = 44 + MeosType_T_GEOGSET MeosType = 45 + MeosType_T_TGEOMPOINT MeosType = 46 + MeosType_T_TGEOGPOINT MeosType = 47 + MeosType_T_NPOINT MeosType = 48 + MeosType_T_NPOINTSET MeosType = 49 + MeosType_T_NSEGMENT MeosType = 50 + MeosType_T_TNPOINT MeosType = 51 + MeosType_T_POSE MeosType = 54 + MeosType_T_POSESET MeosType = 55 + MeosType_T_TPOSE MeosType = 56 + MeosType_T_CBUFFER MeosType = 57 + MeosType_T_CBUFFERSET MeosType = 58 + MeosType_T_TCBUFFER MeosType = 59 + MeosType_T_TGEOMETRY MeosType = 60 + MeosType_T_TGEOGRAPHY MeosType = 61 + MeosType_T_TRGEOMETRY MeosType = 62 + MeosType_T_JSONB MeosType = 63 + MeosType_T_JSONPATH MeosType = 64 + MeosType_T_JSONBSET MeosType = 65 + MeosType_T_TJSONB MeosType = 66 + MeosType_T_TBIGINT MeosType = 67 + MeosType_T_H3INDEX MeosType = 68 + MeosType_T_H3INDEXSET MeosType = 69 + MeosType_T_TH3INDEX MeosType = 70 + MeosType_T_QUADBIN MeosType = 71 + MeosType_T_QUADBINSET MeosType = 72 + MeosType_T_TQUADBIN MeosType = 73 + MeosType_T_PCPOINT MeosType = 74 + MeosType_T_PCPOINTSET MeosType = 75 + MeosType_T_TPCPOINT MeosType = 76 + MeosType_T_PCPATCH MeosType = 77 + MeosType_T_PCPATCHSET MeosType = 78 + MeosType_T_TPCPATCH MeosType = 79 + MeosType_T_TPCBOX MeosType = 80 + MeosType_T_RAQUET MeosType = 81 + MeosType_NUM_MEOS_TYPES MeosType = 82 +) +type MeosOper C.MeosOper +const ( + MeosOper_UNKNOWN_OP MeosOper = 0 + MeosOper_EQ_OP MeosOper = 1 + MeosOper_NE_OP MeosOper = 2 + MeosOper_LT_OP MeosOper = 3 + MeosOper_LE_OP MeosOper = 4 + MeosOper_GT_OP MeosOper = 5 + MeosOper_GE_OP MeosOper = 6 + MeosOper_ADJACENT_OP MeosOper = 7 + MeosOper_UNION_OP MeosOper = 8 + MeosOper_MINUS_OP MeosOper = 9 + MeosOper_INTERSECT_OP MeosOper = 10 + MeosOper_OVERLAPS_OP MeosOper = 11 + MeosOper_CONTAINS_OP MeosOper = 12 + MeosOper_CONTAINED_OP MeosOper = 13 + MeosOper_SAME_OP MeosOper = 14 + MeosOper_LEFT_OP MeosOper = 15 + MeosOper_OVERLEFT_OP MeosOper = 16 + MeosOper_RIGHT_OP MeosOper = 17 + MeosOper_OVERRIGHT_OP MeosOper = 18 + MeosOper_BELOW_OP MeosOper = 19 + MeosOper_OVERBELOW_OP MeosOper = 20 + MeosOper_ABOVE_OP MeosOper = 21 + MeosOper_OVERABOVE_OP MeosOper = 22 + MeosOper_FRONT_OP MeosOper = 23 + MeosOper_OVERFRONT_OP MeosOper = 24 + MeosOper_BACK_OP MeosOper = 25 + MeosOper_OVERBACK_OP MeosOper = 26 + MeosOper_BEFORE_OP MeosOper = 27 + MeosOper_OVERBEFORE_OP MeosOper = 28 + MeosOper_AFTER_OP MeosOper = 29 + MeosOper_OVERAFTER_OP MeosOper = 30 + MeosOper_EVEREQ_OP MeosOper = 31 + MeosOper_EVERNE_OP MeosOper = 32 + MeosOper_EVERLT_OP MeosOper = 33 + MeosOper_EVERLE_OP MeosOper = 34 + MeosOper_EVERGT_OP MeosOper = 35 + MeosOper_EVERGE_OP MeosOper = 36 + MeosOper_ALWAYSEQ_OP MeosOper = 37 + MeosOper_ALWAYSNE_OP MeosOper = 38 + MeosOper_ALWAYSLT_OP MeosOper = 39 + MeosOper_ALWAYSLE_OP MeosOper = 40 + MeosOper_ALWAYSGT_OP MeosOper = 41 + MeosOper_ALWAYSGE_OP MeosOper = 42 + MeosOper_TEMPCONTAINS_OP MeosOper = 43 + MeosOper_TEMPCONTAINED_OP MeosOper = 44 +) +type SkipListType C.SkipListType +const ( + SkipListType_SKIPLIST_TEMPORAL SkipListType = 0 + SkipListType_SKIPLIST_KEYVALUE SkipListType = 1 +) +type NullHandleType C.nullHandleType +const ( + NullHandleType_NULL_INVALID NullHandleType = 0 + NullHandleType_NULL_ERROR NullHandleType = 1 + NullHandleType_NULL_JSON_NULL NullHandleType = 2 + NullHandleType_NULL_DELETE NullHandleType = 3 + NullHandleType_NULL_RETURN NullHandleType = 4 +) diff --git a/geo.go b/geo.go index 28323d1..b83fee2 100644 --- a/geo.go +++ b/geo.go @@ -17,7 +17,7 @@ type Geom struct { func NewGeom(geom_str string, typemod int) Geom { c_geom_str := C.CString(geom_str) defer C.free(unsafe.Pointer(c_geom_str)) - c_geom := C.pgis_geometry_in(c_geom_str, C.int(typemod)) + c_geom := C.geom_in(c_geom_str, C.int(typemod)) g := Geom{_inner: c_geom} return g } @@ -25,7 +25,7 @@ func NewGeom(geom_str string, typemod int) Geom { func PgisGeometryIn(input string, typemod int) *Geom { c_geom_str := C.CString(input) defer C.free(unsafe.Pointer(c_geom_str)) - c_geom := C.pgis_geometry_in(c_geom_str, C.int(typemod)) + c_geom := C.geom_in(c_geom_str, C.int(typemod)) g := &Geom{_inner: c_geom} return g } @@ -33,7 +33,7 @@ func PgisGeometryIn(input string, typemod int) *Geom { func PgisGeographyIn(input string, typemod int) *Geom { c_geom_str := C.CString(input) defer C.free(unsafe.Pointer(c_geom_str)) - c_geom := C.pgis_geography_in(c_geom_str, C.int(typemod)) + c_geom := C.geog_in(c_geom_str, C.int(typemod)) g := &Geom{_inner: c_geom} return g } @@ -41,7 +41,7 @@ func PgisGeographyIn(input string, typemod int) *Geom { func GeographyFromHexEwkb(input string) *Geom { c_geom_str := C.CString(input) defer C.free(unsafe.Pointer(c_geom_str)) - c_geom := C.geography_from_hexewkb(c_geom_str) + c_geom := C.geog_from_hexewkb(c_geom_str) g := &Geom{_inner: c_geom} return g } @@ -49,7 +49,7 @@ func GeographyFromHexEwkb(input string) *Geom { func GeometryFromHexEwkb(input string) *Geom { c_geom_str := C.CString(input) defer C.free(unsafe.Pointer(c_geom_str)) - c_geom := C.geometry_from_hexewkb(c_geom_str) + c_geom := C.geom_from_hexewkb(c_geom_str) g := &Geom{_inner: c_geom} return g } @@ -57,7 +57,7 @@ func GeometryFromHexEwkb(input string) *Geom { func GeographyFromText(input string, srid int) *Geom { c_geom_str := C.CString(input) defer C.free(unsafe.Pointer(c_geom_str)) - c_geom := C.geography_from_text(c_geom_str, C.int(srid)) + c_geom := C.geo_from_text(c_geom_str, C.int(srid)) g := &Geom{_inner: c_geom} return g } @@ -65,7 +65,7 @@ func GeographyFromText(input string, srid int) *Geom { func GeometryFromText(input string, srid int) *Geom { c_geom_str := C.CString(input) defer C.free(unsafe.Pointer(c_geom_str)) - c_geom := C.geometry_from_text(c_geom_str, C.int(srid)) + c_geom := C.geo_from_text(c_geom_str, C.int(srid)) g := &Geom{_inner: c_geom} return g } diff --git a/main_temporal.go b/main_temporal.go index 6f6f45d..4878330 100644 --- a/main_temporal.go +++ b/main_temporal.go @@ -242,7 +242,7 @@ func TemporalTPrecision[T Temporal](temp T, duration timeutil.Timedelta, start t // TemporalAppendTInstant Append an instant to a temporal value func TemporalAppendTInstant[T Temporal, TI TInstant](temp T, inst TI, max_dist float64, max_time timeutil.Timedelta, expand bool) Temporal { m := TimeDeltaToInterval(max_time) - res := C.temporal_append_tinstant(temp.Inner(), C.cast_temporal_to_tinstant(inst.Inner()), C.double(max_dist), &m, C.bool(expand)) + res := C.temporal_append_tinstant(temp.Inner(), C.cast_temporal_to_tinstant(inst.Inner()), C.interpType(C.INTERP_NONE), C.double(max_dist), &m, C.bool(expand)) return CreateTemporal(res) } diff --git a/main_tfloat.go b/main_tfloat.go index 536b36f..9ad63a1 100644 --- a/main_tfloat.go +++ b/main_tfloat.go @@ -376,7 +376,7 @@ func TFloatValueAtTimestamp[TF TFloat](tf TF, ts time.Time) float64 { // TFloatDerivative Return the derivative of a temporal number func TFloatDerivative[TF TFloat](tf TF) Temporal { - return CreateTemporal(C.tfloat_derivative(tf.Inner())) + return CreateTemporal(C.temporal_derivative(tf.Inner())) } // TFloatToDegrees Return a temporal number transformed from radians to degrees @@ -391,7 +391,7 @@ func TFloatToRadians[TF TFloat](tf TF) Temporal { // TFloatRound Return a temporal float with the precision of the values set to a number of decimal places func TFloatRound[TF TFloat](tf TF, max_decimals int) Temporal { - return CreateTemporal(C.tfloat_round(tf.Inner(), C.int(max_decimals))) + return CreateTemporal(C.temporal_round(tf.Inner(), C.int(max_decimals))) } // TFloatShiftValue Return a temporal integer whose value dimension is shifted by a value @@ -465,7 +465,7 @@ func DivFloatTFloat[TF TFloat](value float64, tf TF) Temporal { // DistanceTFloatFloat returns the temporal distance between a temporal float and a constant float. func DistanceTFloatFloat[TF TFloat](tf TF, value float64) Temporal { - c_temp := C.distance_tfloat_float(tf.Inner(), C.double(value)) + c_temp := C.tdistance_tfloat_float(tf.Inner(), C.double(value)) return CreateTemporal(c_temp) } diff --git a/main_tgeogpoint.go b/main_tgeogpoint.go index f7e2d16..bff3906 100644 --- a/main_tgeogpoint.go +++ b/main_tgeogpoint.go @@ -25,7 +25,7 @@ func NewTGeogPointInst(tgmpi_in string) *TGeogPointInst { } func (tgmpi *TGeogPointInst) TPointOut(maxdd int) string { - c_tgmpi_out := C.tpoint_as_text(tgmpi._inner, C.int(maxdd)) + c_tgmpi_out := C.tspatial_as_text(tgmpi._inner, C.int(maxdd)) defer C.free(unsafe.Pointer(c_tgmpi_out)) tgmpi_out := C.GoString(c_tgmpi_out) return tgmpi_out @@ -82,7 +82,7 @@ func NewTGeogPointSeq(tgmpi_in string) TGeogPointSeq { } func (tgmpi *TGeogPointSeq) TPointOut(maxdd int) string { - c_tgmpi_out := C.tpoint_as_text(tgmpi._inner, C.int(maxdd)) + c_tgmpi_out := C.tspatial_as_text(tgmpi._inner, C.int(maxdd)) defer C.free(unsafe.Pointer(c_tgmpi_out)) tgmpi_out := C.GoString(c_tgmpi_out) return tgmpi_out @@ -129,7 +129,7 @@ func NewTGeogPointSeqSet(tgmpi_in string) *TGeogPointSeqSet { } func (tgmpi *TGeogPointSeqSet) TPointOut(maxdd int) string { - c_tgmpi_out := C.tpoint_as_text(tgmpi._inner, C.int(maxdd)) + c_tgmpi_out := C.tspatial_as_text(tgmpi._inner, C.int(maxdd)) defer C.free(unsafe.Pointer(c_tgmpi_out)) tgmpi_out := C.GoString(c_tgmpi_out) return tgmpi_out diff --git a/main_tgeompoint.go b/main_tgeompoint.go index 0e77f56..e2ef7a9 100644 --- a/main_tgeompoint.go +++ b/main_tgeompoint.go @@ -31,14 +31,14 @@ func NewEmptyTGeomPointInst() TGeomPointInst { } func (tgmpi *TGeomPointInst) TPointOut(maxdd int) string { - c_tgmpi_out := C.tpoint_as_text(tgmpi._inner, C.int(maxdd)) + c_tgmpi_out := C.tspatial_as_text(tgmpi._inner, C.int(maxdd)) defer C.free(unsafe.Pointer(c_tgmpi_out)) tgmpi_out := C.GoString(c_tgmpi_out) return tgmpi_out } func (tgmpi *TGeomPointInst) TInstantOut(maxdd int) string { - c_tgmpi_out := C.tpoint_as_text(tgmpi._inner, C.int(maxdd)) + c_tgmpi_out := C.tspatial_as_text(tgmpi._inner, C.int(maxdd)) defer C.free(unsafe.Pointer(c_tgmpi_out)) tgmpi_out := C.GoString(c_tgmpi_out) return tgmpi_out @@ -93,7 +93,7 @@ func NewTGeomPointSeqFromWKB(tgmpi_in string) *TGeomPointSeq { } func (tgmpi *TGeomPointSeq) TPointOut(maxdd int) string { - c_tgmpi_out := C.tpoint_as_text(tgmpi._inner, C.int(maxdd)) + c_tgmpi_out := C.tspatial_as_text(tgmpi._inner, C.int(maxdd)) defer C.free(unsafe.Pointer(c_tgmpi_out)) tgmpi_out := C.GoString(c_tgmpi_out) return tgmpi_out @@ -144,7 +144,7 @@ func NewTGeomPointSeqSet(tgmpi_in string) *TGeomPointSeqSet { } func (tgmpi *TGeomPointSeqSet) TPointOut(maxdd int) string { - c_tgmpi_out := C.tpoint_as_text(tgmpi._inner, C.int(maxdd)) + c_tgmpi_out := C.tspatial_as_text(tgmpi._inner, C.int(maxdd)) defer C.free(unsafe.Pointer(c_tgmpi_out)) tgmpi_out := C.GoString(c_tgmpi_out) return tgmpi_out diff --git a/main_tnumber.go b/main_tnumber.go index ae6fc4c..27cf37e 100644 --- a/main_tnumber.go +++ b/main_tnumber.go @@ -159,7 +159,7 @@ func TNumberDeltaValue[TN TNumber](tn TN) Temporal { // DistanceTNumberTNumber returns the temporal distance between two temporal numbers. func DistanceTNumberTNumber[TN1 TNumber, TN2 TNumber](tn1 TN1, tn2 TN2) Temporal { - c_temp := C.distance_tnumber_tnumber(tn1.Inner(), tn2.Inner()) + c_temp := C.tdistance_tnumber_tnumber(tn1.Inner(), tn2.Inner()) return CreateTemporal(c_temp) } diff --git a/main_tpoint.go b/main_tpoint.go index 1fc45c6..866f3ad 100644 --- a/main_tpoint.go +++ b/main_tpoint.go @@ -15,7 +15,7 @@ import ( // TPointOut Return a temporal geometry/geography point from its Well-Known Text (WKT) representation func TPointOut[TP TPoint](tp TP, maxdd int) string { - c_point := C.tpoint_out(tp.Inner(), C.int(maxdd)) + c_point := C.tspatial_out(tp.Inner(), C.int(maxdd)) defer C.free(unsafe.Pointer(c_point)) point_out := C.GoString(c_point) return point_out @@ -23,7 +23,7 @@ func TPointOut[TP TPoint](tp TP, maxdd int) string { // TPointAsText Return the Well-Known Text (WKT) representation of a temporal point func TPointAsText[TP TPoint](tp TP, maxdd int) string { - c_text := C.tpoint_as_text(tp.Inner(), C.int(maxdd)) + c_text := C.tspatial_as_text(tp.Inner(), C.int(maxdd)) defer C.free(unsafe.Pointer(c_text)) text_out := C.GoString(c_text) return text_out @@ -31,7 +31,7 @@ func TPointAsText[TP TPoint](tp TP, maxdd int) string { // TPointAsEWKT Return the Extended Well-Known Text (EWKT) representation of a temporal point func TPointAsEWKT[T TPoint](temp T, maxdd int) string { - return C.GoString(C.tpoint_as_ewkt(temp.Inner(), C.int(maxdd))) + return C.GoString(C.tspatial_as_ewkt(temp.Inner(), C.int(maxdd))) } // TPointGeoAsEWKT Return the Extended Well-Known Text (EWKT) representation of the geometry of a temporal point @@ -50,19 +50,19 @@ func TPointAsGeoJson[TP TPoint](temp TP, option int, precision int, srs string) // TPointToSTBox Return a temporal point converted to a spatiotemporal box func TPointToSTBox[TP TPoint](tp TP) *STBox { - st_box := C.tpoint_to_stbox(tp.Inner()) + st_box := C.tspatial_to_stbox(tp.Inner()) return &STBox{_inner: st_box} } // TPointStartValue Return the start value of a temporal point func TPointStartValue[TP TPoint](tp TP) *Geom { - cValue := C.tpoint_start_value(tp.Inner()) + cValue := C.tgeo_start_value(tp.Inner()) return &Geom{_inner: cValue} } // TPointEndValue Return the end value of a temporal point func TPointEndValue[TP TPoint](tp TP) *Geom { - cValue := C.tpoint_end_value(tp.Inner()) + cValue := C.tgeo_end_value(tp.Inner()) return &Geom{_inner: cValue} } @@ -77,7 +77,7 @@ func TPointValueSet[TP TPoint](tp TP) ([]*Geom, error) { var count C.int // Call the C function - cValues := C.tpoint_values(tp.Inner(), &count) + cValues := C.tgeo_values(tp.Inner(), &count) if cValues == nil { return nil, fmt.Errorf("failed to retrieve tpoint values") } @@ -131,9 +131,10 @@ func TPointGetZ[TP TPoint](tp TP) Temporal { // TPointSTBoxes Return an array of spatiotemporal boxes from the segments of a temporal point func TPointSTBoxes[TP TPoint](tp TP, max_count int) ([]*STBox, error) { var count C.int + _ = max_count // Call the C function - cValues := C.tpoint_stboxes(tp.Inner(), C.int(max_count), &count) + cValues := C.tgeo_stboxes(tp.Inner(), &count) if cValues == nil { return nil, fmt.Errorf("failed to retrieve bool values") } @@ -186,26 +187,27 @@ func TPointTwcentroid[TP TPoint](tp TP) *Geom { // TPointSrid Return the SRID of a temporal point func TPointSrid[TP TPoint](tp TP) int { - return int(C.tpoint_srid(tp.Inner())) + return int(C.tspatial_srid(tp.Inner())) } // TPointSetSrid Return a temporal point with the coordinates set to an SRID func TPointSetSrid[TP TPoint](tp TP, srid int, output TP) TP { - c_temp := C.tpoint_set_srid(tp.Inner(), C.int(srid)) + c_temp := C.tspatial_set_srid(tp.Inner(), C.int(srid)) output.Init(c_temp) return output } // TPointRound Return a temporal point with the precision of the coordinates set to a number of decimal func TPointRound[TP TPoint](tp TP, max_decimals int) Temporal { - res := C.tpoint_round(tp.Inner(), C.int(max_decimals)) + res := C.temporal_round(tp.Inner(), C.int(max_decimals)) return CreateTemporal(res) } // TPointExpandSpace Return the bounding box of a temporal point expanded on the spatial dimension func TPointExpandSpace[TP TPoint](tp TP, other float64) *STBox { + box := C.tspatial_to_stbox(tp.Inner()) return &STBox{ - _inner: C.tpoint_expand_space(tp.Inner(), C.double(other)), + _inner: C.stbox_expand_space(box, C.double(other)), } } @@ -217,14 +219,14 @@ func TPointAtValue[TP TPoint](tp TP, value *Geom) Temporal { // TPointAtGeomTime Return a temporal point restricted to a geometry func TpointAtGeomTime[T Temporal](temp T, new_temp T, geom *Geom) T { - c_temp := C.tpoint_at_geom_time(temp.Inner(), geom._inner, nil, nil) + c_temp := C.tpoint_at_geom(temp.Inner(), geom._inner) new_temp.Init(c_temp) return new_temp } // TPointAtStbox Return a temporal point restricted to a spatiotemporal box func TPointAtStbox[TP TPoint](tp TP, stbox *STBox, border_inc bool) Temporal { - res := C.tpoint_at_stbox(tp.Inner(), stbox._inner, C.bool(border_inc)) + res := C.tgeo_at_stbox(tp.Inner(), stbox._inner, C.bool(border_inc)) return CreateTemporal(res) } @@ -236,170 +238,170 @@ func TPointMinusValue[TP TPoint](tp TP, value *Geom) Temporal { // TPointMinusGeomTime Return a temporal point minus a geometry func TpointMinusGeomTime[T Temporal](temp T, new_temp T, geom *Geom) T { - c_temp := C.tpoint_minus_geom_time(temp.Inner(), geom._inner, nil, nil) + c_temp := C.tpoint_minus_geom(temp.Inner(), geom._inner) new_temp.Init(c_temp) return new_temp } // TPointMinusStbox Return a temporal point minus a spatiotemporal box func TPointMinusStbox[TP TPoint](tp TP, stbox *STBox, border_inc bool) Temporal { - res := C.tpoint_minus_stbox(tp.Inner(), stbox._inner, C.bool(border_inc)) + res := C.tgeo_minus_stbox(tp.Inner(), stbox._inner, C.bool(border_inc)) return CreateTemporal(res) } // LeftTPointTPoint Return true if a temporal point is to the left of a spatiotemporal box func LeftTPointTPoint[TP1 TPoint, TP2 TPoint](tp1 TP1, tp2 TP2) bool { - return bool(C.left_tpoint_tpoint(tp1.Inner(), tp2.Inner())) + return bool(C.left_tspatial_tspatial(tp1.Inner(), tp2.Inner())) } // LeftTPointSTBox Return true if the first temporal point is to the left of the second one func LeftTPointSTBox[TP TPoint](tp TP, stbox *STBox) bool { - return bool(C.left_tpoint_stbox(tp.Inner(), stbox._inner)) + return bool(C.left_tspatial_stbox(tp.Inner(), stbox._inner)) } // OverleftTPointSTBox returns true if a temporal point is overleft of a spatiotemporal box. func OverleftTPointSTBox[TP TPoint](tp TP, stbox *STBox) bool { - return bool(C.overleft_tpoint_stbox(tp.Inner(), stbox._inner)) + return bool(C.overleft_tspatial_stbox(tp.Inner(), stbox._inner)) } // OverleftTPointTPoint returns true if the first temporal point is overleft of the second temporal point. func OverleftTPointTPoint[TP1 TPoint, TP2 TPoint](tp1 TP1, tp2 TP2) bool { - return bool(C.overleft_tpoint_tpoint(tp1.Inner(), tp2.Inner())) + return bool(C.overleft_tspatial_tspatial(tp1.Inner(), tp2.Inner())) } // RightTPointSTBox returns true if a temporal point is to the right of a spatiotemporal box. func RightTPointSTBox[TP TPoint](tp TP, stbox *STBox) bool { - return bool(C.right_tpoint_stbox(tp.Inner(), stbox._inner)) + return bool(C.right_tspatial_stbox(tp.Inner(), stbox._inner)) } // RightTPointTPoint returns true if the first temporal point is to the right of the second temporal point. func RightTPointTPoint[TP1 TPoint, TP2 TPoint](tp1 TP1, tp2 TP2) bool { - return bool(C.right_tpoint_tpoint(tp1.Inner(), tp2.Inner())) + return bool(C.right_tspatial_tspatial(tp1.Inner(), tp2.Inner())) } // OverrightTPointSTBox returns true if a temporal point is overright of a spatiotemporal box. func OverrightTPointSTBox[TP TPoint](tp TP, stbox *STBox) bool { - return bool(C.overright_tpoint_stbox(tp.Inner(), stbox._inner)) + return bool(C.overright_tspatial_stbox(tp.Inner(), stbox._inner)) } // OverrightTPointTPoint returns true if the first temporal point is overright of the second temporal point. func OverrightTPointTPoint[TP1 TPoint, TP2 TPoint](tp1 TP1, tp2 TP2) bool { - return bool(C.overright_tpoint_tpoint(tp1.Inner(), tp2.Inner())) + return bool(C.overright_tspatial_tspatial(tp1.Inner(), tp2.Inner())) } // BelowTPointSTBox returns true if a temporal point is below a spatiotemporal box. func BelowTPointSTBox[TP TPoint](tp TP, stbox *STBox) bool { - return bool(C.below_tpoint_stbox(tp.Inner(), stbox._inner)) + return bool(C.below_tspatial_stbox(tp.Inner(), stbox._inner)) } // BelowTPointTPoint returns true if the first temporal point is below the second temporal point. func BelowTPointTPoint[TP1 TPoint, TP2 TPoint](tp1 TP1, tp2 TP2) bool { - return bool(C.below_tpoint_tpoint(tp1.Inner(), tp2.Inner())) + return bool(C.below_tspatial_tspatial(tp1.Inner(), tp2.Inner())) } // OverbelowTPointSTBox returns true if a temporal point is overbelow a spatiotemporal box. func OverbelowTPointSTBox[TP TPoint](tp TP, stbox *STBox) bool { - return bool(C.overbelow_tpoint_stbox(tp.Inner(), stbox._inner)) + return bool(C.overbelow_tspatial_stbox(tp.Inner(), stbox._inner)) } // OverbelowTPointTPoint returns true if the first temporal point is overbelow the second temporal point. func OverbelowTPointTPoint[TP1 TPoint, TP2 TPoint](tp1 TP1, tp2 TP2) bool { - return bool(C.overbelow_tpoint_tpoint(tp1.Inner(), tp2.Inner())) + return bool(C.overbelow_tspatial_tspatial(tp1.Inner(), tp2.Inner())) } // AboveTPointSTBox returns true if a temporal point is above a spatiotemporal box. func AboveTPointSTBox[TP TPoint](tp TP, stbox *STBox) bool { - return bool(C.above_tpoint_stbox(tp.Inner(), stbox._inner)) + return bool(C.above_tspatial_stbox(tp.Inner(), stbox._inner)) } // AboveTPointTPoint returns true if the first temporal point is above the second temporal point. func AboveTPointTPoint[TP1 TPoint, TP2 TPoint](tp1 TP1, tp2 TP2) bool { - return bool(C.above_tpoint_tpoint(tp1.Inner(), tp2.Inner())) + return bool(C.above_tspatial_tspatial(tp1.Inner(), tp2.Inner())) } // OveraboveTPointSTBox returns true if a temporal point is overabove a spatiotemporal box. func OveraboveTPointSTBox[TP TPoint](tp TP, stbox *STBox) bool { - return bool(C.overabove_tpoint_stbox(tp.Inner(), stbox._inner)) + return bool(C.overabove_tspatial_stbox(tp.Inner(), stbox._inner)) } // OveraboveTPointTPoint returns true if the first temporal point is overabove the second temporal point. func OveraboveTPointTPoint[TP1 TPoint, TP2 TPoint](tp1 TP1, tp2 TP2) bool { - return bool(C.overabove_tpoint_tpoint(tp1.Inner(), tp2.Inner())) + return bool(C.overabove_tspatial_tspatial(tp1.Inner(), tp2.Inner())) } // FrontTPointSTBox returns true if a temporal point is in front of a spatiotemporal box. func FrontTPointSTBox[TP TPoint](tp TP, stbox *STBox) bool { - return bool(C.front_tpoint_stbox(tp.Inner(), stbox._inner)) + return bool(C.front_tspatial_stbox(tp.Inner(), stbox._inner)) } // FrontTPointTPoint returns true if the first temporal point is in front of the second temporal point. func FrontTPointTPoint[TP1 TPoint, TP2 TPoint](tp1 TP1, tp2 TP2) bool { - return bool(C.front_tpoint_tpoint(tp1.Inner(), tp2.Inner())) + return bool(C.front_tspatial_tspatial(tp1.Inner(), tp2.Inner())) } // OverfrontTPointSTBox returns true if a temporal point is overfront of a spatiotemporal box. func OverfrontTPointSTBox[TP TPoint](tp TP, stbox *STBox) bool { - return bool(C.overfront_tpoint_stbox(tp.Inner(), stbox._inner)) + return bool(C.overfront_tspatial_stbox(tp.Inner(), stbox._inner)) } // OverfrontTPointTPoint returns true if the first temporal point is overfront of the second temporal point. func OverfrontTPointTPoint[TP1 TPoint, TP2 TPoint](tp1 TP1, tp2 TP2) bool { - return bool(C.overfront_tpoint_tpoint(tp1.Inner(), tp2.Inner())) + return bool(C.overfront_tspatial_tspatial(tp1.Inner(), tp2.Inner())) } // BackTPointSTBox returns true if a temporal point is behind a spatiotemporal box. func BackTPointSTBox[TP TPoint](tp TP, stbox *STBox) bool { - return bool(C.back_tpoint_stbox(tp.Inner(), stbox._inner)) + return bool(C.back_tspatial_stbox(tp.Inner(), stbox._inner)) } // BackTPointTPoint returns true if the first temporal point is behind the second temporal point. func BackTPointTPoint[TP1 TPoint, TP2 TPoint](tp1 TP1, tp2 TP2) bool { - return bool(C.back_tpoint_tpoint(tp1.Inner(), tp2.Inner())) + return bool(C.back_tspatial_tspatial(tp1.Inner(), tp2.Inner())) } // OverbackTPointSTBox returns true if a temporal point is overback of a spatiotemporal box. func OverbackTPointSTBox[TP TPoint](tp TP, stbox *STBox) bool { - return bool(C.overback_tpoint_stbox(tp.Inner(), stbox._inner)) + return bool(C.overback_tspatial_stbox(tp.Inner(), stbox._inner)) } // OverbackTPointTPoint returns true if the first temporal point is overback of the second temporal point. func OverbackTPointTPoint[TP1 TPoint, TP2 TPoint](tp1 TP1, tp2 TP2) bool { - return bool(C.overback_tpoint_tpoint(tp1.Inner(), tp2.Inner())) + return bool(C.overback_tspatial_tspatial(tp1.Inner(), tp2.Inner())) } // AlwaysContainsGeoTPoint returns true if the geometry contains the temporal point. func AlwaysContainsGeoTPoint(gs *Geom, temp Temporal) bool { - return int(C.acontains_geo_tpoint(gs._inner, temp.Inner())) > 0 + return int(C.acontains_geo_tgeo(gs._inner, temp.Inner())) > 0 } // AlwaysDisjointTPointGeo returns true if the temporal point is disjoint from the geometry. func AlwaysDisjointTPointGeo(temp Temporal, gs *Geom) bool { - return int(C.adisjoint_tpoint_geo(temp.Inner(), gs._inner)) > 0 + return int(C.adisjoint_tgeo_geo(temp.Inner(), gs._inner)) > 0 } // AlwaysDisjointTPointTPoint returns true if the two temporal points are disjoint. func AlwaysDisjointTPointTPoint(temp1, temp2 Temporal) bool { - return int(C.adisjoint_tpoint_tpoint(temp1.Inner(), temp2.Inner())) > 0 + return int(C.adisjoint_tgeo_tgeo(temp1.Inner(), temp2.Inner())) > 0 } // AlwaysDWithinTPointGeo returns true if the temporal point is within the specified distance of the geometry. func AlwaysDWithinTPointGeo(temp Temporal, gs *Geom, dist float64) bool { - return int(C.adwithin_tpoint_geo(temp.Inner(), gs._inner, C.double(dist))) > 0 + return int(C.adwithin_tgeo_geo(temp.Inner(), gs._inner, C.double(dist))) > 0 } // AlwaysDWithinTPointTPoint returns true if the two temporal points are within the specified distance. func AlwaysDWithinTPointTPoint(temp1, temp2 Temporal, dist float64) bool { - return int(C.adwithin_tpoint_tpoint(temp1.Inner(), temp2.Inner(), C.double(dist))) > 0 + return int(C.adwithin_tgeo_tgeo(temp1.Inner(), temp2.Inner(), C.double(dist))) > 0 } // AlwaysIntersectsTPointGeo returns true if the temporal point intersects the geometry. func AlwaysIntersectsTPointGeo(temp Temporal, gs *Geom) bool { - return int(C.aintersects_tpoint_geo(temp.Inner(), gs._inner)) > 0 + return int(C.aintersects_tgeo_geo(temp.Inner(), gs._inner)) > 0 } // AlwaysIntersectsTPointTPoint returns true if the two temporal points intersect. func AlwaysIntersectsTPointTPoint(temp1, temp2 Temporal) bool { - return int(C.aintersects_tpoint_tpoint(temp1.Inner(), temp2.Inner())) > 0 + return int(C.aintersects_tgeo_tgeo(temp1.Inner(), temp2.Inner())) > 0 } // AlwaysTouchesTPointGeo returns true if the two temporal points touch. @@ -408,31 +410,31 @@ func AlwaysTouchesTPointGeo(temp Temporal, gs *Geom) bool { } func EverContainsGeoTPoint(gs *Geom, temp Temporal) bool { - return int(C.econtains_geo_tpoint(gs._inner, temp.Inner())) > 0 + return int(C.econtains_geo_tgeo(gs._inner, temp.Inner())) > 0 } func EverDisjointTPointGeo(temp Temporal, gs *Geom) bool { - return int(C.edisjoint_tpoint_geo(temp.Inner(), gs._inner)) > 0 + return int(C.edisjoint_tgeo_geo(temp.Inner(), gs._inner)) > 0 } func EverDisjointTPointTPoint(temp1, temp2 Temporal) bool { - return int(C.edisjoint_tpoint_tpoint(temp1.Inner(), temp2.Inner())) > 0 + return int(C.edisjoint_tgeo_tgeo(temp1.Inner(), temp2.Inner())) > 0 } func EverDWithinTPointGeo(temp Temporal, gs *Geom, dist float64) bool { - return int(C.edwithin_tpoint_geo(temp.Inner(), gs._inner, C.double(dist))) > 0 + return int(C.edwithin_tgeo_geo(temp.Inner(), gs._inner, C.double(dist))) > 0 } func EverDWithinTPointTPoint(temp1, temp2 Temporal, dist float64) bool { - return int(C.edwithin_tpoint_tpoint(temp1.Inner(), temp2.Inner(), C.double(dist))) > 0 + return int(C.edwithin_tgeo_tgeo(temp1.Inner(), temp2.Inner(), C.double(dist))) > 0 } func EverIntersectsTPointGeo(temp Temporal, gs *Geom) bool { - return int(C.eintersects_tpoint_geo(temp.Inner(), gs._inner)) > 0 + return int(C.eintersects_tgeo_geo(temp.Inner(), gs._inner)) > 0 } func EverIntersectsTPointTPoint(temp1, temp2 Temporal) bool { - return int(C.eintersects_tpoint_tpoint(temp1.Inner(), temp2.Inner())) > 0 + return int(C.eintersects_tgeo_tgeo(temp1.Inner(), temp2.Inner())) > 0 } func EverTouchesTPointGeo(temp Temporal, gs *Geom) bool { @@ -440,90 +442,90 @@ func EverTouchesTPointGeo(temp Temporal, gs *Geom) bool { } func AlwaysEqTPointPoint(temp Temporal, gs *Geom) bool { - return int(C.always_eq_tpoint_point(temp.Inner(), gs._inner)) > 0 + return int(C.always_eq_tgeo_geo(temp.Inner(), gs._inner)) > 0 } func AlwaysNeTPointPoint(temp Temporal, gs *Geom) bool { - return int(C.always_ne_tpoint_point(temp.Inner(), gs._inner)) > 0 + return int(C.always_ne_tgeo_geo(temp.Inner(), gs._inner)) > 0 } func EverEqTPointPoint(temp Temporal, gs *Geom) bool { - return int(C.ever_eq_tpoint_point(temp.Inner(), gs._inner)) > 0 + return int(C.ever_eq_tgeo_geo(temp.Inner(), gs._inner)) > 0 } func EverNeTPointPoint(temp Temporal, gs *Geom) bool { - return int(C.ever_ne_tpoint_point(temp.Inner(), gs._inner)) > 0 + return int(C.ever_ne_tgeo_geo(temp.Inner(), gs._inner)) > 0 } -func TContainsGeoTPoint[TP TPoint](gs *Geom, temp TP, restr, atvalue bool) Temporal { - res := C.tcontains_geo_tpoint(gs._inner, temp.Inner(), C.bool(restr), C.bool(atvalue)) +func TContainsGeoTPoint[TP TPoint](gs *Geom, temp TP) Temporal { + res := C.tcontains_geo_tgeo(gs._inner, temp.Inner()) return CreateTemporal(res) } -func TDisjointTPointGeo[TP TPoint](temp TP, gs *Geom, restr, atvalue bool) Temporal { - res := C.tdisjoint_tpoint_geo(temp.Inner(), gs._inner, C.bool(restr), C.bool(atvalue)) +func TDisjointTPointGeo[TP TPoint](temp TP, gs *Geom) Temporal { + res := C.tdisjoint_tgeo_geo(temp.Inner(), gs._inner) return CreateTemporal(res) } -func TDisjointTPointTPoint[TP1 TPoint, TP2 TPoint](temp1 TP1, temp2 TP2, restr, atvalue bool) Temporal { - res := C.tdisjoint_tpoint_tpoint(temp1.Inner(), temp2.Inner(), C.bool(restr), C.bool(atvalue)) +func TDisjointTPointTPoint[TP1 TPoint, TP2 TPoint](temp1 TP1, temp2 TP2) Temporal { + res := C.tdisjoint_tgeo_tgeo(temp1.Inner(), temp2.Inner()) return CreateTemporal(res) } -func TDWithinTPointGeo[TP TPoint](temp TP, gs *Geom, dist float64, restr, atvalue bool) Temporal { - res := C.tdwithin_tpoint_geo(temp.Inner(), gs._inner, C.double(dist), C.bool(restr), C.bool(atvalue)) +func TDWithinTPointGeo[TP TPoint](temp TP, gs *Geom, dist float64) Temporal { + res := C.tdwithin_tgeo_geo(temp.Inner(), gs._inner, C.double(dist)) return CreateTemporal(res) } -func TDWithinTPointTPoint[TP1 TPoint, TP2 TPoint](temp1 TP1, temp2 TP2, dist float64, restr, atvalue bool) Temporal { - res := C.tdwithin_tpoint_tpoint(temp1.Inner(), temp2.Inner(), C.double(dist), C.bool(restr), C.bool(atvalue)) +func TDWithinTPointTPoint[TP1 TPoint, TP2 TPoint](temp1 TP1, temp2 TP2, dist float64) Temporal { + res := C.tdwithin_tgeo_tgeo(temp1.Inner(), temp2.Inner(), C.double(dist)) return CreateTemporal(res) } -func TIntersectsTPointGeo[TP TPoint](temp TP, gs *Geom, restr, atvalue bool) Temporal { - res := C.tintersects_tpoint_geo(temp.Inner(), gs._inner, C.bool(restr), C.bool(atvalue)) +func TIntersectsTPointGeo[TP TPoint](temp TP, gs *Geom) Temporal { + res := C.tintersects_tgeo_geo(temp.Inner(), gs._inner) return CreateTemporal(res) } -func TIntersectsTPointTPoint[TP1 TPoint, TP2 TPoint](temp1 TP1, temp2 TP2, restr, atvalue bool) Temporal { - res := C.tintersects_tpoint_tpoint(temp1.Inner(), temp2.Inner(), C.bool(restr), C.bool(atvalue)) +func TIntersectsTPointTPoint[TP1 TPoint, TP2 TPoint](temp1 TP1, temp2 TP2) Temporal { + res := C.tintersects_tgeo_tgeo(temp1.Inner(), temp2.Inner()) return CreateTemporal(res) } -func TTouchesTPointGeo[TP TPoint](temp TP, gs *Geom, restr, atvalue bool) Temporal { - res := C.ttouches_tpoint_geo(temp.Inner(), gs._inner, C.bool(restr), C.bool(atvalue)) +func TTouchesTPointGeo[TP TPoint](temp TP, gs *Geom) Temporal { + res := C.ttouches_tgeo_geo(temp.Inner(), gs._inner) return CreateTemporal(res) } func DistanceTPointPoint[TP TPoint](temp TP, gs *Geom) Temporal { - res := C.distance_tpoint_point(temp.Inner(), gs._inner) + res := C.tdistance_tgeo_geo(temp.Inner(), gs._inner) return CreateTemporal(res) } func DistanceTPointTPoint[TP1 TPoint, TP2 TPoint](temp1 TP1, temp2 TP2) Temporal { - res := C.distance_tpoint_tpoint(temp1.Inner(), temp2.Inner()) + res := C.tdistance_tgeo_tgeo(temp1.Inner(), temp2.Inner()) return CreateTemporal(res) } func TEqTPointPoint[TP TPoint](temp TP, gs *Geom) Temporal { - res := C.teq_tpoint_point(temp.Inner(), gs._inner) + res := C.teq_tgeo_geo(temp.Inner(), gs._inner) return CreateTemporal(res) } func TNeTPointPoint[TP TPoint](temp TP, gs *Geom) Temporal { - res := C.tne_tpoint_point(temp.Inner(), gs._inner) + res := C.tne_tgeo_geo(temp.Inner(), gs._inner) return CreateTemporal(res) } // TPointTransform Return a temporal point transformed to another SRID func TPointTransform[T TPoint](temp T, output T, srid_to int) T { - c_temp := C.tpoint_transform(temp.Inner(), C.int(srid_to)) + c_temp := C.tspatial_transform(temp.Inner(), C.int(srid_to)) output.Init(c_temp) return output } // TPointTrajectory Return the trajectory of a temporal point func TPointTrajectory[TP TPoint](tp TP) *Geom { - trajectory := C.tpoint_trajectory(tp.Inner()) + trajectory := C.tpoint_trajectory(tp.Inner(), C.bool(false)) return &Geom{_inner: trajectory} } diff --git a/meos.h b/meos.h index b200a19..59229f6 100644 --- a/meos.h +++ b/meos.h @@ -1,12 +1,12 @@ /***************************************************************************** * * This MobilityDB code is provided under The PostgreSQL License. - * Copyright (c) 2016-2024, Université libre de Bruxelles and MobilityDB + * Copyright (c) 2016-2025, Université libre de Bruxelles and MobilityDB * contributors * * MobilityDB includes portions of PostGIS version 3 source code released * under the GNU General Public License (GPLv2 or later). - * Copyright (c) 2001-2024, PostGIS contributors + * Copyright (c) 2001-2025, PostGIS contributors * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without a written @@ -28,7 +28,8 @@ *****************************************************************************/ /** - * @brief API of the Mobility Engine Open Source (MEOS) library. + * @file + * @brief External API of the Mobility Engine Open Source (MEOS) library */ #ifndef __MEOS_H__ @@ -36,8 +37,8 @@ /* C */ #include +#include #include -#include /* PostgreSQL */ #ifndef POSTGRES_H #define POSTGRES_H @@ -80,429 +81,21 @@ typedef struct varlena typedef varlena text; typedef struct varlena bytea; -#endif /* POSTGRES_H */ +/* The following functions have the same name as external PostgreSQL functions */ -/* PostGIS */ -#ifndef _LIBLWGEOM_H -#define _LIBLWGEOM_H +extern DateADT date_in(const char *str); +extern char *date_out(DateADT d); +extern int interval_cmp(const Interval *interv1, const Interval *interv2); +extern Interval *interval_in(const char *str, int32 typmod); +extern char *interval_out(const Interval *interv); +extern TimeADT time_in(const char *str, int32 typmod); +extern char *time_out(TimeADT t); +extern Timestamp timestamp_in(const char *str, int32 typmod); +extern char *timestamp_out(Timestamp t); +extern TimestampTz timestamptz_in(const char *str, int32 typmod); +extern char *timestamptz_out(TimestampTz t); -/******************************************************************/ - -/** -* Macros for manipulating the 'flags' byte. A uint8_t used as follows: -* VVSRGBMZ -* Version bit, followed by -* Validty, Solid, ReadOnly, Geodetic, HasBBox, HasM and HasZ flags. -*/ -#define LWFLAG_Z 0x01 -#define LWFLAG_M 0x02 -#define LWFLAG_BBOX 0x04 -#define LWFLAG_GEODETIC 0x08 -#define LWFLAG_READONLY 0x10 -#define LWFLAG_SOLID 0x20 - -#define FLAGS_GET_Z(flags) ((flags) & LWFLAG_Z) -#define FLAGS_GET_M(flags) (((flags) & LWFLAG_M)>>1) -#define FLAGS_GET_BBOX(flags) (((flags) & LWFLAG_BBOX)>>2) -#define FLAGS_GET_GEODETIC(flags) (((flags) & LWFLAG_GEODETIC)>>3) -#define FLAGS_GET_READONLY(flags) (((flags) & LWFLAG_READONLY)>>4) -#define FLAGS_GET_SOLID(flags) (((flags) & LWFLAG_SOLID)>>5) - -#define FLAGS_SET_Z(flags, value) ((flags) = (value) ? ((flags) | LWFLAG_Z) : ((flags) & ~LWFLAG_Z)) -#define FLAGS_SET_M(flags, value) ((flags) = (value) ? ((flags) | LWFLAG_M) : ((flags) & ~LWFLAG_M)) -#define FLAGS_SET_BBOX(flags, value) ((flags) = (value) ? ((flags) | LWFLAG_BBOX) : ((flags) & ~LWFLAG_BBOX)) -#define FLAGS_SET_GEODETIC(flags, value) ((flags) = (value) ? ((flags) | LWFLAG_GEODETIC) : ((flags) & ~LWFLAG_GEODETIC)) -#define FLAGS_SET_READONLY(flags, value) ((flags) = (value) ? ((flags) | LWFLAG_READONLY) : ((flags) & ~LWFLAG_READONLY)) -#define FLAGS_SET_SOLID(flags, value) ((flags) = (value) ? ((flags) | LWFLAG_SOLID) : ((flags) & ~LWFLAG_SOLID)) - -#define FLAGS_NDIMS(flags) (2 + FLAGS_GET_Z(flags) + FLAGS_GET_M(flags)) -#define FLAGS_GET_ZM(flags) (FLAGS_GET_M(flags) + FLAGS_GET_Z(flags) * 2) -#define FLAGS_NDIMS_BOX(flags) (FLAGS_GET_GEODETIC(flags) ? 3 : FLAGS_NDIMS(flags)) - -/* -** Variants available for WKB and WKT output types -*/ - -#define WKB_ISO 0x01 -#define WKB_SFSQL 0x02 -#define WKB_EXTENDED 0x04 -#define WKB_NDR 0x08 -#define WKB_XDR 0x10 -#define WKB_HEX 0x20 -#define WKB_NO_NPOINTS 0x40 /* Internal use only */ -#define WKB_NO_SRID 0x80 /* Internal use only */ - -#define WKT_ISO 0x01 -#define WKT_SFSQL 0x02 -#define WKT_EXTENDED 0x04 - -typedef uint16_t lwflags_t; - -/******************************************************************/ - -typedef struct { - double afac, bfac, cfac, dfac, efac, ffac, gfac, hfac, ifac, xoff, yoff, zoff; -} AFFINE; - -/******************************************************************/ - -typedef struct -{ - double xmin, ymin, zmin; - double xmax, ymax, zmax; - int32_t srid; -} -BOX3D; - -/****************************************************************** -* GBOX structure. -* We include the flags (information about dimensionality), -* so we don't have to constantly pass them -* into functions that use the GBOX. -*/ -typedef struct -{ - lwflags_t flags; - double xmin; - double xmax; - double ymin; - double ymax; - double zmin; - double zmax; - double mmin; - double mmax; -} GBOX; - - -/****************************************************************** -* SPHEROID -* -* Standard definition of an ellipsoid (what wkt calls a spheroid) -* f = (a-b)/a -* e_sq = (a*a - b*b)/(a*a) -* b = a - fa -*/ -typedef struct -{ - double a; /* semimajor axis */ - double b; /* semiminor axis b = (a - fa) */ - double f; /* flattening f = (a-b)/a */ - double e; /* eccentricity (first) */ - double e_sq; /* eccentricity squared (first) e_sq = (a*a-b*b)/(a*a) */ - double radius; /* spherical average radius = (2*a+b)/3 */ - char name[20]; /* name of ellipse */ -} -SPHEROID; - -/****************************************************************** -* POINT2D, POINT3D, POINT3DM, POINT4D -*/ -typedef struct -{ - double x, y; -} -POINT2D; - -typedef struct -{ - double x, y, z; -} -POINT3DZ; - -typedef struct -{ - double x, y, z; -} -POINT3D; - -typedef struct -{ - double x, y, m; -} -POINT3DM; - -typedef struct -{ - double x, y, z, m; -} -POINT4D; - -/****************************************************************** -* POINTARRAY -* Point array abstracts a lot of the complexity of points and point lists. -* It handles 2d/3d translation -* (2d points converted to 3d will have z=0 or NaN) -* DO NOT MIX 2D and 3D POINTS! EVERYTHING* is either one or the other -*/ -typedef struct -{ - uint32_t npoints; /* how many points we are currently storing */ - uint32_t maxpoints; /* how many points we have space for in serialized_pointlist */ - - /* Use FLAGS_* macros to handle */ - lwflags_t flags; - - /* Array of POINT 2D, 3D or 4D, possibly misaligned. */ - uint8_t *serialized_pointlist; -} -POINTARRAY; - -/****************************************************************** -* GSERIALIZED -*/ - -typedef struct -{ - uint32_t size; /* For PgSQL use only, use VAR* macros to manipulate. */ - uint8_t srid[3]; /* 24 bits of SRID */ - uint8_t gflags; /* HasZ, HasM, HasBBox, IsGeodetic */ - uint8_t data[1]; /* See gserialized.txt */ -} GSERIALIZED; - -/****************************************************************** -* LWGEOM (any geometry type) -* -* Abstract type, note that 'type', 'bbox' and 'srid' are available in -* all geometry variants. -*/ -typedef struct -{ - GBOX *bbox; - void *data; - int32_t srid; - lwflags_t flags; - uint8_t type; - char pad[1]; /* Padding to 24 bytes (unused) */ -} -LWGEOM; - -/* POINTYPE */ -typedef struct -{ - GBOX *bbox; - POINTARRAY *point; /* hide 2d/3d (this will be an array of 1 point) */ - int32_t srid; - lwflags_t flags; - uint8_t type; /* POINTTYPE */ - char pad[1]; /* Padding to 24 bytes (unused) */ -} -LWPOINT; /* "light-weight point" */ - -/* LINETYPE */ -typedef struct -{ - GBOX *bbox; - POINTARRAY *points; /* array of POINT3D */ - int32_t srid; - lwflags_t flags; - uint8_t type; /* LINETYPE */ - char pad[1]; /* Padding to 24 bytes (unused) */ -} -LWLINE; /* "light-weight line" */ - -/* TRIANGLE */ -typedef struct -{ - GBOX *bbox; - POINTARRAY *points; - int32_t srid; - lwflags_t flags; - uint8_t type; - char pad[1]; /* Padding to 24 bytes (unused) */ -} -LWTRIANGLE; - -/* CIRCSTRINGTYPE */ -typedef struct -{ - GBOX *bbox; - POINTARRAY *points; /* array of POINT(3D/3DM) */ - int32_t srid; - lwflags_t flags; - uint8_t type; /* CIRCSTRINGTYPE */ - char pad[1]; /* Padding to 24 bytes (unused) */ -} -LWCIRCSTRING; /* "light-weight circularstring" */ - -/* POLYGONTYPE */ -typedef struct -{ - GBOX *bbox; - POINTARRAY **rings; /* list of rings (list of points) */ - int32_t srid; - lwflags_t flags; - uint8_t type; /* POLYGONTYPE */ - char pad[1]; /* Padding to 24 bytes (unused) */ - uint32_t nrings; /* how many rings we are currently storing */ - uint32_t maxrings; /* how many rings we have space for in **rings */ -} -LWPOLY; /* "light-weight polygon" */ - -/* MULTIPOINTTYPE */ -typedef struct -{ - GBOX *bbox; - LWPOINT **geoms; - int32_t srid; - lwflags_t flags; - uint8_t type; /* MULTYPOINTTYPE */ - char pad[1]; /* Padding to 24 bytes (unused) */ - uint32_t ngeoms; /* how many geometries we are currently storing */ - uint32_t maxgeoms; /* how many geometries we have space for in **geoms */ -} -LWMPOINT; - -/* MULTILINETYPE */ -typedef struct -{ - GBOX *bbox; - LWLINE **geoms; - int32_t srid; - lwflags_t flags; - uint8_t type; /* MULTILINETYPE */ - char pad[1]; /* Padding to 24 bytes (unused) */ - uint32_t ngeoms; /* how many geometries we are currently storing */ - uint32_t maxgeoms; /* how many geometries we have space for in **geoms */ -} -LWMLINE; - -/* MULTIPOLYGONTYPE */ -typedef struct -{ - GBOX *bbox; - LWPOLY **geoms; - int32_t srid; - lwflags_t flags; - uint8_t type; /* MULTIPOLYGONTYPE */ - char pad[1]; /* Padding to 24 bytes (unused) */ - uint32_t ngeoms; /* how many geometries we are currently storing */ - uint32_t maxgeoms; /* how many geometries we have space for in **geoms */ -} -LWMPOLY; - -/* COLLECTIONTYPE */ -typedef struct -{ - GBOX *bbox; - LWGEOM **geoms; - int32_t srid; - lwflags_t flags; - uint8_t type; /* COLLECTIONTYPE */ - char pad[1]; /* Padding to 24 bytes (unused) */ - uint32_t ngeoms; /* how many geometries we are currently storing */ - uint32_t maxgeoms; /* how many geometries we have space for in **geoms */ -} -LWCOLLECTION; - -/* COMPOUNDTYPE */ -typedef struct -{ - GBOX *bbox; - LWGEOM **geoms; - int32_t srid; - lwflags_t flags; - uint8_t type; /* COLLECTIONTYPE */ - char pad[1]; /* Padding to 24 bytes (unused) */ - uint32_t ngeoms; /* how many geometries we are currently storing */ - uint32_t maxgeoms; /* how many geometries we have space for in **geoms */ -} -LWCOMPOUND; /* "light-weight compound line" */ - -/* CURVEPOLYTYPE */ -typedef struct -{ - GBOX *bbox; - LWGEOM **rings; - int32_t srid; - lwflags_t flags; - uint8_t type; /* CURVEPOLYTYPE */ - char pad[1]; /* Padding to 24 bytes (unused) */ - uint32_t nrings; /* how many rings we are currently storing */ - uint32_t maxrings; /* how many rings we have space for in **rings */ -} -LWCURVEPOLY; /* "light-weight polygon" */ - -/* MULTICURVE */ -typedef struct -{ - GBOX *bbox; - LWGEOM **geoms; - int32_t srid; - lwflags_t flags; - uint8_t type; /* MULTICURVE */ - char pad[1]; /* Padding to 24 bytes (unused) */ - uint32_t ngeoms; /* how many geometries we are currently storing */ - uint32_t maxgeoms; /* how many geometries we have space for in **geoms */ -} -LWMCURVE; - -/* MULTISURFACETYPE */ -typedef struct -{ - GBOX *bbox; - LWGEOM **geoms; - int32_t srid; - lwflags_t flags; - uint8_t type; /* MULTISURFACETYPE */ - char pad[1]; /* Padding to 24 bytes (unused) */ - uint32_t ngeoms; /* how many geometries we are currently storing */ - uint32_t maxgeoms; /* how many geometries we have space for in **geoms */ -} -LWMSURFACE; - -/* POLYHEDRALSURFACETYPE */ -typedef struct -{ - GBOX *bbox; - LWPOLY **geoms; - int32_t srid; - lwflags_t flags; - uint8_t type; /* POLYHEDRALSURFACETYPE */ - char pad[1]; /* Padding to 24 bytes (unused) */ - uint32_t ngeoms; /* how many geometries we are currently storing */ - uint32_t maxgeoms; /* how many geometries we have space for in **geoms */ -} -LWPSURFACE; - -/* TINTYPE */ -typedef struct -{ - GBOX *bbox; - LWTRIANGLE **geoms; - int32_t srid; - lwflags_t flags; - uint8_t type; /* TINTYPE */ - char pad[1]; /* Padding to 24 bytes (unused) */ - uint32_t ngeoms; /* how many geometries we are currently storing */ - uint32_t maxgeoms; /* how many geometries we have space for in **geoms */ -} -LWTIN; - -/* Functions */ - -extern int32 geo_get_srid(const GSERIALIZED *g); - -/* PROJ */ - -struct PJconsts; -typedef struct PJconsts PJ; - -typedef struct LWPROJ -{ - PJ* pj; - - /* for pipeline transforms, whether to do a forward or inverse */ - bool pipeline_is_forward; - - /* Source crs is geographic: Used in geography calls (source srid == dst srid) */ - uint8_t source_is_latlong; - /* Source ellipsoid parameters */ - double source_semi_major_metre; - double source_semi_minor_metre; -} LWPROJ; - - -#endif /* _LIBLWGEOM_H */ +#endif /* POSTGRES_H */ /***************************************************************************** @@ -522,6 +115,15 @@ typedef struct LWPROJ #define strdup _strdup #endif +/* + * Thread-local storage qualifier (MEOS_TLS) used internally by MEOS to + * make per-thread state (last-error number, PROJ context, SRS cache, + * ways cache, RNG, session timezone) safe under multithreading. Defined + * in a stand-alone header so that vendored PostgreSQL files can pick it + * up without pulling in the full meos.h. + */ +#include "meos_tls.h" + /***************************************************************************** * Type definitions *****************************************************************************/ @@ -597,8 +199,8 @@ typedef struct double xmax; /**< maximum x value */ double ymax; /**< maximum y value */ double zmax; /**< maximum z value */ - int32 srid; /**< SRID */ - int16 flags; /**< flags */ + int32_t srid; /**< SRID */ + int16 flags; /**< flags */ } STBox; /** @@ -623,18 +225,6 @@ typedef enum LINEAR = 3, } interpType; -/** - * @brief Enumeration that defines the spatial relationships for which a call - * to GEOS is made. - */ -typedef enum -{ - INTERSECTS = 0, - CONTAINS = 1, - TOUCHES = 2, - COVERS = 3, -} spatialRel; - /** * Structure to represent the common structure of temporal values of * any temporal subtype @@ -666,7 +256,7 @@ typedef struct } TInstant; /** - * Structure to represent temporal values of instant set or sequence subtype + * Structure to represent temporal values of sequence subtype */ typedef struct { @@ -723,34 +313,59 @@ typedef struct /*****************************************************************************/ /** - * Structure to represent skiplist elements + * Structure for skiplists */ +typedef struct SkipList SkipList; -#define SKIPLIST_MAXLEVEL 32 /**< maximum possible is 47 with current RNG */ +/*****************************************************************************/ -typedef struct -{ - void *value; - int height; - int next[SKIPLIST_MAXLEVEL]; -} SkipListElem; +/** + * Structure for expandable arrays + */ +typedef struct MeosArray MeosArray; + +/* MeosArray functions */ + +extern MeosArray *meos_array_create(int elem_size); +extern void meos_array_add(MeosArray *array, void *value); +extern void *meos_array_get(const MeosArray *array, int n); +extern int meos_array_count(const MeosArray *array); +extern void meos_array_reset(MeosArray *array); +extern void meos_array_reset_free(MeosArray *array); +extern void meos_array_destroy(MeosArray *array); +extern void meos_array_destroy_free(MeosArray *array); + +/*****************************************************************************/ /** - * Structure to represent skiplists that keep the current state of an aggregation + * @brief Enumeration that defines the search operations for an RTree. */ -typedef struct +typedef enum { - int capacity; - int next; - int length; - int *freed; - int freecount; - int freecap; - int tail; - void *extra; - size_t extrasize; - SkipListElem *elems; -} SkipList; + RTREE_OVERLAPS, /**< Find stored boxes that overlap the query */ + RTREE_CONTAINS, /**< Find stored boxes that contain the query */ + RTREE_CONTAINED_BY /**< Find stored boxes contained by the query */ +} RTreeSearchOp; + +/** + * Structure for the in-memory Rtree index + */ +typedef struct RTree RTree; + +/* RTree functions */ + +extern RTree *rtree_create_intspan(); +extern RTree *rtree_create_bigintspan(); +extern RTree *rtree_create_floatspan(); +extern RTree *rtree_create_datespan(); +extern RTree *rtree_create_tstzspan(); +extern RTree *rtree_create_tbox(); +extern RTree *rtree_create_stbox(); +extern void rtree_free(RTree *rtree); +extern void rtree_insert(RTree *rtree, void *box, int id); +extern void rtree_insert_temporal(RTree *rtree, const Temporal *temp, int id); +extern int rtree_search(const RTree *rtree, RTreeSearchOp op, const void *query, MeosArray *result); +extern int rtree_search_temporal(const RTree *rtree, RTreeSearchOp op, const Temporal *temp, MeosArray *result); /***************************************************************************** * Error codes @@ -758,33 +373,34 @@ typedef struct typedef enum { - MEOS_SUCCESS = 0, // Successful operation - - MEOS_ERR_INTERNAL_ERROR = 1, // Unspecified internal error - MEOS_ERR_INTERNAL_TYPE_ERROR = 2, // Internal type error - MEOS_ERR_VALUE_OUT_OF_RANGE = 3, // Internal out of range error - MEOS_ERR_DIVISION_BY_ZERO = 4, // Internal division by zero error - MEOS_ERR_MEMORY_ALLOC_ERROR = 5, // Internal malloc error - MEOS_ERR_AGGREGATION_ERROR = 6, // Internal aggregation error - MEOS_ERR_DIRECTORY_ERROR = 7, // Internal directory error - MEOS_ERR_FILE_ERROR = 8, // Internal file error - - MEOS_ERR_INVALID_ARG = 10, // Invalid argument - MEOS_ERR_INVALID_ARG_TYPE = 11, // Invalid argument type - MEOS_ERR_INVALID_ARG_VALUE = 12, // Invalid argument value - - MEOS_ERR_MFJSON_INPUT = 20, // MFJSON input error - MEOS_ERR_MFJSON_OUTPUT = 21, // MFJSON output error - MEOS_ERR_TEXT_INPUT = 22, // Text input error - MEOS_ERR_TEXT_OUTPUT = 23, // Text output error - MEOS_ERR_WKB_INPUT = 24, // WKB input error - MEOS_ERR_WKB_OUTPUT = 25, // WKB output error - MEOS_ERR_GEOJSON_INPUT = 26, // GEOJSON input error - MEOS_ERR_GEOJSON_OUTPUT = 27, // GEOJSON output error + MEOS_SUCCESS = 0, // Successful operation + + MEOS_ERR_INTERNAL_ERROR = 1, // Unspecified internal error + MEOS_ERR_INTERNAL_TYPE_ERROR = 2, // Internal type error + MEOS_ERR_VALUE_OUT_OF_RANGE = 3, // Internal out of range error + MEOS_ERR_DIVISION_BY_ZERO = 4, // Internal division by zero error + MEOS_ERR_MEMORY_ALLOC_ERROR = 5, // Internal malloc error + MEOS_ERR_AGGREGATION_ERROR = 6, // Internal aggregation error + MEOS_ERR_DIRECTORY_ERROR = 7, // Internal directory error + MEOS_ERR_FILE_ERROR = 8, // Internal file error + + MEOS_ERR_INVALID_ARG = 10, // Invalid argument + MEOS_ERR_INVALID_ARG_TYPE = 11, // Invalid argument type + MEOS_ERR_INVALID_ARG_VALUE = 12, // Invalid argument value + MEOS_ERR_FEATURE_NOT_SUPPORTED = 13, // Feature not currently supported + + MEOS_ERR_MFJSON_INPUT = 20, // MFJSON input error + MEOS_ERR_MFJSON_OUTPUT = 21, // MFJSON output error + MEOS_ERR_TEXT_INPUT = 22, // Text input error + MEOS_ERR_TEXT_OUTPUT = 23, // Text output error + MEOS_ERR_WKB_INPUT = 24, // WKB input error + MEOS_ERR_WKB_OUTPUT = 25, // WKB output error + MEOS_ERR_GEOJSON_INPUT = 26, // GEOJSON input error + MEOS_ERR_GEOJSON_OUTPUT = 27, // GEOJSON output error } errorCode; -extern void meos_error(int errlevel, int errcode, char *format, ...); +extern void meos_error(int errlevel, int errcode, const char *format, ...); /* Set or read error level */ @@ -795,26 +411,42 @@ extern int meos_errno_reset(void); /***************************************************************************** * Initialization of the MEOS library + * + * Multithreading + * -------------- + * The MEOS state managed by these functions is per-thread. Each thread + * that calls into MEOS must call `meos_initialize()` before its first + * MEOS call and `meos_finalize()` before exiting; the PROJ context, SRS + * cache, ways cache, RNGs, last-error number (`meos_errno`), and + * session timezone are all thread-local. + * + * The error handler set by `meos_initialize_error_handler()` is the + * one exception: it is process-global and should be installed once + * before workers are spawned. *****************************************************************************/ /* Definition of error handler function */ -typedef void (*error_handler_fn)(int, int, char *); +typedef void (*error_handler_fn)(int, int, const char *); extern void meos_initialize_timezone(const char *name); extern void meos_initialize_error_handler(error_handler_fn err_handler); extern void meos_finalize_timezone(void); +extern void meos_finalize_projsrs(void); +extern void meos_finalize_ways(void); -extern bool meos_set_datestyle(char *newval, void *extra); -extern bool meos_set_intervalstyle(char *newval, int extra); +extern bool meos_set_datestyle(const char *newval, void *extra); +extern bool meos_set_intervalstyle(const char *newval, int extra); extern char *meos_get_datestyle(void); extern char *meos_get_intervalstyle(void); -extern void meos_initialize(const char *tz_str, error_handler_fn err_handler); +extern void meos_set_spatial_ref_sys_csv(const char* path); + +extern void meos_initialize(void); extern void meos_finalize(void); -/*===========================================================================* - * Functions for PostgreSQL types - *===========================================================================*/ +/****************************************************************************** + * Functions for base and time types + ******************************************************************************/ extern DateADT add_date_int(DateADT d, int32 days); extern Interval *add_interval_interval(const Interval *interv1, const Interval *interv2); @@ -822,20 +454,26 @@ extern TimestampTz add_timestamptz_interval(TimestampTz t, const Interval *inter extern bool bool_in(const char *str); extern char *bool_out(bool b); extern text *cstring2text(const char *str); +extern Timestamp date_to_timestamp(DateADT dateVal); extern TimestampTz date_to_timestamptz(DateADT d); -extern Interval *minus_date_date(DateADT d1, DateADT d2); +extern double float_exp(double d); +extern double float_ln(double d); +extern double float_log10(double d); +extern char *float8_out(double d, int maxdd); +extern double float_round(double d, int maxdd); +extern int int32_cmp(int32 l, int32 r); +extern int int64_cmp(int64 l, int64 r); +extern Interval *interval_make(int32 years, int32 months, int32 weeks, int32 days, int32 hours, int32 mins, double secs); +extern int minus_date_date(DateADT d1, DateADT d2); extern DateADT minus_date_int(DateADT d, int32 days); extern TimestampTz minus_timestamptz_interval(TimestampTz t, const Interval *interv); extern Interval *minus_timestamptz_timestamptz(TimestampTz t1, TimestampTz t2); -extern Interval *mult_interval_double(const Interval *interv, double factor); +extern Interval *mul_interval_double(const Interval *interv, double factor); extern DateADT pg_date_in(const char *str); extern char *pg_date_out(DateADT d); extern int pg_interval_cmp(const Interval *interv1, const Interval *interv2); extern Interval *pg_interval_in(const char *str, int32 typmod); -extern Interval *pg_interval_make(int32 years, int32 months, int32 weeks, int32 days, int32 hours, int32 mins, double secs); extern char *pg_interval_out(const Interval *interv); -extern TimeADT pg_time_in(const char *str, int32 typmod); -extern char *pg_time_out(TimeADT t); extern Timestamp pg_timestamp_in(const char *str, int32 typmod); extern char *pg_timestamp_out(Timestamp t); extern TimestampTz pg_timestamptz_in(const char *str, int32 typmod); @@ -843,36 +481,19 @@ extern char *pg_timestamptz_out(TimestampTz t); extern char *text2cstring(const text *txt); extern int text_cmp(const text *txt1, const text *txt2); extern text *text_copy(const text *txt); +extern text *text_in(const char *str); extern text *text_initcap(const text *txt); extern text *text_lower(const text *txt); extern char *text_out(const text *txt); extern text *text_upper(const text *txt); extern text *textcat_text_text(const text *txt1, const text *txt2); +extern TimestampTz timestamptz_shift(TimestampTz t, const Interval *interv); +extern DateADT timestamp_to_date(Timestamp t); extern DateADT timestamptz_to_date(TimestampTz t); -/*===========================================================================* - * Functions for PostGIS types - *===========================================================================*/ - -extern bytea *geo_as_ewkb(const GSERIALIZED *gs, char *endian); -extern char *geo_as_ewkt(const GSERIALIZED *gs, int precision); -extern char *geo_as_geojson(const GSERIALIZED *gs, int option, int precision, char *srs); -extern char *geo_as_hexewkb(const GSERIALIZED *gs, const char *endian); -extern char *geo_as_text(const GSERIALIZED *gs, int precision); -extern GSERIALIZED *geo_from_ewkb(const bytea *bytea_wkb, int32 srid); -extern GSERIALIZED *geo_from_geojson(const char *geojson); -extern char *geo_out(const GSERIALIZED *gs); -extern bool geo_same(const GSERIALIZED *gs1, const GSERIALIZED *gs2); -extern GSERIALIZED *geography_from_hexewkb(const char *wkt); -extern GSERIALIZED *geography_from_text(char *wkt, int srid); -extern GSERIALIZED *geometry_from_hexewkb(const char *wkt); -extern GSERIALIZED *geometry_from_text(char *wkt, int srid); -extern GSERIALIZED *pgis_geography_in(char *str, int32 typmod); -extern GSERIALIZED *pgis_geometry_in(char *str, int32 typmod); - -/*===========================================================================* +/*============================================================================ * Functions for set and span types - *===========================================================================*/ + ===========================================================================*/ /***************************************************************************** * Input/output functions for set and span types @@ -880,6 +501,7 @@ extern GSERIALIZED *pgis_geometry_in(char *str, int32 typmod); extern Set *bigintset_in(const char *str); extern char *bigintset_out(const Set *set); +extern Span *bigintspan_expand(const Span *s, int64 value); extern Span *bigintspan_in(const char *str); extern char *bigintspan_out(const Span *s); extern SpanSet *bigintspanset_in(const char *str); @@ -892,17 +514,14 @@ extern SpanSet *datespanset_in(const char *str); extern char *datespanset_out(const SpanSet *ss); extern Set *floatset_in(const char *str); extern char *floatset_out(const Set *set, int maxdd); +extern Span *floatspan_expand(const Span *s, double value); extern Span *floatspan_in(const char *str); extern char *floatspan_out(const Span *s, int maxdd); extern SpanSet *floatspanset_in(const char *str); extern char *floatspanset_out(const SpanSet *ss, int maxdd); -extern Set *geogset_in(const char *str); -extern Set *geomset_in(const char *str); -extern char *geoset_as_ewkt(const Set *set, int maxdd); -extern char *geoset_as_text(const Set *set, int maxdd); -extern char *geoset_out(const Set *set, int maxdd); extern Set *intset_in(const char *str); extern char *intset_out(const Set *set); +extern Span *intspan_expand(const Span *s, int32 value); extern Span *intspan_in(const char *str); extern char *intspan_out(const Span *s); extern SpanSet *intspanset_in(const char *str); @@ -938,14 +557,13 @@ extern Set *dateset_make(const DateADT *values, int count); extern Span *datespan_make(DateADT lower, DateADT upper, bool lower_inc, bool upper_inc); extern Set *floatset_make(const double *values, int count); extern Span *floatspan_make(double lower, double upper, bool lower_inc, bool upper_inc); -extern Set *geoset_make(const GSERIALIZED **values, int count); extern Set *intset_make(const int *values, int count); extern Span *intspan_make(int lower, int upper, bool lower_inc, bool upper_inc); extern Set *set_copy(const Set *s); extern Span *span_copy(const Span *s); extern SpanSet *spanset_copy(const SpanSet *ss); -extern SpanSet *spanset_make(Span *spans, int count, bool normalize, bool order); -extern Set *textset_make(const text **values, int count); +extern SpanSet *spanset_make(Span *spans, int count); +extern Set *textset_make(text **values, int count); extern Set *tstzset_make(const TimestampTz *values, int count); extern Span *tstzspan_make(TimestampTz lower, TimestampTz upper, bool lower_inc, bool upper_inc); @@ -968,16 +586,16 @@ extern SpanSet *float_to_spanset(double d); extern Set *floatset_to_intset(const Set *s); extern Span *floatspan_to_intspan(const Span *s); extern SpanSet *floatspanset_to_intspanset(const SpanSet *ss); -extern Set *geo_to_set(GSERIALIZED *gs); extern Set *int_to_set(int i); extern Span *int_to_span(int i); extern SpanSet *int_to_spanset(int i); extern Set *intset_to_floatset(const Set *s); extern Span *intspan_to_floatspan(const Span *s); extern SpanSet *intspanset_to_floatspanset(const SpanSet *ss); +extern Span *set_to_span(const Set *s); extern SpanSet *set_to_spanset(const Set *s); extern SpanSet *span_to_spanset(const Span *s); -extern Set *text_to_set(text *txt); +extern Set *text_to_set(const text *txt); extern Set *timestamptz_to_set(TimestampTz t); extern Span *timestamptz_to_span(TimestampTz t); extern SpanSet *timestamptz_to_spanset(TimestampTz t); @@ -1022,11 +640,6 @@ extern double floatspan_width(const Span *s); extern double floatspanset_lower(const SpanSet *ss); extern double floatspanset_upper(const SpanSet *ss); extern double floatspanset_width(const SpanSet *ss, bool boundspan); -extern GSERIALIZED *geoset_end_value(const Set *s); -extern int geoset_srid(const Set *s); -extern GSERIALIZED *geoset_start_value(const Set *s); -extern bool geoset_value_n(const Set *s, int n, GSERIALIZED **result); -extern GSERIALIZED **geoset_values(const Set *s); extern int intset_end_value(const Set *s); extern int intset_start_value(const Set *s); extern bool intset_value_n(const Set *s, int n, int *result); @@ -1040,7 +653,6 @@ extern int intspanset_width(const SpanSet *ss, bool boundspan); extern uint32 set_hash(const Set *s); extern uint64 set_hash_extended(const Set *s, uint64 seed); extern int set_num_values(const Set *s); -extern Span *set_to_span(const Set *s); extern uint32 span_hash(const Span *s); extern uint64 span_hash_extended(const Span *s, uint64 seed); extern bool span_lower_inc(const Span *s); @@ -1071,8 +683,8 @@ extern TimestampTz tstzspanset_end_timestamptz(const SpanSet *ss); extern TimestampTz tstzspanset_lower(const SpanSet *ss); extern int tstzspanset_num_timestamps(const SpanSet *ss); extern TimestampTz tstzspanset_start_timestamptz(const SpanSet *ss); -extern bool tstzspanset_timestamptz_n(const SpanSet *ss, int n, TimestampTz *result); extern Set *tstzspanset_timestamps(const SpanSet *ss); +extern bool tstzspanset_timestamptz_n(const SpanSet *ss, int n, TimestampTz *result); extern TimestampTz tstzspanset_upper(const SpanSet *ss); /***************************************************************************** @@ -1086,35 +698,32 @@ extern Set *dateset_shift_scale(const Set *s, int shift, int width, bool hasshif extern Span *datespan_shift_scale(const Span *s, int shift, int width, bool hasshift, bool haswidth); extern SpanSet *datespanset_shift_scale(const SpanSet *ss, int shift, int width, bool hasshift, bool haswidth); extern Set *floatset_ceil(const Set *s); -extern Set *floatset_floor(const Set *s); extern Set *floatset_degrees(const Set *s, bool normalize); +extern Set *floatset_floor(const Set *s); extern Set *floatset_radians(const Set *s); -extern Set *floatset_round(const Set *s, int maxdd); extern Set *floatset_shift_scale(const Set *s, double shift, double width, bool hasshift, bool haswidth); extern Span *floatspan_ceil(const Span *s); +extern Span *floatspan_degrees(const Span *s, bool normalize); extern Span *floatspan_floor(const Span *s); +extern Span *floatspan_radians(const Span *s); extern Span *floatspan_round(const Span *s, int maxdd); extern Span *floatspan_shift_scale(const Span *s, double shift, double width, bool hasshift, bool haswidth); extern SpanSet *floatspanset_ceil(const SpanSet *ss); extern SpanSet *floatspanset_floor(const SpanSet *ss); +extern SpanSet *floatspanset_degrees(const SpanSet *ss, bool normalize); +extern SpanSet *floatspanset_radians(const SpanSet *ss); extern SpanSet *floatspanset_round(const SpanSet *ss, int maxdd); extern SpanSet *floatspanset_shift_scale(const SpanSet *ss, double shift, double width, bool hasshift, bool haswidth); -extern Set *geoset_round(const Set *s, int maxdd); -extern Set *geoset_set_srid(const Set *s, int32 srid); -extern Set *geoset_transform(const Set *s, int32 srid); -extern Set *geoset_transform_pipeline(const Set *s, char *pipelinestr, int32 srid, bool is_forward); extern Set *intset_shift_scale(const Set *s, int shift, int width, bool hasshift, bool haswidth); extern Span *intspan_shift_scale(const Span *s, int shift, int width, bool hasshift, bool haswidth); extern SpanSet *intspanset_shift_scale(const SpanSet *ss, int shift, int width, bool hasshift, bool haswidth); -extern GSERIALIZED *point_transform(const GSERIALIZED *gs, int32 srid); -extern GSERIALIZED *point_transform_pipeline(const GSERIALIZED *gs, char *pipelinestr, int32 srid, bool is_forward); -extern Span *set_spans(const Set *s, int max_count, int *count); -extern Span *spanset_spans(const SpanSet *ss, int max_count, int *count); +extern Span *tstzspan_expand(const Span *s, const Interval *interv); +extern Set *set_round(const Set *s, int maxdd); +extern Set *textcat_text_textset(const text *txt, const Set *s); +extern Set *textcat_textset_text(const Set *s, const text *txt); extern Set *textset_initcap(const Set *s); extern Set *textset_lower(const Set *s); extern Set *textset_upper(const Set *s); -extern Set *textcat_textset_text(const Set *s, const text *txt); -extern Set *textcat_text_textset(const text *txt, const Set *s); extern TimestampTz timestamptz_tprecision(TimestampTz t, const Interval *duration, TimestampTz torigin); extern Set *tstzset_shift_scale(const Set *s, const Interval *shift, const Interval *duration); extern Set *tstzset_tprecision(const Set *s, const Interval *duration, TimestampTz torigin); @@ -1153,7 +762,16 @@ extern bool spanset_ne(const SpanSet *ss1, const SpanSet *ss2); * Bounding box functions for set and span types *****************************************************************************/ -/* Topological functions for set and span types */ +/* Split functions */ + +extern Span *set_spans(const Set *s); +extern Span *set_split_each_n_spans(const Set *s, int elems_per_span, int *count); +extern Span *set_split_n_spans(const Set *s, int span_count, int *count); +extern Span *spanset_spans(const SpanSet *ss); +extern Span *spanset_split_each_n_spans(const SpanSet *ss, int elems_per_span, int *count); +extern Span *spanset_split_n_spans(const SpanSet *ss, int span_count, int *count); + +/* Topological functions */ extern bool adjacent_span_bigint(const Span *s, int64 i); extern bool adjacent_span_date(const Span *s, DateADT d); @@ -1178,7 +796,6 @@ extern bool contained_date_spanset(DateADT d, const SpanSet *ss); extern bool contained_float_set(double d, const Set *s); extern bool contained_float_span(double d, const Span *s); extern bool contained_float_spanset(double d, const SpanSet *ss); -extern bool contained_geo_set(GSERIALIZED *gs, const Set *s); extern bool contained_int_set(int i, const Set *s); extern bool contained_int_span(int i, const Span *s); extern bool contained_int_spanset(int i, const SpanSet *ss); @@ -1187,14 +804,13 @@ extern bool contained_span_span(const Span *s1, const Span *s2); extern bool contained_span_spanset(const Span *s, const SpanSet *ss); extern bool contained_spanset_span(const SpanSet *ss, const Span *s); extern bool contained_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2); -extern bool contained_text_set(text *txt, const Set *s); +extern bool contained_text_set(const text *txt, const Set *s); extern bool contained_timestamptz_set(TimestampTz t, const Set *s); extern bool contained_timestamptz_span(TimestampTz t, const Span *s); extern bool contained_timestamptz_spanset(TimestampTz t, const SpanSet *ss); extern bool contains_set_bigint(const Set *s, int64 i); extern bool contains_set_date(const Set *s, DateADT d); extern bool contains_set_float(const Set *s, double d); -extern bool contains_set_geo(const Set *s, GSERIALIZED *gs); extern bool contains_set_int(const Set *s, int i); extern bool contains_set_set(const Set *s1, const Set *s2); extern bool contains_set_text(const Set *s, text *t); @@ -1271,7 +887,7 @@ extern bool left_spanset_float(const SpanSet *ss, double d); extern bool left_spanset_int(const SpanSet *ss, int i); extern bool left_spanset_span(const SpanSet *ss, const Span *s); extern bool left_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2); -extern bool left_text_set(text *txt, const Set *s); +extern bool left_text_set(const text *txt, const Set *s); extern bool overafter_date_set(DateADT d, const Set *s); extern bool overafter_date_span(DateADT d, const Span *s); extern bool overafter_date_spanset(DateADT d, const SpanSet *ss); @@ -1320,7 +936,7 @@ extern bool overleft_spanset_float(const SpanSet *ss, double d); extern bool overleft_spanset_int(const SpanSet *ss, int i); extern bool overleft_spanset_span(const SpanSet *ss, const Span *s); extern bool overleft_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2); -extern bool overleft_text_set(text *txt, const Set *s); +extern bool overleft_text_set(const text *txt, const Set *s); extern bool overright_bigint_set(int64 i, const Set *s); extern bool overright_bigint_span(int64 i, const Span *s); extern bool overright_bigint_spanset(int64 i, const SpanSet *ss); @@ -1345,7 +961,7 @@ extern bool overright_spanset_float(const SpanSet *ss, double d); extern bool overright_spanset_int(const SpanSet *ss, int i); extern bool overright_spanset_span(const SpanSet *ss, const Span *s); extern bool overright_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2); -extern bool overright_text_set(text *txt, const Set *s); +extern bool overright_text_set(const text *txt, const Set *s); extern bool right_bigint_set(int64 i, const Set *s); extern bool right_bigint_span(int64 i, const Span *s); extern bool right_bigint_spanset(int64 i, const SpanSet *ss); @@ -1370,21 +986,19 @@ extern bool right_spanset_float(const SpanSet *ss, double d); extern bool right_spanset_int(const SpanSet *ss, int i); extern bool right_spanset_span(const SpanSet *ss, const Span *s); extern bool right_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2); -extern bool right_text_set(text *txt, const Set *s); +extern bool right_text_set(const text *txt, const Set *s); /***************************************************************************** * Set functions for set and span types *****************************************************************************/ extern Set *intersection_bigint_set(int64 i, const Set *s); -extern Set *intersection_date_set(const DateADT d, const Set *s); +extern Set *intersection_date_set(DateADT d, const Set *s); extern Set *intersection_float_set(double d, const Set *s); -extern Set *intersection_geo_set(const GSERIALIZED *gs, const Set *s); extern Set *intersection_int_set(int i, const Set *s); extern Set *intersection_set_bigint(const Set *s, int64 i); extern Set *intersection_set_date(const Set *s, DateADT d); extern Set *intersection_set_float(const Set *s, double d); -extern Set *intersection_set_geo(const Set *s, const GSERIALIZED *gs); extern Set *intersection_set_int(const Set *s, int i); extern Set *intersection_set_set(const Set *s1, const Set *s2); extern Set *intersection_set_text(const Set *s, const text *txt); @@ -1404,7 +1018,7 @@ extern SpanSet *intersection_spanset_span(const SpanSet *ss, const Span *s); extern SpanSet *intersection_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2); extern SpanSet *intersection_spanset_timestamptz(const SpanSet *ss, TimestampTz t); extern Set *intersection_text_set(const text *txt, const Set *s); -extern Set *intersection_timestamptz_set(const TimestampTz t, const Set *s); +extern Set *intersection_timestamptz_set(TimestampTz t, const Set *s); extern Set *minus_bigint_set(int64 i, const Set *s); extern SpanSet *minus_bigint_span(int64 i, const Span *s); extern SpanSet *minus_bigint_spanset(int64 i, const SpanSet *ss); @@ -1414,14 +1028,12 @@ extern SpanSet *minus_date_spanset(DateADT d, const SpanSet *ss); extern Set *minus_float_set(double d, const Set *s); extern SpanSet *minus_float_span(double d, const Span *s); extern SpanSet *minus_float_spanset(double d, const SpanSet *ss); -extern Set *minus_geo_set(const GSERIALIZED *gs, const Set *s); extern Set *minus_int_set(int i, const Set *s); extern SpanSet *minus_int_span(int i, const Span *s); extern SpanSet *minus_int_spanset(int i, const SpanSet *ss); extern Set *minus_set_bigint(const Set *s, int64 i); extern Set *minus_set_date(const Set *s, DateADT d); extern Set *minus_set_float(const Set *s, double d); -extern Set *minus_set_geo(const Set *s, const GSERIALIZED *gs); extern Set *minus_set_int(const Set *s, int i); extern Set *minus_set_set(const Set *s1, const Set *s2); extern Set *minus_set_text(const Set *s, const text *txt); @@ -1447,24 +1059,22 @@ extern SpanSet *minus_timestamptz_spanset(TimestampTz t, const SpanSet *ss); extern Set *union_bigint_set(int64 i, const Set *s); extern SpanSet *union_bigint_span(const Span *s, int64 i); extern SpanSet *union_bigint_spanset(int64 i, SpanSet *ss); -extern Set *union_date_set(const DateADT d, const Set *s); +extern Set *union_date_set(DateADT d, const Set *s); extern SpanSet *union_date_span(const Span *s, DateADT d); extern SpanSet *union_date_spanset(DateADT d, SpanSet *ss); extern Set *union_float_set(double d, const Set *s); extern SpanSet *union_float_span(const Span *s, double d); extern SpanSet *union_float_spanset(double d, SpanSet *ss); -extern Set *union_geo_set(const GSERIALIZED *gs, const Set *s); extern Set *union_int_set(int i, const Set *s); extern SpanSet *union_int_span(int i, const Span *s); extern SpanSet *union_int_spanset(int i, SpanSet *ss); extern Set *union_set_bigint(const Set *s, int64 i); extern Set *union_set_date(const Set *s, DateADT d); extern Set *union_set_float(const Set *s, double d); -extern Set *union_set_geo(const Set *s, const GSERIALIZED *gs); extern Set *union_set_int(const Set *s, int i); extern Set *union_set_set(const Set *s1, const Set *s2); extern Set *union_set_text(const Set *s, const text *txt); -extern Set *union_set_timestamptz(const Set *s, const TimestampTz t); +extern Set *union_set_timestamptz(const Set *s, TimestampTz t); extern SpanSet *union_span_bigint(const Span *s, int64 i); extern SpanSet *union_span_date(const Span *s, DateADT d); extern SpanSet *union_span_float(const Span *s, double d); @@ -1480,7 +1090,7 @@ extern SpanSet *union_spanset_span(const SpanSet *ss, const Span *s); extern SpanSet *union_spanset_spanset(const SpanSet *ss1, const SpanSet *ss2); extern SpanSet *union_spanset_timestamptz(const SpanSet *ss, TimestampTz t); extern Set *union_text_set(const text *txt, const Set *s); -extern Set *union_timestamptz_set(const TimestampTz t, const Set *s); +extern Set *union_timestamptz_set(TimestampTz t, const Set *s); extern SpanSet *union_timestamptz_span(TimestampTz t, const Span *s); extern SpanSet *union_timestamptz_spanset(TimestampTz t, SpanSet *ss); @@ -1548,41 +1158,51 @@ extern Set *text_union_transfn(Set *state, const text *txt); extern Span *timestamptz_extent_transfn(Span *state, TimestampTz t); extern Set *timestamptz_union_transfn(Set *state, TimestampTz t); +/***************************************************************************** + * Bin functions for span and spanset types + *****************************************************************************/ + +extern int64 bigint_get_bin(int64 value, int64 vsize, int64 vorigin); +extern Span *bigintspan_bins(const Span *s, int64 vsize, int64 vorigin, int *count); +extern Span *bigintspanset_bins(const SpanSet *ss, int64 vsize, int64 vorigin, int *count); +extern DateADT date_get_bin(DateADT d, const Interval *duration, DateADT torigin); +extern Span *datespan_bins(const Span *s, const Interval *duration, DateADT torigin, int *count); +extern Span *datespanset_bins(const SpanSet *ss, const Interval *duration, DateADT torigin, int *count); +extern double float_get_bin(double value, double vsize, double vorigin); +extern Span *floatspan_bins(const Span *s, double vsize, double vorigin, int *count); +extern Span *floatspanset_bins(const SpanSet *ss, double vsize, double vorigin, int *count); +extern int int_get_bin(int value, int vsize, int vorigin); +extern Span *intspan_bins(const Span *s, int vsize, int vorigin, int *count); +extern Span *intspanset_bins(const SpanSet *ss, int vsize, int vorigin, int *count); +extern TimestampTz timestamptz_get_bin(TimestampTz t, const Interval *duration, TimestampTz torigin); +extern Span *tstzspan_bins(const Span *s, const Interval *duration, TimestampTz origin, int *count); +extern Span *tstzspanset_bins(const SpanSet *ss, const Interval *duration, TimestampTz torigin, int *count); + /*===========================================================================* - * Functions for box types + * Functions for temporal boxes *===========================================================================*/ /***************************************************************************** * Input and output functions for box types *****************************************************************************/ +extern char *tbox_as_hexwkb(const TBox *box, uint8_t variant, size_t *size); +extern uint8_t *tbox_as_wkb(const TBox *box, uint8_t variant, size_t *size_out); +extern TBox *tbox_from_hexwkb(const char *hexwkb); +extern TBox *tbox_from_wkb(const uint8_t *wkb, size_t size); extern TBox *tbox_in(const char *str); extern char *tbox_out(const TBox *box, int maxdd); -extern TBox *tbox_from_wkb(const uint8_t *wkb, size_t size); -extern TBox *tbox_from_hexwkb(const char *hexwkb); -extern STBox *stbox_from_wkb(const uint8_t *wkb, size_t size); -extern STBox *stbox_from_hexwkb(const char *hexwkb); -extern uint8_t *tbox_as_wkb(const TBox *box, uint8_t variant, size_t *size_out); -extern char *tbox_as_hexwkb(const TBox *box, uint8_t variant, size_t *size); -extern uint8_t *stbox_as_wkb(const STBox *box, uint8_t variant, size_t *size_out); -extern char *stbox_as_hexwkb(const STBox *box, uint8_t variant, size_t *size); -extern STBox *stbox_in(const char *str); -extern char *stbox_out(const STBox *box, int maxdd); /***************************************************************************** * Constructor functions for box types *****************************************************************************/ -extern TBox *float_tstzspan_to_tbox(double d, const Span *s); extern TBox *float_timestamptz_to_tbox(double d, TimestampTz t); -extern STBox *geo_tstzspan_to_stbox(const GSERIALIZED *gs, const Span *s); -extern STBox *geo_timestamptz_to_stbox(const GSERIALIZED *gs, TimestampTz t); -extern TBox *int_tstzspan_to_tbox(int i, const Span *s); +extern TBox *float_tstzspan_to_tbox(double d, const Span *s); extern TBox *int_timestamptz_to_tbox(int i, TimestampTz t); +extern TBox *int_tstzspan_to_tbox(int i, const Span *s); extern TBox *numspan_tstzspan_to_tbox(const Span *span, const Span *s); extern TBox *numspan_timestamptz_to_tbox(const Span *span, TimestampTz t); -extern STBox *stbox_copy(const STBox *box); -extern STBox *stbox_make(bool hasx, bool hasz, bool geodetic, int32 srid, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, const Span *s); extern TBox *tbox_copy(const TBox *box); extern TBox *tbox_make(const Span *s, const Span *p); @@ -1591,48 +1211,21 @@ extern TBox *tbox_make(const Span *s, const Span *p); *****************************************************************************/ extern TBox *float_to_tbox(double d); -extern STBox *geo_to_stbox(const GSERIALIZED *gs); extern TBox *int_to_tbox(int i); extern TBox *set_to_tbox(const Set *s); extern TBox *span_to_tbox(const Span *s); extern TBox *spanset_to_tbox(const SpanSet *ss); -extern STBox *spatialset_to_stbox(const Set *s); -extern GBOX *stbox_to_gbox(const STBox *box); -extern BOX3D *stbox_to_box3d(const STBox *box); -extern GSERIALIZED *stbox_to_geo(const STBox *box); -extern Span *stbox_to_tstzspan(const STBox *box); extern Span *tbox_to_intspan(const TBox *box); extern Span *tbox_to_floatspan(const TBox *box); extern Span *tbox_to_tstzspan(const TBox *box); -extern STBox *timestamptz_to_stbox(TimestampTz t); extern TBox *timestamptz_to_tbox(TimestampTz t); -extern STBox *tstzset_to_stbox(const Set *s); -extern STBox *tstzspan_to_stbox(const Span *s); -extern STBox *tstzspanset_to_stbox(const SpanSet *ss); -extern TBox *tnumber_to_tbox(const Temporal *temp); -extern STBox *tpoint_to_stbox(const Temporal *temp); /***************************************************************************** * Accessor functions for box types *****************************************************************************/ -extern double stbox_area(const STBox *box, bool spheroid); -extern bool stbox_hast(const STBox *box); -extern bool stbox_hasx(const STBox *box); -extern bool stbox_hasz(const STBox *box); -extern bool stbox_isgeodetic(const STBox *box); -extern double stbox_perimeter(const STBox *box, bool spheroid); -extern int32 stbox_srid(const STBox *box); -extern bool stbox_tmax(const STBox *box, TimestampTz *result); -extern bool stbox_tmax_inc(const STBox *box, bool *result); -extern bool stbox_tmin(const STBox *box, TimestampTz *result); -extern bool stbox_tmin_inc(const STBox *box, bool *result); -extern bool stbox_xmax(const STBox *box, double *result); -extern bool stbox_xmin(const STBox *box, double *result); -extern bool stbox_ymax(const STBox *box, double *result); -extern bool stbox_ymin(const STBox *box, double *result); -extern bool stbox_zmax(const STBox *box, double *result); -extern bool stbox_zmin(const STBox *box, double *result); +extern uint32 tbox_hash(const TBox *box); +extern uint64 tbox_hash_extended(const TBox *box, uint64 seed); extern bool tbox_hast(const TBox *box); extern bool tbox_hasx(const TBox *box); extern bool tbox_tmax(const TBox *box, TimestampTz *result); @@ -1652,22 +1245,13 @@ extern bool tboxint_xmin(const TBox *box, int *result); * Transformation functions for box types *****************************************************************************/ -extern STBox *stbox_expand_space(const STBox *box, double d); -extern STBox *stbox_expand_time(const STBox *box, const Interval *interv); -extern STBox *stbox_get_space(const STBox *box); -extern STBox *stbox_quad_split(const STBox *box, int *count); -extern STBox *stbox_round(const STBox *box, int maxdd); -extern STBox *stbox_set_srid(const STBox *box, int32 srid); -extern STBox *stbox_shift_scale_time(const STBox *box, const Interval *shift, const Interval *duration); -extern STBox *stbox_transform(const STBox *box, int32 srid); -extern STBox *stbox_transform_pipeline(const STBox *box, char *pipelinestr, int32 srid, bool is_forward); extern TBox *tbox_expand_time(const TBox *box, const Interval *interv); -extern TBox *tbox_expand_float(const TBox *box, const double d); -extern TBox *tbox_expand_int(const TBox *box, const int i); extern TBox *tbox_round(const TBox *box, int maxdd); -extern TBox *tbox_shift_scale_float(const TBox *box, double shift, double width, bool hasshift, bool haswidth); -extern TBox *tbox_shift_scale_int(const TBox *box, int shift, int width, bool hasshift, bool haswidth); extern TBox *tbox_shift_scale_time(const TBox *box, const Interval *shift, const Interval *duration); +extern TBox *tfloatbox_expand(const TBox *box, double d); +extern TBox *tfloatbox_shift_scale(const TBox *box, double shift, double width, bool hasshift, bool haswidth); +extern TBox *tintbox_expand(const TBox *box, int i); +extern TBox *tintbox_shift_scale(const TBox *box, int shift, int width, bool hasshift, bool haswidth); /***************************************************************************** * Set functions for box types @@ -1675,8 +1259,6 @@ extern TBox *tbox_shift_scale_time(const TBox *box, const Interval *shift, const extern TBox *union_tbox_tbox(const TBox *box1, const TBox *box2, bool strict); extern TBox *intersection_tbox_tbox(const TBox *box1, const TBox *box2); -extern STBox *union_stbox_stbox(const STBox *box1, const STBox *box2, bool strict); -extern STBox *intersection_stbox_stbox(const STBox *box1, const STBox *box2); /***************************************************************************** * Bounding box functions for box types @@ -1684,64 +1266,36 @@ extern STBox *intersection_stbox_stbox(const STBox *box1, const STBox *box2); /* Topological functions for box types */ -extern bool adjacent_stbox_stbox(const STBox *box1, const STBox *box2); extern bool adjacent_tbox_tbox(const TBox *box1, const TBox *box2); extern bool contained_tbox_tbox(const TBox *box1, const TBox *box2); -extern bool contained_stbox_stbox(const STBox *box1, const STBox *box2); -extern bool contains_stbox_stbox(const STBox *box1, const STBox *box2); extern bool contains_tbox_tbox(const TBox *box1, const TBox *box2); extern bool overlaps_tbox_tbox(const TBox *box1, const TBox *box2); -extern bool overlaps_stbox_stbox(const STBox *box1, const STBox *box2); extern bool same_tbox_tbox(const TBox *box1, const TBox *box2); -extern bool same_stbox_stbox(const STBox *box1, const STBox *box2); /*****************************************************************************/ /* Position functions for box types */ +extern bool after_tbox_tbox(const TBox *box1, const TBox *box2); +extern bool before_tbox_tbox(const TBox *box1, const TBox *box2); extern bool left_tbox_tbox(const TBox *box1, const TBox *box2); +extern bool overafter_tbox_tbox(const TBox *box1, const TBox *box2); +extern bool overbefore_tbox_tbox(const TBox *box1, const TBox *box2); extern bool overleft_tbox_tbox(const TBox *box1, const TBox *box2); -extern bool right_tbox_tbox(const TBox *box1, const TBox *box2); extern bool overright_tbox_tbox(const TBox *box1, const TBox *box2); -extern bool before_tbox_tbox(const TBox *box1, const TBox *box2); -extern bool overbefore_tbox_tbox(const TBox *box1, const TBox *box2); -extern bool after_tbox_tbox(const TBox *box1, const TBox *box2); -extern bool overafter_tbox_tbox(const TBox *box1, const TBox *box2); -extern bool left_stbox_stbox(const STBox *box1, const STBox *box2); -extern bool overleft_stbox_stbox(const STBox *box1, const STBox *box2); -extern bool right_stbox_stbox(const STBox *box1, const STBox *box2); -extern bool overright_stbox_stbox(const STBox *box1, const STBox *box2); -extern bool below_stbox_stbox(const STBox *box1, const STBox *box2); -extern bool overbelow_stbox_stbox(const STBox *box1, const STBox *box2); -extern bool above_stbox_stbox(const STBox *box1, const STBox *box2); -extern bool overabove_stbox_stbox(const STBox *box1, const STBox *box2); -extern bool front_stbox_stbox(const STBox *box1, const STBox *box2); -extern bool overfront_stbox_stbox(const STBox *box1, const STBox *box2); -extern bool back_stbox_stbox(const STBox *box1, const STBox *box2); -extern bool overback_stbox_stbox(const STBox *box1, const STBox *box2); -extern bool before_stbox_stbox(const STBox *box1, const STBox *box2); -extern bool overbefore_stbox_stbox(const STBox *box1, const STBox *box2); -extern bool after_stbox_stbox(const STBox *box1, const STBox *box2); -extern bool overafter_stbox_stbox(const STBox *box1, const STBox *box2); +extern bool right_tbox_tbox(const TBox *box1, const TBox *box2); /***************************************************************************** * Comparison functions for box types *****************************************************************************/ -extern bool tbox_eq(const TBox *box1, const TBox *box2); -extern bool tbox_ne(const TBox *box1, const TBox *box2); extern int tbox_cmp(const TBox *box1, const TBox *box2); -extern bool tbox_lt(const TBox *box1, const TBox *box2); -extern bool tbox_le(const TBox *box1, const TBox *box2); +extern bool tbox_eq(const TBox *box1, const TBox *box2); extern bool tbox_ge(const TBox *box1, const TBox *box2); extern bool tbox_gt(const TBox *box1, const TBox *box2); -extern bool stbox_eq(const STBox *box1, const STBox *box2); -extern bool stbox_ne(const STBox *box1, const STBox *box2); -extern int stbox_cmp(const STBox *box1, const STBox *box2); -extern bool stbox_lt(const STBox *box1, const STBox *box2); -extern bool stbox_le(const STBox *box1, const STBox *box2); -extern bool stbox_ge(const STBox *box1, const STBox *box2); -extern bool stbox_gt(const STBox *box1, const STBox *box2); +extern bool tbox_le(const TBox *box1, const TBox *box2); +extern bool tbox_lt(const TBox *box1, const TBox *box2); +extern bool tbox_ne(const TBox *box1, const TBox *box2); /*===========================================================================* * Functions for temporal types @@ -1751,31 +1305,23 @@ extern bool stbox_gt(const STBox *box1, const STBox *box2); * Input and output functions for temporal types *****************************************************************************/ +extern Temporal *tbool_from_mfjson(const char *str); extern Temporal *tbool_in(const char *str); -extern Temporal *tint_in(const char *str); +extern char *tbool_out(const Temporal *temp); +extern char *temporal_as_hexwkb(const Temporal *temp, uint8_t variant, size_t *size_out); +extern char *temporal_as_mfjson(const Temporal *temp, bool with_bbox, int flags, int precision, const char *srs); +extern uint8_t *temporal_as_wkb(const Temporal *temp, uint8_t variant, size_t *size_out); +extern Temporal *temporal_from_hexwkb(const char *hexwkb); +extern Temporal *temporal_from_wkb(const uint8_t *wkb, size_t size); +extern Temporal *tfloat_from_mfjson(const char *str); extern Temporal *tfloat_in(const char *str); -extern Temporal *ttext_in(const char *str); -extern Temporal *tgeompoint_in(const char *str); -extern Temporal *tgeogpoint_in(const char *str); -extern Temporal *tbool_from_mfjson(const char *str); +extern char *tfloat_out(const Temporal *temp, int maxdd); extern Temporal *tint_from_mfjson(const char *str); -extern Temporal *tfloat_from_mfjson(const char *str); -extern Temporal *ttext_from_mfjson(const char *str); -extern Temporal *tgeompoint_from_mfjson(const char *str); -extern Temporal *tgeogpoint_from_mfjson(const char *str); -extern Temporal *temporal_from_wkb(const uint8_t *wkb, size_t size); -extern Temporal *temporal_from_hexwkb(const char *hexwkb); - -extern char *tbool_out(const Temporal *temp); +extern Temporal *tint_in(const char *str); extern char *tint_out(const Temporal *temp); -extern char *tfloat_out(const Temporal *temp, int maxdd); +extern Temporal *ttext_from_mfjson(const char *str); +extern Temporal *ttext_in(const char *str); extern char *ttext_out(const Temporal *temp); -extern char *tpoint_out(const Temporal *temp, int maxdd); -extern char *tpoint_as_text(const Temporal *temp, int maxdd); -extern char *tpoint_as_ewkt(const Temporal *temp, int maxdd); -extern char *temporal_as_mfjson(const Temporal *temp, bool with_bbox, int flags, int precision, char *srs); -extern uint8_t *temporal_as_wkb(const Temporal *temp, uint8_t variant, size_t *size_out); -extern char *temporal_as_hexwkb(const Temporal *temp, uint8_t variant, size_t *size_out); /***************************************************************************** * Constructor functions for temporal types @@ -1789,36 +1335,33 @@ extern TSequenceSet *tboolseqset_from_base_tstzspanset(bool b, const SpanSet *ss extern Temporal *temporal_copy(const Temporal *temp); extern Temporal *tfloat_from_base_temp(double d, const Temporal *temp); extern TInstant *tfloatinst_make(double d, TimestampTz t); -extern TSequence *tfloatseq_from_base_tstzspan(double d, const Span *s, interpType interp); extern TSequence *tfloatseq_from_base_tstzset(double d, const Set *s); +extern TSequence *tfloatseq_from_base_tstzspan(double d, const Span *s, interpType interp); extern TSequenceSet *tfloatseqset_from_base_tstzspanset(double d, const SpanSet *ss, interpType interp); extern Temporal *tint_from_base_temp(int i, const Temporal *temp); extern TInstant *tintinst_make(int i, TimestampTz t); -extern TSequence *tintseq_from_base_tstzspan(int i, const Span *s); extern TSequence *tintseq_from_base_tstzset(int i, const Set *s); +extern TSequence *tintseq_from_base_tstzspan(int i, const Span *s); extern TSequenceSet *tintseqset_from_base_tstzspanset(int i, const SpanSet *ss); -extern Temporal *tpoint_from_base_temp(const GSERIALIZED *gs, const Temporal *temp); -extern TInstant *tpointinst_make(const GSERIALIZED *gs, TimestampTz t); -extern TSequence *tpointseq_from_base_tstzspan(const GSERIALIZED *gs, const Span *s, interpType interp); -extern TSequence *tpointseq_from_base_tstzset(const GSERIALIZED *gs, const Set *s); -extern TSequenceSet *tpointseqset_from_base_tstzspanset(const GSERIALIZED *gs, const SpanSet *ss, interpType interp); -extern TSequence *tsequence_make(const TInstant **instants, int count, bool lower_inc, bool upper_inc, interpType interp, bool normalize); -extern TSequenceSet *tsequenceset_make(const TSequence **sequences, int count, bool normalize); -extern TSequenceSet *tsequenceset_make_gaps(const TInstant **instants, int count, interpType interp, Interval *maxt, double maxdist); +extern TSequence *tsequence_make(TInstant **instants, int count, bool lower_inc, bool upper_inc, interpType interp, bool normalize); +extern TSequenceSet *tsequenceset_make(TSequence **sequences, int count, bool normalize); +extern TSequenceSet *tsequenceset_make_gaps(TInstant **instants, int count, interpType interp, const Interval *maxt, double maxdist); extern Temporal *ttext_from_base_temp(const text *txt, const Temporal *temp); extern TInstant *ttextinst_make(const text *txt, TimestampTz t); -extern TSequence *ttextseq_from_base_tstzspan(const text *txt, const Span *s); extern TSequence *ttextseq_from_base_tstzset(const text *txt, const Set *s); +extern TSequence *ttextseq_from_base_tstzspan(const text *txt, const Span *s); extern TSequenceSet *ttextseqset_from_base_tstzspanset(const text *txt, const SpanSet *ss); /***************************************************************************** * Conversion functions for temporal types *****************************************************************************/ +extern Temporal *tbool_to_tint(const Temporal *temp); extern Span *temporal_to_tstzspan(const Temporal *temp); extern Temporal *tfloat_to_tint(const Temporal *temp); extern Temporal *tint_to_tfloat(const Temporal *temp); extern Span *tnumber_to_span(const Temporal *temp); +extern TBox *tnumber_to_tbox (const Temporal *temp); /***************************************************************************** * Accessor functions for temporal types @@ -1837,27 +1380,29 @@ extern uint32 temporal_hash(const Temporal *temp); extern TInstant *temporal_instant_n(const Temporal *temp, int n); extern TInstant **temporal_instants(const Temporal *temp, int *count); extern const char *temporal_interp(const Temporal *temp); +extern bool temporal_lower_inc(const Temporal *temp); extern TInstant *temporal_max_instant(const Temporal *temp); extern TInstant *temporal_min_instant(const Temporal *temp); extern int temporal_num_instants(const Temporal *temp); extern int temporal_num_sequences(const Temporal *temp); extern int temporal_num_timestamps(const Temporal *temp); +extern TSequenceSet *temporal_segm_duration(const Temporal *temp, const Interval *duration, bool atleast, bool strict); extern TSequence **temporal_segments(const Temporal *temp, int *count); extern TSequence *temporal_sequence_n(const Temporal *temp, int i); extern TSequence **temporal_sequences(const Temporal *temp, int *count); -extern int temporal_lower_inc(const Temporal *temp); -extern int temporal_upper_inc(const Temporal *temp); extern TInstant *temporal_start_instant(const Temporal *temp); extern TSequence *temporal_start_sequence(const Temporal *temp); extern TimestampTz temporal_start_timestamptz(const Temporal *temp); extern TSequenceSet *temporal_stops(const Temporal *temp, double maxdist, const Interval *minduration); extern const char *temporal_subtype(const Temporal *temp); extern SpanSet *temporal_time(const Temporal *temp); -extern bool temporal_timestamptz_n(const Temporal *temp, int n, TimestampTz *result); extern TimestampTz *temporal_timestamps(const Temporal *temp, int *count); +extern bool temporal_timestamptz_n(const Temporal *temp, int n, TimestampTz *result); +extern bool temporal_upper_inc(const Temporal *temp); +extern double tfloat_avg_value(const Temporal *temp); extern double tfloat_end_value(const Temporal *temp); -extern double tfloat_max_value(const Temporal *temp); extern double tfloat_min_value(const Temporal *temp); +extern double tfloat_max_value(const Temporal *temp); extern double tfloat_start_value(const Temporal *temp); extern bool tfloat_value_at_timestamptz(const Temporal *temp, TimestampTz t, bool strict, double *value); extern bool tfloat_value_n(const Temporal *temp, int n, double *result); @@ -1869,14 +1414,10 @@ extern int tint_start_value(const Temporal *temp); extern bool tint_value_at_timestamptz(const Temporal *temp, TimestampTz t, bool strict, int *value); extern bool tint_value_n(const Temporal *temp, int n, int *result); extern int *tint_values(const Temporal *temp, int *count); +extern double tnumber_avg_value(const Temporal *temp); extern double tnumber_integral(const Temporal *temp); extern double tnumber_twavg(const Temporal *temp); extern SpanSet *tnumber_valuespans(const Temporal *temp); -extern GSERIALIZED *tpoint_end_value(const Temporal *temp); -extern GSERIALIZED *tpoint_start_value(const Temporal *temp); -extern bool tpoint_value_at_timestamptz(const Temporal *temp, TimestampTz t, bool strict, GSERIALIZED **value); -extern bool tpoint_value_n(const Temporal *temp, int n, GSERIALIZED **result); -extern GSERIALIZED **tpoint_values(const Temporal *temp, int *count); extern text *ttext_end_value(const Temporal *temp); extern text *ttext_max_value(const Temporal *temp); extern text *ttext_min_value(const Temporal *temp); @@ -1890,42 +1431,36 @@ extern text **ttext_values(const Temporal *temp, int *count); *****************************************************************************/ extern double float_degrees(double value, bool normalize); +extern Temporal **temparr_round(Temporal **temp, int count, int maxdd); +extern Temporal *temporal_round(const Temporal *temp, int maxdd); extern Temporal *temporal_scale_time(const Temporal *temp, const Interval *duration); extern Temporal *temporal_set_interp(const Temporal *temp, interpType interp); extern Temporal *temporal_shift_scale_time(const Temporal *temp, const Interval *shift, const Interval *duration); extern Temporal *temporal_shift_time(const Temporal *temp, const Interval *shift); extern TInstant *temporal_to_tinstant(const Temporal *temp); -extern TSequence *temporal_to_tsequence(const Temporal *temp, char *interp_str); -extern TSequenceSet *temporal_to_tsequenceset(const Temporal *temp, char *interp_str); -extern Temporal *tfloat_floor(const Temporal *temp); +extern TSequence *temporal_to_tsequence(const Temporal *temp, interpType interp); +extern TSequenceSet *temporal_to_tsequenceset(const Temporal *temp, interpType interp); extern Temporal *tfloat_ceil(const Temporal *temp); extern Temporal *tfloat_degrees(const Temporal *temp, bool normalize); +extern Temporal *tfloat_floor(const Temporal *temp); extern Temporal *tfloat_radians(const Temporal *temp); -extern Temporal *tfloat_round(const Temporal *temp, int maxdd); extern Temporal *tfloat_scale_value(const Temporal *temp, double width); extern Temporal *tfloat_shift_scale_value(const Temporal *temp, double shift, double width); extern Temporal *tfloat_shift_value(const Temporal *temp, double shift); -extern Temporal **tfloatarr_round(const Temporal **temp, int count, int maxdd); extern Temporal *tint_scale_value(const Temporal *temp, int width); extern Temporal *tint_shift_scale_value(const Temporal *temp, int shift, int width); extern Temporal *tint_shift_value(const Temporal *temp, int shift); -extern Temporal *tpoint_round(const Temporal *temp, int maxdd); -extern Temporal *tpoint_transform(const Temporal *temp, int32 srid); -extern Temporal *tpoint_transform_pipeline(const Temporal *temp, char *pipelinestr, int32 srid, bool is_forward); -extern Temporal *tpoint_transform_pj(const Temporal *temp, int32 srid, const LWPROJ* pj); -extern LWPROJ *lwproj_transform(int32 srid_from, int32 srid_to); -extern Temporal **tpointarr_round(const Temporal **temp, int count, int maxdd); /***************************************************************************** * Modification functions for temporal types *****************************************************************************/ -extern Temporal *temporal_append_tinstant(Temporal *temp, const TInstant *inst, double maxdist, Interval *maxt, bool expand); +extern Temporal *temporal_append_tinstant(Temporal *temp, const TInstant *inst, interpType interp, double maxdist, const Interval *maxt, bool expand); extern Temporal *temporal_append_tsequence(Temporal *temp, const TSequence *seq, bool expand); -extern Temporal *temporal_delete_tstzspan(const Temporal *temp, const Span *s, bool connect); -extern Temporal *temporal_delete_tstzspanset(const Temporal *temp, const SpanSet *ss, bool connect); extern Temporal *temporal_delete_timestamptz(const Temporal *temp, TimestampTz t, bool connect); extern Temporal *temporal_delete_tstzset(const Temporal *temp, const Set *s, bool connect); +extern Temporal *temporal_delete_tstzspan(const Temporal *temp, const Span *s, bool connect); +extern Temporal *temporal_delete_tstzspanset(const Temporal *temp, const SpanSet *ss, bool connect); extern Temporal *temporal_insert(const Temporal *temp1, const Temporal *temp2, bool connect); extern Temporal *temporal_merge(const Temporal *temp1, const Temporal *temp2); extern Temporal *temporal_merge_array(Temporal **temparr, int count); @@ -1937,19 +1472,21 @@ extern Temporal *temporal_update(const Temporal *temp1, const Temporal *temp2, b extern Temporal *tbool_at_value(const Temporal *temp, bool b); extern Temporal *tbool_minus_value(const Temporal *temp, bool b); +extern Temporal *temporal_after_timestamptz(const Temporal *temp, TimestampTz t, bool strict); extern Temporal *temporal_at_max(const Temporal *temp); extern Temporal *temporal_at_min(const Temporal *temp); -extern Temporal *temporal_at_tstzspan(const Temporal *temp, const Span *s); -extern Temporal *temporal_at_tstzspanset(const Temporal *temp, const SpanSet *ss); extern Temporal *temporal_at_timestamptz(const Temporal *temp, TimestampTz t); extern Temporal *temporal_at_tstzset(const Temporal *temp, const Set *s); +extern Temporal *temporal_at_tstzspan(const Temporal *temp, const Span *s); +extern Temporal *temporal_at_tstzspanset(const Temporal *temp, const SpanSet *ss); extern Temporal *temporal_at_values(const Temporal *temp, const Set *set); +extern Temporal *temporal_before_timestamptz(const Temporal *temp, TimestampTz t, bool strict); extern Temporal *temporal_minus_max(const Temporal *temp); extern Temporal *temporal_minus_min(const Temporal *temp); -extern Temporal *temporal_minus_tstzspan(const Temporal *temp, const Span *s); -extern Temporal *temporal_minus_tstzspanset(const Temporal *temp, const SpanSet *ss); extern Temporal *temporal_minus_timestamptz(const Temporal *temp, TimestampTz t); extern Temporal *temporal_minus_tstzset(const Temporal *temp, const Set *s); +extern Temporal *temporal_minus_tstzspan(const Temporal *temp, const Span *s); +extern Temporal *temporal_minus_tstzspanset(const Temporal *temp, const SpanSet *ss); extern Temporal *temporal_minus_values(const Temporal *temp, const Set *set); extern Temporal *tfloat_at_value(const Temporal *temp, double d); extern Temporal *tfloat_minus_value(const Temporal *temp, double d); @@ -1961,12 +1498,6 @@ extern Temporal *tnumber_at_tbox(const Temporal *temp, const TBox *box); extern Temporal *tnumber_minus_span(const Temporal *temp, const Span *span); extern Temporal *tnumber_minus_spanset(const Temporal *temp, const SpanSet *ss); extern Temporal *tnumber_minus_tbox(const Temporal *temp, const TBox *box); -extern Temporal *tpoint_at_geom_time(const Temporal *temp, const GSERIALIZED *gs, const Span *zspan, const Span *period); -extern Temporal *tpoint_at_stbox(const Temporal *temp, const STBox *box, bool border_inc); -extern Temporal *tpoint_at_value(const Temporal *temp, GSERIALIZED *gs); -extern Temporal *tpoint_minus_geom_time(const Temporal *temp, const GSERIALIZED *gs, const Span *zspan, const Span *period); -extern Temporal *tpoint_minus_stbox(const Temporal *temp, const STBox *box, bool border_inc); -extern Temporal *tpoint_minus_value(const Temporal *temp, GSERIALIZED *gs); extern Temporal *ttext_at_value(const Temporal *temp, text *txt); extern Temporal *ttext_minus_value(const Temporal *temp, text *txt); @@ -1991,27 +1522,12 @@ extern bool temporal_ne(const Temporal *temp1, const Temporal *temp2); extern int always_eq_bool_tbool(bool b, const Temporal *temp); extern int always_eq_float_tfloat(double d, const Temporal *temp); extern int always_eq_int_tint(int i, const Temporal *temp); -extern int always_eq_point_tpoint(const GSERIALIZED *gs, const Temporal *temp); extern int always_eq_tbool_bool(const Temporal *temp, bool b); extern int always_eq_temporal_temporal(const Temporal *temp1, const Temporal *temp2); extern int always_eq_text_ttext(const text *txt, const Temporal *temp); extern int always_eq_tfloat_float(const Temporal *temp, double d); extern int always_eq_tint_int(const Temporal *temp, int i); -extern int always_eq_tpoint_point(const Temporal *temp, const GSERIALIZED *gs); -extern int always_eq_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); extern int always_eq_ttext_text(const Temporal *temp, const text *txt); -extern int always_ne_bool_tbool(bool b, const Temporal *temp); -extern int always_ne_float_tfloat(double d, const Temporal *temp); -extern int always_ne_int_tint(int i, const Temporal *temp); -extern int always_ne_point_tpoint(const GSERIALIZED *gs, const Temporal *temp); -extern int always_ne_tbool_bool(const Temporal *temp, bool b); -extern int always_ne_temporal_temporal(const Temporal *temp1, const Temporal *temp2); -extern int always_ne_text_ttext(const text *txt, const Temporal *temp); -extern int always_ne_tfloat_float(const Temporal *temp, double d); -extern int always_ne_tint_int(const Temporal *temp, int i); -extern int always_ne_tpoint_point(const Temporal *temp, const GSERIALIZED *gs); -extern int always_ne_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); -extern int always_ne_ttext_text(const Temporal *temp, const text *txt); extern int always_ge_float_tfloat(double d, const Temporal *temp); extern int always_ge_int_tint(int i, const Temporal *temp); extern int always_ge_temporal_temporal(const Temporal *temp1, const Temporal *temp2); @@ -2040,17 +1556,23 @@ extern int always_lt_text_ttext(const text *txt, const Temporal *temp); extern int always_lt_tfloat_float(const Temporal *temp, double d); extern int always_lt_tint_int(const Temporal *temp, int i); extern int always_lt_ttext_text(const Temporal *temp, const text *txt); +extern int always_ne_bool_tbool(bool b, const Temporal *temp); +extern int always_ne_float_tfloat(double d, const Temporal *temp); +extern int always_ne_int_tint(int i, const Temporal *temp); +extern int always_ne_tbool_bool(const Temporal *temp, bool b); +extern int always_ne_temporal_temporal(const Temporal *temp1, const Temporal *temp2); +extern int always_ne_text_ttext(const text *txt, const Temporal *temp); +extern int always_ne_tfloat_float(const Temporal *temp, double d); +extern int always_ne_tint_int(const Temporal *temp, int i); +extern int always_ne_ttext_text(const Temporal *temp, const text *txt); extern int ever_eq_bool_tbool(bool b, const Temporal *temp); extern int ever_eq_float_tfloat(double d, const Temporal *temp); extern int ever_eq_int_tint(int i, const Temporal *temp); -extern int ever_eq_point_tpoint(const GSERIALIZED *gs, const Temporal *temp); extern int ever_eq_tbool_bool(const Temporal *temp, bool b); extern int ever_eq_temporal_temporal(const Temporal *temp1, const Temporal *temp2); extern int ever_eq_text_ttext(const text *txt, const Temporal *temp); extern int ever_eq_tfloat_float(const Temporal *temp, double d); extern int ever_eq_tint_int(const Temporal *temp, int i); -extern int ever_eq_tpoint_point(const Temporal *temp, const GSERIALIZED *gs); -extern int ever_eq_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); extern int ever_eq_ttext_text(const Temporal *temp, const text *txt); extern int ever_ge_float_tfloat(double d, const Temporal *temp); extern int ever_ge_int_tint(int i, const Temporal *temp); @@ -2083,14 +1605,11 @@ extern int ever_lt_ttext_text(const Temporal *temp, const text *txt); extern int ever_ne_bool_tbool(bool b, const Temporal *temp); extern int ever_ne_float_tfloat(double d, const Temporal *temp); extern int ever_ne_int_tint(int i, const Temporal *temp); -extern int ever_ne_point_tpoint(const GSERIALIZED *gs, const Temporal *temp); extern int ever_ne_tbool_bool(const Temporal *temp, bool b); extern int ever_ne_temporal_temporal(const Temporal *temp1, const Temporal *temp2); extern int ever_ne_text_ttext(const text *txt, const Temporal *temp); extern int ever_ne_tfloat_float(const Temporal *temp, double d); extern int ever_ne_tint_int(const Temporal *temp, int i); -extern int ever_ne_tpoint_point(const Temporal *temp, const GSERIALIZED *gs); -extern int ever_ne_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); extern int ever_ne_ttext_text(const Temporal *temp, const text *txt); /*****************************************************************************/ @@ -2100,12 +1619,10 @@ extern int ever_ne_ttext_text(const Temporal *temp, const text *txt); extern Temporal *teq_bool_tbool(bool b, const Temporal *temp); extern Temporal *teq_float_tfloat(double d, const Temporal *temp); extern Temporal *teq_int_tint(int i, const Temporal *temp); -extern Temporal *teq_point_tpoint(const GSERIALIZED *gs, const Temporal *temp); extern Temporal *teq_tbool_bool(const Temporal *temp, bool b); extern Temporal *teq_temporal_temporal(const Temporal *temp1, const Temporal *temp2); extern Temporal *teq_text_ttext(const text *txt, const Temporal *temp); extern Temporal *teq_tfloat_float(const Temporal *temp, double d); -extern Temporal *teq_tpoint_point(const Temporal *temp, const GSERIALIZED *gs); extern Temporal *teq_tint_int(const Temporal *temp, int i); extern Temporal *teq_ttext_text(const Temporal *temp, const text *txt); extern Temporal *tge_float_tfloat(double d, const Temporal *temp); @@ -2139,12 +1656,10 @@ extern Temporal *tlt_ttext_text(const Temporal *temp, const text *txt); extern Temporal *tne_bool_tbool(bool b, const Temporal *temp); extern Temporal *tne_float_tfloat(double d, const Temporal *temp); extern Temporal *tne_int_tint(int i, const Temporal *temp); -extern Temporal *tne_point_tpoint(const GSERIALIZED *gs, const Temporal *temp); extern Temporal *tne_tbool_bool(const Temporal *temp, bool b); extern Temporal *tne_temporal_temporal(const Temporal *temp1, const Temporal *temp2); extern Temporal *tne_text_ttext(const text *txt, const Temporal *temp); extern Temporal *tne_tfloat_float(const Temporal *temp, double d); -extern Temporal *tne_tpoint_point(const Temporal *temp, const GSERIALIZED *gs); extern Temporal *tne_tint_int(const Temporal *temp, int i); extern Temporal *tne_ttext_text(const Temporal *temp, const text *txt); @@ -2152,166 +1667,106 @@ extern Temporal *tne_ttext_text(const Temporal *temp, const text *txt); * Bounding box functions for temporal types *****************************************************************************/ -/* Boxes function */ +/* Split functions */ -extern Span *temporal_spans(const Temporal *temp, int max_count, int *count); -extern TBox *tnumber_tboxes(const Temporal *temp, int max_count, int *count); -extern STBox *tpoint_stboxes(const Temporal *temp, int max_count, int *count); +extern Span *temporal_spans(const Temporal *temp, int *count); +extern Span *temporal_split_each_n_spans(const Temporal *temp, int elem_count, int *count); +extern Span *temporal_split_n_spans(const Temporal *temp, int span_count, int *count); +extern TBox *tnumber_split_each_n_tboxes(const Temporal *temp, int elem_count, int *count); +extern TBox *tnumber_split_n_tboxes(const Temporal *temp, int box_count, int *count); +extern TBox *tnumber_tboxes(const Temporal *temp, int *count); /* Topological functions for temporal types */ extern bool adjacent_numspan_tnumber(const Span *s, const Temporal *temp); -extern bool adjacent_stbox_tpoint(const STBox *box, const Temporal *temp); extern bool adjacent_tbox_tnumber(const TBox *box, const Temporal *temp); extern bool adjacent_temporal_temporal(const Temporal *temp1, const Temporal *temp2); extern bool adjacent_temporal_tstzspan(const Temporal *temp, const Span *s); extern bool adjacent_tnumber_numspan(const Temporal *temp, const Span *s); extern bool adjacent_tnumber_tbox(const Temporal *temp, const TBox *box); extern bool adjacent_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); -extern bool adjacent_tpoint_stbox(const Temporal *temp, const STBox *box); -extern bool adjacent_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); extern bool adjacent_tstzspan_temporal(const Span *s, const Temporal *temp); extern bool contained_numspan_tnumber(const Span *s, const Temporal *temp); -extern bool contained_stbox_tpoint(const STBox *box, const Temporal *temp); extern bool contained_tbox_tnumber(const TBox *box, const Temporal *temp); extern bool contained_temporal_temporal(const Temporal *temp1, const Temporal *temp2); extern bool contained_temporal_tstzspan(const Temporal *temp, const Span *s); extern bool contained_tnumber_numspan(const Temporal *temp, const Span *s); extern bool contained_tnumber_tbox(const Temporal *temp, const TBox *box); extern bool contained_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); -extern bool contained_tpoint_stbox(const Temporal *temp, const STBox *box); -extern bool contained_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); extern bool contained_tstzspan_temporal(const Span *s, const Temporal *temp); extern bool contains_numspan_tnumber(const Span *s, const Temporal *temp); -extern bool contains_stbox_tpoint(const STBox *box, const Temporal *temp); extern bool contains_tbox_tnumber(const TBox *box, const Temporal *temp); extern bool contains_temporal_tstzspan(const Temporal *temp, const Span *s); extern bool contains_temporal_temporal(const Temporal *temp1, const Temporal *temp2); extern bool contains_tnumber_numspan(const Temporal *temp, const Span *s); extern bool contains_tnumber_tbox(const Temporal *temp, const TBox *box); extern bool contains_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); -extern bool contains_tpoint_stbox(const Temporal *temp, const STBox *box); -extern bool contains_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); extern bool contains_tstzspan_temporal(const Span *s, const Temporal *temp); extern bool overlaps_numspan_tnumber(const Span *s, const Temporal *temp); -extern bool overlaps_stbox_tpoint(const STBox *box, const Temporal *temp); extern bool overlaps_tbox_tnumber(const TBox *box, const Temporal *temp); extern bool overlaps_temporal_temporal(const Temporal *temp1, const Temporal *temp2); extern bool overlaps_temporal_tstzspan(const Temporal *temp, const Span *s); extern bool overlaps_tnumber_numspan(const Temporal *temp, const Span *s); extern bool overlaps_tnumber_tbox(const Temporal *temp, const TBox *box); extern bool overlaps_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); -extern bool overlaps_tpoint_stbox(const Temporal *temp, const STBox *box); -extern bool overlaps_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); extern bool overlaps_tstzspan_temporal(const Span *s, const Temporal *temp); extern bool same_numspan_tnumber(const Span *s, const Temporal *temp); -extern bool same_stbox_tpoint(const STBox *box, const Temporal *temp); extern bool same_tbox_tnumber(const TBox *box, const Temporal *temp); extern bool same_temporal_temporal(const Temporal *temp1, const Temporal *temp2); extern bool same_temporal_tstzspan(const Temporal *temp, const Span *s); extern bool same_tnumber_numspan(const Temporal *temp, const Span *s); extern bool same_tnumber_tbox(const Temporal *temp, const TBox *box); extern bool same_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); -extern bool same_tpoint_stbox(const Temporal *temp, const STBox *box); -extern bool same_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); extern bool same_tstzspan_temporal(const Span *s, const Temporal *temp); /*****************************************************************************/ -/* Position box functions for temporal types */ +/* Position functions for temporal types */ -extern bool above_stbox_tpoint(const STBox *box, const Temporal *temp); -extern bool above_tpoint_stbox(const Temporal *temp, const STBox *box); -extern bool above_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); -extern bool after_stbox_tpoint(const STBox *box, const Temporal *temp); extern bool after_tbox_tnumber(const TBox *box, const Temporal *temp); extern bool after_temporal_tstzspan(const Temporal *temp, const Span *s); extern bool after_temporal_temporal(const Temporal *temp1, const Temporal *temp2); extern bool after_tnumber_tbox(const Temporal *temp, const TBox *box); extern bool after_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); -extern bool after_tpoint_stbox(const Temporal *temp, const STBox *box); -extern bool after_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); extern bool after_tstzspan_temporal(const Span *s, const Temporal *temp); -extern bool back_stbox_tpoint(const STBox *box, const Temporal *temp); -extern bool back_tpoint_stbox(const Temporal *temp, const STBox *box); -extern bool back_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); -extern bool before_stbox_tpoint(const STBox *box, const Temporal *temp); extern bool before_tbox_tnumber(const TBox *box, const Temporal *temp); extern bool before_temporal_tstzspan(const Temporal *temp, const Span *s); extern bool before_temporal_temporal(const Temporal *temp1, const Temporal *temp2); extern bool before_tnumber_tbox(const Temporal *temp, const TBox *box); extern bool before_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); -extern bool before_tpoint_stbox(const Temporal *temp, const STBox *box); -extern bool before_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); extern bool before_tstzspan_temporal(const Span *s, const Temporal *temp); -extern bool below_stbox_tpoint(const STBox *box, const Temporal *temp); -extern bool below_tpoint_stbox(const Temporal *temp, const STBox *box); -extern bool below_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); -extern bool front_stbox_tpoint(const STBox *box, const Temporal *temp); -extern bool front_tpoint_stbox(const Temporal *temp, const STBox *box); -extern bool front_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); -extern bool left_stbox_tpoint(const STBox *box, const Temporal *temp); extern bool left_tbox_tnumber(const TBox *box, const Temporal *temp); extern bool left_numspan_tnumber(const Span *s, const Temporal *temp); extern bool left_tnumber_numspan(const Temporal *temp, const Span *s); extern bool left_tnumber_tbox(const Temporal *temp, const TBox *box); extern bool left_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); -extern bool left_tpoint_stbox(const Temporal *temp, const STBox *box); -extern bool left_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); -extern bool overabove_stbox_tpoint(const STBox *box, const Temporal *temp); -extern bool overabove_tpoint_stbox(const Temporal *temp, const STBox *box); -extern bool overabove_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); -extern bool overafter_stbox_tpoint(const STBox *box, const Temporal *temp); extern bool overafter_tbox_tnumber(const TBox *box, const Temporal *temp); extern bool overafter_temporal_tstzspan(const Temporal *temp, const Span *s); extern bool overafter_temporal_temporal(const Temporal *temp1, const Temporal *temp2); extern bool overafter_tnumber_tbox(const Temporal *temp, const TBox *box); extern bool overafter_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); -extern bool overafter_tpoint_stbox(const Temporal *temp, const STBox *box); -extern bool overafter_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); extern bool overafter_tstzspan_temporal(const Span *s, const Temporal *temp); -extern bool overback_stbox_tpoint(const STBox *box, const Temporal *temp); -extern bool overback_tpoint_stbox(const Temporal *temp, const STBox *box); -extern bool overback_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); -extern bool overbefore_stbox_tpoint(const STBox *box, const Temporal *temp); extern bool overbefore_tbox_tnumber(const TBox *box, const Temporal *temp); extern bool overbefore_temporal_tstzspan(const Temporal *temp, const Span *s); extern bool overbefore_temporal_temporal(const Temporal *temp1, const Temporal *temp2); extern bool overbefore_tnumber_tbox(const Temporal *temp, const TBox *box); extern bool overbefore_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); -extern bool overbefore_tpoint_stbox(const Temporal *temp, const STBox *box); -extern bool overbefore_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); extern bool overbefore_tstzspan_temporal(const Span *s, const Temporal *temp); -extern bool overbelow_stbox_tpoint(const STBox *box, const Temporal *temp); -extern bool overbelow_tpoint_stbox(const Temporal *temp, const STBox *box); -extern bool overbelow_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); -extern bool overfront_stbox_tpoint(const STBox *box, const Temporal *temp); -extern bool overfront_tpoint_stbox(const Temporal *temp, const STBox *box); -extern bool overfront_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); extern bool overleft_numspan_tnumber(const Span *s, const Temporal *temp); -extern bool overleft_stbox_tpoint(const STBox *box, const Temporal *temp); extern bool overleft_tbox_tnumber(const TBox *box, const Temporal *temp); extern bool overleft_tnumber_numspan(const Temporal *temp, const Span *s); extern bool overleft_tnumber_tbox(const Temporal *temp, const TBox *box); extern bool overleft_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); -extern bool overleft_tpoint_stbox(const Temporal *temp, const STBox *box); -extern bool overleft_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); extern bool overright_numspan_tnumber(const Span *s, const Temporal *temp); -extern bool overright_stbox_tpoint(const STBox *box, const Temporal *temp); extern bool overright_tbox_tnumber(const TBox *box, const Temporal *temp); extern bool overright_tnumber_numspan(const Temporal *temp, const Span *s); extern bool overright_tnumber_tbox(const Temporal *temp, const TBox *box); extern bool overright_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); -extern bool overright_tpoint_stbox(const Temporal *temp, const STBox *box); -extern bool overright_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); extern bool right_numspan_tnumber(const Span *s, const Temporal *temp); -extern bool right_stbox_tpoint(const STBox *box, const Temporal *temp); extern bool right_tbox_tnumber(const TBox *box, const Temporal *temp); extern bool right_tnumber_numspan(const Temporal *temp, const Span *s); extern bool right_tnumber_tbox(const Temporal *temp, const TBox *box); extern bool right_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); -extern bool right_tpoint_stbox(const Temporal *temp, const STBox *box); -extern bool right_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); /***************************************************************************** * Boolean functions for temporal types @@ -2350,8 +1805,13 @@ extern Temporal *sub_int_tint(int i, const Temporal *tnumber); extern Temporal *sub_tfloat_float(const Temporal *tnumber, double d); extern Temporal *sub_tint_int(const Temporal *tnumber, int i); extern Temporal *sub_tnumber_tnumber(const Temporal *tnumber1, const Temporal *tnumber2); -extern Temporal *tfloat_derivative(const Temporal *temp); +extern Temporal *temporal_derivative(const Temporal *temp); +extern Temporal *tfloat_exp(const Temporal *temp); +extern Temporal *tfloat_ln(const Temporal *temp); +extern Temporal *tfloat_log10(const Temporal *temp); extern Temporal *tnumber_abs(const Temporal *temp); +extern Temporal *tnumber_trend(const Temporal *temp); +extern double float_angular_difference(double degrees1, double degrees2); extern Temporal *tnumber_angular_difference(const Temporal *temp); extern Temporal *tnumber_delta_value(const Temporal *temp); @@ -2362,109 +1822,25 @@ extern Temporal *tnumber_delta_value(const Temporal *temp); extern Temporal *textcat_text_ttext(const text *txt, const Temporal *temp); extern Temporal *textcat_ttext_text(const Temporal *temp, const text *txt); extern Temporal *textcat_ttext_ttext(const Temporal *temp1, const Temporal *temp2); +extern Temporal *ttext_initcap(const Temporal *temp); extern Temporal *ttext_upper(const Temporal *temp); extern Temporal *ttext_lower(const Temporal *temp); -extern Temporal *ttext_initcap(const Temporal *temp); /***************************************************************************** * Distance functions for temporal types *****************************************************************************/ -extern Temporal *distance_tfloat_float(const Temporal *temp, double d); -extern Temporal *distance_tint_int(const Temporal *temp, int i); -extern Temporal *distance_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); -extern Temporal *distance_tpoint_point(const Temporal *temp, const GSERIALIZED *gs); -extern Temporal *distance_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); -extern double nad_stbox_geo(const STBox *box, const GSERIALIZED *gs); -extern double nad_stbox_stbox(const STBox *box1, const STBox *box2); -extern int nad_tint_int(const Temporal *temp, int i); -extern int nad_tint_tbox(const Temporal *temp, const TBox *box); -extern int nad_tint_tint(const Temporal *temp1, const Temporal *temp2); +extern Temporal *tdistance_tfloat_float(const Temporal *temp, double d); +extern Temporal *tdistance_tint_int(const Temporal *temp, int i); +extern Temporal *tdistance_tnumber_tnumber(const Temporal *temp1, const Temporal *temp2); +extern double nad_tboxfloat_tboxfloat(const TBox *box1, const TBox *box2); extern int nad_tboxint_tboxint(const TBox *box1, const TBox *box2); extern double nad_tfloat_float(const Temporal *temp, double d); extern double nad_tfloat_tfloat(const Temporal *temp1, const Temporal *temp2); extern double nad_tfloat_tbox(const Temporal *temp, const TBox *box); -extern double nad_tboxfloat_tboxfloat(const TBox *box1, const TBox *box2); -extern double nad_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs); -extern double nad_tpoint_stbox(const Temporal *temp, const STBox *box); -extern double nad_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); -extern TInstant *nai_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs); -extern TInstant *nai_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); -extern GSERIALIZED *shortestline_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs); -extern GSERIALIZED *shortestline_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); - -/***************************************************************************** - * Spatial functions for temporal points - *****************************************************************************/ - -/* Spatial accessor functions for temporal points */ - -extern bool bearing_point_point(const GSERIALIZED *gs1, const GSERIALIZED *gs2, double *result); -extern Temporal *bearing_tpoint_point(const Temporal *temp, const GSERIALIZED *gs, bool invert); -extern Temporal *bearing_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); -extern GBOX *geo_gboxes(const GSERIALIZED *gs, int max_count, int *count); -extern Temporal *tpoint_angular_difference(const Temporal *temp); -extern Temporal *tpoint_azimuth(const Temporal *temp); -extern GSERIALIZED *tpoint_convex_hull(const Temporal *temp); -extern Temporal *tpoint_cumulative_length(const Temporal *temp); -extern bool tpoint_direction(const Temporal *temp, double *result); -extern Temporal *tpoint_get_x(const Temporal *temp); -extern Temporal *tpoint_get_y(const Temporal *temp); -extern Temporal *tpoint_get_z(const Temporal *temp); -extern bool tpoint_is_simple(const Temporal *temp); -extern double tpoint_length(const Temporal *temp); -extern Temporal *tpoint_speed(const Temporal *temp); -extern int tpoint_srid(const Temporal *temp); -extern GSERIALIZED *tpoint_trajectory(const Temporal *temp); -extern GSERIALIZED *tpoint_twcentroid(const Temporal *temp); - -/*****************************************************************************/ - -/* Spatial transformation functions for temporal points */ - -extern STBox *geo_expand_space(const GSERIALIZED *gs, double d); -extern Temporal *geomeas_to_tpoint(const GSERIALIZED *gs); -extern Temporal *tgeogpoint_to_tgeompoint(const Temporal *temp); -extern Temporal *tgeompoint_to_tgeogpoint(const Temporal *temp); -bool tpoint_AsMVTGeom(const Temporal *temp, const STBox *bounds, int32_t extent, int32_t buffer, bool clip_geom, GSERIALIZED **gsarr, int64 **timesarr, int *count); -extern STBox *tpoint_expand_space(const Temporal *temp, double d); -extern Temporal **tpoint_make_simple(const Temporal *temp, int *count); -extern Temporal *tpoint_set_srid(const Temporal *temp, int32 srid); -bool tpoint_tfloat_to_geomeas(const Temporal *tpoint, const Temporal *measure, bool segmentize, GSERIALIZED **result); - -/*****************************************************************************/ - -/* Ever and always spatial relationship functions for temporal points */ - -extern int acontains_geo_tpoint(const GSERIALIZED *gs, const Temporal *temp); -extern int adisjoint_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs); -extern int adisjoint_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); -extern int adwithin_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs, double dist); -extern int adwithin_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2, double dist); -extern int aintersects_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs); -extern int aintersects_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); -extern int atouches_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs); -extern int econtains_geo_tpoint(const GSERIALIZED *gs, const Temporal *temp); -extern int edisjoint_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs); -extern int edisjoint_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); -extern int edwithin_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs, double dist); -extern int edwithin_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2, double dist); -extern int eintersects_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs); -extern int eintersects_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); -extern int etouches_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs); - -/*****************************************************************************/ - -/* Temporal spatial relationship functions for temporal points */ - -extern Temporal *tcontains_geo_tpoint(const GSERIALIZED *gs, const Temporal *temp, bool restr, bool atvalue); -extern Temporal *tdisjoint_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs, bool restr, bool atvalue); -extern Temporal *tdisjoint_tpoint_tpoint (const Temporal *temp1, const Temporal *temp2, bool restr, bool atvalue); -extern Temporal *tdwithin_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs, double dist, bool restr, bool atvalue); -extern Temporal *tdwithin_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2, double dist, bool restr, bool atvalue); -extern Temporal *tintersects_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs, bool restr, bool atvalue); -extern Temporal *tintersects_tpoint_tpoint (const Temporal *temp1, const Temporal *temp2, bool restr, bool atvalue); -extern Temporal *ttouches_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs, bool restr, bool atvalue); +extern int nad_tint_int(const Temporal *temp, int i); +extern int nad_tint_tbox(const Temporal *temp, const TBox *box); +extern int nad_tint_tint(const Temporal *temp1, const Temporal *temp2); /***************************************************************************** * Aggregate functions for temporal types @@ -2473,6 +1849,8 @@ extern Temporal *ttouches_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs extern SkipList *tbool_tand_transfn(SkipList *state, const Temporal *temp); extern SkipList *tbool_tor_transfn(SkipList *state, const Temporal *temp); extern Span *temporal_extent_transfn(Span *s, const Temporal *temp); +extern SkipList *temporal_merge_transfn(SkipList *state, const Temporal *temp); +extern SkipList *temporal_merge_combinefn(SkipList *state1, SkipList *state2); extern Temporal *temporal_tagg_finalfn(SkipList *state); extern SkipList *temporal_tcount_transfn(SkipList *state, const Temporal *temp); extern SkipList *tfloat_tmax_transfn(SkipList *state, const Temporal *temp); @@ -2492,9 +1870,6 @@ extern TBox *tnumber_extent_transfn(TBox *box, const Temporal *temp); extern Temporal *tnumber_tavg_finalfn(SkipList *state); extern SkipList *tnumber_tavg_transfn(SkipList *state, const Temporal *temp); extern SkipList *tnumber_wavg_transfn(SkipList *state, const Temporal *temp, const Interval *interv); -extern STBox *tpoint_extent_transfn(STBox *box, const Temporal *temp); -extern Temporal *tpoint_tcentroid_finalfn(SkipList *state); -extern SkipList *tpoint_tcentroid_transfn(SkipList *state, Temporal *temp); extern SkipList *tstzset_tcount_transfn(SkipList *state, const Set *s); extern SkipList *tstzspan_tcount_transfn(SkipList *state, const Span *s); extern SkipList *tstzspanset_tcount_transfn(SkipList *state, const SpanSet *ss); @@ -2507,10 +1882,10 @@ extern SkipList *ttext_tmin_transfn(SkipList *state, const Temporal *temp); /* Simplification functions for temporal types */ -Temporal *temporal_simplify_dp(const Temporal *temp, double eps_dist, bool synchronized); -Temporal *temporal_simplify_max_dist(const Temporal *temp, double eps_dist, bool synchronized); -Temporal *temporal_simplify_min_dist(const Temporal *temp, double dist); -Temporal *temporal_simplify_min_tdelta(const Temporal *temp, const Interval *mint); +extern Temporal *temporal_simplify_dp(const Temporal *temp, double eps_dist, bool synchronized); +extern Temporal *temporal_simplify_max_dist(const Temporal *temp, double eps_dist, bool synchronized); +extern Temporal *temporal_simplify_min_dist(const Temporal *temp, double dist); +extern Temporal *temporal_simplify_min_tdelta(const Temporal *temp, const Interval *mint); /*****************************************************************************/ @@ -2533,25 +1908,26 @@ extern double temporal_hausdorff_distance(const Temporal *temp1, const Temporal /* Tile functions for temporal types */ -extern double float_bucket(double value, double size, double origin); -extern Span *floatspan_bucket_list(const Span *bounds, double size, double origin, int *count); -extern int int_bucket(int value, int size, int origin); -extern Span *intspan_bucket_list(const Span *bounds, int size, int origin, int *count); -extern STBox *stbox_tile(GSERIALIZED *point, TimestampTz t, double xsize, double ysize, double zsize, Interval *duration, GSERIALIZED *sorigin, TimestampTz torigin, bool hast); -extern STBox *stbox_tile_list(const STBox *bounds, double xsize, double ysize, double zsize, const Interval *duration, GSERIALIZED *sorigin, TimestampTz torigin, bool border_inc, int *count); -extern Temporal **temporal_time_split(Temporal *temp, Interval *duration, TimestampTz torigin, TimestampTz **time_buckets, int *count); -extern Temporal **tfloat_value_split(Temporal *temp, double size, double origin, double **value_buckets, int *count); -extern Temporal **tfloat_value_time_split(Temporal *temp, double size, Interval *duration, double vorigin, TimestampTz torigin, double **value_buckets, TimestampTz **time_buckets, int *count); -extern TBox *tfloatbox_tile(double value, TimestampTz t, double vsize, Interval *duration, double vorigin, TimestampTz torigin); -extern TBox *tfloatbox_tile_list(const TBox *box, double xsize, const Interval *duration, double xorigin, TimestampTz torigin, int *count); -extern TimestampTz timestamptz_bucket(TimestampTz timestamp, const Interval *duration, TimestampTz origin); -extern Temporal **tint_value_split(Temporal *temp, int size, int origin, int **value_buckets, int *count); -extern Temporal **tint_value_time_split(Temporal *temp, int size, Interval *duration, int vorigin, TimestampTz torigin, int **value_buckets, TimestampTz **time_buckets, int *count); -extern TBox *tintbox_tile(int value, TimestampTz t, int vsize, Interval *duration, int vorigin, TimestampTz torigin); -extern TBox *tintbox_tile_list(const TBox *box, int xsize, const Interval *duration, int xorigin, TimestampTz torigin, int *count); -extern Temporal **tpoint_space_split(Temporal *temp, float xsize, float ysize, float zsize, GSERIALIZED *sorigin, bool bitmatrix, bool border_inc, GSERIALIZED ***space_buckets, int *count); -extern Temporal **tpoint_space_time_split(Temporal *temp, float xsize, float ysize, float zsize, Interval *duration, GSERIALIZED *sorigin, TimestampTz torigin, bool bitmatrix, bool border_inc, GSERIALIZED ***space_buckets, TimestampTz **time_buckets, int *count); -extern Span *tstzspan_bucket_list(const Span *bounds, const Interval *duration, TimestampTz origin, int *count); +extern Span *temporal_time_bins(const Temporal *temp, const Interval *duration, TimestampTz origin, int *count); +extern Temporal **temporal_time_split(const Temporal *temp, const Interval *duration, TimestampTz torigin, TimestampTz **time_bins, int *count); +extern TBox *tfloat_time_boxes(const Temporal *temp, const Interval *duration, TimestampTz torigin, int *count); +extern Span *tfloat_value_bins(const Temporal *temp, double vsize, double vorigin, int *count); +extern TBox *tfloat_value_boxes(const Temporal *temp, double vsize, double vorigin, int *count); +extern Temporal **tfloat_value_split(const Temporal *temp, double size, double origin, double **bins, int *count); +extern TBox *tfloat_value_time_boxes(const Temporal *temp, double vsize, const Interval *duration, double vorigin, TimestampTz torigin, int *count); +extern Temporal **tfloat_value_time_split(const Temporal *temp, double vsize, const Interval *duration, double vorigin, TimestampTz torigin, double **value_bins, TimestampTz **time_bins, int *count); +extern TBox *tfloatbox_time_tiles(const TBox *box, const Interval *duration, TimestampTz torigin, int *count); +extern TBox *tfloatbox_value_tiles(const TBox *box, double vsize, double vorigin, int *count); +extern TBox *tfloatbox_value_time_tiles(const TBox *box, double vsize, const Interval *duration, double vorigin, TimestampTz torigin, int *count); +extern TBox *tint_time_boxes(const Temporal *temp, const Interval *duration, TimestampTz torigin, int *count); +extern Span *tint_value_bins(const Temporal *temp, int vsize, int vorigin, int *count); +extern TBox *tint_value_boxes(const Temporal *temp, int vsize, int vorigin, int *count); +extern Temporal **tint_value_split(const Temporal *temp, int vsize, int vorigin, int **bins, int *count); +extern TBox *tint_value_time_boxes(const Temporal *temp, int vsize, const Interval *duration, int vorigin, TimestampTz torigin, int *count); +extern Temporal **tint_value_time_split(const Temporal *temp, int size, const Interval *duration, int vorigin, TimestampTz torigin, int **value_bins, TimestampTz **time_bins, int *count); +extern TBox *tintbox_time_tiles(const TBox *box, const Interval *duration, TimestampTz torigin, int *count); +extern TBox *tintbox_value_tiles(const TBox *box, int xsize, int xorigin, int *count); +extern TBox *tintbox_value_time_tiles(const TBox *box, int xsize, const Interval *duration, int xorigin, TimestampTz torigin, int *count); /*****************************************************************************/ diff --git a/meos_catalog.h b/meos_catalog.h index 39ca3a4..ea0dcf2 100644 --- a/meos_catalog.h +++ b/meos_catalog.h @@ -1,12 +1,12 @@ /***************************************************************************** * * This MobilityDB code is provided under The PostgreSQL License. - * Copyright (c) 2016-2024, Université libre de Bruxelles and MobilityDB + * Copyright (c) 2016-2025, Université libre de Bruxelles and MobilityDB * contributors * * MobilityDB includes portions of PostGIS version 3 source code released * under the GNU General Public License (GPLv2 or later). - * Copyright (c) 2001-2024, PostGIS contributors + * Copyright (c) 2001-2025, PostGIS contributors * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without a written @@ -108,10 +108,17 @@ typedef enum T_NSEGMENT = 50, /**< network segment type */ T_TNPOINT = 51, /**< temporal network point type */ T_POSE = 54, /**< pose type */ - T_TPOSE = 55, /**< temporal pose type */ -} meosType; - -#define NO_MEOS_TYPES 56 + T_POSESET = 55, /**< pose set type */ + T_TPOSE = 56, /**< temporal pose type */ + T_CBUFFER = 57, /**< buffer type */ + T_CBUFFERSET = 58, /**< buffer set type */ + T_TCBUFFER = 59, /**< temporal buffer type */ + T_TGEOMETRY = 60, /**< temporal geometry type */ + T_TGEOGRAPHY = 61, /**< temporal geography type */ + T_TRGEOMETRY = 62, /**< temporal rigid geometry type */ + NUM_MEOS_TYPES /* Dummy value that determines the size of the + * lookup array MeosType -> Oid */ +} MeosType; /** * Enumeration that defines the classes of Boolean operators used in @@ -169,8 +176,8 @@ typedef enum */ typedef struct { - meosType temptype; /**< Enum value of the temporal type */ - meosType basetype; /**< Enum value of the base type */ + MeosType temptype; /**< Enum value of the temporal type */ + MeosType basetype; /**< Enum value of the base type */ } temptype_catalog_struct; /** @@ -178,8 +185,8 @@ typedef struct */ typedef struct { - meosType settype; /**< Enum value of the set type */ - meosType basetype; /**< Enum value of the base type */ + MeosType settype; /**< Enum value of the set type */ + MeosType basetype; /**< Enum value of the base type */ } settype_catalog_struct; /** @@ -187,8 +194,8 @@ typedef struct */ typedef struct { - meosType spantype; /**< Enum value of the span type */ - meosType basetype; /**< Enum value of the base type */ + MeosType spantype; /**< Enum value of the span type */ + MeosType basetype; /**< Enum value of the base type */ } spantype_catalog_struct; /** @@ -196,14 +203,16 @@ typedef struct */ typedef struct { - meosType spansettype; /**< Enum value of the span type */ - meosType spantype; /**< Enum value of the base type */ + MeosType spansettype; /**< Enum value of the span type */ + MeosType spantype; /**< Enum value of the base type */ } spansettype_catalog_struct; /*****************************************************************************/ +#ifndef NDEBUG extern bool temptype_subtype(tempSubtype subtype); extern bool temptype_subtype_all(tempSubtype subtype); +#endif extern const char *tempsubtype_name(tempSubtype subtype); extern bool tempsubtype_from_string(const char *str, int16 *subtype); extern const char *meosoper_name(meosOper oper); @@ -213,77 +222,88 @@ extern interpType interptype_from_string(const char *interp_str); /* Type conversion functions */ -extern const char *meostype_name(meosType type); -extern meosType temptype_basetype(meosType type); -extern meosType settype_basetype(meosType type); -extern meosType spantype_basetype(meosType type); -extern meosType spantype_spansettype(meosType type); -extern meosType spansettype_spantype(meosType type); -extern meosType basetype_spantype(meosType type); -extern meosType basetype_settype(meosType type); +extern const char *meostype_name(MeosType type); +extern MeosType temptype_basetype(MeosType type); +extern MeosType settype_basetype(MeosType type); +extern MeosType spantype_basetype(MeosType type); +extern MeosType spantype_spansettype(MeosType type); +extern MeosType spansettype_spantype(MeosType type); +extern MeosType basetype_spantype(MeosType type); +extern MeosType basetype_settype(MeosType type); /* Catalog functions */ -extern bool meos_basetype(meosType type); -extern bool alpha_basetype(meosType type); -extern bool tnumber_basetype(meosType type); -extern bool alphanum_basetype(meosType type); -extern bool geo_basetype(meosType type); -extern bool spatial_basetype(meosType type); +extern bool tnumber_basetype(MeosType type); +extern bool geo_basetype(MeosType type); +#ifndef NDEBUG +extern bool meos_basetype(MeosType type); +extern bool alphanum_basetype(MeosType type); +extern bool alphanum_temptype(MeosType type); +#endif -extern bool time_type(meosType type); -extern bool set_basetype(meosType type); +extern bool time_type(MeosType type); +#ifndef NDEBUG +extern bool set_basetype(MeosType type); +#endif -extern bool set_type(meosType type); -extern bool numset_type(meosType type); -extern bool ensure_numset_type(meosType type); -extern bool timeset_type(meosType type); -extern bool ensure_timeset_type(meosType type); -extern bool set_spantype(meosType type); -extern bool ensure_set_spantype(meosType type); -extern bool alphanumset_type(meosType settype); -extern bool geoset_type(meosType type); -extern bool ensure_geoset_type(meosType type); -extern bool spatialset_type(meosType type); -extern bool ensure_spatialset_type(meosType type); +extern bool set_type(MeosType type); +extern bool numset_type(MeosType type); +extern bool ensure_numset_type(MeosType type); +extern bool timeset_type(MeosType type); +extern bool set_spantype(MeosType type); +extern bool ensure_set_spantype(MeosType type); +extern bool alphanumset_type(MeosType settype); +extern bool geoset_type(MeosType type); +extern bool ensure_geoset_type(MeosType type); +extern bool spatialset_type(MeosType type); +extern bool ensure_spatialset_type(MeosType type); -extern bool span_basetype(meosType type); -extern bool span_canon_basetype(meosType type); -extern bool span_type(meosType type); -extern bool span_bbox_type(meosType type); -extern bool numspan_basetype(meosType type); -extern bool numspan_type(meosType type); -extern bool ensure_numspan_type(meosType type); -extern bool timespan_basetype(meosType type); -extern bool timespan_type(meosType type); -extern bool ensure_timespan_type(meosType type); +extern bool span_basetype(MeosType type); +extern bool span_canon_basetype(MeosType type); +extern bool span_type(MeosType type); +extern bool type_span_bbox(MeosType type); +extern bool span_tbox_type(MeosType type); +extern bool ensure_span_tbox_type(MeosType type); +extern bool numspan_basetype(MeosType type); +extern bool numspan_type(MeosType type); +extern bool ensure_numspan_type(MeosType type); +extern bool timespan_basetype(MeosType type); +extern bool timespan_type(MeosType type); -extern bool spanset_type(meosType type); -extern bool numspanset_type(meosType type); -extern bool timespanset_type(meosType type); -extern bool ensure_timespanset_type(meosType type); +extern bool spanset_type(MeosType type); +extern bool timespanset_type(MeosType type); +extern bool ensure_timespanset_type(MeosType type); -extern bool temporal_type(meosType type); -extern bool temporal_basetype(meosType type); -extern bool temptype_continuous(meosType type); -extern bool basetype_byvalue(meosType type); -extern bool basetype_varlength(meosType type); -extern int16 basetype_length(meosType type); -extern bool talphanum_type(meosType type); -extern bool talpha_type(meosType type); -extern bool tnumber_type(meosType type); -extern bool ensure_tnumber_type(meosType type); -extern bool tnumber_basetype(meosType type); -extern bool ensure_tnumber_basetype(meosType type); -extern bool tnumber_settype(meosType type); -extern bool tnumber_spantype(meosType type); -extern bool tnumber_spansettype(meosType type); -extern bool tspatial_type(meosType type); -extern bool ensure_tspatial_type(meosType type); -extern bool tspatial_basetype(meosType type); -extern bool tgeo_type(meosType type); -extern bool ensure_tgeo_type(meosType type); -extern bool ensure_tnumber_tgeo_type(meosType type); +extern bool temporal_type(MeosType type); +#ifndef NDEBUG +extern bool temporal_basetype(MeosType type); +#endif +extern bool temptype_continuous(MeosType type); +extern bool basetype_byvalue(MeosType type); +extern bool basetype_varlength(MeosType type); +extern int16 meostype_length(MeosType type); +#ifndef NDEBUG +extern bool talphanum_type(MeosType type); +#endif +extern bool talpha_type(MeosType type); +extern bool tnumber_type(MeosType type); +extern bool ensure_tnumber_type(MeosType type); +extern bool ensure_tnumber_basetype(MeosType type); +extern bool tnumber_spantype(MeosType type); +extern bool spatial_basetype(MeosType type); +extern bool tspatial_type(MeosType type); +extern bool ensure_tspatial_type(MeosType type); +extern bool tpoint_type(MeosType type); +extern bool ensure_tpoint_type(MeosType type); +extern bool tgeo_type(MeosType type); +extern bool ensure_tgeo_type(MeosType type); +extern bool tgeo_type_all(MeosType type); +extern bool ensure_tgeo_type_all(MeosType type); +extern bool tgeometry_type(MeosType type); +extern bool ensure_tgeometry_type(MeosType type); +extern bool tgeodetic_type(MeosType type); +extern bool ensure_tgeodetic_type(MeosType type); +extern bool ensure_tnumber_tpoint_type(MeosType type); /*****************************************************************************/ diff --git a/meos_geo.h b/meos_geo.h new file mode 100644 index 0000000..bfba4c0 --- /dev/null +++ b/meos_geo.h @@ -0,0 +1,1316 @@ +/***************************************************************************** + * + * This MobilityDB code is provided under The PostgreSQL License. + * Copyright (c) 2016-2025, Université libre de Bruxelles and MobilityDB + * contributors + * + * MobilityDB includes portions of PostGIS version 3 source code released + * under the GNU General Public License (GPLv2 or later). + * Copyright (c) 2001-2025, PostGIS contributors + * + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose, without fee, and without a written + * agreement is hereby granted, provided that the above copyright notice and + * this paragraph and the following two paragraphs appear in all copies. + * + * IN NO EVENT SHALL UNIVERSITE LIBRE DE BRUXELLES BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING + * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, + * EVEN IF UNIVERSITE LIBRE DE BRUXELLES HAS BEEN ADVISED OF THE POSSIBILITY + * OF SUCH DAMAGE. + * + * UNIVERSITE LIBRE DE BRUXELLES SPECIFICALLY DISCLAIMS ANY WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON + * AN "AS IS" BASIS, AND UNIVERSITE LIBRE DE BRUXELLES HAS NO OBLIGATIONS TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. + * + *****************************************************************************/ + +/** + * @brief API of the Mobility Engine Open Source (MEOS) library. + */ + +#ifndef __MEOS_GEO_H__ +#define __MEOS_GEO_H__ + +/* C */ +#include +#include + +/* PostGIS */ +#ifndef _LIBLWGEOM_H +#define _LIBLWGEOM_H + +/******************************************************************/ + +/** +* Macros for manipulating the 'flags' byte. A uint8_t used as follows: +* VVSRGBMZ +* Version bit, followed by +* Validty, Solid, ReadOnly, Geodetic, HasBBox, HasM and HasZ flags. +*/ +#define LWFLAG_Z 0x01 +#define LWFLAG_M 0x02 +#define LWFLAG_BBOX 0x04 +#define LWFLAG_GEODETIC 0x08 +#define LWFLAG_READONLY 0x10 +#define LWFLAG_SOLID 0x20 + +#define FLAGS_GET_Z(flags) ((flags) & LWFLAG_Z) +#define FLAGS_GET_M(flags) (((flags) & LWFLAG_M)>>1) +#define FLAGS_GET_BBOX(flags) (((flags) & LWFLAG_BBOX)>>2) +#define FLAGS_GET_GEODETIC(flags) (((flags) & LWFLAG_GEODETIC)>>3) +#define FLAGS_GET_READONLY(flags) (((flags) & LWFLAG_READONLY)>>4) +#define FLAGS_GET_SOLID(flags) (((flags) & LWFLAG_SOLID)>>5) + +#define FLAGS_SET_Z(flags, value) ((flags) = (value) ? ((flags) | LWFLAG_Z) : ((flags) & ~LWFLAG_Z)) +#define FLAGS_SET_M(flags, value) ((flags) = (value) ? ((flags) | LWFLAG_M) : ((flags) & ~LWFLAG_M)) +#define FLAGS_SET_BBOX(flags, value) ((flags) = (value) ? ((flags) | LWFLAG_BBOX) : ((flags) & ~LWFLAG_BBOX)) +#define FLAGS_SET_GEODETIC(flags, value) ((flags) = (value) ? ((flags) | LWFLAG_GEODETIC) : ((flags) & ~LWFLAG_GEODETIC)) +#define FLAGS_SET_READONLY(flags, value) ((flags) = (value) ? ((flags) | LWFLAG_READONLY) : ((flags) & ~LWFLAG_READONLY)) +#define FLAGS_SET_SOLID(flags, value) ((flags) = (value) ? ((flags) | LWFLAG_SOLID) : ((flags) & ~LWFLAG_SOLID)) + +#define FLAGS_NDIMS(flags) (2 + FLAGS_GET_Z(flags) + FLAGS_GET_M(flags)) +#define FLAGS_GET_ZM(flags) (FLAGS_GET_M(flags) + FLAGS_GET_Z(flags) * 2) +#define FLAGS_NDIMS_BOX(flags) (FLAGS_GET_GEODETIC(flags) ? 3 : FLAGS_NDIMS(flags)) + +/* +** Variants available for WKB and WKT output types +*/ + +#define WKB_ISO 0x01 +#define WKB_SFSQL 0x02 +#define WKB_EXTENDED 0x04 +#define WKB_NDR 0x08 +#define WKB_XDR 0x10 +#define WKB_HEX 0x20 +#define WKB_NO_NPOINTS 0x40 /* Internal use only */ +#define WKB_NO_SRID 0x80 /* Internal use only */ + +#define WKT_ISO 0x01 +#define WKT_SFSQL 0x02 +#define WKT_EXTENDED 0x04 + +typedef uint16_t lwflags_t; + +/******************************************************************/ + +typedef struct { + double afac, bfac, cfac, dfac, efac, ffac, gfac, hfac, ifac, xoff, yoff, zoff; +} AFFINE; + +/******************************************************************/ + +typedef struct +{ + double xmin, ymin, zmin; + double xmax, ymax, zmax; + int32_t srid; +} +BOX3D; + +/****************************************************************** +* GBOX structure. +* We include the flags (information about dimensionality), +* so we don't have to constantly pass them +* into functions that use the GBOX. +*/ +typedef struct +{ + lwflags_t flags; + double xmin; + double xmax; + double ymin; + double ymax; + double zmin; + double zmax; + double mmin; + double mmax; +} GBOX; + + +/****************************************************************** +* SPHEROID +* +* Standard definition of an ellipsoid (what wkt calls a spheroid) +* f = (a-b)/a +* e_sq = (a*a - b*b)/(a*a) +* b = a - fa +*/ +typedef struct +{ + double a; /* semimajor axis */ + double b; /* semiminor axis b = (a - fa) */ + double f; /* flattening f = (a-b)/a */ + double e; /* eccentricity (first) */ + double e_sq; /* eccentricity squared (first) e_sq = (a*a-b*b)/(a*a) */ + double radius; /* spherical average radius = (2*a+b)/3 */ + char name[20]; /* name of ellipse */ +} +SPHEROID; + +/****************************************************************** +* POINT2D, POINT3D, POINT3DM, POINT4D +*/ +typedef struct +{ + double x, y; +} +POINT2D; + +typedef struct +{ + double x, y, z; +} +POINT3DZ; + +typedef struct +{ + double x, y, z; +} +POINT3D; + +typedef struct +{ + double x, y, m; +} +POINT3DM; + +typedef struct +{ + double x, y, z, m; +} +POINT4D; + +/****************************************************************** +* POINTARRAY +* Point array abstracts a lot of the complexity of points and point lists. +* It handles 2d/3d translation +* (2d points converted to 3d will have z=0 or NaN) +* DO NOT MIX 2D and 3D POINTS! EVERYTHING* is either one or the other +*/ +typedef struct +{ + uint32_t npoints; /* how many points we are currently storing */ + uint32_t maxpoints; /* how many points we have space for in serialized_pointlist */ + + /* Use FLAGS_* macros to handle */ + lwflags_t flags; + + /* Array of POINT 2D, 3D or 4D, possibly misaligned. */ + uint8_t *serialized_pointlist; +} +POINTARRAY; + +/****************************************************************** +* GSERIALIZED +*/ + +typedef struct +{ + uint32_t size; /* For PgSQL use only, use VAR* macros to manipulate. */ + uint8_t srid[3]; /* 24 bits of SRID */ + uint8_t gflags; /* HasZ, HasM, HasBBox, IsGeodetic */ + uint8_t data[1]; /* See gserialized.txt */ +} GSERIALIZED; + +/****************************************************************** +* LWGEOM (any geometry type) +* +* Abstract type, note that 'type', 'bbox' and 'srid' are available in +* all geometry variants. +*/ +typedef struct +{ + GBOX *bbox; + void *data; + int32_t srid; + lwflags_t flags; + uint8_t type; + char pad[1]; /* Padding to 24 bytes (unused) */ +} +LWGEOM; + +/* POINTYPE */ +typedef struct +{ + GBOX *bbox; + POINTARRAY *point; /* hide 2d/3d (this will be an array of 1 point) */ + int32_t srid; + lwflags_t flags; + uint8_t type; /* POINTTYPE */ + char pad[1]; /* Padding to 24 bytes (unused) */ +} +LWPOINT; /* "light-weight point" */ + +/* LINETYPE */ +typedef struct +{ + GBOX *bbox; + POINTARRAY *points; /* array of POINT3D */ + int32_t srid; + lwflags_t flags; + uint8_t type; /* LINETYPE */ + char pad[1]; /* Padding to 24 bytes (unused) */ +} +LWLINE; /* "light-weight line" */ + +/* TRIANGLE */ +typedef struct +{ + GBOX *bbox; + POINTARRAY *points; + int32_t srid; + lwflags_t flags; + uint8_t type; + char pad[1]; /* Padding to 24 bytes (unused) */ +} +LWTRIANGLE; + +/* CIRCSTRINGTYPE */ +typedef struct +{ + GBOX *bbox; + POINTARRAY *points; /* array of POINT(3D/3DM) */ + int32_t srid; + lwflags_t flags; + uint8_t type; /* CIRCSTRINGTYPE */ + char pad[1]; /* Padding to 24 bytes (unused) */ +} +LWCIRCSTRING; /* "light-weight circularstring" */ + +/* POLYGONTYPE */ +typedef struct +{ + GBOX *bbox; + POINTARRAY **rings; /* list of rings (list of points) */ + int32_t srid; + lwflags_t flags; + uint8_t type; /* POLYGONTYPE */ + char pad[1]; /* Padding to 24 bytes (unused) */ + uint32_t nrings; /* how many rings we are currently storing */ + uint32_t maxrings; /* how many rings we have space for in **rings */ +} +LWPOLY; /* "light-weight polygon" */ + +/* MULTIPOINTTYPE */ +typedef struct +{ + GBOX *bbox; + LWPOINT **geoms; + int32_t srid; + lwflags_t flags; + uint8_t type; /* MULTYPOINTTYPE */ + char pad[1]; /* Padding to 24 bytes (unused) */ + uint32_t ngeoms; /* how many geometries we are currently storing */ + uint32_t maxgeoms; /* how many geometries we have space for in **geoms */ +} +LWMPOINT; + +/* MULTILINETYPE */ +typedef struct +{ + GBOX *bbox; + LWLINE **geoms; + int32_t srid; + lwflags_t flags; + uint8_t type; /* MULTILINETYPE */ + char pad[1]; /* Padding to 24 bytes (unused) */ + uint32_t ngeoms; /* how many geometries we are currently storing */ + uint32_t maxgeoms; /* how many geometries we have space for in **geoms */ +} +LWMLINE; + +/* MULTIPOLYGONTYPE */ +typedef struct +{ + GBOX *bbox; + LWPOLY **geoms; + int32_t srid; + lwflags_t flags; + uint8_t type; /* MULTIPOLYGONTYPE */ + char pad[1]; /* Padding to 24 bytes (unused) */ + uint32_t ngeoms; /* how many geometries we are currently storing */ + uint32_t maxgeoms; /* how many geometries we have space for in **geoms */ +} +LWMPOLY; + +/* COLLECTIONTYPE */ +typedef struct +{ + GBOX *bbox; + LWGEOM **geoms; + int32_t srid; + lwflags_t flags; + uint8_t type; /* COLLECTIONTYPE */ + char pad[1]; /* Padding to 24 bytes (unused) */ + uint32_t ngeoms; /* how many geometries we are currently storing */ + uint32_t maxgeoms; /* how many geometries we have space for in **geoms */ +} +LWCOLLECTION; + +/* COMPOUNDTYPE */ +typedef struct +{ + GBOX *bbox; + LWGEOM **geoms; + int32_t srid; + lwflags_t flags; + uint8_t type; /* COLLECTIONTYPE */ + char pad[1]; /* Padding to 24 bytes (unused) */ + uint32_t ngeoms; /* how many geometries we are currently storing */ + uint32_t maxgeoms; /* how many geometries we have space for in **geoms */ +} +LWCOMPOUND; /* "light-weight compound line" */ + +/* CURVEPOLYTYPE */ +typedef struct +{ + GBOX *bbox; + LWGEOM **rings; + int32_t srid; + lwflags_t flags; + uint8_t type; /* CURVEPOLYTYPE */ + char pad[1]; /* Padding to 24 bytes (unused) */ + uint32_t nrings; /* how many rings we are currently storing */ + uint32_t maxrings; /* how many rings we have space for in **rings */ +} +LWCURVEPOLY; /* "light-weight polygon" */ + +/* MULTICURVE */ +typedef struct +{ + GBOX *bbox; + LWGEOM **geoms; + int32_t srid; + lwflags_t flags; + uint8_t type; /* MULTICURVE */ + char pad[1]; /* Padding to 24 bytes (unused) */ + uint32_t ngeoms; /* how many geometries we are currently storing */ + uint32_t maxgeoms; /* how many geometries we have space for in **geoms */ +} +LWMCURVE; + +/* MULTISURFACETYPE */ +typedef struct +{ + GBOX *bbox; + LWGEOM **geoms; + int32_t srid; + lwflags_t flags; + uint8_t type; /* MULTISURFACETYPE */ + char pad[1]; /* Padding to 24 bytes (unused) */ + uint32_t ngeoms; /* how many geometries we are currently storing */ + uint32_t maxgeoms; /* how many geometries we have space for in **geoms */ +} +LWMSURFACE; + +/* POLYHEDRALSURFACETYPE */ +typedef struct +{ + GBOX *bbox; + LWPOLY **geoms; + int32_t srid; + lwflags_t flags; + uint8_t type; /* POLYHEDRALSURFACETYPE */ + char pad[1]; /* Padding to 24 bytes (unused) */ + uint32_t ngeoms; /* how many geometries we are currently storing */ + uint32_t maxgeoms; /* how many geometries we have space for in **geoms */ +} +LWPSURFACE; + +/* TINTYPE */ +typedef struct +{ + GBOX *bbox; + LWTRIANGLE **geoms; + int32_t srid; + lwflags_t flags; + uint8_t type; /* TINTYPE */ + char pad[1]; /* Padding to 24 bytes (unused) */ + uint32_t ngeoms; /* how many geometries we are currently storing */ + uint32_t maxgeoms; /* how many geometries we have space for in **geoms */ +} +LWTIN; + +/* Functions */ + +extern int32 geo_get_srid(const GSERIALIZED *g); + +/* PROJ */ + +struct PJconsts; +typedef struct PJconsts PJ; + +typedef struct LWPROJ +{ + PJ* pj; + + /* for pipeline transforms, whether to do a forward or inverse */ + bool pipeline_is_forward; + + /* Source crs is geographic: Used in geography calls (source srid == dst srid) */ + uint8_t source_is_latlong; + /* Source ellipsoid parameters */ + double source_semi_major_metre; + double source_semi_minor_metre; +} LWPROJ; + + +#endif /* _LIBLWGEOM_H */ + +/* MEOS */ +#include + +/***************************************************************************** + * Type definitions + *****************************************************************************/ + +/** + * @brief Enumeration that defines the spatial relationships for which a call + * to GEOS is made. + */ +typedef enum +{ + INTERSECTS = 0, + CONTAINS = 1, + TOUCHES = 2, + COVERS = 3, +} spatialRel; + +/***************************************************************************** + * Validity macros + *****************************************************************************/ + +/** + * @brief Macro ensuring that a set is a geometry set + */ +#if MEOS + #define VALIDATE_GEOMSET(set, ret) \ + do { \ + if (! ensure_not_null((void *) (set)) || \ + ! ensure_set_isof_type(set, T_GEOMSET) ) \ + return (ret); \ + } while (0) +#else + #define VALIDATE_GEOMSET(set, ret) \ + do { \ + assert(temp); \ + assert((set)->settype == T_GEOMSET); \ + } while (0) +#endif /* MEOS */ + +/** + * @brief Macro ensuring that a set is a geography set + */ +#if MEOS + #define VALIDATE_GEOGSET(set, ret) ( \ + do { \ + if (! ensure_not_null((void *) (set)) || \ + ! ensure_set_isof_type(set, T_GEOGSET) ) \ + return (ret); \ + } while (0) +#else + #define VALIDATE_GEOGSET(set, ret) \ + do { \ + assert(temp); \ + assert((set)->settype == T_GEOGSET); \ + } while (0) +#endif /* MEOS */ + +/** + * @brief Macro ensuring that a set is of a geometry or geography set + */ +#if MEOS + #define VALIDATE_GEOSET(set, ret) \ + do { \ + if (! ensure_not_null((void *) (set)) || \ + ! ensure_geoset_type((set)->settype) ) \ + return (ret); \ + } while (0) +#else + #define VALIDATE_GEOSET(set, ret) \ + do { \ + assert(temp); \ + assert(geoset_type((set)->settype); \ + } while (0) +#endif /* MEOS */ + +/** + * @brief Macro ensuring that a set is of a spatial set + */ +#if MEOS + #define VALIDATE_SPATIALSET(set, ret) \ + do { \ + if (! ensure_not_null((void *) (set)) || \ + ! ensure_spatialset_type((set)->settype) ) \ + return (ret); \ + } while (0) +#else + #define VALIDATE_SPATIALSET(set, ret) \ + do { \ + assert(set); \ + assert(spatialset_type((set)->settype)); \ + } while (0) +#endif /* MEOS */ + +/*****************************************************************************/ + +/** + * @brief Macro ensuring that a temporal value is a temporal geometry + * @note The macro works for the Temporal type and its subtypes TInstant, + * TSequence, and TSequenceSet + */ +#if MEOS + #define VALIDATE_TGEOMETRY(temp, ret) \ + do { \ + if (! ensure_not_null((void *) (temp)) || \ + ! ensure_temporal_isof_type((Temporal *) (temp), T_TGEOMETRY) ) \ + return (ret); \ + } while (0) +#else + #define VALIDATE_TGEOMETRY(temp, ret) \ + do { \ + assert(temp); \ + assert((temp)->temptype == T_TGEOMETRY); \ + } while (0) +#endif /* MEOS */ + +/** + * @brief Macro ensuring that a temporal value is a temporal geography + * @note The macro works for the Temporal type and its subtypes TInstant, + * TSequence, and TSequenceSet + */ +#if MEOS + #define VALIDATE_TGEOGRAPHY(temp, ret) \ + do { \ + if (! ensure_not_null((void *) (temp)) || \ + ! ensure_temporal_isof_type((Temporal *) (temp), T_TGEOGRAPHY) ) \ + return (ret); \ + } while (0) +#else + #define VALIDATE_TGEOGRAPHY(temp, ret) \ + do { \ + assert(temp); \ + assert((temp)->temptype == T_TGEOGRAPHY); \ + } while (0) +#endif /* MEOS */ + +/** + * @brief Macro ensuring that a temporal value is a temporal geometry point + * @note The macro works for the Temporal type and its subtypes TInstant, + * TSequence, and TSequenceSet + */ +#if MEOS + #define VALIDATE_TGEOMPOINT(temp, ret) \ + do { \ + if (! ensure_not_null((void *) (temp)) || \ + ! ensure_temporal_isof_type((Temporal *) (temp), T_TGEOMPOINT) ) \ + return (ret); \ + } while (0) +#else + #define VALIDATE_TGEOMPOINT(temp, ret) \ + do { \ + assert(temp); \ + assert((temp)->temptype == T_TGEOMPOINT); \ + } while (0) +#endif /* MEOS */ + +/** + * @brief Macro ensuring that a temporal value is a temporal geography point + * @note The macro works for the Temporal type and its subtypes TInstant, + * TSequence, and TSequenceSet + */ +#if MEOS + #define VALIDATE_TGEOGPOINT(temp, ret) \ + do { \ + if (! ensure_not_null((void *) (temp)) || \ + ! ensure_temporal_isof_type((Temporal *) (temp), T_TGEOGPOINT) ) \ + return (ret); \ + } while (0) +#else + #define VALIDATE_TGEOGPOINT(temp, ret) \ + do { \ + assert(temp); \ + assert((temp)->temptype == T_TGEOGPOINT); \ + } while (0) +#endif /* MEOS */ + +/** + * @brief Macro ensuring that a temporal value is a temporal geometry or + * geography + * @note The macro works for the Temporal type and its subtypes TInstant, + * TSequence, and TSequenceSet + */ +#if MEOS + #define VALIDATE_TGEO(temp, ret) \ + do { \ + if (! ensure_not_null((void *) (temp)) || \ + ! ensure_tgeo_type_all(((Temporal *) (temp))->temptype) ) \ + return (ret); \ + } while (0) +#else + #define VALIDATE_TGEO(temp, ret) \ + do { \ + assert(temp); \ + assert(tgeo_type_all(((Temporal *) (temp))->temptype)); \ + } while (0) +#endif /* MEOS */ + +/** + * @brief Macro ensuring that a temporal value is a temporal geometry + * @note The macro works for the Temporal type and its subtypes TInstant, + * TSequence, and TSequenceSet + */ +#if MEOS + #define VALIDATE_TGEOM(temp, ret) \ + do { \ + if (! ensure_not_null((void *) (temp)) || \ + ! ensure_tgeometry_type(((Temporal *) (temp))->temptype) ) \ + return (ret); \ + } while (0) +#else + #define VALIDATE_TGEOM(temp, ret) \ + do { \ + assert(temp); \ + assert(tgeometry_type(((Temporal *) (temp))->temptype)); \ + } while (0) +#endif /* MEOS */ + +/** + * @brief Macro ensuring that a temporal value is of a temporal geography + * @note The macro works for the Temporal type and its subtypes TInstant, + * TSequence, and TSequenceSet + */ +#if MEOS + #define VALIDATE_TGEOG(temp, ret) \ + do { \ + if (! ensure_not_null((void *) (temp)) || \ + ! ensure_tgeodetic_type(((Temporal *) (temp))->temptype) ) \ + return (ret); \ + } while (0) +#else + #define VALIDATE_TGEOG(temp, ret) \ + do { \ + assert(temp); \ + assert(tgeodetic_type(((Temporal *) (temp))->temptype)); \ + } while (0) +#endif /* MEOS */ + +/** + * @brief Macro ensuring that a temporal value is of a temporal + * geometry/geography point + * @note The macro works for the Temporal type and its subtypes TInstant, + * TSequence, and TSequenceSet + */ +#if MEOS + #define VALIDATE_TPOINT(temp, ret) \ + do { \ + if (! ensure_not_null((void *) (temp)) || \ + ! ensure_tpoint_type(((Temporal *) (temp))->temptype) ) \ + return (ret); \ + } while (0) +#else + #define VALIDATE_TPOINT(temp, ret) \ + do { \ + assert(temp); \ + assert(tpoint_type(((Temporal *) (temp))->temptype)); \ + } while (0) +#endif /* MEOS */ + +/** + * @brief Macro ensuring that a temporal value is of a spatiotemporal type + * @note The macro works for the Temporal type and its subtypes TInstant, + * TSequence, and TSequenceSet + */ +#if MEOS + #define VALIDATE_TSPATIAL(temp, ret) \ + do { \ + if (! ensure_not_null((void *) (temp)) || \ + ! ensure_tspatial_type(((Temporal *) (temp))->temptype) ) \ + return (ret); \ + } while (0) +#else + #define VALIDATE_TSPATIAL(temp, ret) \ + do { \ + assert(temp); \ + assert(tspatial_type(((Temporal *) (temp))->temptype)); \ + } while (0) +#endif /* MEOS */ + +/*===========================================================================* + * Functions for static geometries + *===========================================================================*/ + +/* Input and output functions */ + +extern uint8_t *geo_as_ewkb(const GSERIALIZED *gs, const char *endian, size_t *size); +extern char *geo_as_ewkt(const GSERIALIZED *gs, int precision); +extern char *geo_as_geojson(const GSERIALIZED *gs, int option, int precision, const char *srs); +extern char *geo_as_hexewkb(const GSERIALIZED *gs, const char *endian); +extern char *geo_as_text(const GSERIALIZED *gs, int precision); +extern GSERIALIZED *geo_from_ewkb(const uint8_t *wkb, size_t wkb_size, int32 srid); +extern GSERIALIZED *geo_from_geojson(const char *geojson); +extern GSERIALIZED *geo_from_text(const char *wkt, int32_t srid); +extern char *geo_out(const GSERIALIZED *gs); +extern GSERIALIZED *geog_from_binary(const char *wkb_bytea); +extern GSERIALIZED *geog_from_hexewkb(const char *wkt); +extern GSERIALIZED *geog_in(const char *str, int32 typmod); +extern GSERIALIZED *geom_from_hexewkb(const char *wkt); +extern GSERIALIZED *geom_in(const char *str, int32 typmod); + +extern BOX3D *box3d_make(double xmin, double xmax, double ymin, double ymax, + double zmin, double zmax, int32_t srid); +extern char *box3d_out(const BOX3D *box, int maxdd); +extern GBOX *gbox_make(bool hasz, double xmin, double xmax, double ymin, + double ymax, double zmin, double zmax); +extern char *gbox_out(const GBOX *box, int maxdd); + +/* Constructor functions */ + +extern GSERIALIZED *geo_copy(const GSERIALIZED *g); +extern GSERIALIZED *geogpoint_make2d(int32_t srid, double x, double y); +extern GSERIALIZED *geogpoint_make3dz(int32_t srid, double x, double y, double z); +extern GSERIALIZED *geompoint_make2d(int32_t srid, double x, double y); +extern GSERIALIZED *geompoint_make3dz(int32_t srid, double x, double y, double z); + +/* Conversion functions */ + +extern GSERIALIZED *geom_to_geog(const GSERIALIZED *geom); +extern GSERIALIZED *geog_to_geom(const GSERIALIZED *geog); + +/* Accessor functions */ + +extern bool geo_is_empty(const GSERIALIZED *g); +extern bool geo_is_unitary(const GSERIALIZED *gs); +extern const char *geo_typename(int type); +extern double geog_area(const GSERIALIZED *g, bool use_spheroid); +extern GSERIALIZED *geog_centroid(const GSERIALIZED *g, bool use_spheroid); +extern double geog_length(const GSERIALIZED *g, bool use_spheroid); +extern double geog_perimeter(const GSERIALIZED *g, bool use_spheroid); +extern bool geom_azimuth(const GSERIALIZED *gs1, const GSERIALIZED *gs2, double *result); +extern double geom_length(const GSERIALIZED *gs); +extern double geom_perimeter(const GSERIALIZED *gs); +extern int line_numpoints(const GSERIALIZED *gs); +extern GSERIALIZED *line_point_n(const GSERIALIZED *geom, int n); + +/* Transformation functions */ + +extern GSERIALIZED *geo_reverse(const GSERIALIZED *gs); +extern GSERIALIZED *geo_round(const GSERIALIZED *gs, int maxdd); + +/* Spatial reference system functions */ + +extern GSERIALIZED *geo_set_srid(const GSERIALIZED *gs, int32_t srid); +extern int32_t geo_srid(const GSERIALIZED *gs); +extern GSERIALIZED *geo_transform(const GSERIALIZED *geom, int32_t srid_to); +extern GSERIALIZED *geo_transform_pipeline(const GSERIALIZED *gs, char *pipeline, int32_t srid_to, bool is_forward); + +/* Spatial processing functions */ + +extern GSERIALIZED *geo_collect_garray(GSERIALIZED **gsarr, int count); +extern GSERIALIZED *geo_makeline_garray(GSERIALIZED **gsarr, int count); +extern int geo_num_points(const GSERIALIZED *gs); +extern int geo_num_geos(const GSERIALIZED *gs); +extern GSERIALIZED *geo_geo_n(const GSERIALIZED *geom, int n); +extern GSERIALIZED **geo_pointarr(const GSERIALIZED *gs, int *count); +extern GSERIALIZED *geo_points(const GSERIALIZED *gs); +extern GSERIALIZED *geom_array_union(GSERIALIZED **gsarr, int count); +extern GSERIALIZED *geom_boundary(const GSERIALIZED *gs); +extern GSERIALIZED *geom_buffer(const GSERIALIZED *gs, double size, const char *params); +extern GSERIALIZED *geom_centroid(const GSERIALIZED *gs); +extern GSERIALIZED *geom_convex_hull(const GSERIALIZED *gs); +extern GSERIALIZED *geom_difference2d(const GSERIALIZED *gs1, const GSERIALIZED *gs2); +extern GSERIALIZED *geom_intersection2d(const GSERIALIZED *gs1, const GSERIALIZED *gs2); +extern GSERIALIZED *geom_intersection2d_coll(const GSERIALIZED *gs1, const GSERIALIZED *gs2); +extern GSERIALIZED *geom_min_bounding_radius(const GSERIALIZED *geom, double *radius); +extern GSERIALIZED *geom_shortestline2d(const GSERIALIZED *gs1, const GSERIALIZED *s2); +extern GSERIALIZED *geom_shortestline3d(const GSERIALIZED *gs1, const GSERIALIZED *s2); +extern GSERIALIZED *geom_unary_union(const GSERIALIZED *gs, double prec); +extern GSERIALIZED *line_interpolate_point(const GSERIALIZED *gs, double distance_fraction, bool repeat); +extern double line_locate_point(const GSERIALIZED *gs1, const GSERIALIZED *gs2); +extern GSERIALIZED *line_substring(const GSERIALIZED *gs, double from, double to); + +/* Spatial relationship functions */ + +extern bool geog_dwithin(const GSERIALIZED *g1, const GSERIALIZED *g2, double tolerance, bool use_spheroid); +extern bool geog_intersects(const GSERIALIZED *gs1, const GSERIALIZED *gs2, bool use_spheroid); +extern bool geom_contains(const GSERIALIZED *gs1, const GSERIALIZED *gs2); +extern bool geom_covers(const GSERIALIZED *gs1, const GSERIALIZED *gs2); +extern bool geom_disjoint2d(const GSERIALIZED *gs1, const GSERIALIZED *gs2); +extern bool geom_dwithin2d(const GSERIALIZED *gs1, const GSERIALIZED *gs2, double tolerance); +extern bool geom_dwithin3d(const GSERIALIZED *gs1, const GSERIALIZED *gs2, double tolerance); +extern bool geom_intersects2d(const GSERIALIZED *gs1, const GSERIALIZED *gs2); +extern bool geom_intersects3d(const GSERIALIZED *gs1, const GSERIALIZED *gs2); +extern bool geom_relate_pattern(const GSERIALIZED *gs1, const GSERIALIZED *gs2, char *patt); +extern bool geom_touches(const GSERIALIZED *gs1, const GSERIALIZED *gs2); + +/* Bounding box functions */ + +extern STBox *geo_stboxes(const GSERIALIZED *gs, int *count); +extern STBox *geo_split_each_n_stboxes(const GSERIALIZED *gs, int elem_count, int *count); +extern STBox *geo_split_n_stboxes(const GSERIALIZED *gs, int box_count, int *count); + +/* Distance functions */ + +extern double geog_distance(const GSERIALIZED *g1, const GSERIALIZED *g2); +extern double geom_distance2d(const GSERIALIZED *gs1, const GSERIALIZED *gs2); +extern double geom_distance3d(const GSERIALIZED *gs1, const GSERIALIZED *gs2); + +/* Comparison functions */ + +extern int geo_equals(const GSERIALIZED *gs1, const GSERIALIZED *gs2); +extern bool geo_same(const GSERIALIZED *gs1, const GSERIALIZED *gs2); + +/***************************************************************************** + * Functions for spatial sets + *****************************************************************************/ + +/* Input and output functions */ + +extern Set *geogset_in(const char *str); +extern Set *geomset_in(const char *str); +extern char *spatialset_as_text(const Set *set, int maxdd); +extern char *spatialset_as_ewkt(const Set *set, int maxdd); + +/* Constructor functions */ + +extern Set *geoset_make(GSERIALIZED **values, int count); + +/* Conversion functions */ + +extern Set *geo_to_set(const GSERIALIZED *gs); + +/* Accessor functions */ + +extern GSERIALIZED *geoset_end_value(const Set *s); +extern GSERIALIZED *geoset_start_value(const Set *s); +extern bool geoset_value_n(const Set *s, int n, GSERIALIZED **result); +extern GSERIALIZED **geoset_values(const Set *s); + +/* Set operations */ + +extern bool contained_geo_set(const GSERIALIZED *gs, const Set *s); +extern bool contains_set_geo(const Set *s, GSERIALIZED *gs); +extern Set *geo_union_transfn(Set *state, const GSERIALIZED *gs); +extern Set *intersection_geo_set(const GSERIALIZED *gs, const Set *s); +extern Set *intersection_set_geo(const Set *s, const GSERIALIZED *gs); +extern Set *minus_geo_set(const GSERIALIZED *gs, const Set *s); +extern Set *minus_set_geo(const Set *s, const GSERIALIZED *gs); +extern Set *union_geo_set(const GSERIALIZED *gs, const Set *s); +extern Set *union_set_geo(const Set *s, const GSERIALIZED *gs); + +/* SRID functions */ + +extern Set *spatialset_set_srid(const Set *s, int32_t srid); +extern int32_t spatialset_srid(const Set *s); +extern Set *spatialset_transform(const Set *s, int32_t srid); +extern Set *spatialset_transform_pipeline(const Set *s, const char *pipelinestr, int32_t srid, bool is_forward); + +/***************************************************************************** + * Functions for spatiotemporal boxes + *****************************************************************************/ + +/* Input/output functions */ + +extern char *stbox_as_hexwkb(const STBox *box, uint8_t variant, size_t *size); +extern uint8_t *stbox_as_wkb(const STBox *box, uint8_t variant, size_t *size_out); +extern STBox *stbox_from_hexwkb(const char *hexwkb); +extern STBox *stbox_from_wkb(const uint8_t *wkb, size_t size); +extern STBox *stbox_in(const char *str); +extern char *stbox_out(const STBox *box, int maxdd); + +/* Constructor functions */ + +extern STBox *geo_timestamptz_to_stbox(const GSERIALIZED *gs, TimestampTz t); +extern STBox *geo_tstzspan_to_stbox(const GSERIALIZED *gs, const Span *s); +extern STBox *stbox_copy(const STBox *box); +extern STBox *stbox_make(bool hasx, bool hasz, bool geodetic, int32 srid, double xmin, double xmax, double ymin, double ymax, double zmin, double zmax, const Span *s); + +/* Conversion functions */ + +extern STBox *geo_to_stbox(const GSERIALIZED *gs); +extern STBox *spatialset_to_stbox(const Set *s); +extern BOX3D *stbox_to_box3d(const STBox *box); +extern GBOX *stbox_to_gbox(const STBox *box); +extern GSERIALIZED *stbox_to_geo(const STBox *box); +extern Span *stbox_to_tstzspan(const STBox *box); +extern STBox *timestamptz_to_stbox(TimestampTz t); +extern STBox *tstzset_to_stbox(const Set *s); +extern STBox *tstzspan_to_stbox(const Span *s); +extern STBox *tstzspanset_to_stbox(const SpanSet *ss); + +/* Accessor functions */ + +extern double stbox_area(const STBox *box, bool spheroid); +extern uint32 stbox_hash(const STBox *box); +extern uint64 stbox_hash_extended(const STBox *box, uint64 seed); +extern bool stbox_hast(const STBox *box); +extern bool stbox_hasx(const STBox *box); +extern bool stbox_hasz(const STBox *box); +extern bool stbox_isgeodetic(const STBox *box); +extern double stbox_perimeter(const STBox *box, bool spheroid); +extern bool stbox_tmax(const STBox *box, TimestampTz *result); +extern bool stbox_tmax_inc(const STBox *box, bool *result); +extern bool stbox_tmin(const STBox *box, TimestampTz *result); +extern bool stbox_tmin_inc(const STBox *box, bool *result); +extern double stbox_volume(const STBox *box); +extern bool stbox_xmax(const STBox *box, double *result); +extern bool stbox_xmin(const STBox *box, double *result); +extern bool stbox_ymax(const STBox *box, double *result); +extern bool stbox_ymin(const STBox *box, double *result); +extern bool stbox_zmax(const STBox *box, double *result); +extern bool stbox_zmin(const STBox *box, double *result); + +/* Transformation functions */ + +extern STBox *stbox_expand_space(const STBox *box, double d); +extern STBox *stbox_expand_time(const STBox *box, const Interval *interv); +extern STBox *stbox_get_space(const STBox *box); +extern STBox *stbox_quad_split(const STBox *box, int *count); +extern STBox *stbox_round(const STBox *box, int maxdd); +extern STBox *stbox_shift_scale_time(const STBox *box, const Interval *shift, const Interval *duration); +extern STBox *stboxarr_round(const STBox *boxarr, int count, int maxdd); + +/* SRID functions */ + +extern STBox *stbox_set_srid(const STBox *box, int32_t srid); +extern int32_t stbox_srid(const STBox *box); +extern STBox *stbox_transform(const STBox *box, int32_t srid); +extern STBox *stbox_transform_pipeline(const STBox *box, const char *pipelinestr, int32_t srid, bool is_forward); + +/* Topological functions */ + +extern bool adjacent_stbox_stbox(const STBox *box1, const STBox *box2); +extern bool contained_stbox_stbox(const STBox *box1, const STBox *box2); +extern bool contains_stbox_stbox(const STBox *box1, const STBox *box2); +extern bool overlaps_stbox_stbox(const STBox *box1, const STBox *box2); +extern bool same_stbox_stbox(const STBox *box1, const STBox *box2); + +/* Position functions */ + +extern bool above_stbox_stbox(const STBox *box1, const STBox *box2); +extern bool after_stbox_stbox(const STBox *box1, const STBox *box2); +extern bool back_stbox_stbox(const STBox *box1, const STBox *box2); +extern bool before_stbox_stbox(const STBox *box1, const STBox *box2); +extern bool below_stbox_stbox(const STBox *box1, const STBox *box2); +extern bool front_stbox_stbox(const STBox *box1, const STBox *box2); +extern bool left_stbox_stbox(const STBox *box1, const STBox *box2); +extern bool overabove_stbox_stbox(const STBox *box1, const STBox *box2); +extern bool overafter_stbox_stbox(const STBox *box1, const STBox *box2); +extern bool overback_stbox_stbox(const STBox *box1, const STBox *box2); +extern bool overbefore_stbox_stbox(const STBox *box1, const STBox *box2); +extern bool overbelow_stbox_stbox(const STBox *box1, const STBox *box2); +extern bool overfront_stbox_stbox(const STBox *box1, const STBox *box2); +extern bool overleft_stbox_stbox(const STBox *box1, const STBox *box2); +extern bool overright_stbox_stbox(const STBox *box1, const STBox *box2); +extern bool right_stbox_stbox(const STBox *box1, const STBox *box2); + +/* Set functions */ + +extern STBox *union_stbox_stbox(const STBox *box1, const STBox *box2, bool strict); +extern STBox *intersection_stbox_stbox(const STBox *box1, const STBox *box2); + +/* Comparisons */ + +extern int stbox_cmp(const STBox *box1, const STBox *box2); +extern bool stbox_eq(const STBox *box1, const STBox *box2); +extern bool stbox_ge(const STBox *box1, const STBox *box2); +extern bool stbox_gt(const STBox *box1, const STBox *box2); +extern bool stbox_le(const STBox *box1, const STBox *box2); +extern bool stbox_lt(const STBox *box1, const STBox *box2); +extern bool stbox_ne(const STBox *box1, const STBox *box2); + +/***************************************************************************** + * Functions for temporal geometries/geographies + *****************************************************************************/ + +/* Input and output functions */ + +extern Temporal *tgeogpoint_from_mfjson(const char *str); +extern Temporal *tgeogpoint_in(const char *str); +extern Temporal *tgeography_from_mfjson(const char *mfjson); +extern Temporal *tgeography_in(const char *str); +extern Temporal *tgeometry_from_mfjson(const char *str); +extern Temporal *tgeometry_in(const char *str); +extern Temporal *tgeompoint_from_mfjson(const char *str); +extern Temporal *tgeompoint_in(const char *str); +extern char *tspatial_as_ewkt(const Temporal *temp, int maxdd); +extern char *tspatial_as_text(const Temporal *temp, int maxdd); +extern char *tspatial_out(const Temporal *temp, int maxdd); + +/* Constructor functions */ + +extern Temporal *tgeo_from_base_temp(const GSERIALIZED *gs, const Temporal *temp); +extern TInstant *tgeoinst_make(const GSERIALIZED *gs, TimestampTz t); +extern TSequence *tgeoseq_from_base_tstzset(const GSERIALIZED *gs, const Set *s); +extern TSequence *tgeoseq_from_base_tstzspan(const GSERIALIZED *gs, const Span *s, interpType interp); +extern TSequenceSet *tgeoseqset_from_base_tstzspanset(const GSERIALIZED *gs, const SpanSet *ss, interpType interp); +extern Temporal *tpoint_from_base_temp(const GSERIALIZED *gs, const Temporal *temp); +extern TInstant *tpointinst_make(const GSERIALIZED *gs, TimestampTz t); +extern TSequence *tpointseq_from_base_tstzset(const GSERIALIZED *gs, const Set *s); +extern TSequence *tpointseq_from_base_tstzspan(const GSERIALIZED *gs, const Span *s, interpType interp); +extern TSequence *tpointseq_make_coords(const double *xcoords, const double *ycoords, const double *zcoords, const TimestampTz *times, int count, int32 srid, bool geodetic, bool lower_inc, bool upper_inc, interpType interp, bool normalize); +extern TSequenceSet *tpointseqset_from_base_tstzspanset(const GSERIALIZED *gs, const SpanSet *ss, interpType interp); + +/* Conversion functions */ + +extern STBox *box3d_to_stbox(const BOX3D *box); +extern STBox *gbox_to_stbox(const GBOX *box); +extern Temporal *geomeas_to_tpoint(const GSERIALIZED *gs); +extern Temporal *tgeogpoint_to_tgeography(const Temporal *temp); +extern Temporal *tgeography_to_tgeogpoint(const Temporal *temp); +extern Temporal *tgeography_to_tgeometry(const Temporal *temp); +extern Temporal *tgeometry_to_tgeography(const Temporal *temp); +extern Temporal *tgeometry_to_tgeompoint(const Temporal *temp); +extern Temporal *tgeompoint_to_tgeometry(const Temporal *temp); +extern bool tpoint_as_mvtgeom(const Temporal *temp, const STBox *bounds, int32_t extent, int32_t buffer, bool clip_geom, GSERIALIZED **gsarr, int64 **timesarr, int *count); +extern bool tpoint_tfloat_to_geomeas(const Temporal *tpoint, const Temporal *measure, bool segmentize, GSERIALIZED **result); +extern STBox *tspatial_to_stbox(const Temporal *temp); + +/* Accessor functions */ + +extern bool bearing_point_point(const GSERIALIZED *gs1, const GSERIALIZED *gs2, double *result); +extern Temporal *bearing_tpoint_point(const Temporal *temp, const GSERIALIZED *gs, bool invert); +extern Temporal *bearing_tpoint_tpoint(const Temporal *temp1, const Temporal *temp2); +extern Temporal *tgeo_centroid(const Temporal *temp); +extern GSERIALIZED *tgeo_convex_hull(const Temporal *temp); +extern GSERIALIZED *tgeo_end_value(const Temporal *temp); +extern GSERIALIZED *tgeo_start_value(const Temporal *temp); +extern GSERIALIZED *tgeo_traversed_area(const Temporal *temp, bool unary_union); +extern bool tgeo_value_at_timestamptz(const Temporal *temp, TimestampTz t, bool strict, GSERIALIZED **value); +extern bool tgeo_value_n(const Temporal *temp, int n, GSERIALIZED **result); +extern GSERIALIZED **tgeo_values(const Temporal *temp, int *count); +extern Temporal *tpoint_angular_difference(const Temporal *temp); +extern Temporal *tpoint_azimuth(const Temporal *temp); +extern Temporal *tpoint_cumulative_length(const Temporal *temp); +extern bool tpoint_direction(const Temporal *temp, double *result); +extern Temporal *tpoint_get_x(const Temporal *temp); +extern Temporal *tpoint_get_y(const Temporal *temp); +extern Temporal *tpoint_get_z(const Temporal *temp); +extern bool tpoint_is_simple(const Temporal *temp); +extern double tpoint_length(const Temporal *temp); +extern Temporal *tpoint_speed(const Temporal *temp); +extern GSERIALIZED *tpoint_trajectory(const Temporal *temp, bool unary_union); +extern GSERIALIZED *tpoint_twcentroid(const Temporal *temp); + +/* Transformation functions */ + +extern Temporal *tgeo_affine(const Temporal *temp, const AFFINE *a); +extern Temporal *tgeo_scale(const Temporal *temp, const GSERIALIZED *scale, const GSERIALIZED *sorigin); +extern Temporal **tpoint_make_simple(const Temporal *temp, int *count); + +/* SRID functions */ + +int32_t tspatial_srid(const Temporal *temp); +extern Temporal *tspatial_set_srid(const Temporal *temp, int32_t srid); +extern Temporal *tspatial_transform(const Temporal *temp, int32_t srid); +extern Temporal *tspatial_transform_pipeline(const Temporal *temp, const char *pipelinestr, int32_t srid, bool is_forward); + +/* Restriction functions */ + +extern Temporal *tgeo_at_geom(const Temporal *temp, const GSERIALIZED *gs); +extern Temporal *tgeo_at_stbox(const Temporal *temp, const STBox *box, bool border_inc); +extern Temporal *tgeo_at_value(const Temporal *temp, GSERIALIZED *gs); +extern Temporal *tgeo_minus_geom(const Temporal *temp, const GSERIALIZED *gs); +extern Temporal *tgeo_minus_stbox(const Temporal *temp, const STBox *box, bool border_inc); +extern Temporal *tgeo_minus_value(const Temporal *temp, GSERIALIZED *gs); +extern Temporal *tpoint_at_elevation(const Temporal *temp, const Span *s); +extern Temporal *tpoint_at_geom(const Temporal *temp, const GSERIALIZED *gs); +extern Temporal *tpoint_at_value(const Temporal *temp, GSERIALIZED *gs); +extern Temporal *tpoint_minus_elevation(const Temporal *temp, const Span *s); +extern Temporal *tpoint_minus_geom(const Temporal *temp, const GSERIALIZED *gs); +extern Temporal *tpoint_minus_value(const Temporal *temp, GSERIALIZED *gs); + +/* Ever and always comparisons */ + +extern int always_eq_geo_tgeo(const GSERIALIZED *gs, const Temporal *temp); +extern int always_eq_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern int always_eq_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2); +extern int always_ne_geo_tgeo(const GSERIALIZED *gs, const Temporal *temp); +extern int always_ne_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern int always_ne_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2); +extern int ever_eq_geo_tgeo(const GSERIALIZED *gs, const Temporal *temp); +extern int ever_eq_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern int ever_eq_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2); +extern int ever_ne_geo_tgeo(const GSERIALIZED *gs, const Temporal *temp); +extern int ever_ne_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern int ever_ne_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2); + +/* Temporal comparisons */ + +extern Temporal *teq_geo_tgeo(const GSERIALIZED *gs, const Temporal *temp); +extern Temporal *teq_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern Temporal *tne_geo_tgeo(const GSERIALIZED *gs, const Temporal *temp); +extern Temporal *tne_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); + +/* Bounding box functions */ + +extern STBox *tgeo_stboxes(const Temporal *temp, int *count); +extern STBox *tgeo_space_boxes(const Temporal *temp, double xsize, double ysize, double zsize, const GSERIALIZED *sorigin, bool bitmatrix, bool border_inc, int *count); +extern STBox *tgeo_space_time_boxes(const Temporal *temp, double xsize, double ysize, double zsize, const Interval *duration, const GSERIALIZED *sorigin, TimestampTz torigin, bool bitmatrix, bool border_inc, int *count); +extern STBox *tgeo_split_each_n_stboxes(const Temporal *temp, int elem_count, int *count); +extern STBox *tgeo_split_n_stboxes(const Temporal *temp, int box_count, int *count); + +/* Topological functions */ + +extern bool adjacent_stbox_tspatial(const STBox *box, const Temporal *temp); +extern bool adjacent_tspatial_stbox(const Temporal *temp, const STBox *box); +extern bool adjacent_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2); +extern bool contained_stbox_tspatial(const STBox *box, const Temporal *temp); +extern bool contained_tspatial_stbox(const Temporal *temp, const STBox *box); +extern bool contained_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2); +extern bool contains_stbox_tspatial(const STBox *box, const Temporal *temp); +extern bool contains_tspatial_stbox(const Temporal *temp, const STBox *box); +extern bool contains_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2); +extern bool overlaps_stbox_tspatial(const STBox *box, const Temporal *temp); +extern bool overlaps_tspatial_stbox(const Temporal *temp, const STBox *box); +extern bool overlaps_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2); +extern bool same_stbox_tspatial(const STBox *box, const Temporal *temp); +extern bool same_tspatial_stbox(const Temporal *temp, const STBox *box); +extern bool same_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2); + +/* Position functions */ + +extern bool above_stbox_tspatial(const STBox *box, const Temporal *temp); +extern bool above_tspatial_stbox(const Temporal *temp, const STBox *box); +extern bool above_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2); +extern bool after_stbox_tspatial(const STBox *box, const Temporal *temp); +extern bool after_tspatial_stbox(const Temporal *temp, const STBox *box); +extern bool after_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2); +extern bool back_stbox_tspatial(const STBox *box, const Temporal *temp); +extern bool back_tspatial_stbox(const Temporal *temp, const STBox *box); +extern bool back_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2); +extern bool before_stbox_tspatial(const STBox *box, const Temporal *temp); +extern bool before_tspatial_stbox(const Temporal *temp, const STBox *box); +extern bool before_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2); +extern bool below_stbox_tspatial(const STBox *box, const Temporal *temp); +extern bool below_tspatial_stbox(const Temporal *temp, const STBox *box); +extern bool below_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2); +extern bool front_stbox_tspatial(const STBox *box, const Temporal *temp); +extern bool front_tspatial_stbox(const Temporal *temp, const STBox *box); +extern bool front_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2); +extern bool left_stbox_tspatial(const STBox *box, const Temporal *temp); +extern bool left_tspatial_stbox(const Temporal *temp, const STBox *box); +extern bool left_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2); +extern bool overabove_stbox_tspatial(const STBox *box, const Temporal *temp); +extern bool overabove_tspatial_stbox(const Temporal *temp, const STBox *box); +extern bool overabove_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2); +extern bool overafter_stbox_tspatial(const STBox *box, const Temporal *temp); +extern bool overafter_tspatial_stbox(const Temporal *temp, const STBox *box); +extern bool overafter_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2); +extern bool overback_stbox_tspatial(const STBox *box, const Temporal *temp); +extern bool overback_tspatial_stbox(const Temporal *temp, const STBox *box); +extern bool overback_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2); +extern bool overbefore_stbox_tspatial(const STBox *box, const Temporal *temp); +extern bool overbefore_tspatial_stbox(const Temporal *temp, const STBox *box); +extern bool overbefore_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2); +extern bool overbelow_stbox_tspatial(const STBox *box, const Temporal *temp); +extern bool overbelow_tspatial_stbox(const Temporal *temp, const STBox *box); +extern bool overbelow_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2); +extern bool overfront_stbox_tspatial(const STBox *box, const Temporal *temp); +extern bool overfront_tspatial_stbox(const Temporal *temp, const STBox *box); +extern bool overfront_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2); +extern bool overleft_stbox_tspatial(const STBox *box, const Temporal *temp); +extern bool overleft_tspatial_stbox(const Temporal *temp, const STBox *box); +extern bool overleft_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2); +extern bool overright_stbox_tspatial(const STBox *box, const Temporal *temp); +extern bool overright_tspatial_stbox(const Temporal *temp, const STBox *box); +extern bool overright_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2); +extern bool right_stbox_tspatial(const STBox *box, const Temporal *temp); +extern bool right_tspatial_stbox(const Temporal *temp, const STBox *box); +extern bool right_tspatial_tspatial(const Temporal *temp1, const Temporal *temp2); + +/* Ever and always spatial relationships */ + +extern int acontains_geo_tgeo(const GSERIALIZED *gs, const Temporal *temp); +extern int acontains_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern int acontains_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2); +extern int adisjoint_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern int adisjoint_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2); +extern int adwithin_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs, double dist); +extern int adwithin_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2, double dist); +extern int aintersects_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern int aintersects_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2); +extern int atouches_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern int atouches_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2); +extern int atouches_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs); +extern int econtains_geo_tgeo(const GSERIALIZED *gs, const Temporal *temp); +extern int econtains_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern int econtains_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2); +extern int ecovers_geo_tgeo(const GSERIALIZED *gs, const Temporal *temp); +extern int ecovers_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern int ecovers_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2); +extern int edisjoint_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern int edisjoint_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2); +extern int edwithin_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs, double dist); +extern int edwithin_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2, double dist); +extern int eintersects_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern int eintersects_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2); +extern int etouches_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern int etouches_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2); +extern int etouches_tpoint_geo(const Temporal *temp, const GSERIALIZED *gs); + +/* Spatiotemporal relationships */ + +extern Temporal *tcontains_geo_tgeo(const GSERIALIZED *gs, const Temporal *temp); +extern Temporal *tcontains_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern Temporal *tcontains_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2); +extern Temporal *tcovers_geo_tgeo(const GSERIALIZED *gs, const Temporal *temp); +extern Temporal *tcovers_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern Temporal *tcovers_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2); +extern Temporal *tdisjoint_geo_tgeo(const GSERIALIZED *gs, const Temporal *temp); +extern Temporal *tdisjoint_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern Temporal *tdisjoint_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2); +extern Temporal *tdwithin_geo_tgeo(const GSERIALIZED *gs, const Temporal *temp, double dist); +extern Temporal *tdwithin_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs, double dist); +extern Temporal *tdwithin_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2, double dist); +extern Temporal *tintersects_geo_tgeo(const GSERIALIZED *gs, const Temporal *temp); +extern Temporal *tintersects_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern Temporal *tintersects_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2); +extern Temporal *ttouches_geo_tgeo(const GSERIALIZED *gs, const Temporal *temp); +extern Temporal *ttouches_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern Temporal *ttouches_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2); + +/* Distance */ + +extern Temporal *tdistance_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern Temporal *tdistance_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2); +extern double nad_stbox_geo(const STBox *box, const GSERIALIZED *gs); +extern double nad_stbox_stbox(const STBox *box1, const STBox *box2); +extern double nad_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern double nad_tgeo_stbox(const Temporal *temp, const STBox *box); +extern double nad_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2); +extern TInstant *nai_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern TInstant *nai_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2); +extern GSERIALIZED *shortestline_tgeo_geo(const Temporal *temp, const GSERIALIZED *gs); +extern GSERIALIZED *shortestline_tgeo_tgeo(const Temporal *temp1, const Temporal *temp2); + +/* Aggregates */ + +extern Temporal *tpoint_tcentroid_finalfn(SkipList *state); +extern SkipList *tpoint_tcentroid_transfn(SkipList *state, Temporal *temp); +extern STBox *tspatial_extent_transfn(STBox *box, const Temporal *temp); + +/* Tile functions */ + +extern STBox *stbox_get_space_tile(const GSERIALIZED *point, double xsize, double ysize, double zsize, const GSERIALIZED *sorigin); +extern STBox *stbox_get_space_time_tile(const GSERIALIZED *point, TimestampTz t, double xsize, double ysize, double zsize, const Interval *duration, const GSERIALIZED *sorigin, TimestampTz torigin); +extern STBox *stbox_get_time_tile(TimestampTz t, const Interval *duration, TimestampTz torigin); +extern STBox *stbox_space_tiles(const STBox *bounds, double xsize, double ysize, double zsize, const GSERIALIZED *sorigin, bool border_inc, int *count); +extern STBox *stbox_space_time_tiles(const STBox *bounds, double xsize, double ysize, double zsize, const Interval *duration, const GSERIALIZED *sorigin, TimestampTz torigin, bool border_inc, int *count); +extern STBox *stbox_time_tiles(const STBox *bounds, const Interval *duration, TimestampTz torigin, bool border_inc, int *count); +extern Temporal **tgeo_space_split(const Temporal *temp, double xsize, double ysize, double zsize, const GSERIALIZED *sorigin, bool bitmatrix, bool border_inc, GSERIALIZED ***space_bins, int *count); +extern Temporal **tgeo_space_time_split(const Temporal *temp, double xsize, double ysize, double zsize, const Interval *duration, const GSERIALIZED *sorigin, TimestampTz torigin, bool bitmatrix, bool border_inc, GSERIALIZED ***space_bins, TimestampTz **time_bins, int *count); + +/* Clustering functions */ + +extern int *geo_cluster_kmeans(const GSERIALIZED **geoms, uint32_t ngeoms, uint32_t k); +extern uint32_t *geo_cluster_dbscan(const GSERIALIZED **geoms, uint32_t ngeoms, double tolerance, int minpoints, int *count); +extern GSERIALIZED **geo_cluster_intersecting(const GSERIALIZED **geoms, uint32_t ngeoms, int *count); +extern GSERIALIZED **geo_cluster_within(const GSERIALIZED **geoms, uint32_t ngeoms, double tolerance, int *count); + +/*****************************************************************************/ + +#endif diff --git a/meos_init.go b/meos_init.go index d9e7d23..69689d8 100644 --- a/meos_init.go +++ b/meos_init.go @@ -9,7 +9,10 @@ package gomeos import "C" func MeosInitialize(tz string) { - C.meos_initialize(C.CString(tz), nil) + C.meos_initialize() + if tz != "" { + C.meos_initialize_timezone(C.CString(tz)) + } } func MeosFinalize() { diff --git a/tools/.gitignore b/tools/.gitignore new file mode 100644 index 0000000..31d89b1 --- /dev/null +++ b/tools/.gitignore @@ -0,0 +1,4 @@ +__pycache__/ + +# Generated by portable_parity.py (the gate writes it; do not commit) +portable-parity.report.json diff --git a/tools/PORTABLE_ALIASES.md b/tools/PORTABLE_ALIASES.md new file mode 100644 index 0000000..5c879c5 --- /dev/null +++ b/tools/PORTABLE_ALIASES.md @@ -0,0 +1,93 @@ +# GoMEOS portable bare-name parity (RFC #920) + +The MobilityDB ecosystem defines a canonical, type-agnostic +operator → bare-name dialect so one program/query runs identically on +every engine and binding — a user learns one reference and assumes the +rest. The contract is **29 operator → bareName pairs** across eight +families (topology, time-position, space X/Y/Z, temporal-comparison, +distance, same); the single source of truth is MEOS-API +`meta/portable-aliases.json` (discussion MobilityDB#861 · RFC #920 · +native MobilityDB#1075 · manual MobilityDB#1078 · cross-repo handoff +MEOS-API PR #9). + +`tools/portable-aliases.json` is that contract, vendored +**byte-identical**. (`tools/portable_parity.py --idl tools/meos-idl.json` +prefers the catalog's folded-in `portableAliases` automatically once a +re-vendored MEOS-API catalog carries it; the MEOS 1.4 catalog vendored +today predates the MEOS-API #8 fold-in, so the SoT copy is used by +default and the gate stays self-contained.) + +## Everything is leveraged from the MEOS-API JSON — never header parsing + +This gate consumes only JSON-derived artifacts: + +- **The contract** is MEOS-API's `meta/portable-aliases.json` (JSON), + vendored byte-identical. +- **The binding surface** it measures is `tools/_preview/*.go`, which + `tools/codegen.py` generates from `tools/meos-idl.json` — the output + of the MEOS-API parser. This is the exact GoMEOS analogue of MEOS.NET + gating its generated P/Invoke file and PyMEOS/JMEOS gating their + codegen: every binding derives the *same* dialect from the *one* + catalog. + +The gate's only source-level step is reading `C.(` tokens from +the generated/hand-written Go to learn which MEOS functions the binding +actually references. It does **not** parse `meos.h`; the C surface it +trusts is the one the MEOS-API JSON described. + +## What "backed" means + +GoMEOS wraps MEOS directly through CGO, and MEOS C already names every +operator's backing function `...` (`&&` → `overlaps_*`, +`#<` → `tlt_*`, `~=` → `same_*`, `<->` → `tdistance_*`), so the binding +exposes the dialect **by construction**: every portable name reuses the +operator's *own* backing C function, never a reimplementation, with no +type-qualified or per-binding form. + +A bare name is **backed** when the exposed CGO symbol set (every +`C.(` in the hand-written root `*.go` and the IDL-driven +`tools/_preview/*.go`) contains a MEOS function whose name `== bareName` +or `startswith(bareName + "_")`, with one verified, *non-guessed* +fallback from the contract: `nearestApproachDistance` (`|=|`) ← the +`nad_*` family (`explicitBacking`). + +The `tdistance` (`<->`) version bridge from the pre-1.4 era +(`distance_t*`) is now **inert**: MEOS 1.4 — vendored here via GoMEOS +PR #3 — provides the canonical `tdistance_*`, so `tdistance` resolves +directly by prefix. The bridge is retained only as a documented safety +net if the gate is pointed at an older header. + +## Six-family scope — fully covered + +`temporal`, `geo`, `cbuffer`, `npoint`, `pose`, `rgeo` are **all full +user-facing temporal types** and are **never excluded from the parity +headline**. Stacked on the MEOS 1.4 bump (GoMEOS PR #3), the IDL-driven +generated surface backs every one of the 29 bare names across **all +six** families. The gate hard-fails on any family that is *present in +the surface but unbacked* (a real exclusion — `regressed`) or *absent* +(`pending`); neither is tolerated. + +Live result: **29 / 29 bare names backed, 0 unbacked, six / six families +covered** (`temporal`, `geo`, `cbuffer`, `npoint`, `pose`, `rgeo`). + +## Verifying parity + +```sh +python3 tools/portable_parity.py --check # writes tools/portable-parity.report.json +CGO_ENABLED=0 go test ./tools/parity/ -v # language-independent mirror +``` + +Both exit non-zero unless **29/29 bare names are backed, 0 unbacked, +all six in-scope families covered**. They are byte-for-byte equivalent +in verdict (the Go test mirrors the Python script — the analogue of +MEOS-API's `portable_parity.py`, MobilityDB's +`tools/portable_aliases/generate.py --check`, and the MEOS.NET / PyMEOS +parity gates). The same two checks run in the `portable-aliases parity` +CI workflow; neither needs libmeos or CGO. + +## Provenance + +Discussion MobilityDB#861 · RFC #920 · native MobilityDB#1075 · manual +MobilityDB#1078 · MEOS-API cross-repo handoff PR #9. Stacks on GoMEOS +PR #3 (`bump/meos-1.4`), which vendors the MEOS 1.4 headers and the +IDL-driven codegen. diff --git a/tools/README.md b/tools/README.md new file mode 100644 index 0000000..b7984b3 --- /dev/null +++ b/tools/README.md @@ -0,0 +1,89 @@ +# GoMEOS code generator + +`codegen.py` reads `tools/meos-idl.json` (produced by the +[MEOS-API](https://github.com/MobilityDB/MEOS-API) parser) and emits one +idiomatic Go wrapper per MEOS public C function into `tools/_preview/`. +The directory is prefixed with `_` so `go build ./...` ignores it; the +output is a Draft artifact that lets reviewers see the shape of the +generated surface without disturbing the hand-written package. + +## Running + +``` +python3 tools/codegen.py +``` + +## Coverage today + +2369 candidate functions across the six public headers. 2199 emit +cleanly; 170 are excluded as `Datum`-bearing internal helpers (the +hand-written surface exposes those through typed overloads which the +codegen cannot synthesise from the IDL). Zero unresolved TODOs and +zero explicit skips remain. The skiplist primitives that take +function-pointer arguments (`comp_fn`, `merge_fn`, `datum_func2`) or +operate on `void **` element arrays surface as `unsafe.Pointer`, +matching how PyMEOS-CFFI exposes them as `_ffi.CData` and MEOS.NET as +`IntPtr` — callers provide the raw pointer obtained from another +wrapped MEOS call (for example a typed comparator's address). + +The covered shapes are: scalar inputs, wrapped opaque pointers +(`Temporal`, `STBox`, `TBox`, `Span`, `SpanSet`, `Set`, `GSERIALIZED`, +`TInstant`, `TSequence`, `TSequenceSet`, `Npoint`, `Nsegment`, +`SkipList`, `RTree`, `Match`, `BOX3D`, `GBOX`, `AFFINE`, `PJ_CONTEXT`, +`gsl_rng`, `Interval`), C and PostgreSQL text strings, output +parameters named `result` / `value` (scalar and wrapped-pointer +out-params surfaced as additional Go return values), counted-array +inputs (`T **` / `const T *` paired with `int count` or `size_t size`) +lowered to Go slices, counted-array returns (`T **` paired with +`int *count` or matching the input slice length) lowered to Go slices +including byte buffers and `char **` / `text **` string arrays, +`unsafe.Pointer` for `void *` arguments, and metadata-driven shapes +described below. + +## meta/meos-meta.json shape annotations + +The remaining ecosystem-wide editorial decisions live in MEOS-API's +`meta/meos-meta.json` under each function's `shape` key, merged into +`meos-idl.json` at IDL-generation time. All bindings consume the same +catalog. + +Annotation kinds: + +* `shape.arrayReturn.lengthFrom = { kind: "accessor", func, arg, castTo? }` — + the function returns an array whose length is obtained by calling a + sibling accessor on one of its inputs. Used by the `*_values` family + (`bigintset_values` -> `set_num_values(s)`), the `*_insts_p` / + `*_sequences_p` accessors (cast to `const Temporal *`), and the + `*_spanarr` / `*_sps` spanset accessors. +* `shape.arrayReturn.lengthFrom = { kind: "param", name }` — the + function returns an array whose length is written to an output + parameter of the same call. +* `shape.outputArrays = [{ param, ... }]` — additional parallel output + arrays sharing the primary length. Used by the `*_split` family + (`time_bins`, `value_bins`) including the triple-pointer + `GSERIALIZED ***` output of `tgeo_space_split` / `tgeo_space_time_split`. +* `shape.namedOutputs = ["subtype", "radius"]` — scalar out-parameters + whose name is neither `result` nor `value`. +* `shape.arrayInputGroup = { params, count, nullable }` — N parallel + input arrays sharing one count (`tpointseq_make_coords`). Nullable + members accept Go `nil`. +* `shape.skip = ""` — bindings omit the function entirely. + Retained as an escape hatch but no entries use it today; the + skiplist family now surfaces through `unsafe.Pointer` instead. + +## Refreshing the IDL + +`tools/meos-idl.json` is vendored. When MEOS bumps, regenerate with +MEOS-API against the new headers and copy the output back: + +``` +cp ../MEOS-API/output/meos-idl.json tools/meos-idl.json +python3 tools/codegen.py +``` + +The vendored IDL relies on MEOS-API PR #1 (the stdbool stub) being in +place so `bool` returns and `bool *` outputs do not get demoted to +`int`. + +The vendored IDL relies on MEOS-API PR #1 (the stdbool stub) being in +place so `bool` returns and `bool *` outputs do not get demoted to `int`. diff --git a/tools/codegen.py b/tools/codegen.py new file mode 100644 index 0000000..8714473 --- /dev/null +++ b/tools/codegen.py @@ -0,0 +1,1099 @@ +"""GoMEOS code generator. + +Drives idiomatic Go wrapper generation from meos-idl.json (produced by the +MEOS-API parser). Output is one Go source file per MEOS public header, +emitted to ``generated/`` and consumed by the hand-written ergonomic surface +in the package root. + +The generator is intentionally minimal in its first iteration: it covers the +scalar-in / opaque-pointer-out signatures (the bulk of the API) and leaves +edge-case shapes (multiple return values, output parameters, array +arguments, generic-method dispatch) for follow-up commits. Functions whose +shape is not yet handled emit a ``// TODO`` placeholder so the diff against +the hand-written surface stays auditable. + +Run from the repo root: + + python3 tools/codegen.py +""" + +from __future__ import annotations + +import json +import re +import sys +from dataclasses import dataclass +from pathlib import Path + +HEADER_FILES = [ + "meos.h", + "meos_catalog.h", + "meos_geo.h", + "meos_internal.h", + "meos_internal_geo.h", + "meos_npoint.h", + "meos_cbuffer.h", + "meos_pose.h", + "meos_rgeo.h", + "meos_h3.h", + "meos_quadbin.h", + "meos_json.h", + "meos_pointcloud.h", + "meos_arrow.h", +] + +# Forward-declared opaque types we never wrap (mirrors the cdef skip list +# the PyMEOS-CFFI builder applies). +OPAQUE_TYPES = ("json_object", "GEOSContextHandle_t") + +# C-name skip list: functions handled by hand or intentionally hidden. +# CODEGEN-REGULAR-EXCEPTION: this is the documented audit bucket for the +# error-plumbing functions the binding never exposes (it drives errors through +# its own handler). meos_error joins it because it is the sole VARIADIC public +# MEOS function (``void meos_error(int, int, const char *, ...)``) and cgo +# cannot call a C variadic function at all -- it is unwrappable by construction, +# not skipped to pad coverage. Every other catalog function is emitted. +SKIPPED_FUNCTIONS = { + "py_error_handler", + "meos_initialize_error_handler", + "meos_error", +} + + +# Type mapping ---------------------------------------------------------- + +@dataclass +class TypeMapping: + go_type: str # Go-side parameter / return type + c_cast: str | None # ``C.(x)`` template, ``{}`` is the Go expr + from_c: str | None # Convert a C result to Go (``{}`` is the C expr) + + +# Scalars and well-known opaque pointers. Pointer types map to the package's +# wrapper structs (``*STBox``, ``*Geom``, etc.) where the wrapper exposes an +# ``Inner()`` method returning the C pointer. +TYPE_MAP: dict[str, TypeMapping] = { + "void": TypeMapping("", None, None), + "bool": TypeMapping("bool", "C.bool({})", "bool({})"), + "int": TypeMapping("int", "C.int({})", "int({})"), + "int8": TypeMapping("int8", "C.int8({})", "int8({})"), + "int16": TypeMapping("int16", "C.int16({})", "int16({})"), + "int32": TypeMapping("int32", "C.int32({})", "int32({})"), + "int32_t": TypeMapping("int32", "C.int32_t({})", "int32({})"), + "int64": TypeMapping("int64", "C.int64({})", "int64({})"), + "int64_t": TypeMapping("int64", "C.int64_t({})", "int64({})"), + "uint8": TypeMapping("uint8", "C.uint8({})", "uint8({})"), + "uint8_t": TypeMapping("uint8", "C.uint8_t({})", "uint8({})"), + "uint16": TypeMapping("uint16", "C.uint16({})", "uint16({})"), + "uint32": TypeMapping("uint32", "C.uint32({})", "uint32({})"), + "uint32_t": TypeMapping("uint32", "C.uint32_t({})", "uint32({})"), + "uint64": TypeMapping("uint64", "C.uint64({})", "uint64({})"), + "uint64_t": TypeMapping("uint64", "C.uint64_t({})", "uint64({})"), + "Quadbin": TypeMapping("uint64", "C.Quadbin({})", "uint64({})"), + "double": TypeMapping("float64", "C.double({})", "float64({})"), + "size_t": TypeMapping("uint", "C.size_t({})", "uint({})"), + "DateADT": TypeMapping("int32", "C.DateADT({})", "int32({})"), + "Timestamp": TypeMapping("int64", "C.Timestamp({})", "int64({})"), + "TimestampTz": TypeMapping("int64", "C.TimestampTz({})", "int64({})"), + "TimeADT": TypeMapping("int64", "C.TimeADT({})", "int64({})"), + "TimeOffset": TypeMapping("int64", "C.TimeOffset({})", "int64({})"), + # Opaque pointer family. Every binding that consumes meos-idl.json + # (PyMEOS-CFFI as `_ffi.CData`, MEOS.NET as `IntPtr`, meos-rs as + # `*mut c_void`) surfaces these as raw pointers and lets the caller + # supply a value obtained elsewhere (typically another wrapped + # function's return). GoMEOS follows the same convention. + "void *": TypeMapping("unsafe.Pointer", "unsafe.Pointer({})", "unsafe.Pointer({})"), + "const void *": TypeMapping("unsafe.Pointer", "unsafe.Pointer({})", "unsafe.Pointer({})"), + # cgo types ``void **`` as ``*unsafe.Pointer``; the Go side is an opaque + # unsafe.Pointer cast to that at the call. + "void **": TypeMapping("unsafe.Pointer", "(*unsafe.Pointer)(unsafe.Pointer({}))", "unsafe.Pointer({})"), + "const void **": TypeMapping("unsafe.Pointer", "(*unsafe.Pointer)(unsafe.Pointer({}))", "unsafe.Pointer({})"), + # Function-pointer typedefs. MEOS exposes these as opaque handles + # the caller obtains from another MEOS call (e.g. taking the address + # of a typed comparator). Skiplist primitives and the error handler + # are the only signatures that take one today. + # Function-pointer typedefs: JMEOS surfaces them as an opaque Pointer. cgo + # represents every C function pointer uniformly as ``*[0]byte``, so the Go + # side is unsafe.Pointer cast to ``*[0]byte`` at the call. + "datum_func2": TypeMapping("unsafe.Pointer", "(*[0]byte)({})", "{}"), + "error_handler_fn": TypeMapping("unsafe.Pointer", "(*[0]byte)({})", "{}"), + "int (*)(void *, void *)": TypeMapping("unsafe.Pointer", "(*[0]byte)({})", "{}"), + "void *(*)(void *, void *)": TypeMapping("unsafe.Pointer", "(*[0]byte)({})", "{}"), + "interpType": TypeMapping("Interpolation", "C.interpType({})", "Interpolation({})"), + "MeosType": TypeMapping("MeosType", "C.MeosType({})", "MeosType({})"), + "MeosOper": TypeMapping("MeosOper", "C.MeosOper({})", "MeosOper({})"), + "RTreeSearchOp": TypeMapping("RTreeSearchOp", "C.RTreeSearchOp({})", "RTreeSearchOp({})"), + "nullHandleType": TypeMapping("NullHandleType", "C.nullHandleType({})", "NullHandleType({})"), + "tempSubtype": TypeMapping("TempSubtype", "C.tempSubtype({})", "TempSubtype({})"), + "errorLevel": TypeMapping("ErrorLevel", "C.errorLevel({})", "ErrorLevel({})"), + "SkipListType": TypeMapping("SkipListType", "C.SkipListType({})", "SkipListType({})"), + "char *": TypeMapping("string", "C.CString({})", "C.GoString({})"), + "const char *": TypeMapping("string", "C.CString({})", "C.GoString({})"), + # PostgreSQL ``text`` is a varlena envelope around a Go string. The + # hand-written ``cstring2text`` / ``text2cstring`` helpers handle the + # palloc/pfree, mirroring the same idiom used by the hand-written + # surface. + # PostgreSQL ``text`` is a varlena envelope around a Go string. MEOS + # exposes the canonical converters ``cstring_to_text`` / ``text_to_cstring`` + # (public, exported, in the catalog -- the older ``cstring2text`` / + # ``text2cstring`` spellings are retired): a Go string becomes + # ``C.cstring_to_text(C.CString(s))`` in and ``C.GoString(C.text_to_cstring(t))`` + # out. + "text *": TypeMapping("string", "C.cstring_to_text(C.CString({}))", "C.GoString(C.text_to_cstring({}))"), + "const text *": TypeMapping("string", "C.cstring_to_text(C.CString({}))", "C.GoString(C.text_to_cstring({}))"), +} + +# Opaque MEOS struct pointers mapped to GoMEOS wrapper types. When the +# pointer is an input, the caller passes the wrapper and the codegen emits +# ``.Inner()``. When it is a return, the codegen wraps the pointer in a new +# instance. ``Temporal`` is the interface type and uses ``CreateTemporal``. +WRAPPER_TYPES: dict[str, tuple[str, str]] = { + # C struct name (without trailing space/star) -> (Go wrapper type, ctor expr). + # The ctor expr uses a literal ``$res`` placeholder for the C result so we + # do not collide with Python ``str.format`` parsing the embedded braces of + # Go composite literals. + # Every MEOS struct is a uniform opaque pointer handle (the meos-rs / + # JMEOS pattern: the generated FFI never builds an OO interface or a + # runtime subtype dispatch -- that idiomatic layer is retired). A + # Temporal* return is just a *Temporal handle; the caller passes it back + # to another MEOS call via Inner(). + "Temporal": ("*Temporal", "&Temporal{_inner: $res}"), + "TInstant": ("*TInstant", "&TInstant{_inner: $res}"), + "TSequence": ("*TSequence", "&TSequence{_inner: $res}"), + "TSequenceSet": ("*TSequenceSet", "&TSequenceSet{_inner: $res}"), + "STBox": ("*STBox", "&STBox{_inner: $res}"), + "TBox": ("*TBox", "&TBox{_inner: $res}"), + "Span": ("*Span", "&Span{_inner: $res}"), + "SpanSet": ("*SpanSet", "&SpanSet{_inner: $res}"), + "Set": ("*Set", "&Set{_inner: $res}"), + "GSERIALIZED": ("*Geom", "&Geom{_inner: $res}"), + "Interval": ("*Interval", "&Interval{_inner: $res}"), + "Npoint": ("*Npoint", "&Npoint{_inner: $res}"), + "Nsegment": ("*Nsegment", "&Nsegment{_inner: $res}"), + "Cbuffer": ("*Cbuffer", "&Cbuffer{_inner: $res}"), + "Pose": ("*Pose", "&Pose{_inner: $res}"), + "Rgeo": ("*Rgeo", "&Rgeo{_inner: $res}"), + "Jsonb": ("*Jsonb", "&Jsonb{_inner: $res}"), + "JsonPath": ("*JsonPath", "&JsonPath{_inner: $res}"), + "Pcpoint": ("*Pcpoint", "&Pcpoint{_inner: $res}"), + "Pcpatch": ("*Pcpatch", "&Pcpatch{_inner: $res}"), + "TPCBox": ("*TPCBox", "&TPCBox{_inner: $res}"), + "MeosArray": ("*MeosArray", "&MeosArray{_inner: $res}"), + "PCSCHEMA": ("*PCSchema", "&PCSchema{_inner: $res}"), + "SkipList": ("*SkipList", "&SkipList{_inner: $res}"), + "RTree": ("*RTree", "&RTree{_inner: $res}"), + "Match": ("*Match", "&Match{_inner: $res}"), + "BOX3D": ("*Box3D", "&Box3D{_inner: $res}"), + "GBOX": ("*GBox", "&GBox{_inner: $res}"), + "AFFINE": ("*AFFINE", "&AFFINE{_inner: $res}"), + "PJ_CONTEXT": ("*PJContext", "&PJContext{_inner: $res}"), + "gsl_rng": ("*GslRng", "&GslRng{_inner: $res}"), +} + + +# CODEGEN-REGULAR-EXCEPTION: ENUM_GO_NAME is a NAME MAP, not an exclusion. +# emit_types() below iterates EVERY catalog enum and emits a Go type for each; +# this dict only overrides the Go spelling for the seven enums the wrapper +# TYPE_MAP already references (so the names line up), and every other enum +# falls back to PascalCase via `.get(c_name, _go_name(c_name))`. Zero enums are +# dropped or left unclassified. +ENUM_GO_NAME: dict[str, str] = { + "interpType": "Interpolation", + "MeosType": "MeosType", + "MeosOper": "MeosOper", + "RTreeSearchOp": "RTreeSearchOp", + "nullHandleType": "NullHandleType", + "tempSubtype": "TempSubtype", + "SkipListType": "SkipListType", +} + + +def emit_types(idl: dict, corpus: str) -> str: + """Emit the type layer the flat wrappers depend on: one opaque handle + struct per MEOS wrapper type and one Go type + const block per catalog + enum. This is the meos-rs / JMEOS opaque-handle pattern (no OO interface, + no runtime subtype dispatch) expressed in Go: every MEOS struct is a + ``*C.`` behind an ``Inner()`` accessor, and the caller only ever passes + the handle back to another MEOS call. + + ``corpus`` is the full body of the emitted wrappers. A wrapper type or + enum is emitted ONLY if it is referenced there -- so a WRAPPER_TYPES entry + no live function uses (no matching ``*C.`` exists) and an enum whose + family header is out of scope (e.g. the raster ``MeosPixType``) are dropped + rather than declaring a Go alias to a C type cgo cannot see.""" + def referenced(go_name: str) -> bool: + return re.search(rf"\b{re.escape(go_name)}\b", corpus) is not None + + out: list[str] = [] + + # -- opaque wrapper structs (one per distinct referenced wrapper type) --- + out.append("// -------------------- opaque handle types --------------------") + seen: set[str] = set() + for c_name, (go_type, _ctor) in WRAPPER_TYPES.items(): + go_name = go_type.lstrip("*") + if go_name in seen or not referenced(go_name): + continue + seen.add(go_name) + out.append(f"type {go_name} struct {{ _inner *C.{c_name} }}") + out.append( + f"func (x *{go_name}) Inner() *C.{c_name} {{ " + f"if x == nil {{ return nil }}; return x._inner }}" + ) + + # -- enums: Go type aliased to the C enum + a numeric const block -------- + out.append("\n// -------------------- enums --------------------") + for e in idl.get("enums", []): + c_name = e["name"] + go_name = ENUM_GO_NAME.get(c_name, _go_name(c_name)) + if not referenced(go_name): + continue + out.append(f"type {go_name} C.{c_name}") + values = e.get("values", []) + if values: + out.append("const (") + for v in values: + out.append(f"\t{go_name}_{v['name']} {go_name} = {int(v['value'])}") + out.append(")") + + header = _PER_HEADER_PREAMBLE + "\n".join(out) + "\n" + return header + + +def _references_opaque(entry: dict) -> bool: + if any(t in entry["returnType"]["c"] for t in OPAQUE_TYPES): + return True + return any(any(t in p["cType"] for t in OPAQUE_TYPES) for p in entry["params"]) + + +def _is_datum_internal(entry: dict) -> bool: + """Functions that take or return a raw Datum are MEOS-internal helpers + that the hand-written surface re-exposes through typed overloads. The + codegen cannot produce those overloads automatically and reporting them + as TODO would conflate metadata work with real shape gaps.""" + if "Datum" in entry["returnType"]["c"].split(): + return True + for p in entry["params"]: + if "Datum" in p["cType"].split(): + return True + return False + + +def _strip_qualifiers(c_type: str) -> tuple[str, int]: + """Return ``(base_type, pointer_level)`` stripped of ``const`` and ``*``.""" + s = c_type.replace("const ", "").strip() + stars = s.count("*") + return s.replace("*", "").strip(), stars + + +# Arrow C Data Interface structs cross the cgo boundary as opaque pointers: the +# caller owns the ArrowSchema/ArrowArray (zero-copy interop), so they map to +# unsafe.Pointer, cast to the concrete C struct at the call site. +_ARROW_STRUCTS = { + "struct ArrowSchema": "C.struct_ArrowSchema", + "struct ArrowArray": "C.struct_ArrowArray", +} + + +def _go_type_for(c_type: str) -> tuple[str | None, str | None, str | None]: + """Look up a C type in the mapping tables. + + Returns ``(go_type, c_cast, from_c)``; any field may be ``None`` when the + type is not yet handled. + """ + if c_type in TYPE_MAP: + m = TYPE_MAP[c_type] + # Normalise scalar/string templates to the same ``$x`` placeholder + # the wrapper-type entries use, so emit_function only deals with one + # substitution dialect. + c_cast = m.c_cast.replace("{}", "$x") if m.c_cast else None + from_c = m.from_c.replace("{}", "$x") if m.from_c else None + return m.go_type, c_cast, from_c + base, stars = _strip_qualifiers(c_type) + if stars == 1 and base in WRAPPER_TYPES: + go_type, ctor = WRAPPER_TYPES[base] + # Pass through the wrapper as an input; convert back as a return. + c_cast = "$x.Inner()" if not go_type.startswith("*") else "$x._inner" + return go_type, c_cast, ctor.replace("$res", "$x") + if stars == 1 and base in _ARROW_STRUCTS: + return "unsafe.Pointer", f"(*{_ARROW_STRUCTS[base]})($x)", None + # JMEOS-flat fallback: any remaining pointer (an array ``T **``, a scalar + # out-pointer, a ``void *``) is an opaque handle -- JMEOS maps every such + # pointer to a raw ``Pointer`` and never unpacks it (the array->collection + # conversion is a separate layer). cgo needs the concrete pointer type at + # the boundary, so the Go side is ``unsafe.Pointer`` and the call casts to + # the exact C pointer type. + if stars >= 1: + if base == "void": + # cgo maps ``void *`` -> unsafe.Pointer, ``void **`` -> + # *unsafe.Pointer, etc. A bare ``void *`` needs no cast. + if stars == 1: + return "unsafe.Pointer", "unsafe.Pointer($x)", "unsafe.Pointer($x)" + cgotype = "*" * (stars - 1) + "unsafe.Pointer" + return "unsafe.Pointer", f"({cgotype})(unsafe.Pointer($x))", "unsafe.Pointer($x)" + cgotype = "*" * stars + f"C.{base}" + return "unsafe.Pointer", f"({cgotype})(unsafe.Pointer($x))", "unsafe.Pointer($x)" + return None, None, None + + +# Name conversion ------------------------------------------------------- + +def _go_name(c_name: str) -> str: + """Convert ``snake_case`` to ``PascalCase`` while keeping initialisms.""" + parts = c_name.split("_") + out = [] + for p in parts: + if not p: + continue + # Preserve common acronyms in upper case for readability. + if p.upper() in {"WKB", "WKT", "MFJSON", "JSON", "SRID", "EWKT", "EWKB", + "STBOX", "TBOX", "ID", "X", "Y", "Z", "T", "MFJ"}: + out.append(p.upper()) + else: + out.append(p[:1].upper() + p[1:]) + return "".join(out) or c_name + + +_GO_RESERVED = {"type", "func", "interface", "select", "case", "chan", "goto", + "package", "import", "go", "defer", "return", "range", "var", + "const", "for", "if", "else", "switch", "break", "continue", + "default", "fallthrough", "map", "struct", "string"} + + +def _go_param_name(c_name: str) -> str: + if c_name in _GO_RESERVED: + return c_name + "_" + return c_name + + +def _c_callee(c_name: str) -> str: + """The identifier used at the ``C.`` call site. + + cgo parses ``C.union_x`` as the C ``union x`` TYPE, not the function + ``union_x`` -- so every MEOS ``union_*`` set/span operator is reached + through a ``#define g `` alias emitted in the cgo preamble + (see ``_union_alias_block``), mirroring the hand-written cast.h ``gunion_`` + macros.""" + if c_name.startswith("union_"): + return "g" + c_name + return c_name + + +def _union_alias_block(idl: dict) -> str: + names = sorted(f["name"] for f in idl["functions"] + if f["name"].startswith("union_")) + if not names: + return "" + defines = "\n".join(f"#define g{n} {n}" for n in names) + # A ``//`` line comment (not ``/* */``) -- this block is spliced INSIDE the + # cgo preamble's C comment, and C comments do not nest. + return ("\n// cgo reads C.union_* as a union TYPE; alias the union " + "operators so C.g resolves them as functions.\n" + defines) + + +# Parameter classification --------------------------------------------- + +# Param-name heuristics for the MEOS C convention: these names, paired with +# the right pointer level, signal an out-parameter or a length-of-array +# companion to the preceding pointer-of-pointers input. +_OUT_NAMES = {"result", "value"} +_LENGTH_NAMES = {"count", "size", "ngeoms", "wkb_size"} +_SIZE_OUT_NAMES = {"size_out", "size", "len"} + + +def _classify_param(p: dict, params: list[dict], i: int) -> str: + """Return one of ``INPUT`` / ``OUTPUT_SCALAR`` / ``OUTPUT_COUNT`` / + ``OUTPUT_SIZE`` / ``ARRAY_INPUT`` / ``ARRAY_LENGTH``. + + The classification follows the MEOS C convention: parameters named + ``count`` / ``size`` paired with a preceding double-pointer or array + pointer are array lengths; pointer parameters named ``result`` / + ``value`` are out-parameters; ``int *count`` / ``size_t *size_out`` at + the tail are count outputs.""" + name = p["name"] + ctype = p["cType"] + base, stars = _strip_qualifiers(ctype) + + # ``T *result`` / ``T *value`` with a concrete scalar/wrapper base -> a + # hidden out-parameter the wrapper allocates and returns (JMEOS hides + # ``result`` the same way). A ``void *`` is never a typed output we can + # allocate -- it is an opaque INPUT (e.g. meos_array_add's ``void *value``). + if stars >= 1 and name in _OUT_NAMES and base != "void": + return "OUTPUT_SCALAR" + + # Everything else -- including array pointers ``T **`` and their ``count`` + # companions -- is a flat opaque INPUT. Mirroring JMEOS, the generated FFI + # does NOT unpack arrays into Go slices or return the count as an extra + # value; the caller passes the array/count pointers through as opaque + # handles (a higher layer does the collection conversion). + return "INPUT" + + +# Emission -------------------------------------------------------------- + +@dataclass +class EmittedFunc: + name: str # Go-side name + code: str # full Go source for the function + skipped: bool # true if emitted as a TODO stub + + +def _array_return_info(return_c: str): + """Return ``(base_type, ptr_level)`` for ``T **`` / ``T *`` returns that + pair with an OUTPUT_COUNT param, or ``None`` if the return is not an + array shape.""" + base, stars = _strip_qualifiers(return_c) + if stars in (1, 2): + return base, stars + return None + + +def _go_slice_elem(base: str, stars: int) -> tuple[str, str] | None: + """For an array return ``base`` + ``stars``, return ``(elem_go_type, + elem_ctor_template)`` where the template uses ``$x`` for the C element. + + The element type for a ``T **`` return is the wrapped pointer (``*Foo``); + for a ``T *`` return of scalar elements it is the Go primitive.""" + if stars == 2 and base in WRAPPER_TYPES: + go_type, ctor = WRAPPER_TYPES[base] + return go_type, ctor.replace("$res", "$x") + if stars == 2 and base == "char": + # ``char **`` -> []string; each element is a C string. + return "string", "C.GoString($x)" + if stars == 2 and base == "text": + # ``text **`` -> []string via text2cstring per element. + return "string", "C.GoString(C.text_to_cstring($x))" + if stars == 1: + scalar = TYPE_MAP.get(base) + if scalar is not None: + # Normalise the ``{}`` placeholder used inside TYPE_MAP to the + # ``$x`` placeholder the emitter substitutes per element. + ctor = (scalar.from_c or "$x").replace("{}", "$x") + return scalar.go_type, ctor + if base == "uint8_t": + # ``uint8_t *`` byte buffer return -> []byte handled separately. + return None + return None + + +def _emit_array_input_group(entry: dict, group: dict) -> EmittedFunc: + """Emit a wrapper for functions that take N parallel input arrays sharing + one count parameter (e.g. ``tpointseq_make_coords``). Each array param + becomes a Go slice; nullable members accept ``nil`` for the empty case.""" + c_name = entry["name"] + go_name = _go_name(c_name) + return_c = entry["returnType"]["c"] + params = entry["params"] + array_params = set(group["params"]) + count_param = group["count"] + nullable = set(group.get("nullable", [])) + + ret_go, _, ret_from_c = _go_type_for(return_c) + if ret_go is None and return_c != "void": + return EmittedFunc(go_name, _todo_stub(c_name, "arrayInputGroup return shape " + return_c), True) + + go_args, inner_args, deferred = [], [], [] + primary = None + for p in params: + pname = _go_param_name(p["name"]) + ptype = p["cType"] + base, stars = _strip_qualifiers(ptype) + if p["name"] in array_params: + primary = primary or pname + go_t = TYPE_MAP[base].go_type if base in TYPE_MAP else None + if go_t is None: + return EmittedFunc(go_name, _todo_stub(c_name, "arrayInputGroup element " + base), True) + go_args.append(f"{pname} []{go_t}") + local = f"_c_{pname}" + if p["name"] in nullable: + deferred.append(f"var {local} []C.{base}") + deferred.append(f"if {pname} != nil {{") + deferred.append(f"\t{local} = make([]C.{base}, len({pname}))") + deferred.append(f"\tfor _i, _v := range {pname} {{ {local}[_i] = C.{base}(_v) }}") + deferred.append(f"}}") + inner_args.append(f"_ptr_or_nil_{base}({local})") + else: + deferred.append(f"{local} := make([]C.{base}, len({pname}))") + deferred.append(f"for _i, _v := range {pname} {{ {local}[_i] = C.{base}(_v) }}") + inner_args.append(f"&{local}[0]") + elif p["name"] == count_param: + base, _ = _strip_qualifiers(ptype) + inner_args.append(f"C.{base}(len({primary}))") + else: + go_t, c_cast, _ = _go_type_for(ptype) + if go_t is None: + return EmittedFunc(go_name, _todo_stub(c_name, "arrayInputGroup other param " + ptype), True) + go_args.append(f"{pname} {go_t}") + inner_args.append(c_cast.replace("$x", pname) if c_cast else pname) + + sig_args = ", ".join(go_args) + call = f"C.{_c_callee(c_name)}({', '.join(inner_args)})" + body = "\n".join("\t" + d for d in deferred) + ret_sig = "" if return_c == "void" else f" {ret_go}" + if return_c == "void": + tail = f"\t{call}" + else: + tail = f"\t_cret := {call}\n\treturn {ret_from_c.replace('$x', '_cret')}" + code = ( + f"// {go_name} wraps MEOS C function {c_name}.\n" + f"func {go_name}({sig_args}){ret_sig} {{\n" + f"{body}\n{tail}\n}}\n" + ) + return EmittedFunc(go_name, code, False) + + +def emit_function(entry: dict) -> EmittedFunc: + c_name = entry["name"] + go_name = _go_name(c_name) + return_c = entry["returnType"]["c"] + params = entry["params"] + shape = entry.get("shape", {}) + + # ``shape.skip`` (from meta/meos-meta.json) marks functions the codegen + # is told to omit entirely (function-pointer args, void ** internals). + if "skip" in shape: + return EmittedFunc(go_name, _todo_stub(c_name, "skip: " + shape["skip"]), True) + + # Metadata can mark scalar parameters as outputs even when their name is + # not the canonical ``result`` / ``value``. Carry the set down to + # ``_classify_param`` via a closure-friendly local override. + named_outputs = set(shape.get("namedOutputs", [])) + + # ``shape.arrayInputGroup`` describes N parallel input arrays that share + # one count. We hand-roll a separate emission path for these because + # the heuristic loop expects a single (array, count) pair. + if "arrayInputGroup" in shape: + return _emit_array_input_group(entry, shape["arrayInputGroup"]) + + # ``shape.outputArrays`` declares parallel out-parameters sharing the + # primary length. Hold the metadata for the param walk to recognise + # them and for the body-assembly pass to unpack them after the call. + # JMEOS-flat: output arrays are passed through as opaque pointer params, + # not unpacked into Go slices, so no declared-output-array set is used. + declared_output_arrays: dict = {} + + # Pre-classify every parameter so the input loop can skip ones that + # become outputs or array-length companions. + def classify_one(p, i): + if p["name"] in named_outputs: + return "OUTPUT_SCALAR" + return _classify_param(p, params, i) + classes = [classify_one(p, i) for i, p in enumerate(params)] + + # Identify a paired array return. Three shapes, in priority order: + # (m) shape.arrayReturn metadata -> length from sibling accessor + # (a) explicit OUTPUT_COUNT param -> slice length comes from C + # (b) an ARRAY_LENGTH input -> slice length matches the input slice + has_out_count = "OUTPUT_COUNT" in classes + has_in_length = "ARRAY_LENGTH" in classes + is_array_return = False + array_length_source: str | None = None # ``c_count`` or ``len(input_slice)`` + array_elem_go = array_elem_ctor = None + + # JMEOS-flat: an array return is a raw opaque pointer, never a length-driven + # Go slice, so the accessor-length metadata path stays disabled. + array_meta = None + if array_meta and array_meta.get("kind") == "accessor" and return_c != "void": + info = _array_return_info(return_c) + if info is not None: + base, stars = info + elem = _go_slice_elem(base, stars) + if elem is None and stars == 2 and base == "text": + # ``text **`` array returns lower to []string. + elem = ("string", "C.GoString(C.text_to_cstring($x))") + if elem is not None: + is_array_return = True + array_elem_go, array_elem_ctor = elem + accessor_func = array_meta["func"] + accessor_arg = _go_param_name(array_meta["arg"]) + cast_to = array_meta.get("castTo") + arg_expr = f"{accessor_arg}.Inner()" if cast_to else f"{accessor_arg}.Inner()" + # When castTo is set, force the accessor's first param to that + # type via cgo's unsafe.Pointer ladder. Otherwise pass the + # wrapper's Inner() directly. + if cast_to: + cast_base = _strip_qualifiers(cast_to)[0] + arg_expr = f"(*C.{cast_base})(unsafe.Pointer({accessor_arg}.Inner()))" + array_length_source = f"int(C.{accessor_func}({arg_expr}))" + if (has_out_count or has_in_length) and return_c not in ("void",): + info = _array_return_info(return_c) + if info is not None: + base, stars = info + elem = _go_slice_elem(base, stars) + if elem is not None: + is_array_return = True + array_elem_go, array_elem_ctor = elem + elif stars == 1 and base == "uint8_t": + # WKB-style ``uint8_t *`` paired with ``size_t *size_out``. + is_array_return = True + array_elem_go = "byte" + array_elem_ctor = "byte($x)" + if is_array_return and not has_out_count: + # Length is taken from the input slice ``len(...)``; find the + # first ARRAY_LENGTH index and read the preceding param name. + length_idx = next(i for i, c in enumerate(classes) if c == "ARRAY_LENGTH") + array_length_source = f"len({_go_param_name(params[length_idx - 1]['name'])})" + + # Resolve the return type when not an array shape. + if is_array_return: + ret_go = f"[]{array_elem_go}" + ret_from_c = None + else: + ret_go, _, ret_from_c = _go_type_for(return_c) + if ret_go is None and return_c != "void": + return EmittedFunc(go_name, _todo_stub(c_name, "unsupported return type " + return_c), True) + + # Walk parameters, building Go-side signature args and C-side call args. + go_args = [] + inner_args = [] + deferred = [] + extra_returns: list[tuple[str, str, str]] = [] # (go_type, var_name, c_to_go expr) + array_length_for: list[int] = [] # indices of ARRAY_LENGTH params (skipped from sig) + array_count_local: str | None = None # the OUTPUT_COUNT local for array returns + + for i, p in enumerate(params): + pname = _go_param_name(p["name"]) + ptype = p["cType"] + cls = classes[i] + + if cls == "ARRAY_LENGTH": + # Length is derived from the preceding slice's len(); locate it. + prev_name = _go_param_name(params[i - 1]["name"]) + base, _ = _strip_qualifiers(ptype) + inner_args.append(f"C.{base}(len({prev_name}))") + array_length_for.append(i - 1) + continue + + if cls == "OUTPUT_COUNT": + base, _ = _strip_qualifiers(ptype) + local = f"_out_{pname}" + deferred.append(f"var {local} C.{base}") + inner_args.append(f"&{local}") + # If this count is paired with an array return, it is not + # surfaced as a separate Go return -- it controls the slice + # length. + if is_array_return: + array_count_local = local + else: + extra_returns.append( + ("int" if base == "int" else "uint", local, + f"int({local})" if base == "int" else f"uint({local})")) + continue + + if cls == "OUTPUT_SCALAR": + base, stars = _strip_qualifiers(ptype) + # Wrapped opaque output (e.g. ``GSERIALIZED ** result``). + if stars == 2 and base in WRAPPER_TYPES: + go_type, ctor = WRAPPER_TYPES[base] + local = f"_out_{pname}" + deferred.append(f"var {local} *C.{base}") + inner_args.append(f"&{local}") + extra_returns.append((go_type, local, ctor.replace("$res", local))) + continue + # text** -> string + if stars == 2 and base == "text": + local = f"_out_{pname}" + deferred.append(f"var {local} *C.text") + inner_args.append(f"&{local}") + extra_returns.append(("string", local, f"C.GoString(C.text_to_cstring({local}))")) + continue + # Scalar slice output (``TimestampTz **time_bins`` and friends) + # is left as TODO: the parallel output array needs post-call + # unsafe.Slice + element conversion alongside the primary array + # return, and that wiring is not yet plumbed through the + # body-assembly pass. Affects the ``*_split`` and + # ``tpoint_as_mvtgeom`` families. + # Wrapped opaque single-pointer output (``Span *result`` etc.): + # MEOS writes into a caller-allocated struct; allocate one and + # surface the pointer back as the typed wrapper. + if stars == 1 and base in WRAPPER_TYPES: + go_type, ctor = WRAPPER_TYPES[base] + local = f"_out_{pname}" + deferred.append(f"var {local} C.{base}") + inner_args.append(f"&{local}") + extra_returns.append((go_type, local, ctor.replace("$res", f"&{local}"))) + continue + # Scalar output (`double * result`, `bool * value`, etc.) + if stars == 1 and base in TYPE_MAP: + go_type = TYPE_MAP[base].go_type + local = f"_out_{pname}" + deferred.append(f"var {local} C.{base}") + inner_args.append(f"&{local}") + # TYPE_MAP entries use the legacy ``{}`` placeholder; the + # emitter's substitution dialect is ``$x``. + from_c = (TYPE_MAP[base].from_c or "$x").replace("{}", "$x") + extra_returns.append((go_type, local, from_c.replace("$x", local))) + continue + return EmittedFunc(go_name, _todo_stub(c_name, "unhandled OUTPUT_SCALAR shape " + ptype), True) + + # Metadata-declared output array (e.g. ``time_bins TimestampTz **``, + # ``space_bins GSERIALIZED ***``). Allocate the appropriately-typed + # local; the body-assembly pass below converts to a Go slice using + # the primary length. + if p["name"] in declared_output_arrays: + base, stars = _strip_qualifiers(ptype) + local = f"_out_{pname}" + if stars == 2 and base in TYPE_MAP and base != "text": + deferred.append(f"var {local} *C.{base}") + inner_args.append(f"&{local}") + extra_returns.append(( + f"[]{TYPE_MAP[base].go_type}", + local, + f"@SLICE_SCALAR:{local}:{base}", + )) + continue + if stars == 3 and base in WRAPPER_TYPES: + go_elem = WRAPPER_TYPES[base][0] + deferred.append(f"var {local} **C.{base}") + inner_args.append(f"&{local}") + extra_returns.append(( + f"[]{go_elem}", + local, + f"@SLICE_WRAPPED:{local}:{base}", + )) + continue + if stars == 2 and base in WRAPPER_TYPES: + go_elem = WRAPPER_TYPES[base][0] + deferred.append(f"var {local} *C.{base}") + inner_args.append(f"&{local}") + extra_returns.append(( + f"[]{go_elem}", + local, + f"@SLICE_WRAPPED_2:{local}:{base}", + )) + continue + + # INPUT path ------------------------------------------------------- + base, stars = _strip_qualifiers(ptype) + + # Counted-array input: ``T ** xs`` paired with the next ``int + # count`` (already marked ARRAY_LENGTH). Lowered to a Go slice of + # the wrapped element. + if stars == 2 and base in WRAPPER_TYPES and i + 1 < len(params) and classes[i + 1] == "ARRAY_LENGTH": + elem_go, _ = WRAPPER_TYPES[base] + slice_go = f"[]{elem_go}" + local = f"_c_{pname}" + deferred.append(f"{local} := make([]*C.{base}, len({pname}))") + deferred.append(f"for _i, _v := range {pname} {{ {local}[_i] = _v._inner }}") + ptr_expr = f"(**C.{base})(unsafe.Pointer(&{local}[0]))" if base != "uint8_t" else f"&{local}[0]" + go_args.append(f"{pname} {slice_go}") + inner_args.append(ptr_expr) + continue + + # text** array input + count -> []string (textset_make and family). + if stars == 2 and base == "text" and i + 1 < len(params) and classes[i + 1] == "ARRAY_LENGTH": + local = f"_c_{pname}" + deferred.append(f"{local} := make([]*C.text, len({pname}))") + deferred.append(f"for _i, _v := range {pname} {{ {local}[_i] = C.cstring_to_text(C.CString(_v)) }}") + go_args.append(f"{pname} []string") + inner_args.append(f"(**C.text)(unsafe.Pointer(&{local}[0]))") + continue + + # Scalar slice input: ``const int *values`` etc. paired with count. + if stars == 1 and "const" in ptype and base in {"int", "int64", "double", "DateADT", "TimestampTz"} and i + 1 < len(params) and classes[i + 1] == "ARRAY_LENGTH": + slice_go = f"[]{TYPE_MAP[base].go_type}" + local = f"_c_{pname}" + deferred.append(f"{local} := make([]C.{base}, len({pname}))") + deferred.append(f"for _i, _v := range {pname} {{ {local}[_i] = C.{base}(_v) }}") + go_args.append(f"{pname} {slice_go}") + inner_args.append(f"&{local}[0]") + continue + + # Byte-buffer input: ``const uint8_t *wkb`` + ``size_t size``. + if stars == 1 and "const" in ptype and base == "uint8_t" and i + 1 < len(params) and classes[i + 1] == "ARRAY_LENGTH": + go_args.append(f"{pname} []byte") + inner_args.append(f"(*C.uint8_t)(unsafe.Pointer(&{pname}[0]))") + continue + + go_t, c_cast, _ = _go_type_for(ptype) + if go_t is None: + return EmittedFunc(go_name, _todo_stub(c_name, "unsupported param " + ptype), True) + go_args.append(f"{pname} {go_t}") + if c_cast is None: + inner_args.append(pname) + else: + cast_expr = c_cast.replace("$x", pname) + if go_t == "string": + local = f"_c_{pname}" + deferred.append(f"{local} := {cast_expr}") + deferred.append(f"defer C.free(unsafe.Pointer({local}))") + inner_args.append(local) + else: + inner_args.append(cast_expr) + + # Assemble Go signature ---------------------------------------------- + sig_args = ", ".join(go_args) + all_returns: list[str] = [] + if is_array_return: + all_returns.append(ret_go) + elif return_c != "void": + all_returns.append(ret_go) + for go_type, _, _ in extra_returns: + all_returns.append(go_type) + + if len(all_returns) == 0: + ret_sig = "" + elif len(all_returns) == 1: + ret_sig = f" {all_returns[0]}" + else: + ret_sig = f" ({', '.join(all_returns)})" + + # Assemble Go body ---------------------------------------------------- + body_lines = [] + body_lines.extend("\t" + d for d in deferred) + call = f"C.{_c_callee(c_name)}({', '.join(inner_args)})" + + if is_array_return: + # Slice length resolution order: + # 1. shape.arrayReturn metadata (array_length_source pre-set) + # 2. OUTPUT_COUNT C local captured during param walk + # 3. len() of an ARRAY_LENGTH input slice + if array_count_local: + count_expr = f"int({array_count_local})" + else: + count_expr = array_length_source + body_lines.append(f"\tres := {call}") + body_lines.append(f"\t_n := {count_expr}") + if array_elem_go == "byte": + # WKB byte buffer; cast (*C.uint8_t -> []byte via unsafe.Slice). + body_lines.append("\t_slice := unsafe.Slice((*byte)(unsafe.Pointer(res)), _n)") + body_lines.append("\t_out := make([]byte, _n)") + body_lines.append("\tcopy(_out, _slice)") + body_lines.append("\treturn _out") + else: + base, stars = _array_return_info(return_c) + elem_c = f"*C.{base}" if stars == 2 else f"C.{base}" + body_lines.append(f"\t_slice := unsafe.Slice((*{elem_c})(unsafe.Pointer(res)), _n)") + body_lines.append(f"\t_out := make({ret_go}, _n)") + body_lines.append("\tfor _i, _e := range _slice {") + body_lines.append(f"\t\t_out[_i] = {array_elem_ctor.replace('$x', '_e')}") + body_lines.append("\t}") + body_lines.append("\treturn _out") + elif return_c == "void": + if extra_returns: + body_lines.append(f"\t{call}") + tail = ", ".join(c2g for _, _, c2g in extra_returns) + tail = _expand_slice_markers(tail, body_lines, array_count_local, array_length_source) + body_lines.append(f"\treturn {tail}") + else: + body_lines.append(f"\t{call}") + else: + # ``_cret`` (not ``res``) so the result local never collides with a C + # parameter named ``res`` (e.g. h3_uncompact_cells' resolution arg). + body_lines.append(f"\t_cret := {call}") + return_expr = ret_from_c.replace("$x", "_cret") + if extra_returns: + tail = ", ".join(c2g for _, _, c2g in extra_returns) + tail = _expand_slice_markers(tail, body_lines, array_count_local, array_length_source) + body_lines.append(f"\treturn {return_expr}, {tail}") + else: + body_lines.append(f"\treturn {return_expr}") + + code = ( + f"// {go_name} wraps MEOS C function {c_name}.\n" + f"func {go_name}({sig_args}){ret_sig} {{\n" + + "\n".join(body_lines) + + "\n}\n" + ) + return EmittedFunc(go_name, code, False) + + +def _expand_slice_markers(tail: str, body_lines: list[str], count_local: str | None, + array_length_source: str | None) -> str: + """Resolve ``@SLICE_*`` placeholders left by output-array emission. + + The marker carries everything we need (kind, C local, base type) to + synthesise both the unpacking statements and the final Go expression + used in the return tuple. Statements are appended to ``body_lines``; + the substituted expression replaces the marker in the tail string.""" + if "@SLICE_" not in tail: + return tail + length_expr = f"int({count_local})" if count_local else array_length_source + + def _resolve(marker: str) -> str: + kind, local, base = marker.split(":", 2) + out_local = f"{local}_go" + if kind == "@SLICE_SCALAR": + elem_c = f"C.{base}" + elem_go = TYPE_MAP[base].go_type + from_c = (TYPE_MAP[base].from_c or "$x").replace("{}", "$x").replace("$x", "_e") + body_lines.append(f"\t_slice_{local} := unsafe.Slice({local}, {length_expr})") + body_lines.append(f"\t{out_local} := make([]{elem_go}, {length_expr})") + body_lines.append(f"\tfor _i, _e := range _slice_{local} {{ {out_local}[_i] = {from_c} }}") + return out_local + if kind == "@SLICE_WRAPPED_2": + go_elem, ctor = WRAPPER_TYPES[base] + ctor_expr = ctor.replace("$res", "_e") + elem_c = f"*C.{base}" + body_lines.append(f"\t_slice_{local} := unsafe.Slice({local}, {length_expr})") + body_lines.append(f"\t{out_local} := make([]{go_elem}, {length_expr})") + body_lines.append(f"\tfor _i, _e := range _slice_{local} {{ {out_local}[_i] = {ctor_expr} }}") + return out_local + if kind == "@SLICE_WRAPPED": + # Triple pointer: ``T ***`` means the C function writes a + # ``T **`` (an array of N pointers) to ``*local``. + go_elem, ctor = WRAPPER_TYPES[base] + ctor_expr = ctor.replace("$res", "_e") + body_lines.append(f"\t_slice_{local} := unsafe.Slice({local}, {length_expr})") + body_lines.append(f"\t{out_local} := make([]{go_elem}, {length_expr})") + body_lines.append(f"\tfor _i, _e := range _slice_{local} {{ {out_local}[_i] = {ctor_expr} }}") + return out_local + return marker + + # Substitute every marker; ordering is preserved because we walk the + # comma-separated expression left to right. + out_pieces = [] + for piece in tail.split(", "): + if piece.startswith("@SLICE_"): + out_pieces.append(_resolve(piece)) + else: + out_pieces.append(piece) + return ", ".join(out_pieces) + + +def _todo_stub(c_name: str, reason: str) -> str: + return ( + f"// TODO {c_name}: {reason}\n" + f"// func {_go_name(c_name)}(...) {{ /* not yet handled by codegen */ }}\n" + ) + + +# Driver ---------------------------------------------------------------- + +# The package-global #cgo directives (CFLAGS/LDFLAGS) live once here in cgo.go. +# cgo resolves each Go file's C references against THAT file's own preamble, so +# every generated per-header file repeats the MEOS #includes (see _PER_HEADER_PREAMBLE). +_CGO_FILE = """package functions + +/* +// Every optional MEOS family is enabled so the ``#if ``-guarded +// declarations in the core headers (e.g. meos_initialize_pointcloud) are +// visible -- matching the all-families libmeos the catalog is derived from, in +// sync with MobilityDB CMakeLists.txt's ``if(ALL)`` loop (alphabetical). The +// families expose external library types (H3's h3api.h) through their own +// headers, so their include dirs are added too. +#cgo darwin CFLAGS: -I/opt/homebrew/include -I/opt/homebrew/include/h3 -DMEOS=1 -DARROW=1 -DCBUFFER=1 -DH3=1 -DJSON=1 -DNPOINT=1 -DPOINTCLOUD=1 -DPOSE=1 -DQUADBIN=1 -DRASTER=1 -DRGEO=1 +#cgo darwin LDFLAGS: -L/opt/homebrew/lib -lmeos -Wl,-rpath,/opt/homebrew/lib + +#cgo linux CFLAGS: -I/usr/local/include/ -I/usr/include/h3 -DMEOS=1 -DARROW=1 -DCBUFFER=1 -DH3=1 -DJSON=1 -DNPOINT=1 -DPOINTCLOUD=1 -DPOSE=1 -DQUADBIN=1 -DRASTER=1 -DRGEO=1 +#cgo linux LDFLAGS: -L/usr/local/lib -lmeos -Wl,-rpath,/usr/local/lib + +#include +#include "meos.h" +#include "meos_catalog.h" +#include "meos_geo.h" +#include "meos_internal.h" +#include "meos_internal_geo.h" +#include "meos_npoint.h" +#include "meos_cbuffer.h" +#include "meos_pose.h" +#include "meos_rgeo.h" +#include "meos_h3.h" +#include "meos_quadbin.h" +#include "meos_json.h" +#include "meos_pointcloud.h" +#include "meos_arrow.h" +*/ +import "C" +""" + +_PER_HEADER_PREAMBLE = """package functions + +/* +#include +#include "meos.h" +#include "meos_catalog.h" +#include "meos_geo.h" +#include "meos_internal.h" +#include "meos_internal_geo.h" +#include "meos_npoint.h" +#include "meos_cbuffer.h" +#include "meos_pose.h" +#include "meos_rgeo.h" +#include "meos_h3.h" +#include "meos_quadbin.h" +#include "meos_json.h" +#include "meos_pointcloud.h" +#include "meos_arrow.h" +*/ +import "C" +import ( +\t"unsafe" +) + +var _ = unsafe.Pointer(nil) + +""" + + +def generate(idl_path: Path, out_dir: Path) -> dict: + idl = json.loads(idl_path.read_text()) + out_dir.mkdir(parents=True, exist_ok=True) + + entries_by_file: dict[str, list[dict]] = {h: [] for h in HEADER_FILES} + for entry in idl["functions"]: + if entry["file"] in entries_by_file: + entries_by_file[entry["file"]].append(entry) + + stats = {"emitted": 0, "skipped": 0, "explicit_skip": 0, "datum": 0, "by_header": {}} + corpus_parts: list[str] = [] + # The shared per-file cgo preamble, with the union-operator aliases spliced + # into the C block so every file that calls a ``C.gunion_*`` resolves it. + preamble = _PER_HEADER_PREAMBLE.replace("*/", _union_alias_block(idl) + "\n*/", 1) + for header in HEADER_FILES: + emitted_funcs = [] + local_emit = local_skip = local_explicit = local_datum = 0 + for entry in entries_by_file[header]: + if entry["name"] in SKIPPED_FUNCTIONS: + continue + if _references_opaque(entry): + continue + if _is_datum_internal(entry): + local_datum += 1 + continue + ef = emit_function(entry) + emitted_funcs.append(ef) + if ef.skipped: + # Differentiate explicit meta-driven skips (declared + # non-wrappable) from honest TODOs (shape the generator + # could not resolve). + if "skip:" in ef.code: + local_explicit += 1 + else: + local_skip += 1 + else: + local_emit += 1 + stats["by_header"][header] = (local_emit, local_skip, local_explicit, local_datum) + stats["emitted"] += local_emit + stats["skipped"] += local_skip + stats["explicit_skip"] += local_explicit + stats["datum"] += local_datum + + out_file = out_dir / f"meos_{header.replace('.h', '')}.go" + funcs_code = "\n\n".join(e.code for e in emitted_funcs) + corpus_parts.append(funcs_code) + body = preamble + funcs_code + "\n" + out_file.write_text(body) + + # The single cgo preamble file with all #includes lives next to the + # generated wrappers; Go's cgo machinery merges directives across files. + (out_dir / "cgo.go").write_text(_CGO_FILE) + + # The type layer (opaque handle structs + enums) the wrappers depend on, + # restricted to the types the emitted wrappers actually reference. + (out_dir / "types.go").write_text(emit_types(idl, "\n".join(corpus_parts))) + return stats + + +if __name__ == "__main__": + here = Path(__file__).parent + # The generated flat FFI layer is the ``functions`` package at the repo + # root (mirrors JMEOS ``functions`` / ``pymeos_cffi.functions``): the thin + # I/O shell over MEOS that ``go build ./...`` compiles alongside the OO + # ``gomeos`` package. + stats = generate(here / "meos-idl.json", here.parent / "functions") + print(f"Emitted {stats['emitted']} idiomatic wrappers") + print(f"Skipped {stats['skipped']} as TODO (unresolved signature shape)") + print(f"Excluded {stats['explicit_skip']} via meta/meos-meta.json shape.skip declarations") + print(f"Excluded {stats['datum']} as Datum-bearing internal helpers") + for h, (e, s, sk, d) in stats["by_header"].items(): + print(f" {h}: {e} emitted, {s} TODO, {sk} explicit-skip, {d} Datum") diff --git a/tools/parity/parity_test.go b/tools/parity/parity_test.go new file mode 100644 index 0000000..c63d12d --- /dev/null +++ b/tools/parity/parity_test.go @@ -0,0 +1,269 @@ +// Package parity is the language-independent mirror of +// tools/portable_parity.py — the GoMEOS portable bare-name parity gate +// (RFC #920; MEOS-API cross-repo handoff PR #9). +// +// A binding is done when its exposed symbol set ⊇ portableAliases.bareNames, +// verified with the same prefix logic as MEOS-API portable_parity.py: a +// bare name is backed iff some referenced MEOS symbol == bareName or +// startsWith(bareName + "_"), falling back to the contract's verified +// explicitBacking prefixes (nearestApproachDistance ← the nad_* family). +// 0 unbacked, no per-binding exceptions, across all six in-scope +// user-facing type families (temporal, geo, cbuffer, npoint, pose, rgeo) +// — cbuffer/npoint/pose/rgeo are never excluded from the parity headline. +// +// "Exposed symbol set" = every MEOS C function the CGO layer references +// (C.( ) in the hand-written root package AND the IDL-driven +// generated surface under functions (emitted by tools/codegen.py +// from tools/meos-idl.json — the MEOS-API parser's JSON output). The +// operators' own backing functions, reused by construction, never +// reimplemented. +// +// This package has no `import "C"`, so the gate runs in CI with no +// libmeos/CGO toolchain, exactly like MEOS.NET's managed test mirror. +// Its verdict is identical to the Python script's, by construction. +package parity + +import ( + "encoding/json" + "os" + "path/filepath" + "regexp" + "sort" + "strings" + "testing" +) + +// inScopeFamilies — full user-facing temporal type families. +// cbuffer/npoint/pose/rgeo are NOT internals and are never excluded from +// the parity headline. +var inScopeFamilies = []string{ + "temporal", "geo", "cbuffer", "npoint", "pose", "rgeo", +} + +// bindingBacking is inert at MEOS 1.4 (canonical tdistance_* is present); +// retained as a documented safety net for older/partial header scans. +var bindingBacking = map[string][]string{ + "tdistance": {"distance_tfloat", "distance_tint", + "distance_tnumber", "distance_tpoint"}, +} + +var cgoRe = regexp.MustCompile(`\bC\.([A-Za-z_]\w*)\s*\(`) + +var cgoPseudo = map[string]bool{ + "CString": true, "CBytes": true, "GoString": true, "GoBytes": true, + "free": true, "malloc": true, "calloc": true, +} + +func repoRoot(t *testing.T) string { + t.Helper() + dir, err := os.Getwd() + if err != nil { + t.Fatalf("getwd: %v", err) + } + for { + if _, err := os.Stat(filepath.Join(dir, "go.mod")); err == nil { + return dir + } + parent := filepath.Dir(dir) + if parent == dir { + t.Fatal("could not locate repo root (go.mod)") + } + dir = parent + } +} + +func scanDir(t *testing.T, dir string, syms map[string]bool) int { + t.Helper() + entries, err := os.ReadDir(dir) + if err != nil { + return 0 // optional source (e.g. functions absent) + } + files := 0 + for _, e := range entries { + n := e.Name() + if e.IsDir() || !strings.HasSuffix(n, ".go") || + strings.HasSuffix(n, "_test.go") { + continue + } + b, err := os.ReadFile(filepath.Join(dir, n)) + if err != nil { + t.Fatalf("read %s: %v", n, err) + } + for _, m := range cgoRe.FindAllStringSubmatch(string(b), -1) { + if !cgoPseudo[m[1]] { + syms[m[1]] = true + } + } + files++ + } + return files +} + +// exposedSymbols = hand-written root *.go ∪ IDL-driven functions/*.go. +func exposedSymbols(t *testing.T, repo string) map[string]bool { + t.Helper() + syms := map[string]bool{} + scanDir(t, repo, syms) + scanDir(t, filepath.Join(repo, "functions"), syms) + if len(syms) == 0 { + t.Fatal("no CGO symbols found — repo layout changed?") + } + return syms +} + +type pair struct{ op, bare, fam string } + +func contract(t *testing.T, repo string) ([]pair, map[string][]string) { + t.Helper() + p := filepath.Join(repo, "tools", "portable-aliases.json") + b, err := os.ReadFile(p) + if err != nil { + t.Fatalf("vendored portable-aliases SoT missing: %v", err) + } + var doc struct { + Families map[string][]struct { + Operator string `json:"operator"` + BareName string `json:"bareName"` + } `json:"families"` + ExplicitBacking map[string][]string `json:"explicitBacking"` + } + if err := json.Unmarshal(b, &doc); err != nil { + t.Fatalf("parse contract: %v", err) + } + var pairs []pair + for fam, lst := range doc.Families { + for _, e := range lst { + pairs = append(pairs, pair{e.Operator, e.BareName, fam}) + } + } + sort.Slice(pairs, func(i, j int) bool { + return pairs[i].bare < pairs[j].bare + }) + return pairs, doc.ExplicitBacking +} + +func matches(symbols map[string]bool, prefix string) []string { + var hits []string + for s := range symbols { + if s == prefix || strings.HasPrefix(s, prefix+"_") { + hits = append(hits, s) + } + } + return hits +} + +func backing(bare string, symbols map[string]bool, + explicit map[string][]string) (hits []string, via string) { + if h := matches(symbols, bare); len(h) > 0 { + return h, "prefix" + } + for _, pref := range explicit[bare] { + hits = append(hits, matches(symbols, pref)...) + } + if len(hits) > 0 { + return hits, "explicit:" + strings.Join(explicit[bare], ",") + } + for _, pref := range bindingBacking[bare] { + hits = append(hits, matches(symbols, pref)...) + } + if len(hits) > 0 { + return hits, "version-bridge:" + + strings.Join(bindingBacking[bare], ",") + } + return nil, "" +} + +func familyOf(name string) string { + n := strings.ToLower(name) + switch { + case strings.Contains(n, "rgeo"): + return "rgeo" + case strings.Contains(n, "cbuffer"): + return "cbuffer" + case strings.Contains(n, "npoint"): + return "npoint" + case strings.Contains(n, "pose"): + return "pose" + case strings.Contains(n, "geo"), strings.Contains(n, "geom"), + strings.Contains(n, "geog"), strings.Contains(n, "point"), + strings.Contains(n, "spatial"): + return "geo" + default: + return "temporal" + } +} + +// TestExposedApiSupersetOfPortableBareNames is the Go mirror of +// tools/portable_parity.py --check: the exposed CGO symbol set (root + +// IDL-driven functions) must be a superset of +// portableAliases.bareNames (29/29, 0 unbacked) AND every in-scope +// user-facing family must be covered. cbuffer/npoint/pose/rgeo are full +// types and are never excluded from the parity headline; a family present +// in the surface but unbacked (regressed) or absent (pending) is a hard +// failure. +func TestExposedApiSupersetOfPortableBareNames(t *testing.T) { + repo := repoRoot(t) + symbols := exposedSymbols(t, repo) + pairs, explicit := contract(t, repo) + + if len(pairs) != 29 { + t.Fatalf("contract must carry exactly 29 operator→bareName "+ + "pairs, got %d", len(pairs)) + } + + famsPresent := map[string]bool{} + for s := range symbols { + famsPresent[familyOf(s)] = true + } + + famTotals := map[string]int{} + for _, f := range inScopeFamilies { + famTotals[f] = 0 + } + var unbacked []string + for _, p := range pairs { + hits, via := backing(p.bare, symbols, explicit) + if len(hits) == 0 { + unbacked = append(unbacked, + p.bare+" ("+p.op+", "+p.fam+")") + continue + } + t.Logf("backed: %-24s %-5s via %s (%d symbols)", + p.bare, p.op, via, len(hits)) + for _, h := range hits { + if _, ok := famTotals[familyOf(h)]; ok { + famTotals[familyOf(h)]++ + } + } + } + + if len(unbacked) != 0 { + t.Fatalf("unbacked canonical bare names (exposed symbol set must "+ + "be a superset, 0 unbacked): %s", + strings.Join(unbacked, ", ")) + } + + var regressed, pending []string + for _, f := range inScopeFamilies { + switch { + case famTotals[f] > 0: // covered + case famsPresent[f]: + regressed = append(regressed, f) + default: + pending = append(pending, f) + } + } + if len(regressed) != 0 { + t.Fatalf("in-scope families present in the surface but unbacked "+ + "(cbuffer/npoint/pose/rgeo are never excluded from the "+ + "parity headline): %s; coverage=%v", + strings.Join(regressed, ", "), famTotals) + } + if len(pending) != 0 { + t.Fatalf("in-scope user-facing families absent from the exposed "+ + "surface (never excluded from the parity headline): %s; "+ + "coverage=%v", strings.Join(pending, ", "), famTotals) + } + t.Logf("PASS: 29/29 bare names backed, 0 unbacked, all six in-scope "+ + "families covered: %v", famTotals) +} diff --git a/tools/portable-aliases.json b/tools/portable-aliases.json new file mode 100644 index 0000000..1cabac1 --- /dev/null +++ b/tools/portable-aliases.json @@ -0,0 +1,60 @@ +{ + "_comment": "Canonical portable bare-name dialect — the single codegen source of truth (RFC #920). Every binding/engine generates the SAME bare names from this mapping so users learn one reference and assume the rest. Operators are SQL operator symbols; bareName is the portable function name. The mapping is type-agnostic: it applies to EVERY temporal type family.", + "provenance": { + "discussion": "MobilityDB#861", + "rfc": "MobilityDB RFC #920 (doc/rfc/sql-portability/README.md, branch rfc/sql-portability)", + "nativePR": "MobilityDB#1075 (1303 operator-overload aliases, each reusing the operator's own C symbol — identical by construction; CI-gated by tools/portable_aliases/generate.py --check)", + "manualChapter": "MobilityDB#1078" + }, + "families": { + "topology": [{"operator": "&&", "bareName": "overlaps"}, + {"operator": "@>", "bareName": "contains"}, + {"operator": "<@", "bareName": "contained"}, + {"operator": "-|-", "bareName": "adjacent"}], + "timePosition": [{"operator": "<<#", "bareName": "before"}, + {"operator": "#>>", "bareName": "after"}, + {"operator": "&<#", "bareName": "overbefore"}, + {"operator": "#&>", "bareName": "overafter"}], + "spaceX": [{"operator": "<<", "bareName": "left"}, + {"operator": ">>", "bareName": "right"}, + {"operator": "&<", "bareName": "overleft"}, + {"operator": "&>", "bareName": "overright"}], + "spaceY": [{"operator": "<<|", "bareName": "below"}, + {"operator": "|>>", "bareName": "above"}, + {"operator": "&<|", "bareName": "overbelow"}, + {"operator": "|&>", "bareName": "overabove"}], + "spaceZ": [{"operator": "<>", "bareName": "back"}, + {"operator": "&", "bareName": "overback"}], + "temporalComparison": [{"operator": "#=", "bareName": "teq"}, + {"operator": "#<>", "bareName": "tne"}, + {"operator": "#<", "bareName": "tlt"}, + {"operator": "#<=", "bareName": "tle"}, + {"operator": "#>", "bareName": "tgt"}, + {"operator": "#>=", "bareName": "tge"}], + "distance": [{"operator": "<->", "bareName": "tdistance"}, + {"operator": "|=|", "bareName": "nearestApproachDistance"}], + "same": [{"operator": "~=", "bareName": "same"}] + }, + "alreadyCanonical": [ + {"family": "ever", "operators": ["?="], "pattern": "ever_*"}, + {"family": "always", "operators": ["%="], "pattern": "always_*"}, + {"functions": ["eIntersects", "atTime", "restriction functions", + "spatial-relationship functions"]} + ], + "_explicitBackingComment": "Bare names whose MEOS C family prefix differs from the bare name itself. Verified against the catalog (not guessed): `nearestApproachDistance` is backed by the `nad_*` family (35 functions). Lets the parity audit resolve 100% honestly instead of false-flagging a real, present family.", + "explicitBacking": { + "nearestApproachDistance": ["nad"] + }, + "scope": { + "inScopeTypeFamilies": ["temporal", "geo", "cbuffer", "npoint", "pose", + "rgeo"], + "note": "cbuffer / npoint / pose / rgeo are FULL user-facing temporal types and ARE in scope — covered like every other type. PR #1075 already aliases all six families (1303 aliases). They must NOT be excluded from any parity headline; an upstream/audit note that 'defers' or 'jointly excludes' them is a known error being corrected — where another engine defers them, that is incomplete work to close (a gap with a plan), never an accepted exclusion." + }, + "notes": [ + "Generate aliases by reusing each operator's own backing C function (equivalence by construction), never by reimplementing; mirror MobilityDB tools/portable_aliases/generate.py + its 100%-coverage audit.", + "User-facing API uses the full name `trgeometry`; internal functions keep the `trgeo_` prefix — do NOT normalize the internal prefix.", + "Goal: 100% parity ecosystem-wide — every operator has its bare name on every engine, no gaps, no headline exclusions." + ] +} diff --git a/tools/portable_parity.py b/tools/portable_parity.py new file mode 100644 index 0000000..d76e09d --- /dev/null +++ b/tools/portable_parity.py @@ -0,0 +1,257 @@ +#!/usr/bin/env python3 +"""Portable bare-name parity gate for GoMEOS. + +The GoMEOS analogue of MEOS-API's portable_parity.py, MobilityDB's +`tools/portable_aliases/generate.py --check`, and the MEOS.NET / PyMEOS +parity gates. Per the cross-repo handoff (MEOS-API PR #9): a binding is +done when its **exposed symbol set ⊇ portableAliases.bareNames**, verified +with the *same prefix logic* as MEOS-API portable_parity.py, **0 +unbacked**, no per-binding exceptions, across all six in-scope type +families. + +"Exposed symbol set" for GoMEOS = every MEOS C function the CGO layer +references (`C.(`): + + * the hand-written package at the repo root (`*.go`), and + * the IDL-driven generated surface under `functions/*.go`, which + `tools/codegen.py` emits from `tools/meos-idl.json` — the MEOS-API + parser's JSON output. Measuring the generated surface is the exact + GoMEOS analogue of MEOS.NET gating its generated P/Invoke file and + PyMEOS/JMEOS gating their codegen: every binding derives the same + dialect from the one catalog, so coverage is leveraged from the + MEOS-API JSON end to end — never by parsing `meos.h`. + +GoMEOS wraps MEOS directly, so these are the operators' *own* backing C +functions, reused by construction — never a reimplementation. A bare name +is *backed* iff some referenced symbol `== bareName` or +`startswith(bareName + "_")`, falling back to the contract's verified +`explicitBacking` prefixes (`nearestApproachDistance` <- the `nad_*` +family). + +The portable-aliases contract is read from the catalog's folded-in +`portableAliases` when an --idl is given and carries it; otherwise from +the vendored, byte-identical SoT copy tools/portable-aliases.json (the +vendored MEOS 1.4 `tools/meos-idl.json` predates the MEOS-API #8 fold-in, +so the gate uses the SoT copy by default and stays self-contained). + +Version bridge (now inert at MEOS 1.4, kept as a documented safety net): +pre-1.4 headers named the `<->` temporal-distance operator `distance_t*`; +MEOS 1.4 (vendored here via GoMEOS PR #3) uses the canonical `tdistance_*`, +so `tdistance` resolves directly by prefix and `BINDING_BACKING` no longer +fires. It is retained only so the gate still reports honestly if pointed +at an older header. + + python3 tools/portable_parity.py # write report + python3 tools/portable_parity.py --check # exit non-zero on any gap + +Writes tools/portable-parity.report.json. +""" + +from __future__ import annotations + +import argparse +import json +import re +import sys +from pathlib import Path + +REPO = Path(__file__).resolve().parent.parent +PREVIEW = REPO / "functions" +VENDORED = Path(__file__).resolve().parent / "portable-aliases.json" +REPORT = Path(__file__).resolve().parent / "portable-parity.report.json" + +# Full user-facing temporal type families — cbuffer/npoint/pose/rgeo are +# NOT internals and must never be excluded from the parity headline. +# Precedence keeps the broad geo/temporal buckets from swallowing them. +IN_SCOPE_FAMILIES = ["temporal", "geo", "cbuffer", "npoint", "pose", "rgeo"] + +# Inert at MEOS 1.4 (canonical `tdistance_*` is present); retained as a +# documented safety net for older/partial header scans only. +BINDING_BACKING = { + "tdistance": ["distance_tfloat", "distance_tint", + "distance_tnumber", "distance_tpoint"], +} + +# Every MEOS C symbol referenced through CGO: `C.(`. +_CGO_RE = re.compile(r"\bC\.([A-Za-z_]\w*)\s*\(") +_CGO_PSEUDO = {"CString", "CBytes", "GoString", "GoBytes", "free", + "malloc", "calloc"} + + +def _scan(path: Path, syms: set[str]) -> None: + for m in _CGO_RE.findall(path.read_text()): + if m not in _CGO_PSEUDO: + syms.add(m) + + +def exposed_symbols(repo: Path) -> list[str]: + """MEOS C function names the CGO layer references — hand-written root + package plus the IDL-driven generated surface (functions).""" + syms: set[str] = set() + for go in sorted(repo.glob("*.go")): + if not go.name.endswith("_test.go"): + _scan(go, syms) + if PREVIEW.is_dir(): + for go in sorted(PREVIEW.glob("*.go")): + if not go.name.endswith("_test.go"): + _scan(go, syms) + return sorted(syms) + + +def load_portable_aliases(idl_path: str | None) -> dict: + """Prefer the catalog's folded-in portableAliases; else the vendored SoT.""" + if idl_path: + idl = json.loads(Path(idl_path).read_text()) + pa = idl.get("portableAliases") + if pa and pa.get("families"): + return pa + return json.loads(VENDORED.read_text()) + + +def family_of(name: str) -> str: + n = name.lower() + if "rgeo" in n: + return "rgeo" + if "cbuffer" in n: + return "cbuffer" + if "npoint" in n: + return "npoint" + if "pose" in n: + return "pose" + if any(t in n for t in ("geo", "geom", "geog", "point", "spatial")): + return "geo" + return "temporal" + + +def build_parity(symbols: list[str], pa: dict) -> dict: + fam_of = {p["bareName"]: (fam, p["operator"]) + for fam, lst in pa["families"].items() for p in lst} + explicit = dict(pa.get("explicitBacking", {})) + + def matches(prefix: str) -> list[str]: + return [s for s in symbols + if s == prefix or s.startswith(prefix + "_")] + + fams_present = {family_of(s) for s in symbols} + + by_bare: dict[str, dict] = {} + fam_totals: dict[str, int] = {f: 0 for f in IN_SCOPE_FAMILIES} + for bare, (fam, op) in sorted(fam_of.items()): + hits, via = matches(bare), "prefix" + if not hits: + for pref in explicit.get(bare, []): + hits += matches(pref) + if hits: + via = "explicit:" + ",".join(explicit.get(bare, [])) + if not hits and bare in BINDING_BACKING: + for pref in BINDING_BACKING[bare]: + hits += matches(pref) + if hits: + via = "version-bridge:" + ",".join(BINDING_BACKING[bare]) + if not hits: + via = None + hist: dict[str, int] = {} + for h in hits: + k = family_of(h) + hist[k] = hist.get(k, 0) + 1 + fam_totals[k] = fam_totals.get(k, 0) + 1 + by_bare[bare] = { + "operator": op, "family": fam, "via": via, + "backedBy": len(hits), "sample": sorted(hits)[:3], + "familyCoverage": hist, + "status": "backed" if hits else "needs-explicit-backing", + } + + backed = [b for b, v in by_bare.items() if v["status"] == "backed"] + unbacked = sorted(b for b, v in by_bare.items() + if v["status"] == "needs-explicit-backing") + + # - covered : has backings now + # - regressed : header carries the type's symbols but zero backings + # (a real exclusion — hard fail; never tolerated) + # - pending : type absent from the scanned MEOS surface entirely + fam_status: dict[str, str] = {} + for f in IN_SCOPE_FAMILIES: + if fam_totals.get(f, 0) > 0: + fam_status[f] = "covered" + elif f in fams_present: + fam_status[f] = "regressed" + else: + fam_status[f] = "pending" + regressed = [f for f, s in fam_status.items() if s == "regressed"] + pending = [f for f, s in fam_status.items() if s == "pending"] + + total = len(by_bare) + return { + "exposedSymbols": len(symbols), + "symbolSources": ["repo-root *.go (hand-written)", + "functions/*.go (IDL-driven codegen " + "from tools/meos-idl.json — MEOS-API output)"], + "total": total, + "backed": len(backed), + "needsExplicitBacking": len(unbacked), + "parityPct": round(len(backed) * 100 / total, 1) if total else 0, + "unbacked": unbacked, + "familyCoverage": fam_totals, + "familyStatus": fam_status, + "regressedFamilies": regressed, + "pendingFamilies": pending, + "byBareName": by_bare, + "provenance": pa.get("provenance", {}), + "scope": pa.get("scope", {}), + } + + +def main() -> int: + ap = argparse.ArgumentParser(description=__doc__) + ap.add_argument("--idl", metavar="meos-idl.json", default=None, + help="catalog to read portableAliases from " + "(default: vendored tools/portable-aliases.json)") + ap.add_argument("--check", action="store_true", + help="exit non-zero if any bare name is unbacked or any " + "in-scope family present in the surface is excluded " + "(CI gate)") + args = ap.parse_args() + + symbols = exposed_symbols(REPO) + pa = load_portable_aliases(args.idl) + rep = build_parity(symbols, pa) + REPORT.write_text(json.dumps(rep, indent=2) + "\n") + + src = ("idl.portableAliases" if args.idl + and json.loads(Path(args.idl).read_text()) + .get("portableAliases", {}).get("families") + else "vendored tools/portable-aliases.json") + print(f"[portable-parity] {rep['backed']}/{rep['total']} bare names " + f"backed in the exposed GoMEOS CGO symbol set " + f"({rep['parityPct']}%); {rep['needsExplicitBacking']} unbacked " + f"[contract: {src}]", file=sys.stderr) + print(f"[portable-parity] six-family status {rep['familyStatus']} " + f"-> {REPORT}", file=sys.stderr) + for b in rep["unbacked"]: + v = rep["byBareName"][b] + print(f" needs-explicit-backing: {b!r} ({v['operator']}, " + f"{v['family']})", file=sys.stderr) + + # Hard gate = the handoff doc's literal "Done" for a binding: + # 29/29 bare names backed, 0 unbacked, and every in-scope user-facing + # family covered (cbuffer/npoint/pose/rgeo are never excluded). + fail = bool(rep["unbacked"] or rep["regressedFamilies"] + or rep["pendingFamilies"]) + if args.check: + if rep["regressedFamilies"]: + print(" EXCLUDED in-scope families present in surface but " + f"unbacked: {rep['regressedFamilies']}", file=sys.stderr) + if rep["pendingFamilies"]: + print(" in-scope families absent from the scanned surface: " + f"{rep['pendingFamilies']}", file=sys.stderr) + verdict = ("FAIL" if fail else + f"PASS — {rep['backed']}/{rep['total']} = 100%, " + "0 unbacked, all six in-scope families covered") + print(f"CHECK: {verdict}", file=sys.stderr) + return 1 if fail else 0 + return 0 + + +if __name__ == "__main__": + sys.exit(main())