gomeos

package module
v0.1.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2024 License: MIT Imports: 5 Imported by: 0

README

GoMEOS

MEOS (Mobility Engine, Open Source) is a C library which enables the manipulation of temporal and spatio-temporal data based on MobilityDB's data types and functions.

GoMEOS is a Go library that wraps the MEOS C library using CGO, providing a set of Go functions that allows to use MEOS functionality by directly accessing C structs and C functions.

GoMEOS exposes the functionality of MEOS and is meant to be used directly by the user.

Usage

Installation

go get github.com/MobilityDB/GoMEOS

You also need to install the MEOS library by compling MobilityDB.

git clone git@github.com:MobilityDB/MobilityDB.git
cd MobilityDB
mkdir build
cd build
cmake -DMEOS=on ..
make
sudo make install

GoMEOS requires CGO (CGO_ENABLED=1) in order to be built.

Path Configuration

To give CGO the access to MEOS library, flags(which is paths to both the dynamic library and header files) need to be configured in gomeos.go.

In MacOS, the flag setting can be:

#cgo CFLAGS: -I/opt/homebrew/include
#cgo LDFLAGS: -L/opt/homebrew/lib -lmeos -Wl,-rpath,/opt/homebrew/lib

In Linux, the flag setting can be:

#cgo CFLAGS: -I/usr/local/include/
#cgo LDFLAGS: -L/usr/local/lib -lmeos -Wl,-rpath,/usr/local/lib

Note that the directory may be different after compling and installing on different systems. So it is highly recommended to check the directory for both dynamic library and header files.

Quick Start

IMPORTANT Before using any GoMEOS function, always call MeosInitialize(). Otherwise, the library will crash with a Segmentation Fault error. You should also always call MeosFinalize() at the end of your code.

import (
	"fmt"

	gomeos "github.com/MobilityDB/GoMEOS"
)

func main() {
	gomeos.MeosInitialize("UTC")

	/* Input temporal points in WKT format */
	inst_wkt := "POINT(1 1)@2000-01-01"
	seq_disc_wkt := "{POINT(1 1)@2000-01-01, POINT(2 2)@2000-01-02}"
	seq_linear_wkt := "[POINT(1 1)@2000-01-01, POINT(2 2)@2000-01-02]"
	seq_step_wkt := "Interp=Step;[POINT(1 1)@2000-01-01, POINT(2 2)@2000-01-02]"
	ss_linear_wkt := "{[POINT(1 1)@2000-01-01, POINT(2 2)@2000-01-02],[POINT(3 3)@2000-01-03, POINT(3 3)@2000-01-04]}"
	ss_step_wkt := "Interp=Step;{[POINT(1 1)@2000-01-01, POINT(2 2)@2000-01-02],[POINT(3 3)@2000-01-03, POINT(3 3)@2000-01-04]}"

	/* Read WKT into temporal point object */
	inst := gomeos.NewTGeomPointInst(inst_wkt)
	seq_disc := gomeos.NewTGeomPointSeq(seq_disc_wkt)
	seq_linear := gomeos.NewTGeomPointSeq(seq_linear_wkt)
	seq_step := gomeos.NewTGeomPointSeq(seq_step_wkt)
	ss_linear := gomeos.NewTGeomPointSeqSet(ss_linear_wkt)
	ss_step := gomeos.NewTGeomPointSeqSet(ss_step_wkt)

	fmt.Println("--------------------Temporal Instant--------------------")
	fmt.Println(inst.TPointOut(5))
	fmt.Println("--------------------Temporal Sequence with Discrete Interpolation--------------------")
	fmt.Println(seq_disc.TPointOut(5))
	fmt.Println("--------------------Temporal Sequence with Linear Interpolation--------------------")
	fmt.Println(seq_linear.TPointOut(5))
	fmt.Println("--------------------Temporal Sequence with Step Interpolation--------------------")
	fmt.Println(seq_step.TPointOut(5))
	fmt.Println("--------------------Temporal Sequence Set with Linear Interpolation--------------------")
	fmt.Println(ss_linear.TPointOut(5))
	fmt.Println("--------------------Temporal Sequence Set with Step Interpolation--------------------")
	fmt.Println(ss_step.TPointOut(5))
	gomeos.MeosFinalize()
}
output:
--------------------Temporal Instant--------------------
POINT(1 1)@2000-01-01 00:00:00+00
--------------------Temporal Sequence with Discrete Interpolation--------------------
{POINT(1 1)@2000-01-01 00:00:00+00, POINT(2 2)@2000-01-02 00:00:00+00}
--------------------Temporal Sequence with Linear Interpolation--------------------
[POINT(1 1)@2000-01-01 00:00:00+00, POINT(2 2)@2000-01-02 00:00:00+00]
--------------------Temporal Sequence with Step Interpolation--------------------
Interp=Step;[POINT(1 1)@2000-01-01 00:00:00+00, POINT(2 2)@2000-01-02 00:00:00+00]
--------------------Temporal Sequence Set with Linear Interpolation--------------------
{[POINT(1 1)@2000-01-01 00:00:00+00, POINT(2 2)@2000-01-02 00:00:00+00], [POINT(3 3)@2000-01-03 00:00:00+00, POINT(3 3)@2000-01-04 00:00:00+00]}
--------------------Temporal Sequence Set with Step Interpolation--------------------
Interp=Step;{[POINT(1 1)@2000-01-01 00:00:00+00, POINT(2 2)@2000-01-02 00:00:00+00], [POINT(3 3)@2000-01-03 00:00:00+00, POINT(3 3)@2000-01-04 00:00:00+00]}

Documentation

Visit pkg.go.dev for a more complete and detailed documentation.

Documentation

Index

Examples

Constants

View Source
const (
	INTERP_NONE    Interpolation = C.INTERP_NONE
	DISCRETE       Interpolation = C.DISCRETE
	STEP           Interpolation = C.STEP
	LINEAR                       = C.LINEAR
	ANYTEMPSUBTYPE               = C.ANYTEMPSUBTYPE /**< Any temporal subtype */
	TINSTANT                     = C.TINSTANT       /**< Temporal instant subtype */
	TSEQUENCE                    = C.TSEQUENCE      /**< Temporal sequence subtype */
	TSEQUENCESET                 = C.TSEQUENCESET   /**< Temporal sequence set subtype */
	T_TBOOL                      = C.T_TBOOL        /**< temporal boolean type */
	T_TFLOAT                     = C.T_TFLOAT       /**< temporal float type */
	T_TINT                       = C.T_TINT         /**< temporal integer type */
	T_TTEXT                      = C.T_TTEXT        /**< temporal text type */
	T_TGEOMPOINT                 = C.T_TGEOMPOINT   /**< temporal geometry point type */
	T_TGEOGPOINT                 = C.T_TGEOGPOINT   /**< temporal geography point type */
)

Variables

This section is empty.

Functions

func AlwaysEqTBoolBool added in v0.1.9

func AlwaysEqTBoolBool[TB TBool](tb TB, value bool) bool

AlwaysEqTBoolBool Return true if a temporal boolean is always equal to a boolean

func AlwaysEqTFloatFloat added in v0.1.9

func AlwaysEqTFloatFloat[TF TFloat](tf TF, value float64) bool

AlwaysEqTFloatFloat Return true if a temporal float is always equal to a float

func AlwaysEqTIntInt added in v0.1.9

func AlwaysEqTIntInt[TI TInt](ti TI, value int) bool

AlwaysEqTIntInt Return true if a temporal integer is always equal to an integer

func AlwaysEqTemporalTemporal added in v0.1.9

func AlwaysEqTemporalTemporal[T1 Temporal, T2 Temporal](temp1 T1, temp2 T2) bool

AlwaysEqTemporalTemporal Return true if two temporal values are always equal

func AlwaysGeTFloatFloat added in v0.1.9

func AlwaysGeTFloatFloat[TF TFloat](tf TF, value float64) bool

AlwaysGeTFloatFloat Return true if a temporal float is always greater than or equal to a float

func AlwaysGeTIntInt added in v0.1.9

func AlwaysGeTIntInt[TI TInt](ti TI, value int) bool

AlwaysGeTIntInt Return true if a temporal integer is always greater than or equal to an integer

func AlwaysGeTemporalTemporal added in v0.1.9

func AlwaysGeTemporalTemporal[T Temporal](t1, t2 T) bool

AlwaysGeTemporalTemporal returns true if one temporal value is always greater than or equal to another temporal value

func AlwaysGtTFloatFloat added in v0.1.9

func AlwaysGtTFloatFloat[TF TFloat](tf TF, value float64) bool

AlwaysGtTFloatFloat Return true if a temporal float is always greater than a float

func AlwaysGtTIntInt added in v0.1.9

func AlwaysGtTIntInt[TI TInt](ti TI, value int) bool

AlwaysGtTIntInt Return true if a temporal integer is always greater than an integer

func AlwaysGtTemporalTemporal added in v0.1.9

func AlwaysGtTemporalTemporal[T Temporal](t1, t2 T) bool

AlwaysGtTemporalTemporal returns true if one temporal value is always greater than another temporal value

func AlwaysLeTFloatFloat added in v0.1.9

func AlwaysLeTFloatFloat[TF TFloat](tf TF, value float64) bool

AlwaysLeTFloatFloat Return true if a temporal float is always less than or equal to a float

func AlwaysLeTIntInt added in v0.1.9

func AlwaysLeTIntInt[TI TInt](ti TI, value int) bool

AlwaysLeTIntInt Return true if a temporal integer is always less than or equal to an integer

func AlwaysLeTemporalTemporal added in v0.1.9

func AlwaysLeTemporalTemporal[T Temporal](t1, t2 T) bool

AlwaysLeTemporalTemporal returns true if one temporal value is always less than or equal to another temporal value

func AlwaysLtTFloatFloat added in v0.1.9

func AlwaysLtTFloatFloat[TF TFloat](tf TF, value float64) bool

AlwaysLtTFloatFloat Return true if a temporal float is always less than a float

func AlwaysLtTIntInt added in v0.1.9

func AlwaysLtTIntInt[TI TInt](ti TI, value int) bool

AlwaysLtTIntInt Return true if a temporal integer is always less than an integer

func AlwaysLtTemporalTemporal added in v0.1.9

func AlwaysLtTemporalTemporal[T Temporal](t1, t2 T) bool

AlwaysLtTemporalTemporal returns true if one temporal value is always less than another temporal value

func AlwaysNeTFloatFloat added in v0.1.9

func AlwaysNeTFloatFloat[TF TFloat](tf TF, value float64) bool

AlwaysNeTFloatFloat Return true if a temporal float is always not equal to a float

func AlwaysNeTIntInt added in v0.1.9

func AlwaysNeTIntInt[TI TInt](ti TI, value int) bool

AlwaysNeTIntInt Return true if a temporal integer is always not equal to an integer

func AlwaysNeTemporalTemporal added in v0.1.9

func AlwaysNeTemporalTemporal[T Temporal](t1, t2 T) bool

AlwaysNeTemporalTemporal returns true if one temporal value is always not equal to another temporal value

func DateADTToDate

func DateADTToDate(d C.DateADT) time.Time

Return a temporal integer restricted to the complement of an integer.

Parameters:

  • temp: Temporal value
  • i: Value

See also: Temporal_minus_value()

func DateToDateADT

func DateToDateADT(t time.Time) C.DateADT

func DatetimeToTimestamptz

func DatetimeToTimestamptz(t time.Time) C.TimestampTz

Transform time.Time to TimestampTz

func EverEqTBoolBool added in v0.1.9

func EverEqTBoolBool[TB TBool](tb TB, value bool) bool

EverEqTBoolBool Return true if a temporal boolean is always equal to a boolean

Example
tb1 := NewTBoolSeq("{FALSE@2022-10-01, FALSE@2022-10-02,FALSE@2022-10-03}")
tb2 := true
res := EverEqTBoolBool(tb1, tb2)
fmt.Println(res)
Output:

false

func EverEqTFloatFloat added in v0.1.9

func EverEqTFloatFloat[TF TFloat](tf TF, value float64) bool

EverEqTFloatFloat Return true if a temporal float is ever equal to a float

func EverEqTIntInt added in v0.1.9

func EverEqTIntInt[TI TInt](ti TI, value int) bool

EverEqTIntInt Return true if a temporal integer is ever equal to an integer

func EverEqTemporalTemporal added in v0.1.9

func EverEqTemporalTemporal[T1 Temporal, T2 Temporal](temp1 T1, temp2 T2) bool

EverEqTemporalTemporal Return true if two temporal values are ever equal

Example
MeosInitialize("UTC")
tb1 := NewTBoolSeq("{FALSE@2022-10-01, FALSE@2022-10-02,FALSE@2022-10-03}")
tb2 := NewTBoolInst("TRUE@2022-10-01")
res := EverEqTemporalTemporal(tb1, tb2)
fmt.Println(res)
Output:

false

func EverGeTFloatFloat added in v0.1.9

func EverGeTFloatFloat[TF TFloat](tf TF, value float64) bool

EverGeTFloatFloat Return true if a temporal float is ever greater than or equal to a float

func EverGeTIntInt added in v0.1.9

func EverGeTIntInt[TI TInt](ti TI, value int) bool

EverGeTIntInt Return true if a temporal integer is ever greater than or equal to an integer

func EverGeTemporalTemporal added in v0.1.9

func EverGeTemporalTemporal[T Temporal](t1, t2 T) bool

EverGeTemporalTemporal returns true if one temporal value is ever greater than or equal to another temporal value

func EverGtTFloatFloat added in v0.1.9

func EverGtTFloatFloat[TF TFloat](tf TF, value float64) bool

EverGtTFloatFloat Return true if a temporal float is ever greater than a float

func EverGtTIntInt added in v0.1.9

func EverGtTIntInt[TI TInt](ti TI, value int) bool

EverGtTIntInt Return true if a temporal integer is ever greater than an integer

func EverGtTemporalTemporal added in v0.1.9

func EverGtTemporalTemporal[T Temporal](t1, t2 T) bool

EverGtTemporalTemporal returns true if one temporal value is ever greater than another temporal value

func EverLeTFloatFloat added in v0.1.9

func EverLeTFloatFloat[TF TFloat](tf TF, value float64) bool

EverLeTFloatFloat Return true if a temporal float is ever less than or equal to a float

func EverLeTIntInt added in v0.1.9

func EverLeTIntInt[TI TInt](ti TI, value int) bool

EverLeTIntInt Return true if a temporal integer is ever less than or equal to an integer

func EverLeTemporalTemporal added in v0.1.9

func EverLeTemporalTemporal[T Temporal](t1, t2 T) bool

EverLeTemporalTemporal returns true if one temporal value is ever less than or equal to another temporal value

func EverLtTFloatFloat added in v0.1.9

func EverLtTFloatFloat[TF TFloat](tf TF, value float64) bool

EverLtTFloatFloat Return true if a temporal float is ever less than a float

func EverLtTIntInt added in v0.1.9

func EverLtTIntInt[TI TInt](ti TI, value int) bool

EverLtTIntInt Return true if a temporal integer is ever less than an integer

func EverLtTemporalTemporal added in v0.1.9

func EverLtTemporalTemporal[T Temporal](t1, t2 T) bool

EverLtTemporalTemporal returns true if one temporal value is ever less than another temporal value

func EverNeTFloatFloat added in v0.1.9

func EverNeTFloatFloat[TF TFloat](tf TF, value float64) bool

EverNeTFloatFloat Return true if a temporal float is ever not equal to a float

func EverNeTIntInt added in v0.1.9

func EverNeTIntInt[TI TInt](ti TI, value int) bool

EverNeTIntInt Return true if a temporal integer is ever not equal to an integer

func EverNeTemporalTemporal added in v0.1.9

func EverNeTemporalTemporal[T Temporal](t1, t2 T) bool

EverNeTemporalTemporal returns true if one temporal value is ever not equal to another temporal value

func GeoAsEWKT

func GeoAsEWKT(g *Geom, precision int) string

func GeoAsGeojson

func GeoAsGeojson(g *Geom, option int, precision int) string

func GeoAsHexEwkb

func GeoAsHexEwkb(g *Geom, endian string) string

func GeoAsText

func GeoAsText(g *Geom, precision int) string

func GeoSame

func GeoSame(g1 *Geom, g2 *Geom) bool

------------------------- Operation ---------------------------

func IntervalToTimeDelta

func IntervalToTimeDelta(interval C.Interval) timeutil.Timedelta

func MeosFinalize

func MeosFinalize()

func MeosInitialize

func MeosInitialize(tz string)

func NadTIntInt added in v0.1.9

func NadTIntInt[TI TInt](tf TI, value int) float64

NadTIntInt Return the nearest approach distance between a temporal number and a number

func NadTIntTInt added in v0.1.9

func NadTIntTInt[TI1 TInt, TI2 TInt](tf1 TI1, tf2 TI2) float64

NadTIntTInt Return the nearest approach distance between two temporal integers

func STBoxOut

func STBoxOut(stbox *STBox, max_decimals int) string

------------------------- Output ----------------------------------------

func SpansetUnionFinalfn

func SpansetUnionFinalfn[SS SpanSet](state SS, output SS) SS

func SpansetUnionTransfn

func SpansetUnionTransfn[SS SpanSet](state SS, ss SS, output SS) SS

func TBoolEndValue

func TBoolEndValue[TB TBool](tb TB) bool

TBoolEndValue Return the end value of a temporal boolean

func TBoolFromBaseTemporal added in v0.1.9

func TBoolFromBaseTemporal[T1 Temporal, T2 Temporal](value bool, base T1, output T2) T2

TBoolFromBaseTemporal Create a temporal Boolean from a Boolean value and the time frame of another temporal object.

Example
tb_seq := TBoolIn("{FALSE@2022-10-01, FALSE@2022-10-02,TRUE@2022-10-03}", &TBoolSeq{})
res := TBoolFromBaseTemporal(true, tb_seq, &TBoolSeq{})
fmt.Println(TBoolOut(res))
Output:

{t@2022-10-01 00:00:00+00, t@2022-10-02 00:00:00+00, t@2022-10-03 00:00:00+00}

func TBoolFromMFJSON

func TBoolFromMFJSON[TB TBool](input string, output TB) TB

TBoolFromMFJSON Return a temporal boolean from its MF-JSON representation

func TBoolIn

func TBoolIn[TB TBool](input string, output TB) TB

func TBoolOut

func TBoolOut[TB TBool](tb TB) string
Example
g_is := NewTBoolInst("TRUE@2022-10-01")
fmt.Println(TBoolOut(g_is))
Output:

t@2022-10-01 00:00:00+00

func TBoolStartValue

func TBoolStartValue[TB TBool](tb TB) bool

TBoolStartValue Return the start value of a temporal boolean

func TBoolValueAtTimestamp

func TBoolValueAtTimestamp[TB TBool](tb TB, ts time.Time) bool

TBoolValueAtTimestamp Return the value of a temporal boolean at a timestamptz

Example
g_is := NewTBoolSeq("{FALSE@2022-10-01, FALSE@2022-10-02,TRUE@2022-10-03}")
ts, _ := time.Parse("2006-01-02", "2022-10-01")
res := TBoolValueAtTimestamp(g_is, ts)
fmt.Println(res)
Output:

false

func TBoolValueSet

func TBoolValueSet[TB TBool](tb TB) ([]bool, error)

TBoolValueSet Return the array of base values of a temporal boolean

func TBoxOut

func TBoxOut(tbox *TBox, max_decimals int) string

------------------------- Output ----------------------------------------

func TFloatEndValue added in v0.1.9

func TFloatEndValue[TB TFloat](tb TB) float64

TFloatEndValue Return the end value of a temporal float

func TFloatFromBaseTemporal added in v0.1.9

func TFloatFromBaseTemporal[T1 Temporal, T2 Temporal](value float64, base T1, output T2) T2

TFloatFromBaseTemporal Return a temporal float from a float and the time frame of another temporal value

Example
tb_seq := TBoolIn("{FALSE@2022-10-01, FALSE@2022-10-02,TRUE@2022-10-03}", &TBoolSeq{})
res := TFloatFromBaseTemporal(2, tb_seq, &TFloatSeq{})
fmt.Println(TFloatOut(res, 10))
Output:

{2@2022-10-01 00:00:00+00, 2@2022-10-02 00:00:00+00, 2@2022-10-03 00:00:00+00}

func TFloatFromMFJSON

func TFloatFromMFJSON[TF TFloat](input string, output TF) TF

TFloatFromMFJSON Return a temporal float from its MF-JSON representation

func TFloatIn

func TFloatIn[TF TFloat](input string, output TF) TF

TFloatIn Return a temporal float from its Well-Known Text (WKT) representation

func TFloatMaxValue added in v0.1.9

func TFloatMaxValue[TB TFloat](tb TB) float64

TFloatMaxValue Return the maximum value of a temporal float

func TFloatMinValue added in v0.1.9

func TFloatMinValue[TB TFloat](tb TB) float64

TFloatMinValue Return the minimum value of a temporal float

func TFloatOut

func TFloatOut[TF TFloat](tf TF, maxdd int) string

TFloatOut Return a temporal float from its Well-Known Text (WKT) representation

func TFloatStartValue added in v0.1.9

func TFloatStartValue[TB TFloat](tb TB) float64

TFloatStartValue Return the start value of a temporal float

func TFloatToTInt

func TFloatToTInt[TF TFloat, TI TInt](tf TF, ti TI) (TI, error)

TFloatToTInt Return a temporal float converted to a temporal integer

Example
tf_seq := TFloatIn("{1.2@2022-10-01, 2.3@2022-10-02,3.4@2022-10-03}", &TFloatSeq{})
res, _ := TFloatToTInt(tf_seq, &TIntSeq{})
fmt.Println(TIntOut(res))
Output:

{1@2022-10-01 00:00:00+00, 2@2022-10-02 00:00:00+00, 3@2022-10-03 00:00:00+00}

func TFloatValueAtTimestamp added in v0.1.9

func TFloatValueAtTimestamp[TF TFloat](tf TF, ts time.Time) float64

TFloatValueAtTimestamp Return the value of a temporal float at a timestamptz

Example
tf_seq := TFloatIn("{1.2@2022-10-01, 2.3@2022-10-02,3.4@2022-10-03}", &TFloatSeq{})
ts, _ := time.Parse("2006-01-02", "2022-10-01")
res := TFloatValueAtTimestamp(tf_seq, ts)
fmt.Println(res)
Output:

1.2

func TFloatValues added in v0.1.9

func TFloatValues[TF TFloat](tf TF) ([]float64, error)

TFloatValues Return the array of base values of a temporal float

Example
tf_seq := TFloatIn("{1.2@2022-10-01, 2.3@2022-10-02,3.4@2022-10-03}", &TFloatSeq{})
res, _ := TFloatValues(tf_seq)
fmt.Println(res)
Output:

[1.2 2.3 3.4]

func TGeogPointFromMFJSON

func TGeogPointFromMFJSON[TG TGeogPoint](input string, output TG) TG

func TGeogPointIn

func TGeogPointIn[TG TGeogPoint](input string, output TG) TG

------------------------- TGeogPoint ---------------------------

func TGeomPointFromMFJSON

func TGeomPointFromMFJSON[TG TGeomPoint](input string, output TG) TG

func TGeomPointIn

func TGeomPointIn[TG TGeomPoint](input string, output TG) TG

------------------------- TGeomPoint ---------------------------

func TIntEndValue added in v0.1.9

func TIntEndValue[TB TInt](tb TB) int

TIntEndValue Return the end value of a temporal int

func TIntFromBaseTemporal added in v0.1.9

func TIntFromBaseTemporal[T1 Temporal, T2 Temporal](value int, base T1, output T2) T2

TIntFromBaseTemporal Return a temporal int from a int and the time frame of another temporal value

func TIntFromMFJSON

func TIntFromMFJSON[TI TInt](input string, output TI) TI

TIntFromMFJSON Return a temporal integer from its MF-JSON representation

func TIntIn

func TIntIn[TI TInt](input string, output TI) TI

TIntIn Return a temporal integer from its Well-Known Text (WKT) representation

func TIntMaxValue added in v0.1.9

func TIntMaxValue[TB TInt](tb TB) int

TIntMaxValue Return the maximum value of a temporal int

func TIntMinValue added in v0.1.9

func TIntMinValue[TB TInt](tb TB) int

TIntMinValue Return the minimum value of a temporal int

func TIntOut

func TIntOut[TI TInt](ti TI) string

TIntOut Return a temporal integer from its Well-Known Text (WKT) representation

func TIntStartValue added in v0.1.9

func TIntStartValue[TB TInt](tb TB) int

TIntStartValue Return the start value of a temporal int

func TIntToTFloat added in v0.1.9

func TIntToTFloat[TI TInt, TF TFloat](ti TI, output TF) TF

TIntToTFloat Return a temporal integer converted to a temporal float

func TIntValueAtTimestamp added in v0.1.9

func TIntValueAtTimestamp[TF TInt](tf TF, ts time.Time) int

TIntValueAtTimestamp Return the value of a temporal int at a timestamptz

func TIntValues added in v0.1.9

func TIntValues[TF TInt](tf TF) ([]int, error)

TIntValues Return the array of base values of a temporal integer

func TNotTBool added in v0.1.9

func TNotTBool[TB TBool](tb TB, output TB) TB

TNotTBool Return the boolean not of a temporal boolean

Example
tb1 := NewTBoolSeq("{TRUE@2022-10-01, TRUE@2022-10-02,TRUE@2022-10-03}")
res := TNotTBool(tb1, &TBoolSeq{})
fmt.Println(res.String())
Output:

{f@2022-10-01 00:00:00+00, f@2022-10-02 00:00:00+00, f@2022-10-03 00:00:00+00}

func TNumberIntegral

func TNumberIntegral[TN TNumber](tn TN) float64

func TNumberToSpan added in v0.1.9

func TNumberToSpan[TN TNumber, S Span](tn TN, output S) S

TNumberToSpan Return the value span of a temporal number

Example
tf_seq := TFloatIn("{1.2@2022-10-01, 2.3@2022-10-02,3.4@2022-10-03}", &TFloatSeq{})
fs := TNumberToSpan(tf_seq, &FloatSpan{})
fmt.Println(fs.FloatSpanOut(10))
Output:

[1.2, 3.4]

func TNumberValueSpans added in v0.1.9

func TNumberValueSpans[TN TNumber, SS SpanSet](tn TN, ss SS) SS

TNumberValueSpans Return the base values of a temporal number as a span set

Example
tf_seq := TFloatIn("{1.2@2022-10-01, 2.3@2022-10-02,3.4@2022-10-03}", &TFloatSeq{})
fs := TNumberValueSpans(tf_seq, &FloatSpanSet{})
fmt.Println(fs.FloatSpanSetOut(10))
Output:

{[1.2, 1.2], [2.3, 2.3], [3.4, 3.4]}

func TPointAsEWKT

func TPointAsEWKT[T TPoint](temp T, maxdd int) string

func TPointAsText

func TPointAsText[TP TPoint](tp TP, maxdd int) string

func TPointGeoAsEWKT

func TPointGeoAsEWKT[T TPoint](temp T, maxdd int) string

