structs.go 439 B

123456789101112131415161718192021222324
  1. // SPDX-FileCopyrightText: Adam Evyčędo
  2. //
  3. // SPDX-License-Identifier: AGPL-3.0-or-later
  4. package api
  5. import "github.com/dhconnelly/rtreego"
  6. type TimedStopStub struct {
  7. // StopStub
  8. Time uint
  9. }
  10. func (s StopV2) Bounds() *rtreego.Rect {
  11. rect, err := rtreego.NewRectFromPoints(
  12. rtreego.Point{s.Position.Lat, s.Position.Lon},
  13. rtreego.Point{s.Position.Lat, s.Position.Lon},
  14. )
  15. if err != nil {
  16. panic(err.Error())
  17. }
  18. return rect
  19. }