fixed dependencies

This commit is contained in:
nuknal
2024-10-24 15:46:01 +08:00
parent d16a5bd9c0
commit 1161e8d054
2005 changed files with 690883 additions and 0 deletions

58
vendor/github.com/paulmach/orb/multi_line_string.go generated vendored Normal file
View File

@@ -0,0 +1,58 @@
package orb
// MultiLineString is a set of polylines.
type MultiLineString []LineString
// GeoJSONType returns the GeoJSON type for the object.
func (mls MultiLineString) GeoJSONType() string {
return "MultiLineString"
}
// Dimensions returns 1 because a MultiLineString is a 2d object.
func (mls MultiLineString) Dimensions() int {
return 1
}
// Bound returns a bound around all the line strings.
func (mls MultiLineString) Bound() Bound {
if len(mls) == 0 {
return emptyBound
}
bound := mls[0].Bound()
for i := 1; i < len(mls); i++ {
bound = bound.Union(mls[i].Bound())
}
return bound
}
// Equal compares two multi line strings. Returns true if lengths are the same
// and all points are Equal.
func (mls MultiLineString) Equal(multiLineString MultiLineString) bool {
if len(mls) != len(multiLineString) {
return false
}
for i, ls := range mls {
if !ls.Equal(multiLineString[i]) {
return false
}
}
return true
}
// Clone returns a new deep copy of the multi line string.
func (mls MultiLineString) Clone() MultiLineString {
if mls == nil {
return nil
}
nmls := make(MultiLineString, 0, len(mls))
for _, ls := range mls {
nmls = append(nmls, ls.Clone())
}
return nmls
}