func TPointLength

func TPointLength[T Temporal](temp T) float64

func TPointOut

func TPointOut[TP TPoint](tp TP, maxdd int) string

func TPointSpeed

func TPointSpeed[T Temporal, F TFloat](temp T, new_temp F) F

func TPointTransform

func TPointTransform[T TPoint](temp T, output T, srid_to int) T

func TSequenceLowerInclude

func TSequenceLowerInclude[TS TSequence](temp TS) bool

------------------------- Accessors ----------------------------------

func TSequenceMake

func TSequenceMake[TI TInstant, TS TSequence](instants []TI, count int, lower_inc bool, upper_inc bool, interp Interpolation, normalize bool, output TS) TS

------------------------- Constructor ----------------------------------

func TSequenceUpperInclude

func TSequenceUpperInclude[TS TSequence](temp TS) bool

func TTextFromMFJSON

func TTextFromMFJSON[TT TText](input string, output TT) TT

func TTextIn

func TTextIn[TT TText](input string, output TT) TT

------------------------- TText ---------------------------

func TTextOut

func TTextOut[TT TText](tt TT) string

func TemporalAsMFJSON

func TemporalAsMFJSON[T Temporal](temp T, with_bbox bool, flags int, precision int, srs string) string

------------------------- Output ---------------------------

func TemporalDuration

func TemporalDuration[T Temporal](temp T, ignore_gaps bool) timeutil.Timedelta

func TemporalDyntimewarpDistance

func TemporalDyntimewarpDistance[T Temporal](temp1 T, temp2 T) float64

func TemporalEndInstant

func TemporalEndInstant[T Temporal, TI TInstant](temp T, inst TI) TI

func TemporalEndTimestamptz

func TemporalEndTimestamptz[T Temporal](temp T) time.Time

func TemporalFrechetDistance

func TemporalFrechetDistance[T Temporal](temp1 T, temp2 T) float64

func TemporalFromHexWKB

func TemporalFromHexWKB[T Temporal](s string, output T) T

------------------------- Input ----------------------------------

func TemporalHash

func TemporalHash[T Temporal](temp T) int

func TemporalHausdorffDistance

func TemporalHausdorffDistance[T Temporal](temp1 T, temp2 T) float64

func TemporalInstantN

func TemporalInstantN[T Temporal, TI TInstant](temp T, inst TI, n int) TI

func TemporalInstants

func TemporalInstants[T Temporal, TI TInstant](temp T, insts []TI) []TI

func TemporalInterpolation

func TemporalInterpolation[T Temporal](temp T) string

func TemporalMaxInstant

func TemporalMaxInstant[T Temporal, TI TInstant](temp T, inst TI) TI

func TemporalMinInstant

func TemporalMinInstant[T Temporal, TI TInstant](temp T, inst TI) TI

func TemporalNumInstants

func TemporalNumInstants[T Temporal](temp T) int

func TemporalNumTimestamps

func TemporalNumTimestamps[T Temporal](temp T) int

func TemporalSimplifyDP

func TemporalSimplifyDP[T Temporal](temp T, new_temp T, dist float64, syncdist bool) T

func TemporalStartInstant

func TemporalStartInstant[T Temporal, TI TInstant](temp T, inst TI) TI

func TemporalStartTimestamptz

func TemporalStartTimestamptz[T Temporal](temp T) time.Time

func TemporalTimestampN

func TemporalTimestampN[T Temporal](temp T, n int) time.Time

func TemporalTimestamps

func TemporalTimestamps[T Temporal](temp T) []time.Time

func TimeDeltaToInterval

func TimeDeltaToInterval(td timeutil.Timedelta) C.Interval

func TimestamptzIn

func TimestamptzIn(timeStr string) C.TimestampTz

func TimestamptzOut

func TimestamptzOut(ts C.TimestampTz) string

func TimestamptzToDatetime

func TimestamptzToDatetime(tstz C.TimestampTz) time.Time

Transform TimestampTz to time.Time

func TnumberTwavg

func TnumberTwavg[TN TNumber](temp TN) float64

func TpointAtGeomTime

func TpointAtGeomTime[T Temporal](temp T, new_temp T, geom *Geom) T

func TpointMinusGeomTime

func TpointMinusGeomTime[T Temporal](temp T, new_temp T, geom *Geom) T

Types

type DateSet

type DateSet struct {
	// contains filtered or unexported fields
}

func FalseDateSet

func FalseDateSet() *DateSet

func NewDateSet

func NewDateSet(g_ds_in string) *DateSet

------------------------- Input ----------------------------------------

func (*DateSet) Add

func (g_ds *DateSet) Add(other interface{}) (Dates, error)

func (*DateSet) Contains

func (g_ds *DateSet) Contains(other interface{}) (bool, error)

------------------------- Topological Operations ------------------------

func (*DateSet) DateSetOut

func (g_ds *DateSet) DateSetOut() string

------------------------- Output ----------------------------------------

func (*DateSet) Distance

func (g_ds *DateSet) Distance(other interface{}) (timeutil.Timedelta, error)

------------------------- Distance Operations ---------------------------

func (*DateSet) Duration

func (g_ds *DateSet) Duration() timeutil.Timedelta

func (*DateSet) ElementN

func (g_ds *DateSet) ElementN(n int) time.Time

func (*DateSet) Elements

func (g_ds *DateSet) Elements() []time.Time

func (*DateSet) EndElement

func (g_ds *DateSet) EndElement() time.Time

func (*DateSet) Intersection

func (g_ds *DateSet) Intersection(other interface{}) (interface{}, error)

func (*DateSet) IsLeft

func (g_ds *DateSet) IsLeft(other interface{}) (bool, error)

------------------------- Position Operations ---------------------------

func (*DateSet) IsOverOrLeft

func (g_ds *DateSet) IsOverOrLeft(other interface{}) (bool, error)

func (*DateSet) IsOverOrRight

func (g_ds *DateSet) IsOverOrRight(other interface{}) (bool, error)

func (*DateSet) IsRight

func (g_ds *DateSet) IsRight(other interface{}) (bool, error)

func (*DateSet) Minus

func (g_ds *DateSet) Minus(other interface{}) (Dates, error)

func (*DateSet) NumElements

func (g_ds *DateSet) NumElements() int

func (DateSet) Output

func (ds DateSet) Output() string

func (*DateSet) Overlaps

func (g_ds *DateSet) Overlaps(other interface{}) (bool, error)

func (*DateSet) Scale

func (g_ds *DateSet) Scale(duration interface{}) (*DateSet, error)

func (*DateSet) Shift

func (g_ds *DateSet) Shift(delta interface{}) (*DateSet, error)

func (*DateSet) ShiftScale

func (g_ds *DateSet) ShiftScale(shift interface{}, duration interface{}) (*DateSet, error)

------------------------- Transformations -------------------------------

func (*DateSet) StartElement

func (g_ds *DateSet) StartElement() time.Time

func (*DateSet) Sub

func (g_ds *DateSet) Sub(other interface{}) (Dates, error)

func (*DateSet) ToSpan

func (g_ds *DateSet) ToSpan() *DateSpan

TODO: remove library duplicate(fix the warnings) ------------------------- Conversions -----------------------------------

func (*DateSet) ToSpanSet

func (g_ds *DateSet) ToSpanSet() *DateSpanSet

func (*DateSet) Union

func (g_ds *DateSet) Union(other interface{}) (Dates, error)

type DateSpan

type DateSpan struct {
	// contains filtered or unexported fields
}

DateSpan wraps the C Span type

func NewDateSpan

func NewDateSpan(g_ds_in string) *DateSpan

------------------------- Input ----------------------------------------

func (*DateSpan) Contains

func (g_ds *DateSpan) Contains(other interface{}) (bool, error)

func (*DateSpan) DateSpanOut

func (g_ds *DateSpan) DateSpanOut() string

------------------------- Output ----------------------------------------

func (*DateSpan) Distance

func (g_ds *DateSpan) Distance(other interface{}) (timeutil.Timedelta, error)

------------------------- Distance Operations ---------------------------

func (*DateSpan) Duration

func (g_ds *DateSpan) Duration() timeutil.Timedelta

func (*DateSpan) Intersection

func (g_ds *DateSpan) Intersection(other interface{}) (Dates, error)

------------------------- Set Operations --------------------------------

func (*DateSpan) IsAdjacent

func (g_ds *DateSpan) IsAdjacent(other interface{}) (bool, error)

------------------------- Topological Operations ------------------------

func (*DateSpan) IsLeft

func (g_ds *DateSpan) IsLeft(other interface{}) (bool, error)

------------------------- Position Operations ---------------------------

func (*DateSpan) IsOverOrLeft

func (g_ds *DateSpan) IsOverOrLeft(other interface{}) (bool, error)

func (*DateSpan) IsOverOrRight

func (g_ds *DateSpan) IsOverOrRight(other interface{}) (bool, error)

func (*DateSpan) IsRight

func (g_ds *DateSpan) IsRight(other interface{}) (bool, error)

func (*DateSpan) Lower

func (g_ds *DateSpan) Lower() time.Time

------------------------- Accessors -------------------------------------

func (*DateSpan) Minus

func (g_ds *DateSpan) Minus(other interface{}) (*DateSpanSet, error)

func (DateSpan) Output

func (ds DateSpan) Output() string

func (*DateSpan) Overlaps

func (g_ds *DateSpan) Overlaps(other interface{}) (bool, error)

func (*DateSpan) Scale

func (g_ds *DateSpan) Scale(duration interface{}) (*DateSpan, error)

func (*DateSpan) Shift

func (g_ds *DateSpan) Shift(delta interface{}) (*DateSpan, error)

func (*DateSpan) ShiftScale

func (g_ds *DateSpan) ShiftScale(shift interface{}, duration interface{}) (*DateSpan, error)

------------------------- Transformations -------------------------------

func (*DateSpan) ToSpanSet

func (g_ds *DateSpan) ToSpanSet() *DateSpanSet

func (*DateSpan) ToTstzspan

func (g_ds *DateSpan) ToTstzspan() *TsTzSpan

func (*DateSpan) Union

func (g_ds *DateSpan) Union(other interface{}) (*DateSpanSet, error)

func (*DateSpan) Upper

func (g_ds *DateSpan) Upper() time.Time

type DateSpanSet

type DateSpanSet struct {
	// contains filtered or unexported fields
}

func NewDateSpanSet

func NewDateSpanSet(g_dss_in string) *DateSpanSet

------------------------- Input ----------------------------------------

func (*DateSpanSet) Add

func (g_dss *DateSpanSet) Add(other interface{}) (*DateSpanSet, error)

func (*DateSpanSet) Contains

func (g_dss *DateSpanSet) Contains(other interface{}) (bool, error)

------------------------- Topological Operations ------------------------

func (*DateSpanSet) DateN

func (g_dss *DateSpanSet) DateN(n int) time.Time

func (*DateSpanSet) DateSpanSetOut

func (g_dss *DateSpanSet) DateSpanSetOut() string

------------------------- Output ----------------------------------------

func (*DateSpanSet) Dates

func (g_dss *DateSpanSet) Dates() []time.Time

func (*DateSpanSet) Distance

func (g_dss *DateSpanSet) Distance(other interface{}) (timeutil.Timedelta, error)

------------------------- Distance Operations ---------------------------

func (*DateSpanSet) Duration

func (g_dss *DateSpanSet) Duration(ignore_gap bool) timeutil.Timedelta

func (*DateSpanSet) EndDate

func (g_dss *DateSpanSet) EndDate() time.Time

func (*DateSpanSet) EndSpan

func (g_dss *DateSpanSet) EndSpan() DateSpan

func (*DateSpanSet) Intersection

func (g_dss *DateSpanSet) Intersection(other interface{}) (*DateSpanSet, error)

------------------------- Set Operations --------------------------------

func (*DateSpanSet) IsAdjacent

func (g_dss *DateSpanSet) IsAdjacent(other interface{}) (bool, error)

func (*DateSpanSet) IsLeft

func (g_ds *DateSpanSet) IsLeft(other interface{}) (bool, error)

------------------------- Position Operations ---------------------------

func (*DateSpanSet) IsOverOrLeft

func (g_ds *DateSpanSet) IsOverOrLeft(other interface{}) (bool, error)

func (*DateSpanSet) IsOverOrRight

func (g_ds *DateSpanSet) IsOverOrRight(other interface{}) (bool, error)

func (*DateSpanSet) IsRight

func (g_ds *DateSpanSet) IsRight(other interface{}) (bool, error)

func (*DateSpanSet) Minus

func (g_dss *DateSpanSet) Minus(other interface{}) (*DateSpanSet, error)

func (*DateSpanSet) Mul

func (g_dss *DateSpanSet) Mul(other interface{}) (*DateSpanSet, error)

func (*DateSpanSet) NumDates

func (g_dss *DateSpanSet) NumDates() int

func (*DateSpanSet) NumSpans

func (g_dss *DateSpanSet) NumSpans() int

func (DateSpanSet) Output

func (ds DateSpanSet) Output() string

func (*DateSpanSet) Overlaps

func (g_dss *DateSpanSet) Overlaps(other interface{}) (bool, error)

func (*DateSpanSet) Scale

func (g_ds *DateSpanSet) Scale(duration interface{}) (*DateSpanSet, error)

func (*DateSpanSet) Shift

func (g_ds *DateSpanSet) Shift(delta interface{}) (*DateSpanSet, error)

func (*DateSpanSet) ShiftScale

func (g_ds *DateSpanSet) ShiftScale(shift interface{}, duration interface{}) (*DateSpanSet, error)

------------------------- Transformations -------------------------------

func (*DateSpanSet) SpanN

func (g_dss *DateSpanSet) SpanN(n int) DateSpan

func (*DateSpanSet) Spans

func (g_dss *DateSpanSet) Spans() []DateSpan

func (*DateSpanSet) StartDate

func (g_dss *DateSpanSet) StartDate() time.Time

func (*DateSpanSet) StartSpan

func (g_dss *DateSpanSet) StartSpan() DateSpan

func (*DateSpanSet) Sub

func (g_dss *DateSpanSet) Sub(other interface{}) (*DateSpanSet, error)

func (*DateSpanSet) ToSpan

func (g_dss *DateSpanSet) ToSpan() *DateSpan

------------------------- Conversions -----------------------------------

func (*DateSpanSet) ToTsTzSpanSet

func (g_dss *DateSpanSet) ToTsTzSpanSet() *TsTzSpanSet

func (*DateSpanSet) Union

func (g_dss *DateSpanSet) Union(other interface{}) (*DateSpanSet, error)

type Dates

type Dates interface {
	Output() string
}

type FloatSet

type FloatSet struct {
	// contains filtered or unexported fields
}

func NewFloatSet

func NewFloatSet(g_fs_in string) FloatSet

------------------------- Input ----------------------------------------

func (*FloatSet) Add

func (g_fs *FloatSet) Add(other interface{}) (*FloatSet, error)

func (*FloatSet) Contains

func (g_fs *FloatSet) Contains(other interface{}) (bool, error)

func (*FloatSet) Distance

func (g_fs *FloatSet) Distance(other interface{}) (float64, error)

------------------------- Distance Operations --------------------------------

func (FloatSet) ElementN

func (g_fs FloatSet) ElementN(n int) float64

func (FloatSet) Elements

func (g_fs FloatSet) Elements() []float64

func (FloatSet) EndElement

func (g_fs FloatSet) EndElement() float64

func (*FloatSet) FloatSetOut

func (g_fs *FloatSet) FloatSetOut(max_decimal int) string

------------------------- Output ----------------------------------------

func (*FloatSet) Intersection

func (g_fs *FloatSet) Intersection(other interface{}) (*FloatSet, error)

------------------------- Set Operations --------------------------------

func (*FloatSet) IsLeft

func (g_fs *FloatSet) IsLeft(other interface{}) (bool, error)

------------------------- Position Operations ---------------------------

func (*FloatSet) IsOverOrLeft

func (g_fs *FloatSet) IsOverOrLeft(other interface{}) (bool, error)

func (*FloatSet) IsOverOrRight

func (g_fs *FloatSet) IsOverOrRight(other interface{}) (bool, error)

func (*FloatSet) IsRight

func (g_fs *FloatSet) IsRight(other interface{}) (bool, error)

func (*FloatSet) Minus

func (g_fs *FloatSet) Minus(other interface{}) (*FloatSet, error)

func (*FloatSet) Mul

func (g_fs *FloatSet) Mul(other interface{}) (*FloatSet, error)

func (FloatSet) NumElements

func (g_fs FloatSet) NumElements() int

func (FloatSet) Scale

func (g_fs FloatSet) Scale(width float64) FloatSet

func (FloatSet) Shift

func (g_fs FloatSet) Shift(delta float64) FloatSet

func (FloatSet) ShiftScale

func (g_fs FloatSet) ShiftScale(d float64, w float64) FloatSet

func (FloatSet) StartElement

func (g_fs FloatSet) StartElement() float64

------------------------- Accessors -------------------------------------

func (*FloatSet) Sub

func (g_fs *FloatSet) Sub(other interface{}) (*FloatSet, error)

func (FloatSet) ToIntSet

func (g_fs FloatSet) ToIntSet() IntSet

------------------------- Conversions -----------------------------------

func (FloatSet) ToSpanSet

func (g_fs FloatSet) ToSpanSet() FloatSpanSet

func (*FloatSet) Union

func (g_fs *FloatSet) Union(other interface{}) (*FloatSet, error)

type FloatSpan

type FloatSpan struct {
	// contains filtered or unexported fields
}

func NewFloatSpan

func NewFloatSpan(g_fs_in string) *FloatSpan

func (*FloatSpan) Add

func (g_fs *FloatSpan) Add(other interface{}) (*FloatSpanSet, error)

func (*FloatSpan) Contains

func (g_fs *FloatSpan) Contains(other interface{}) (bool, error)

func (*FloatSpan) Distance

func (g_fs *FloatSpan) Distance(other interface{}) (float64, error)

func (FloatSpan) FloatSpanOut

func (g_fs FloatSpan) FloatSpanOut(max_decimal int) string

func (*FloatSpan) Init added in v0.1.9

func (g_fs *FloatSpan) Init(c_span *C.Span)

func (*FloatSpan) Inner added in v0.1.9

func (g_fs *FloatSpan) Inner() *C.Span

func (*FloatSpan) Intersection

func (g_fs *FloatSpan) Intersection(other interface{}) (*FloatSpan, error)

func (*FloatSpan) IsAdjacent

func (g_fs *FloatSpan) IsAdjacent(other interface{}) (bool, error)

func (*FloatSpan) IsLeft

func (g_fs *FloatSpan) IsLeft(other interface{}) (bool, error)

func (*FloatSpan) IsOverOrLeft

func (g_fs *FloatSpan) IsOverOrLeft(other interface{}) (bool, error)

func (*FloatSpan) IsOverOrRight

func (g_fs *FloatSpan) IsOverOrRight(other interface{}) (bool, error)

func (*FloatSpan) IsRight

func (g_fs *FloatSpan) IsRight(other interface{}) (bool, error)

func (*FloatSpan) IsSame

func (g_fs *FloatSpan) IsSame(other interface{}) (bool, error)

func (FloatSpan) Lower

func (g_fs FloatSpan) Lower() float64

func (*FloatSpan) Minus

func (g_fs *FloatSpan) Minus(other interface{}) (*FloatSpanSet, error)

func (*FloatSpan) Mul

func (g_fs *FloatSpan) Mul(other interface{}) (*FloatSpan, error)

func (FloatSpan) Scale

func (g_fs FloatSpan) Scale(width float64) FloatSpan

func (FloatSpan) Shift

func (g_fs FloatSpan) Shift(delta float64) FloatSpan

func (FloatSpan) ShiftScale

func (g_fs FloatSpan) ShiftScale(d float64, w float64) FloatSpan

func (*FloatSpan) Sub

func (g_fs *FloatSpan) Sub(other interface{}) (*FloatSpanSet, error)

func (FloatSpan) ToIntSpan

func (g_fs FloatSpan) ToIntSpan() IntSpan

func (FloatSpan) ToSpanSet

func (g_fs FloatSpan) ToSpanSet() FloatSpanSet

func (*FloatSpan) Union

func (g_fs *FloatSpan) Union(other interface{}) (*FloatSpanSet, error)

func (FloatSpan) Upper

func (g_fs FloatSpan) Upper() float64

func (FloatSpan) Width

func (g_fs FloatSpan) Width() float32

type FloatSpanSet

type FloatSpanSet struct {
	// contains filtered or unexported fields
}

func NewFloatSpanSet

func NewFloatSpanSet(g_fss_in string) *FloatSpanSet

------------------------- Input ----------------------------------------

func (*FloatSpanSet) Add

func (g_fss *FloatSpanSet) Add(other interface{}) (*FloatSpanSet, error)

func (*FloatSpanSet) Contains

func (g_fss *FloatSpanSet) Contains(other interface{}) (bool, error)

func (*FloatSpanSet) Distance

func (g_fss *FloatSpanSet) Distance(other interface{}) (float32, error)

———————–– Distance Operations —————————

func (FloatSpanSet) EndSpan

func (g_fss FloatSpanSet) EndSpan() FloatSpan

Returns the last span in FloatSpanSet. Returns:

A FloatSpan instance

MEOS Functions:

spanset_end_span

func (*FloatSpanSet) FloatSpanSetOut

func (g_fss *FloatSpanSet) FloatSpanSetOut(max_decimal int) string

------------------------- Output ----------------------------------------

Return the string representation of the content of FloatSpanSet.

Returns:

String

MEOS Functions:

floatspanset_out

func (*FloatSpanSet) Init

func (fss *FloatSpanSet) Init(ss *C.SpanSet)

func (*FloatSpanSet) Inner

func (fss *FloatSpanSet) Inner() *C.SpanSet

func (*FloatSpanSet) Intersection

func (g_fss *FloatSpanSet) Intersection(other interface{}) (*FloatSpanSet, error)

———————–– Set Operations ––––––––––––––––

func (*FloatSpanSet) IsAdjacent

func (g_fss *FloatSpanSet) IsAdjacent(other interface{}) (bool, error)

------------------------- Topological Operations --------------------------------

func (*FloatSpanSet) IsLeft

func (g_fss *FloatSpanSet) IsLeft(other interface{}) (bool, error)

func (*FloatSpanSet) IsOverOrLeft

func (g_fss *FloatSpanSet) IsOverOrLeft(other interface{}) (bool, error)

func (*FloatSpanSet) IsOverOrRight

func (g_fss *FloatSpanSet) IsOverOrRight(other interface{}) (bool, error)

func (*FloatSpanSet) IsRight

func (g_fss *FloatSpanSet) IsRight(other interface{}) (bool, error)

func (*FloatSpanSet) IsSame

func (g_fss *FloatSpanSet) IsSame(other interface{}) (bool, error)

func (*FloatSpanSet) IsSpanSet

func (fss *FloatSpanSet) IsSpanSet() bool

------------------------- Interface ----------------------------------------

func (*FloatSpanSet) Minus

func (g_fss *FloatSpanSet) Minus(other interface{}) (*FloatSpanSet, error)

func (*FloatSpanSet) Mul

func (g_fss *FloatSpanSet) Mul(other interface{}) (*FloatSpanSet, error)

func (FloatSpanSet) NumSpans

func (g_fss FloatSpanSet) NumSpans() int

------------------------- Accessors -------------------------------------

Returns the number of spans in FloatSpanSet. Returns:

An int

MEOS Functions:

spanset_num_spans

func (FloatSpanSet) Scale

func (g_fss FloatSpanSet) Scale(width float64) FloatSpanSet

Return a new “FloatSpanSet“ with the lower and upper bounds scaled so that the width is “width“.

Args:

width: The new width

Returns:

A new ``FloatSpanSet`` instance

MEOS Functions:

floatspanset_shift_scale

func (FloatSpanSet) Shift

func (g_fss FloatSpanSet) Shift(delta float64) FloatSpanSet

Return a new “FloatSpanSet“ with the lower and upper bounds shifted by “delta“.

Args:

delta: The value to shift by

Returns:

A new ``FloatSpanSet`` instance

MEOS Functions:

floatspanset_shift_scale

func (FloatSpanSet) ShiftScale

func (g_fss FloatSpanSet) ShiftScale(d float64, w float64) FloatSpanSet

Return a new “FloatSpanSet“ with the lower and upper bounds shifted by “delta“.

Args:

delta: The value to shift by

Returns:

A new ``FloatSpanSet`` instance

MEOS Functions:

floatspanset_shift_scale

func (FloatSpanSet) SpanN

func (g_fss FloatSpanSet) SpanN(n int) FloatSpan

Returns the n-th span in FloatSpanSet. Returns:

A FloatSpan instance

MEOS Functions:

spanset_span_n

func (FloatSpanSet) Spans

func (g_fss FloatSpanSet) Spans() []FloatSpan

Returns the list of spans in FloatSpanSet. Returns:

A FloatSpan instance

MEOS Functions:

spanset_spans

func (FloatSpanSet) StartSpan

func (g_fss FloatSpanSet) StartSpan() FloatSpan

Returns the first span in spanset. Returns:

A FloatSpan instance

MEOS Functions:

spanset_start_span

func (*FloatSpanSet) Sub

func (g_fss *FloatSpanSet) Sub(other interface{}) (*FloatSpanSet, error)

func (FloatSpanSet) ToIntSpanSet

func (g_fss FloatSpanSet) ToIntSpanSet() IntSpanSet

Converts FloatSpanSet to an IntSpanSet instance.

Returns:

A new IntSpanSet instance

MEOS Functions:

floatspanset_to_intspanset

func (FloatSpanSet) ToSpan

func (g_fss FloatSpanSet) ToSpan() FloatSpan

------------------------- Conversions -----------------------------------

Returns a span that encompasses _inner.

Returns:

A new struct `FloatSpan` instance

MEOS Functions:

spanset_span

func (*FloatSpanSet) Union

func (g_fss *FloatSpanSet) Union(other interface{}) (*FloatSpanSet, error)

func (FloatSpanSet) Width

func (g_fss FloatSpanSet) Width(ignore_gap bool) float64

Returns the width of the spanset. By default, i.e., when the second argument is False, the function takes into account the gaps within, i.e., returns the sum of the widths of the spans within. Otherwise, the function returns the width of the spanset ignoring any gap, i.e., the width from the lower bound of the first span to the upper bound of the last span.

Parameters:

ignore_gaps: Whether to take into account potential gaps in
the spanset.

Returns:

A `float` representing the duration of the spanset

MEOS Functions:

floatspanset_width

type Geo

type Geo interface {
	Inner() *C.GSERIALIZED
	IsGeo() bool
}

type Geom

type Geom struct {
	// contains filtered or unexported fields
}

------------------------- Geom ---------------------------

func GeoFromGeojson

func GeoFromGeojson(input string) *Geom

func GeographyFromHexEwkb

func GeographyFromHexEwkb(input string) *Geom

func GeographyFromText

func GeographyFromText(input string, srid int) *Geom

func GeometryFromHexEwkb

func GeometryFromHexEwkb(input string) *Geom

