-
-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathmulti_pointzms.go
More file actions
36 lines (29 loc) · 833 Bytes
/
multi_pointzms.go
File metadata and controls
36 lines (29 loc) · 833 Bytes
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
package geom
import "errors"
// ErrNilMultiPointZMS is thrown when a MultiPointZMS is nil but shouldn't be
var ErrNilMultiPointZMS = errors.New("geom: nil MultiPointZMS")
// MultiPointZMS is a geometry with multiple, referenced 3+1D points.
type MultiPointZMS struct {
Srid
Mpzm MultiPointZM
}
// Points returns the coordinates for the 3+1D points
func (mpzms MultiPointZMS) Points() struct {
Srid
Mpzm MultiPointZM
} {
return mpzms
}
// SetSRID modifies the struct containing the SRID int and the array of 3+1D coordinates
func (mpzms *MultiPointZMS) SetSRID(srid uint32, mpzm MultiPointZM) (err error) {
if mpzms == nil {
return ErrNilMultiPointZMS
}
mpzms.Srid = Srid(srid)
mpzms.Mpzm = mpzm
return
}
// Get the simple 3D multipoint
func (mpzms MultiPointZMS) MultiPointZM() MultiPointZM {
return mpzms.Mpzm
}