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