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

51
vendor/github.com/paulmach/orb/equal.go generated vendored Normal file
View File

@@ -0,0 +1,51 @@
package orb
import (
"fmt"
)
// Equal returns if the two geometrires are equal.
func Equal(g1, g2 Geometry) bool {
if g1 == nil || g2 == nil {
return g1 == g2
}
if g1.GeoJSONType() != g2.GeoJSONType() {
return false
}
switch g1 := g1.(type) {
case Point:
return g1.Equal(g2.(Point))
case MultiPoint:
return g1.Equal(g2.(MultiPoint))
case LineString:
return g1.Equal(g2.(LineString))
case MultiLineString:
return g1.Equal(g2.(MultiLineString))
case Ring:
g2, ok := g2.(Ring)
if !ok {
return false
}
return g1.Equal(g2)
case Polygon:
g2, ok := g2.(Polygon)
if !ok {
return false
}
return g1.Equal(g2)
case MultiPolygon:
return g1.Equal(g2.(MultiPolygon))
case Collection:
return g1.Equal(g2.(Collection))
case Bound:
g2, ok := g2.(Bound)
if !ok {
return false
}
return g1.Equal(g2)
}
panic(fmt.Sprintf("geometry type not supported: %T", g1))
}