func GeometryFromText

func GeometryFromText(input string, srid int) *Geom

func NewGeom

func NewGeom(geom_str string, typemod int) Geom

------------------------- Input ---------------------------

func PgisGeographyIn

func PgisGeographyIn(input string, typemod int) *Geom

func PgisGeometryIn

func PgisGeometryIn(input string, typemod int) *Geom

func TPointTrajectory

func TPointTrajectory[TP TPoint](tp TP) *Geom

func (*Geom) GeoOut

func (geom *Geom) GeoOut() string

------------------------- Output ---------------------------

type IntSet

type IntSet struct {
	// contains filtered or unexported fields
}

func NewIntSet

func NewIntSet(g_is_in string) IntSet

------------------------- Input ----------------------------------------

func (*IntSet) Add

func (g_is *IntSet) Add(other interface{}) (*IntSet, error)

func (*IntSet) Contains

func (g_is *IntSet) Contains(other interface{}) (bool, error)

func (*IntSet) Distance

func (g_is *IntSet) Distance(other interface{}) (int, error)

------------------------- Distance Operations --------------------------------

func (IntSet) ElementN

func (g_is IntSet) ElementN(n int) int

func (IntSet) Elements

func (g_is IntSet) Elements() []int

func (IntSet) EndElement

func (g_is IntSet) EndElement() int

func (*IntSet) IntSetOut

func (g_is *IntSet) IntSetOut() string

------------------------- Output ----------------------------------------

func (*IntSet) Intersection

func (g_is *IntSet) Intersection(other interface{}) (*IntSet, error)

------------------------- Set Operations --------------------------------

func (*IntSet) IsLeft

func (g_is *IntSet) IsLeft(other interface{}) (bool, error)

------------------------- Position Operations ---------------------------

func (*IntSet) IsOverOrLeft

func (g_is *IntSet) IsOverOrLeft(other interface{}) (bool, error)

func (*IntSet) IsOverOrRight

func (g_is *IntSet) IsOverOrRight(other interface{}) (bool, error)

func (*IntSet) IsRight

func (g_is *IntSet) IsRight(other interface{}) (bool, error)

func (*IntSet) Minus

func (g_is *IntSet) Minus(other interface{}) (*IntSet, error)

func (*IntSet) Mul

func (g_is *IntSet) Mul(other interface{}) (*IntSet, error)

func (IntSet) NumElements

func (g_is IntSet) NumElements() int

func (IntSet) Scale

func (g_is IntSet) Scale(width int) IntSet

func (IntSet) Shift

func (g_is IntSet) Shift(delta int) IntSet

func (IntSet) ShiftScale

func (g_is IntSet) ShiftScale(d int, w int) IntSet

func (IntSet) StartElement

func (g_is IntSet) StartElement() int

------------------------- Accessors -------------------------------------

func (*IntSet) Sub

func (g_is *IntSet) Sub(other interface{}) (*IntSet, error)

func (IntSet) ToFloatSet

func (g_is IntSet) ToFloatSet() FloatSet

------------------------- Conversions -----------------------------------

func (IntSet) ToSpanSet

func (g_is IntSet) ToSpanSet() IntSpanSet

func (*IntSet) Union

func (g_is *IntSet) Union(other interface{}) (*IntSet, error)

type IntSpan

type IntSpan struct {
	// contains filtered or unexported fields
}

func NewIntSpan

func NewIntSpan(g_is_in string) *IntSpan

------------------------- Input ----------------------------------------

func (*IntSpan) Add

func (g_is *IntSpan) Add(other interface{}) (*IntSpanSet, error)

func (*IntSpan) Contains

func (g_is *IntSpan) Contains(other interface{}) (bool, error)

func (*IntSpan) Distance

func (g_is *IntSpan) Distance(other interface{}) (int, error)

func (*IntSpan) Init added in v0.1.9

func (g_fs *IntSpan) Init(c_span *C.Span)

func (*IntSpan) Inner added in v0.1.9

func (g_fs *IntSpan) Inner() *C.Span

func (IntSpan) IntSpanOut

func (g_is IntSpan) IntSpanOut() string

------------------------- Output ----------------------------------------

func (*IntSpan) Intersection

func (g_is *IntSpan) Intersection(other interface{}) (*IntSpan, error)

------------------------- Set Operations --------------------------------

func (*IntSpan) IsAdjacent

func (g_is *IntSpan) IsAdjacent(other interface{}) (bool, error)

------------------------- Topological Operations --------------------------------

func (*IntSpan) IsLeft

func (g_is *IntSpan) IsLeft(other interface{}) (bool, error)

------------------------- Position Operations ---------------------------

func (*IntSpan) IsOverOrLeft

func (g_is *IntSpan) IsOverOrLeft(other interface{}) (bool, error)

func (*IntSpan) IsOverOrRight

func (g_is *IntSpan) IsOverOrRight(other interface{}) (bool, error)

func (*IntSpan) IsRight

func (g_is *IntSpan) IsRight(other interface{}) (bool, error)

func (*IntSpan) IsSame

func (g_is *IntSpan) IsSame(other interface{}) (bool, error)

func (IntSpan) Lower

func (g_is IntSpan) Lower() int

------------------------- Accessors -------------------------------------

func (*IntSpan) Minus

func (g_is *IntSpan) Minus(other interface{}) (*IntSpanSet, error)

func (*IntSpan) Mul

func (g_is *IntSpan) Mul(other interface{}) (*IntSpan, error)

func (IntSpan) Scale

func (g_is IntSpan) Scale(width int) IntSpan

func (IntSpan) Shift

func (g_is IntSpan) Shift(delta int) IntSpan

func (IntSpan) ShiftScale

func (g_is IntSpan) ShiftScale(d int, w int) IntSpan

------------------------- Transformations -------------------------------

func (*IntSpan) Sub

func (g_is *IntSpan) Sub(other interface{}) (*IntSpanSet, error)

func (IntSpan) ToFloatSpan

func (g_is IntSpan) ToFloatSpan() FloatSpan

func (IntSpan) ToSpanSet

func (g_is IntSpan) ToSpanSet() IntSpanSet

------------------------- Conversions -----------------------------------

func (*IntSpan) Union

func (g_is *IntSpan) Union(other interface{}) (*IntSpanSet, error)

func (IntSpan) Upper

func (g_is IntSpan) Upper() int

func (IntSpan) Width

func (g_is IntSpan) Width() float32

type IntSpanSet

type IntSpanSet struct {
	// contains filtered or unexported fields
}

func NewIntSpanSet

func NewIntSpanSet(g_iss_in string) *IntSpanSet

------------------------- Input ----------------------------------------

func (*IntSpanSet) Add

func (g_iss *IntSpanSet) Add(other interface{}) (*IntSpanSet, error)

func (*IntSpanSet) Contains

func (g_iss *IntSpanSet) Contains(other interface{}) (bool, error)

func (*IntSpanSet) Distance

func (g_iss *IntSpanSet) Distance(other interface{}) (int, error)

------------------------- Distance Operations ---------------------------

func (IntSpanSet) EndSpan

func (g_iss IntSpanSet) EndSpan() IntSpan

Returns the last span in IntSpanSet. Returns:

A IntSpan instance

MEOS Functions:

spanset_end_span

func (*IntSpanSet) IntSpanSetOut

func (g_iss *IntSpanSet) IntSpanSetOut() string

------------------------- Output ----------------------------------------

Return the string representation of the content of IntSpanSet.

Returns:

String

MEOS Functions:

intspanset_out

func (*IntSpanSet) Intersection

func (g_iss *IntSpanSet) Intersection(other interface{}) (*IntSpanSet, error)

------------------------- Set Operations --------------------------------

func (*IntSpanSet) IsAdjacent

func (g_iss *IntSpanSet) IsAdjacent(other interface{}) (bool, error)

------------------------- Topological Operations --------------------------------

func (*IntSpanSet) IsLeft

func (g_iss *IntSpanSet) IsLeft(other interface{}) (bool, error)

func (*IntSpanSet) IsOverOrLeft

func (g_iss *IntSpanSet) IsOverOrLeft(other interface{}) (bool, error)

func (*IntSpanSet) IsOverOrRight

func (g_iss *IntSpanSet) IsOverOrRight(other interface{}) (bool, error)

func (*IntSpanSet) IsRight

func (g_iss *IntSpanSet) IsRight(other interface{}) (bool, error)

func (*IntSpanSet) IsSame

func (g_iss *IntSpanSet) IsSame(other interface{}) (bool, error)

func (*IntSpanSet) Minus

func (g_iss *IntSpanSet) Minus(other interface{}) (*IntSpanSet, error)

func (*IntSpanSet) Mul

func (g_iss *IntSpanSet) Mul(other interface{}) (*IntSpanSet, error)

func (IntSpanSet) NumSpans

func (g_iss IntSpanSet) NumSpans() int

------------------------- Accessors -------------------------------------

Returns the number of spans in IntSpanSet. Returns:

An int

MEOS Functions:

spanset_num_spans

func (IntSpanSet) Scale

func (g_iss IntSpanSet) Scale(width int) IntSpanSet

Return a new “IntSpanSet“ with the lower and upper bounds scaled so that the width is “width“.

Args:

width: The new width

Returns:

A new ``IntSpanSet`` instance

MEOS Functions:

intspanset_shift_scale

func (IntSpanSet) Shift

func (g_iss IntSpanSet) Shift(delta int) IntSpanSet

Return a new “IntSpanSet“ with the lower and upper bounds shifted by “delta“.

Args:

delta: The value to shift by

Returns:

A new ``IntSpanSet`` instance

MEOS Functions:

intspanset_shift_scale

func (IntSpanSet) ShiftScale

func (g_iss IntSpanSet) ShiftScale(d int, w int) IntSpanSet

Return a new “IntSpanSet“ with the lower and upper bounds shifted by “delta“.

Args:

delta: The value to shift by

Returns:

A new ``IntSpanSet`` instance

MEOS Functions:

intspanset_shift_scale

func (IntSpanSet) SpanN

func (g_iss IntSpanSet) SpanN(n int) IntSpan

Returns the n-th span in IntSpanSet. Returns:

A IntSpan instance

MEOS Functions:

spanset_span_n

func (IntSpanSet) Spans

func (g_iss IntSpanSet) Spans() []IntSpan

Returns the list of spans in IntSpanSet. Returns:

A IntSpan instance

MEOS Functions:

spanset_spans

func (IntSpanSet) StartSpan

func (g_iss IntSpanSet) StartSpan() IntSpan

Returns the first span in spanset. Returns:

A IntSpan instance

MEOS Functions:

spanset_start_span

func (*IntSpanSet) Sub

func (g_iss *IntSpanSet) Sub(other interface{}) (*IntSpanSet, error)

func (IntSpanSet) ToFloatSpanSet

func (g_iss IntSpanSet) ToFloatSpanSet() FloatSpanSet

Converts IntSpanSet to a FloatSpanSet instance.

Returns:

A new FloatSpanSet instance

MEOS Functions:

intspanset_to_floatspanset

func (IntSpanSet) ToSpan

func (g_iss IntSpanSet) ToSpan() IntSpan

------------------------- Conversions -----------------------------------

Returns a span that encompasses _inner.

Returns:

A new struct `IntSpan` instance

MEOS Functions:

spanset_span

func (*IntSpanSet) Union

func (g_iss *IntSpanSet) Union(other interface{}) (*IntSpanSet, error)

func (IntSpanSet) Width

func (g_iss IntSpanSet) Width(ignore_gap bool) int

Returns the width of the spanset. By default, i.e., when the second argument is False, the function takes into account the gaps within, i.e., returns the sum of the widths of the spans within. Otherwise, the function returns the width of the spanset ignoring any gap, i.e., the width from the lower bound of the first span to the upper bound of the last span.

Parameters:

ignore_gaps: Whether to take into account potential gaps in
the spanset.

Returns:

A `float` representing the duration of the spanset

MEOS Functions:

intspanset_width

type Interpolation

type Interpolation C.int

try godoc

type STBox

type STBox struct {
	// contains filtered or unexported fields
}

func TPointToSTBox

func TPointToSTBox[TP TPoint](tp TP) *STBox
Example
tg := TGeomPointIn("{POINT(1 1)@2022-10-01 00:00:00+00, POINT(2 2)@2022-10-02 00:00:00+00}", &TGeomPointSeq{})
stbox := TPointToSTBox(tg)
fmt.Println(STBoxOut(stbox, 10))
Output:

STBOX XT(((1,1),(2,2)),[2022-10-01 00:00:00+00, 2022-10-02 00:00:00+00])

type Set

type Set interface {
	Inner() *C.Set
	Init(*C.Set)
}

type Span

type Span interface {
	Inner() *C.Span
	Init(*C.Span)
}

type SpanSet

type SpanSet interface {
	Inner() *C.SpanSet
	Init(*C.SpanSet)
}

type TBool

type TBool interface {
	Temporal
	IsTBool() bool
}

type TBoolInst

type TBoolInst struct {
	// contains filtered or unexported fields
}

func NewTBoolInst

func NewTBoolInst(tgmpi_in string) *TBoolInst

func TBoolInstMake added in v0.1.9

func TBoolInstMake(value bool, base time.Time) *TBoolInst

TBoolInstMake Return a temporal boolean instant from a boolean and a timestamptz

func TemporalToTBoolInst

func TemporalToTBoolInst[T Temporal](temp T) (*TBoolInst, error)

func (*TBoolInst) Init

func (tb *TBoolInst) Init(c_temp *C.Temporal)

func (*TBoolInst) Inner

func (tb *TBoolInst) Inner() *C.Temporal

func (*TBoolInst) IsTBool

func (tb *TBoolInst) IsTBool() bool

