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