2025-12-16 16:37:53 +00:00
|
|
|
package db
|
|
|
|
|
|
2026-03-21 19:41:51 +00:00
|
|
|
import ()
|
2025-12-16 16:37:53 +00:00
|
|
|
|
|
|
|
|
type GeoBounds struct {
|
2026-03-21 19:41:51 +00:00
|
|
|
East float64
|
2025-12-16 16:37:53 +00:00
|
|
|
North float64
|
|
|
|
|
South float64
|
2026-03-21 19:41:51 +00:00
|
|
|
West float64
|
2025-12-16 16:37:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type GeoQuery struct {
|
|
|
|
|
Bounds GeoBounds
|
2026-03-21 19:41:51 +00:00
|
|
|
Limit int
|
2025-12-16 16:37:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewGeoBounds() GeoBounds {
|
|
|
|
|
return GeoBounds{
|
2026-03-21 19:41:51 +00:00
|
|
|
East: 180,
|
2025-12-16 16:37:53 +00:00
|
|
|
North: 180,
|
|
|
|
|
South: -180,
|
2026-03-21 19:41:51 +00:00
|
|
|
West: -180,
|
2025-12-16 16:37:53 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func NewGeoQuery() GeoQuery {
|
|
|
|
|
return GeoQuery{
|
|
|
|
|
Bounds: NewGeoBounds(),
|
2026-03-21 19:41:51 +00:00
|
|
|
Limit: 0,
|
2025-12-16 16:37:53 +00:00
|
|
|
}
|
|
|
|
|
}
|