func (*TBoolInst) String

func (tb *TBoolInst) String() string

func (*TBoolInst) TBoolOut

func (tgmpi *TBoolInst) TBoolOut() string

func (*TBoolInst) Type

func (tb *TBoolInst) Type() string

type TBoolSeq

type TBoolSeq struct {
	// contains filtered or unexported fields
}

func NewTBoolSeq

func NewTBoolSeq(tgmpi_in string) *TBoolSeq

func TBoolSeqFromBaseTstzset added in v0.1.9

func TBoolSeqFromBaseTstzset(value bool, base TsTzSet) *TBoolSeq

TBoolSeqFromBaseTstzset Return a temporal boolean discrete sequence from a boolean and a timestamptz set

func TBoolSeqFromBaseTstzspan added in v0.1.9

func TBoolSeqFromBaseTstzspan(value bool, base TsTzSpan) *TBoolSeq

TBoolSeqFromBaseTstzspan Return a temporal boolean sequence from a boolean and a timestamptz span

func TemporalToTBoolSeq

func TemporalToTBoolSeq[T Temporal](temp T) (*TBoolSeq, error)

func (*TBoolSeq) Init

func (tb *TBoolSeq) Init(c_temp *C.Temporal)

func (*TBoolSeq) Inner

func (tb *TBoolSeq) Inner() *C.Temporal

func (*TBoolSeq) IsTBool

func (tb *TBoolSeq) IsTBool() bool

func (*TBoolSeq) IsTSequence

func (tb *TBoolSeq) IsTSequence() bool

func (*TBoolSeq) String

func (tb *TBoolSeq) String() string

func (*TBoolSeq) TBoolOut

func (tgmpi *TBoolSeq) TBoolOut() string

func (*TBoolSeq) Type

func (tb *TBoolSeq) Type() string

type TBoolSeqSet

type TBoolSeqSet struct {
	// contains filtered or unexported fields
}

func NewTBoolSeqSet

func NewTBoolSeqSet(tgmpi_in string) *TBoolSeqSet

func TBoolSeqSetFromBaseTstzspanset added in v0.1.9

func TBoolSeqSetFromBaseTstzspanset(value bool, base *TsTzSpanSet) *TBoolSeqSet

TBoolSeqSetFromBaseTstzspanset Return a temporal boolean sequence set from a boolean and a timestamptz span set

Example
tstzspanset := NewTsTzSpanSet("{[2023-01-01 08:00:00+00, 2023-01-02 08:00:00+00), (2023-01-03 10:00:00+00, 2023-01-04 12:00:00+00]}")
tss := TBoolSeqSetFromBaseTstzspanset(true, tstzspanset)
fmt.Println(TBoolOut(tss))
Output:

{[t@2023-01-01 08:00:00+00, t@2023-01-02 08:00:00+00), (t@2023-01-03 10:00:00+00, t@2023-01-04 12:00:00+00]}

func TemporalToTBoolSeqSet

func TemporalToTBoolSeqSet[T Temporal](temp T) (*TBoolSeqSet, error)

func (*TBoolSeqSet) Init

func (tb *TBoolSeqSet) Init(c_temp *C.Temporal)

func (*TBoolSeqSet) Inner

func (tb *TBoolSeqSet) Inner() *C.Temporal

func (*TBoolSeqSet) IsTBool

func (tb *TBoolSeqSet) IsTBool() bool

func (*TBoolSeqSet) String

func (tb *TBoolSeqSet) String() string

func (*TBoolSeqSet) TBoolOut

func (tgmpi *TBoolSeqSet) TBoolOut() string

func (*TBoolSeqSet) Type

func (tb *TBoolSeqSet) Type() string

type TBox

type TBox struct {
	// contains filtered or unexported fields
}

func TNumberToTBox

func TNumberToTBox[TN TNumber](tn TN) *TBox

type TFloat

type TFloat interface {
	TNumber
	IsTFloat() bool
}

type TFloatInst

type TFloatInst struct {
	// contains filtered or unexported fields
}

func NewTFloatInst

func NewTFloatInst(tf_in string) *TFloatInst

func TFloatInstMake added in v0.1.9

func TFloatInstMake(value float64, base time.Time) *TFloatInst

TFloatInstMake Return a temporal float instant from a float and a timestamptz

func TemporalToTFloatInst

func TemporalToTFloatInst[T Temporal](temp T) (*TFloatInst, error)

func (*TFloatInst) Init

func (tf *TFloatInst) Init(c_temp *C.Temporal)

func (*TFloatInst) Inner

func (tf *TFloatInst) Inner() *C.Temporal

func (*TFloatInst) IsTFloat

func (tf *TFloatInst) IsTFloat() bool

func (*TFloatInst) IsTInstant

func (tf *TFloatInst) IsTInstant() bool

func (*TFloatInst) IsTNumber

func (tf *TFloatInst) IsTNumber() bool

func (*TFloatInst) String

func (tf *TFloatInst) String() string

func (*TFloatInst) TPointOut

func (tf *TFloatInst) TPointOut(maxdd int) string

func (*TFloatInst) Type

func (tf *TFloatInst) Type() string

type TFloatSeq

type TFloatSeq struct {
	// contains filtered or unexported fields
}

func NewTFloatSeq

func NewTFloatSeq(tf_in string) *TFloatSeq

func TFloatSeqFromBaseTstzset added in v0.1.9

func TFloatSeqFromBaseTstzset(value float64, base TsTzSet) *TFloatSeq

TFloatSeqFromBaseTstzset Return a temporal float discrete sequence from a float and a timestamptz set

func TFloatSeqFromBaseTstzspan added in v0.1.9

func TFloatSeqFromBaseTstzspan(value float64, base TsTzSpan, interp Interpolation) *TFloatSeq

TFloatSeqFromBaseTstzspan Return a temporal float sequence from a float and a timestamptz span

func TemporalToTFloatSeq

func TemporalToTFloatSeq[T Temporal](temp T) (*TFloatSeq, error)

func (*TFloatSeq) Init

func (tf *TFloatSeq) Init(c_temp *C.Temporal)

func (*TFloatSeq) Inner

func (tf *TFloatSeq) Inner() *C.Temporal

func (*TFloatSeq) IsTFloat

func (tf *TFloatSeq) IsTFloat() bool

func (*TFloatSeq) IsTNumber

func (tf *TFloatSeq) IsTNumber() bool

func (*TFloatSeq) IsTSequence

func (tf *TFloatSeq) IsTSequence() bool

func (*TFloatSeq) String

func (tf *TFloatSeq) String() string

func (*TFloatSeq) TPointOut

func (tf *TFloatSeq) TPointOut(maxdd int) string

func (*TFloatSeq) Type

func (tf *TFloatSeq) Type() string

type TFloatSeqSet

type TFloatSeqSet struct {
	// contains filtered or unexported fields
}

func NewTFloatSeqSet

func NewTFloatSeqSet(tf_in string) *TFloatSeqSet

func TFloatSeqSetFromBaseTstzspanset added in v0.1.9

func TFloatSeqSetFromBaseTstzspanset(value float64, base *TsTzSpanSet, interp Interpolation) *TFloatSeqSet

TFloatSeqSetFromBaseTstzspanset Return a temporal float sequence set from a float and a timestamptz span set

func TemporalToTFloatSeqSet

func TemporalToTFloatSeqSet[T Temporal](temp T) (*TFloatSeqSet, error)

func (*TFloatSeqSet) Init

func (tf *TFloatSeqSet) Init(c_temp *C.Temporal)

func (*TFloatSeqSet) Inner

func (tf *TFloatSeqSet) Inner() *C.Temporal

func (*TFloatSeqSet) IsTFloat

func (tf *TFloatSeqSet) IsTFloat() bool

func (*TFloatSeqSet) IsTNumber

func (tf *TFloatSeqSet) IsTNumber() bool

func (*TFloatSeqSet) String

func (tf *TFloatSeqSet) String() string

func (*TFloatSeqSet) TPointOut

func (tf *TFloatSeqSet) TPointOut(maxdd int) string

func (*TFloatSeqSet) Type

func (tf *TFloatSeqSet) Type() string

type TGeogPoint

type TGeogPoint interface {
	TPoint
	IsTGeogPoint() bool
}

type TGeogPointInst

type TGeogPointInst struct {
	// contains filtered or unexported fields
}

------------------------- TGeogPointInst ---------------------------

func NewTGeogPointInst

func NewTGeogPointInst(tgmpi_in string) *TGeogPointInst

func TemporalToTGeogPointInst

func TemporalToTGeogPointInst[T Temporal](temp T) (*TGeogPointInst, error)

func (*TGeogPointInst) Init

func (tgmpi *TGeogPointInst) Init(c_temp *C.Temporal)

func (*TGeogPointInst) Inner

func (tgmpi *TGeogPointInst) Inner() *C.Temporal

func (*TGeogPointInst) IsTGeogPoint

func (tgmpi *TGeogPointInst) IsTGeogPoint() bool

func (*TGeogPointInst) IsTInstant

func (tgmpi *TGeogPointInst) IsTInstant() bool

func (*TGeogPointInst) IsTPoint

func (tgmpi *TGeogPointInst) IsTPoint() bool

func (*TGeogPointInst) String

func (tgmpi *TGeogPointInst) String() string

func (*TGeogPointInst) TPointOut

func (tgmpi *TGeogPointInst) TPointOut(maxdd int) string

func (*TGeogPointInst) Type

func (tgmpi *TGeogPointInst) Type() string

type TGeogPointSeq

type TGeogPointSeq struct {
	// contains filtered or unexported fields
}

------------------------- TGeogPointSeq ---------------------------

func NewTGeogPointSeq

func NewTGeogPointSeq(tgmpi_in string) TGeogPointSeq

func TemporalToTGeogPointSeq

func TemporalToTGeogPointSeq[T Temporal](temp T) (*TGeogPointSeq, error)

func (*TGeogPointSeq) Init

func (tgmpi *TGeogPointSeq) Init(c_temp *C.Temporal)

func (*TGeogPointSeq) Inner

func (tgmpi *TGeogPointSeq) Inner() *C.Temporal

func (*TGeogPointSeq) IsTGeogPoint

func (tgmpi *TGeogPointSeq) IsTGeogPoint() bool

func (*TGeogPointSeq) IsTPoint

func (tgmpi *TGeogPointSeq) IsTPoint() bool

func (*TGeogPointSeq) IsTSequence

func (tgmpi *TGeogPointSeq) IsTSequence() bool

func (*TGeogPointSeq) String

func (tgmpi *TGeogPointSeq) String() string

func (*TGeogPointSeq) TPointOut

func (tgmpi *TGeogPointSeq) TPointOut(maxdd int) string

func (*TGeogPointSeq) Type

func (tgmpi *TGeogPointSeq) Type() string

type TGeogPointSeqSet

type TGeogPointSeqSet struct {
	// contains filtered or unexported fields
}

------------------------- TGeogPointSeqSet ---------------------------

func NewTGeogPointSeqSet

func NewTGeogPointSeqSet(tgmpi_in string) *TGeogPointSeqSet

func (*TGeogPointSeqSet) Init

func (tgmpi *TGeogPointSeqSet) Init(c_temp *C.Temporal)

func (*TGeogPointSeqSet) Inner

func (tgmpi *TGeogPointSeqSet) Inner() *C.Temporal

func (*TGeogPointSeqSet) IsTGeogPoint

func (tgmpi *TGeogPointSeqSet) IsTGeogPoint() bool

func (*TGeogPointSeqSet) IsTPoint

func (tgmpi *TGeogPointSeqSet) IsTPoint() bool

func (*TGeogPointSeqSet) String

func (tgmpi *TGeogPointSeqSet) String() string

func (*TGeogPointSeqSet) TPointOut

func (tgmpi *TGeogPointSeqSet) TPointOut(maxdd int) string

func (*TGeogPointSeqSet) Type

func (tgmpi *TGeogPointSeqSet) Type() string

type TGeomPoint

type TGeomPoint interface {
	TPoint
	IsTGeomPoint() bool
}

type TGeomPointInst

type TGeomPointInst struct {
	// contains filtered or unexported fields
}

------------------------- TGeomPointInst ---------------------------

func NewEmptyTGeomPointInst

func NewEmptyTGeomPointInst() TGeomPointInst

func NewTGeomPointInst

func NewTGeomPointInst(tgmpi_in string) TGeomPointInst

func NewTGeomPointInstInner

func NewTGeomPointInstInner(inner *C.Temporal) *TGeomPointInst

func TemporalToGeomPointInst

func TemporalToGeomPointInst[T Temporal](temp T) (*TGeomPointInst, error)

func (*TGeomPointInst) Init

func (tb *TGeomPointInst) Init(c_temp *C.Temporal)

func (*TGeomPointInst) Inner

func (tb *TGeomPointInst) Inner() *C.Temporal

func (*TGeomPointInst) IsTGeomPoint

func (tb *TGeomPointInst) IsTGeomPoint() bool

func (*TGeomPointInst) IsTInstant

func (tgmpi *TGeomPointInst) IsTInstant() bool

func (*TGeomPointInst) IsTPoint

func (tgmpi *TGeomPointInst) IsTPoint() bool

func (*TGeomPointInst) String

func (tgmpi *TGeomPointInst) String() string

func (*TGeomPointInst) TInstantOut

func (tgmpi *TGeomPointInst) TInstantOut(maxdd int) string

func (*TGeomPointInst) TPointOut

func (tgmpi *TGeomPointInst) TPointOut(maxdd int) string

func (*TGeomPointInst) TimestampOut

func (tgmpi *TGeomPointInst) TimestampOut() string

func (*TGeomPointInst) Timestamptz

func (tgmpi *TGeomPointInst) Timestamptz() time.Time

func (*TGeomPointInst) Type

func (tgmpi *TGeomPointInst) Type() string

type TGeomPointSeq

type TGeomPointSeq struct {
	// contains filtered or unexported fields
}

------------------------- TGeomPointSeq ---------------------------

func NewTGeomPointSeq

func NewTGeomPointSeq(tgmpi_in string) *TGeomPointSeq

func NewTGeomPointSeqFromWKB

func NewTGeomPointSeqFromWKB(tgmpi_in string) *TGeomPointSeq

func TemporalToTGeomPointSeq

func TemporalToTGeomPointSeq[T Temporal](temp T) (*TGeomPointSeq, error)

func (*TGeomPointSeq) Init

func (tgmpi *TGeomPointSeq) Init(c_temp *C.Temporal)

func (*TGeomPointSeq) Inner

func (tgmpi *TGeomPointSeq) Inner() *C.Temporal

func (*TGeomPointSeq) IsTGeomPoint

func (tgmpi *TGeomPointSeq) IsTGeomPoint() bool

func (*TGeomPointSeq) IsTPoint

func (tgmpi *TGeomPointSeq) IsTPoint() bool

func (*TGeomPointSeq) IsTSequence

func (tgmpi *TGeomPointSeq) IsTSequence() bool

func (*TGeomPointSeq) NewInit

func (tgmpi *TGeomPointSeq) NewInit(c_temp *C.Temporal) *TGeomPointSeq

func (*TGeomPointSeq) String

func (tgmpi *TGeomPointSeq) String() string

func (*TGeomPointSeq) TPointOut

func (tgmpi *TGeomPointSeq) TPointOut(maxdd int) string

func (*TGeomPointSeq) Type

func (tgmpi *TGeomPointSeq) Type() string

type TGeomPointSeqSet

type TGeomPointSeqSet struct {
	// contains filtered or unexported fields
}

------------------------- TGeomPointSeqSet ---------------------------

func NewTGeomPointSeqSet

func NewTGeomPointSeqSet(tgmpi_in string) *TGeomPointSeqSet

func TemporalToTGeomPointSeqSet

func TemporalToTGeomPointSeqSet[T Temporal](temp T) (*TGeomPointSeqSet, error)

func (*TGeomPointSeqSet) Init

func (tb *TGeomPointSeqSet) Init(c_temp *C.Temporal)

func (*TGeomPointSeqSet) Inner

func (tb *TGeomPointSeqSet) Inner() *C.Temporal

func (*TGeomPointSeqSet) IsTGeomPoint

func (tb *TGeomPointSeqSet) IsTGeomPoint() bool

func (*TGeomPointSeqSet) IsTPoint

func (tgmpi *TGeomPointSeqSet) IsTPoint() bool

func (*TGeomPointSeqSet) String

func (tgmpi *TGeomPointSeqSet) String() string

func (*TGeomPointSeqSet) TPointOut

func (tgmpi *TGeomPointSeqSet) TPointOut(maxdd int) string

func (*TGeomPointSeqSet) Type

func (tgmpi *TGeomPointSeqSet) Type() string

type TInstant

type TInstant interface {
	Temporal
	IsTInstant() bool
}

type TInt

type TInt interface {
	TNumber
	IsTInt() bool
}

type TIntInst

type TIntInst struct {
	// contains filtered or unexported fields
}

func NewTIntInst

func NewTIntInst(tf_in string) *TIntInst

func TIntInstMake added in v0.1.9

func TIntInstMake(value int, base time.Time) *TIntInst

TIntInstMake Return a temporal int instant from a int and a timestamptz

func TemporalToTIntInst

func TemporalToTIntInst[T Temporal](temp T) (*TIntInst, error)

func (*TIntInst) Init

func (tb *TIntInst) Init(c_temp *C.Temporal)

func (*TIntInst) Inner

func (tb *TIntInst) Inner() *C.Temporal

func (*TIntInst) IsTInt

func (tb *TIntInst) IsTInt() bool

func (*TIntInst) IsTNumber

func (tb *TIntInst) IsTNumber() bool

func (*TIntInst) String

func (tb *TIntInst) String() string

func (*TIntInst) TIntOut

func (tf *TIntInst) TIntOut() string

func (*TIntInst) Type

func (tb *TIntInst) Type() string

type TIntSeq

type TIntSeq struct {
	// contains filtered or unexported fields
}

func NewTIntSeq

func NewTIntSeq(tf_in string) *TIntSeq

func TIntSeqFromBaseTstzset added in v0.1.9

func TIntSeqFromBaseTstzset(value int, base TsTzSet) *TIntSeq

TIntSeqFromBaseTstzset Return a temporal int discrete sequence from a int and a timestamptz set

func TIntSeqFromBaseTstzspan added in v0.1.9

func TIntSeqFromBaseTstzspan(value int, base TsTzSpan) *TIntSeq

TIntSeqFromBaseTstzspan Return a temporal int sequence from a int and a timestamptz span

func TemporalToTIntSeq

func TemporalToTIntSeq[T Temporal](temp T) (*TIntSeq, error)

func (*TIntSeq) Init

func (tb *TIntSeq) Init(c_temp *C.Temporal)

func (*TIntSeq) Inner

func (tb *TIntSeq) Inner() *C.Temporal

func (*TIntSeq) IsTInt

func (tb *TIntSeq) IsTInt() bool

func (*TIntSeq) IsTNumber

func (tb *TIntSeq) IsTNumber() bool

func (*TIntSeq) IsTSequence

func (tb *TIntSeq) IsTSequence() bool

func (*TIntSeq) String

func (tb *TIntSeq) String() string

func (*TIntSeq) TIntOut

func (tf *TIntSeq) TIntOut() string

func (*TIntSeq) Type

func (tb *TIntSeq) Type() string

type TIntSeqSet

type TIntSeqSet struct {
	// contains filtered or unexported fields
}

func NewTIntSeqSet

func NewTIntSeqSet(tf_in string) *TIntSeqSet

func TIntSeqSetFromBaseTstzspanset added in v0.1.9

func TIntSeqSetFromBaseTstzspanset(value int, base *TsTzSpanSet) *TIntSeqSet

TIntSeqSetFromBaseTstzspanset Return a temporal int sequence set from a int and a timestamptz span set

func TemporalToTIntSeqSet

func TemporalToTIntSeqSet[T Temporal](temp T) (*TIntSeqSet, error)

func (*TIntSeqSet) Init

func (tb *TIntSeqSet) Init(c_temp *C.Temporal)

func (*TIntSeqSet) Inner

func (tb *TIntSeqSet) Inner() *C.Temporal

func (*TIntSeqSet) IsTInt

func (tb *TIntSeqSet) IsTInt() bool

func (*TIntSeqSet) IsTNumber

func (tb *TIntSeqSet) IsTNumber() bool

func (*TIntSeqSet) String

func (tb *TIntSeqSet) String() string

func (*TIntSeqSet) TIntOut

func (tf *TIntSeqSet) TIntOut() string

func (*TIntSeqSet) Type

func (tb *TIntSeqSet) Type() string

type TNumber

type TNumber interface {
	Temporal
	IsTNumber() bool
}

type TPoint

type TPoint interface {
	Temporal
	IsTPoint() bool
}

type TSequence

type TSequence interface {
	Temporal
	IsTSequence() bool
}

type TSequenceSet

type TSequenceSet interface {
	Temporal
	IsTSequenceSet() bool
}

type TText

type TText interface {
	Temporal
	IsTText() bool
}

type TTextInst

type TTextInst struct {
	// contains filtered or unexported fields
}

------------------------- TTextInst ---------------------------

func TemporalToTTextInst

func TemporalToTTextInst[T Temporal](temp T) (*TTextInst, error)

func (*TTextInst) Init

func (tb *TTextInst) Init(c_temp *C.Temporal)

func (*TTextInst) Inner

func (tb *TTextInst) Inner() *C.Temporal

func (*TTextInst) IsTText

func (tb *TTextInst) IsTText() bool

func (*TTextInst) String

func (tb *TTextInst) String() string

func (*TTextInst) TTextOut

func (tb *TTextInst) TTextOut() string

func (*TTextInst) Type

func (tb *TTextInst) Type() string

type TTextSeq

type TTextSeq struct {
	// contains filtered or unexported fields
}

------------------------- TTextSeq ---------------------------

func TemporalToTTextSeq

func TemporalToTTextSeq[T Temporal](temp T) (*TTextSeq, error)

func (*TTextSeq) Init

func (tb *TTextSeq) Init(c_temp *C.Temporal)

func (*TTextSeq) Inner

func (tb *TTextSeq) Inner() *C.Temporal

func (*TTextSeq) IsTSequence

func (tb *TTextSeq) IsTSequence() bool

func (*TTextSeq) IsTText

func (tb *TTextSeq) IsTText() bool

func (*TTextSeq) String

func (tb *TTextSeq) String() string

func (*TTextSeq) TTextOut

func (tb *TTextSeq) TTextOut() string

func (*TTextSeq) Type

func (tb *TTextSeq) Type() string

type TTextSeqSet

type TTextSeqSet struct {
	// contains filtered or unexported fields
}

------------------------- TTextSeqSet ---------------------------

func TemporalToTTextSeqSet

func TemporalToTTextSeqSet[T Temporal](temp T) (*TTextSeqSet, error)

func (*TTextSeqSet) Init

func (tb *TTextSeqSet) Init(c_temp *C.Temporal)

func (*TTextSeqSet) Inner

func (tb *TTextSeqSet) Inner() *C.Temporal

func (*TTextSeqSet) IsTText

func (tb *TTextSeqSet) IsTText() bool

func (*TTextSeqSet) String

func (tb *TTextSeqSet) String() string

func (*TTextSeqSet) TTextOut

func (tb *TTextSeqSet) TTextOut() string

func (*TTextSeqSet) Type

func (tb *TTextSeqSet) Type() string

type Temporal

type Temporal interface {
	Inner() *C.Temporal
	Init(*C.Temporal)
	String() string
	Type() string
}

func CreateTemporal

func CreateTemporal(inner *C.Temporal) Temporal

------------------------- Factory ----------------------------------

func TAndTBoolBool added in v0.1.9

func TAndTBoolBool[TB TBool](tb TB, value bool) Temporal

TAndTBoolBool Return the boolean and of a temporal boolean and a boolean

Example
tb1 := NewTBoolSeq("{TRUE@2022-10-01, TRUE@2022-10-02,TRUE@2022-10-03}")
tb2 := true
res := TAndTBoolBool(tb1, tb2)
fmt.Println(res.String())
Output:

{t@2022-10-01 00:00:00+00, t@2022-10-02 00:00:00+00, t@2022-10-03 00:00:00+00}

func TAndTBoolTBool added in v0.1.9

func TAndTBoolTBool[TB TBool](tb TB, other TB) Temporal

TAndTBoolTBool Return the boolean and of the temporal booleans

func TBoolAtValue

func TBoolAtValue[TB TBool](tb TB, value bool) Temporal

TBoolAtValue Return a temporal boolean restricted to a boolean

func TBoolMinusValue

func TBoolMinusValue[TB TBool](tb TB, value bool) Temporal

TBoolMinusValue Return a temporal boolean restricted to the complement of a boolean

func TEqTBoolBool added in v0.1.9

func TEqTBoolBool[TB TBool](tb TB, value bool) Temporal

TEqTBoolBool Return the temporal equality of a temporal boolean and a boolean

Example
tb1 := NewTBoolSeq("{FALSE@2022-10-01, FALSE@2022-10-02,FALSE@2022-10-03}")
tb2 := false
res := TEqTBoolBool(tb1, tb2)
fmt.Println(res.String())
Output:

{t@2022-10-01 00:00:00+00, t@2022-10-02 00:00:00+00, t@2022-10-03 00:00:00+00}

func TEqTFloatFloat added in v0.1.9

func TEqTFloatFloat[TF TFloat](tf TF, value float64) Temporal

TEqTFloatFloat Return a temporal value that represents where the temporal float is equal to a constant float.

func TEqTIntInt added in v0.1.9

func TEqTIntInt[TI TInt](ti TI, value int) Temporal

TEqTIntInt Return a temporal value that represents where the temporal integer is equal to a constant integer.

func TEqTemporalTemporal added in v0.1.9

func TEqTemporalTemporal[T1 Temporal, T2 Temporal](temp1 T1, temp2 T2) Temporal

TEqTemporalTemporal Return the temporal equality of two temporal values

Example
MeosInitialize("UTC")
tb1 := NewTBoolSeq("{FALSE@2022-10-01, FALSE@2022-10-02,FALSE@2022-10-03}")
tb2 := NewTBoolInst("TRUE@2022-10-01")
res := TEqTemporalTemporal(tb1, tb2)
fmt.Println(res)
Output:

f@2022-10-01 00:00:00+00

func TFloatAtValue added in v0.1.9

func TFloatAtValue[TF TFloat](tf TF, value float64) Temporal

TFloatAtValue Return a temporal float restricted to a float

func TFloatDerivative added in v0.1.9

func TFloatDerivative[TF TFloat](tf TF) Temporal

TFloatDerivative Return the derivative of a temporal number

func TFloatMinusValue added in v0.1.9

func TFloatMinusValue[TF TFloat](tf TF, value float64) Temporal

TFloatMinusValue Return a temporal float restricted to a float

func TFloatRound added in v0.1.9

func TFloatRound[TF TFloat](tf TF, max_decimals int) Temporal

TFloatRound Return a temporal float with the precision of the values set to a number of decimal places

func TFloatToDegrees added in v0.1.9

func TFloatToDegrees[TF TFloat](tf TF, normalize bool) Temporal

