We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
line0 := space.LineString{{116.40495300292967, 39.926785883895654}, {116.3975715637207, 39.9295502919}} line1 := space.LineString{{116.37310981750488, 39.92099342895789}, {116.39928817749023, 39.9174387253541}} fmt.Println(line1.Distance(line0)) 0 <nil>
dist is initialized with 0, this for impossible in if distP, _ := elem.Distance(); dist > distP { dist = distP }
var dist float64 modified with var dist float64 = math.MaxFloat64
修改问题源码 func (el *ElementDistance) distanceLineAndLine() (float64, error) { var dist float64 if mark := relate.IsIntersectionEdge(el.From.(matrix.LineMatrix), el.To.(matrix.LineMatrix)); mark { return 0, nil } for _, v := range el.From.(matrix.LineMatrix) { elem := &ElementDistance{matrix.Matrix(v), el.To, el.F} if distP, _ := elem.Distance(); dist > distP { dist = distP } } return dist, nil }
The text was updated successfully, but these errors were encountered:
thanks,we will fix it recently
Sorry, something went wrong.
we have fix it ,you can use the latest code in branch main, and we will release new version recently
No branches or pull requests
dist is initialized with 0, this for impossible in
if distP, _ := elem.Distance(); dist > distP {
dist = distP
}
var dist float64
modified with
var dist float64 = math.MaxFloat64
The text was updated successfully, but these errors were encountered: