forked from go-spatial/geom
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmulti_pointms.go
More file actions
36 lines (29 loc) · 810 Bytes
/
multi_pointms.go
File metadata and controls
36 lines (29 loc) · 810 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"
// ErrNilMultiPointMS is thrown when a MultiPointMS is nil but shouldn't be
var ErrNilMultiPointMS = errors.New("geom: nil MultiPointMS")
// MultiPointMS is a geometry with multiple, referenced 2+1D points.
type MultiPointMS struct {
Srid uint32
Mpm MultiPointM
}
// Points returns the coordinates for the 3D points
func (mpms MultiPointMS) Points() struct {
Srid uint32
Mpm MultiPointM
} {
return mpms
}
// SetSRID modifies the struct containing the SRID int and the array of 3D coordinates
func (mpms *MultiPointMS) SetSRID(srid uint32, mpm MultiPointM) (err error) {
if mpms == nil {
return ErrNilMultiPointMS
}
mpms.Srid = srid
mpms.Mpm = mpm
return
}
// Get the simple 3D multipoint
func (mpms MultiPointMS) MultiPointM() MultiPointM {
return mpms.Mpm
}