TFloatToDegrees Return a temporal number transformed from radians to degrees

func TFloatToRadians added in v0.1.9

func TFloatToRadians[TF TFloat](tf TF) Temporal

TFloatToRadians Return a temporal number transformed from degrees to radians

func TGeTFloatFloat added in v0.1.9

func TGeTFloatFloat[TF TFloat](tf TF, value float64) Temporal

TGeTFloatFloat Return a temporal value that represents where the temporal float is greater than or equal to a constant float.

func TGeTIntInt added in v0.1.9

func TGeTIntInt[TI TInt](ti TI, value int) Temporal

TGeTIntInt Return a temporal value that represents where the temporal integer is greater than or equal to a constant integer.

func TGtTFloatFloat added in v0.1.9

func TGtTFloatFloat[TF TFloat](tf TF, value float64) Temporal

TGtTFloatFloat Return a temporal value that represents where the temporal float is greater than a constant float.

func TGtTIntInt added in v0.1.9

func TGtTIntInt[TI TInt](ti TI, value int) Temporal

TGtTIntInt Return a temporal value that represents where the temporal integer is greater than a constant integer.

func TIntAtValue added in v0.1.9

func TIntAtValue[TI TInt](tf TI, value int) Temporal

TIntAtValue Return a temporal int restricted to a int

func TIntMinusValue added in v0.1.9

func TIntMinusValue[TI TInt](tf TI, value int) Temporal

TIntMinusValue Return a temporal int restricted to a int

func TLeTFloatFloat added in v0.1.9

func TLeTFloatFloat[TF TFloat](tf TF, value float64) Temporal

TLeTFloatFloat Return a temporal value that represents where the temporal float is less than or equal to a constant float.

func TLeTIntInt added in v0.1.9

func TLeTIntInt[TI TInt](ti TI, value int) Temporal

TLeTIntInt Return a temporal value that represents where the temporal integer is less than or equal to a constant integer.

func TLtTFloatFloat added in v0.1.9

func TLtTFloatFloat[TF TFloat](tf TF, value float64) Temporal

TLtTFloatFloat Return a temporal value that represents where the temporal float is less than a constant float.

func TLtTIntInt added in v0.1.9

func TLtTIntInt[TI TInt](ti TI, value int) Temporal

TLtTIntInt Return a temporal value that represents where the temporal integer is less than a constant integer.

func TNEqTBoolBool added in v0.1.9

func TNEqTBoolBool[TB TBool](tb TB, value bool) Temporal

TNEqTBoolBool Return the temporal equality of a temporal boolean and a boolean

Example
tb1 := NewTBoolSeq("{FALSE@2022-10-01, FALSE@2022-10-02,FALSE@2022-10-03}")
tb2 := false
res := TNEqTBoolBool(tb1, tb2)
fmt.Println(res.String())
Output:

{f@2022-10-01 00:00:00+00, f@2022-10-02 00:00:00+00, f@2022-10-03 00:00:00+00}

func TNEqTemporalTemporal added in v0.1.9

func TNEqTemporalTemporal[T1 Temporal, T2 Temporal](temp1 T1, temp2 T2) Temporal

TNEqTemporalTemporal Return the temporal equality of two temporal values

Example
MeosInitialize("UTC")
tb1 := NewTBoolSeq("{FALSE@2022-10-01, FALSE@2022-10-02,FALSE@2022-10-03}")
tb2 := NewTBoolInst("TRUE@2022-10-01")
res := TNEqTemporalTemporal(tb1, tb2)
fmt.Println(res)
Output:

t@2022-10-01 00:00:00+00

func TNeTFloatFloat added in v0.1.9

func TNeTFloatFloat[TF TFloat](tf TF, value float64) Temporal

TNeTFloatFloat Return a temporal value that represents where the temporal float is not equal to a constant float.

func TNeTIntInt added in v0.1.9

func TNeTIntInt[TI TInt](ti TI, value int) Temporal

TNeTIntInt Return a temporal value that represents where the temporal integer is not equal to a constant integer.

func TNumberAtSpan added in v0.1.9

func TNumberAtSpan[TN TNumber, S Span](tn TN, span S) Temporal

func TNumberAtSpanSet added in v0.1.9

func TNumberAtSpanSet[TN TNumber, SS SpanSet](tn TN, spanset SS) Temporal

func TNumberAtTBox added in v0.1.9

func TNumberAtTBox[TN TNumber](tn TN, tbox *TBox) Temporal

func TNumberMinusSpan added in v0.1.9

func TNumberMinusSpan[TN TNumber, S Span](tn TN, span S) Temporal

func TNumberMinusSpanSet added in v0.1.9

func TNumberMinusSpanSet[TN TNumber, SS SpanSet](tn TN, spanset SS) Temporal

func TNumberMinusTBox added in v0.1.9

func TNumberMinusTBox[TN TNumber](tn TN, tbox *TBox) Temporal

func TOrTBoolBool added in v0.1.9

func TOrTBoolBool[TB TBool](tb TB, value bool) Temporal

TOrTBoolBool Return the boolean or of a temporal boolean and a boolean

func TOrTBoolTBool added in v0.1.9

func TOrTBoolTBool[TB TBool](tb TB, other TB) Temporal

TOrTBoolTBool Return the boolean or of the temporal booleans

func TemporalAtMax

func TemporalAtMax[T Temporal](temp T) Temporal

func TemporalAtMin

func TemporalAtMin[T Temporal](temp T) Temporal

func TemporalAtTimestamptz

func TemporalAtTimestamptz[T Temporal](temp T, ts time.Time) Temporal

------------------------- TODO:Transformations ------------------------------- ------------------------- TODO:Modifications --------------------------------- ------------------------- Restrictions ----------------------------------

func TemporalAtTsTzSet

func TemporalAtTsTzSet[T Temporal](temp T, tstzset TsTzSet) Temporal

func TemporalAtTsTzSpan

func TemporalAtTsTzSpan[T Temporal](temp T, tstzspan TsTzSpan) Temporal

func TemporalAtTsTzSpanSet

func TemporalAtTsTzSpanSet[T Temporal](temp T, tstzspanset TsTzSpanSet) Temporal

func TemporalAtValues

func TemporalAtValues[T Temporal, S Set](temp T, set S) Temporal

TemporalAtValues Return a temporal value restricted to a set of values

func TemporalMinusMax

func TemporalMinusMax[T Temporal](temp T) Temporal

func TemporalMinusMin

func TemporalMinusMin[T Temporal](temp T) Temporal

func TemporalMinusTimestamptz

func TemporalMinusTimestamptz[T Temporal](temp T, ts time.Time) Temporal

TemporalMinusTimestamptz Return a temporal value restricted to the complement of a timestamptz

func TemporalMinusTsTzSet

func TemporalMinusTsTzSet[T Temporal](temp T, tstzset TsTzSet) Temporal

TemporalMinusTsTzSet Return a temporal value restricted to the complement of a timestamptz set

func TemporalMinusTsTzSpan

func TemporalMinusTsTzSpan[T Temporal](temp T, tstzspan TsTzSpan) Temporal

TemporalMinusTsTzSpan Return a temporal value restricted to the complement of a timestamptz span

func TemporalMinusTsTzSpanSet

func TemporalMinusTsTzSpanSet[T Temporal](temp T, tstzspanset TsTzSpanSet) Temporal

TemporalMinusTsTzSpanSet Return a temporal value restricted to the complement of a timestamptz span set

type TsTzSet

type TsTzSet struct {
	// contains filtered or unexported fields
}

func NewTsTzSet

func NewTsTzSet(g_tts_in string) *TsTzSet

------------------------- Input ----------------------------------------

func (*TsTzSet) Duration

func (g_tts *TsTzSet) Duration() timeutil.Timedelta

func (*TsTzSet) ElementN

func (g_tss *TsTzSet) ElementN(n int) time.Time

func (*TsTzSet) Elements

func (g_tss *TsTzSet) Elements() []time.Time

func (*TsTzSet) EndElement

func (g_tts *TsTzSet) EndElement() time.Time

func (*TsTzSet) NumElements

func (g_tss *TsTzSet) NumElements() int

func (*TsTzSet) Scale

func (g_tss *TsTzSet) Scale(duration interface{}) (*TsTzSet, error)

func (*TsTzSet) Shift

func (g_tss *TsTzSet) Shift(delta interface{}) (*TsTzSet, error)

func (*TsTzSet) ShiftScale

func (g_tss *TsTzSet) ShiftScale(shift interface{}, duration interface{}) (*TsTzSet, error)

func (*TsTzSet) StartElement

func (g_tts *TsTzSet) StartElement() time.Time

func (*TsTzSet) TsTzSetOut

func (g_tts *TsTzSet) TsTzSetOut() string

------------------------- Output ----------------------------------------

type TsTzSpan

type TsTzSpan struct {
	// contains filtered or unexported fields
}

func NewTsTzSpan

func NewTsTzSpan(g_tts_in string) *TsTzSpan

------------------------- Input ----------------------------------------

func TemporalToTsTzSpan

func TemporalToTsTzSpan[T Temporal](temp T) *TsTzSpan

------------------------- Accessors -------------------------------------

func (*TsTzSpan) Duration

func (g_tts *TsTzSpan) Duration() timeutil.Timedelta

------------------------- Accessors -------------------------------------

func (*TsTzSpan) Lower

func (g_tts *TsTzSpan) Lower() time.Time

func (*TsTzSpan) Scale

func (g_tss *TsTzSpan) Scale(duration interface{}) (*TsTzSpan, error)

func (*TsTzSpan) Shift

func (g_tss *TsTzSpan) Shift(delta interface{}) (*TsTzSpan, error)

func (*TsTzSpan) ShiftScale

func (g_tss *TsTzSpan) ShiftScale(shift interface{}, duration interface{}) (*TsTzSpan, error)

------------------------- Transformations -------------------------------

func (*TsTzSpan) ToSpanSet

func (g_tts *TsTzSpan) ToSpanSet() TsTzSpanSet

------------------------- Conversions -----------------------------------

func (*TsTzSpan) TsTzSpanOut

func (g_tts *TsTzSpan) TsTzSpanOut() string

------------------------- Output ----------------------------------------

func (*TsTzSpan) Upper

func (g_tts *TsTzSpan) Upper() time.Time

type TsTzSpanSet

type TsTzSpanSet struct {
	// contains filtered or unexported fields
}

func NewTsTzSpanSet

func NewTsTzSpanSet(g_tts_in string) *TsTzSpanSet

------------------------- Input ----------------------------------------

func TBoolWhenTrue added in v0.1.9

func TBoolWhenTrue[TB TBool](tb TB) TsTzSpanSet

TBoolWhenTrue Return the time when the temporal boolean has value true

Example
tb1 := NewTBoolSeq("{TRUE@2022-10-01, FALSE@2022-10-02,TRUE@2022-10-03}")
res := TBoolWhenTrue(tb1)
fmt.Println(res.TsTzSpanSetOut())
Output:

{[2022-10-01 00:00:00+00, 2022-10-01 00:00:00+00], [2022-10-03 00:00:00+00, 2022-10-03 00:00:00+00]}

func TemporalTime

func TemporalTime[T Temporal](temp T) *TsTzSpanSet

func (*TsTzSpanSet) Duration

func (g_tts *TsTzSpanSet) Duration(ignore_gap bool) timeutil.Timedelta

------------------------- Accessors -------------------------------------

func (*TsTzSpanSet) EndSpan

func (g_tts *TsTzSpanSet) EndSpan() TsTzSpan

func (*TsTzSpanSet) EndTimestamp

func (g_tts *TsTzSpanSet) EndTimestamp() time.Time

func (*TsTzSpanSet) NumSpans

func (g_tts *TsTzSpanSet) NumSpans() int

func (*TsTzSpanSet) NumTimestamps

func (g_tts *TsTzSpanSet) NumTimestamps() int

func (*TsTzSpanSet) Scale

func (g_tts *TsTzSpanSet) Scale(duration interface{}) (*TsTzSpanSet, error)

func (*TsTzSpanSet) Shift

func (g_tts *TsTzSpanSet) Shift(delta interface{}) (*TsTzSpanSet, error)

func (*TsTzSpanSet) ShiftScale

func (g_tts *TsTzSpanSet) ShiftScale(shift interface{}, duration interface{}) (*TsTzSpanSet, error)

------------------------- Transformations -------------------------------

func (*TsTzSpanSet) SpanN

func (g_tts *TsTzSpanSet) SpanN(n int) TsTzSpan

func (*TsTzSpanSet) Spans

func (g_tts *TsTzSpanSet) Spans() []TsTzSpan

func (*TsTzSpanSet) StartSpan

func (g_tts *TsTzSpanSet) StartSpan() TsTzSpan

func (*TsTzSpanSet) StartTimestamp

func (g_tts *TsTzSpanSet) StartTimestamp() time.Time

func (*TsTzSpanSet) TimestampN

func (g_tts *TsTzSpanSet) TimestampN(n int) time.Time

func (*TsTzSpanSet) Timestamps

func (g_tts *TsTzSpanSet) Timestamps() []time.Time

func (*TsTzSpanSet) ToSpan

func (g_tts *TsTzSpanSet) ToSpan() *TsTzSpan

------------------------- Conversions -----------------------------------

func (*TsTzSpanSet) ToTsTzSpan

func (g_tts *TsTzSpanSet) ToTsTzSpan() *TsTzSpan

func (*TsTzSpanSet) TsTzSpanSetOut

func (g_tts *TsTzSpanSet) TsTzSpanSetOut() string

------------------------- Output ----------------------------------------

Directories

Path Synopsis
examples
ais/assemble command
geoinout command
helloworld command
transform command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL