-
Notifications
You must be signed in to change notification settings - Fork 0
/
main_tgeompoint.go
191 lines (154 loc) · 4.22 KB
/
main_tgeompoint.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
package gomeos
/*
#include "meos.h"
#include <stdio.h>
#include <stdlib.h>
#include "cast.h"
*/
import "C"
import "unsafe"
type TGeomPointInst struct {
_inner *C.Temporal
}
func NewTGeomPointInstInner(inner *C.Temporal) *TGeomPointInst {
return &TGeomPointInst{_inner: inner}
}
func NewTGeomPointInst(tgmpi_in string) TGeomPointInst {
c_tgmpi_in := C.CString(tgmpi_in)
defer C.free(unsafe.Pointer(c_tgmpi_in))
c_tgmpi := C.tgeompoint_in(c_tgmpi_in)
g_tgmpi := TGeomPointInst{_inner: c_tgmpi}
return g_tgmpi
}
func NewEmptyTGeomPointInst() TGeomPointInst {
g_tgmpi := TGeomPointInst{_inner: nil}
return g_tgmpi
}
func (tgmpi *TGeomPointInst) TPointOut(maxdd int) string {
c_tgmpi_out := C.tpoint_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))
defer C.free(unsafe.Pointer(c_tgmpi_out))
tgmpi_out := C.GoString(c_tgmpi_out)
return tgmpi_out
}
func (tgmpi *TGeomPointInst) IsTInstant() bool {
return true
}
func (tb *TGeomPointInst) Init(c_temp *C.Temporal) {
tb._inner = c_temp
}
func (tb *TGeomPointInst) Inner() *C.Temporal {
return tb._inner
}
func (tb *TGeomPointInst) IsTGeomPoint() bool {
return true
}
func (tgmpi *TGeomPointInst) IsTPoint() bool {
return true
}
func (tgmpi *TGeomPointInst) String() string {
return tgmpi.TPointOut(5)
}
func (tgmpi *TGeomPointInst) Type() string {
return "TGeomPointInst"
}
type TGeomPointSeq struct {
_inner *C.Temporal
}
func NewTGeomPointSeq(tgmpi_in string) *TGeomPointSeq {
c_tgmpi_in := C.CString(tgmpi_in)
defer C.free(unsafe.Pointer(c_tgmpi_in))
c_tgmpi := C.tgeompoint_in(c_tgmpi_in)
g_tgmpi := &TGeomPointSeq{_inner: c_tgmpi}
return g_tgmpi
}
func NewTGeomPointSeqFromWKB(tgmpi_in string) *TGeomPointSeq {
c_tgmpi_in := C.CString(tgmpi_in)
defer C.free(unsafe.Pointer(c_tgmpi_in))
c_tgmpi := C.temporal_from_hexwkb(c_tgmpi_in)
g_tgmpi := &TGeomPointSeq{_inner: c_tgmpi}
return g_tgmpi
}
func (tgmpi *TGeomPointSeq) TPointOut(maxdd int) string {
c_tgmpi_out := C.tpoint_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 *TGeomPointSeq) Inner() *C.Temporal {
return tgmpi._inner
}
func (tgmpi *TGeomPointSeq) Init(c_temp *C.Temporal) {
tgmpi._inner = c_temp
}
func (tgmpi *TGeomPointSeq) NewInit(c_temp *C.Temporal) *TGeomPointSeq {
return &TGeomPointSeq{_inner: c_temp}
}
func (tgmpi *TGeomPointSeq) IsTGeomPoint() bool {
return true
}
func (tgmpi *TGeomPointSeq) IsTPoint() bool {
return true
}
func (tgmpi *TGeomPointSeq) String() string {
return tgmpi.TPointOut(10)
}
func (tgmpi *TGeomPointSeq) Type() string {
return "TGeomPointSeq"
}
func (tgmpi *TGeomPointSeq) IsTSequence() bool {
return true
}
type TGeomPointSeqSet struct {
_inner *C.Temporal
}
func NewTGeomPointSeqSet(tgmpi_in string) *TGeomPointSeqSet {
c_tgmpi_in := C.CString(tgmpi_in)
defer C.free(unsafe.Pointer(c_tgmpi_in))
c_tgmpi := C.tgeompoint_in(c_tgmpi_in)
g_tgmpi := &TGeomPointSeqSet{_inner: c_tgmpi}
return g_tgmpi
}
func (tgmpi *TGeomPointSeqSet) TPointOut(maxdd int) string {
c_tgmpi_out := C.tpoint_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 (tb *TGeomPointSeqSet) Init(c_temp *C.Temporal) {
tb._inner = c_temp
}
func (tb *TGeomPointSeqSet) Inner() *C.Temporal {
return tb._inner
}
func (tb *TGeomPointSeqSet) IsTGeomPoint() bool {
return true
}
func (tgmpi *TGeomPointSeqSet) IsTPoint() bool {
return true
}
func (tgmpi *TGeomPointSeqSet) String() string {
return tgmpi.TPointOut(10)
}
func (tgmpi *TGeomPointSeqSet) Type() string {
return "TGeomPointSeqSet"
}
func TGeomPointIn[TG TGeomPoint](input string, output TG) TG {
c_str := C.CString(input)
defer C.free(unsafe.Pointer(c_str))
c_geompoint := C.tgeompoint_in(c_str)
output.Init(c_geompoint)
return output
}
func TGeomPointFromMFJSON[TG TGeomPoint](input string, output TG) TG {
c_str := C.CString(input)
defer C.free(unsafe.Pointer(c_str))
c_geompoint := C.tgeompoint_from_mfjson(c_str)
output.Init(c_geompoint)
return output
}