-
-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathmulti_line_stringzs.go
More file actions
36 lines (29 loc) · 900 Bytes
/
multi_line_stringzs.go
File metadata and controls
36 lines (29 loc) · 900 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"
// ErrNilMultiLineStringZS is thrown when MultiLineStringZS is nil but shouldn't be
var ErrNilMultiLineStringZS = errors.New("geom: nil MultiLineStringZS")
// MultiLineStringZS is a geometry with multiple LineStringSs.
type MultiLineStringZS struct {
Srid
Mlsz MultiLineStringZ
}
// LineStrings returns the coordinates for the linestrings
func (mlszs MultiLineStringZS) MultiLineStringZs() struct {
Srid
Mlsz MultiLineStringZ
} {
return mlszs
}
// SetSRID modifies the struct containing the SRID int and the array of 3D coordinates
func (mlszs *MultiLineStringZS) SetSRID(srid uint32, mlsz MultiLineStringZ) (err error) {
if mlszs == nil {
return ErrNilMultiLineStringZS
}
mlszs.Srid = Srid(srid)
mlszs.Mlsz = mlsz
return
}
// Get the simple 3D multiline string
func (mlszs MultiLineStringZS) MultiLineStringZ() MultiLineStringZ {
return mlszs.Mlsz
}