radar

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BelgiumBounds = Bounds{
	North: 51.6,
	South: 49.4,
	East:  6.5,
	West:  2.3,
}

BelgiumBounds covers the Belgium radar area

View Source
var NetherlandsBounds = Bounds{
	North: 53.6,
	South: 50.7,
	East:  7.3,
	West:  3.3,
}

NetherlandsBounds covers the Netherlands radar area

Functions

func CreateGIF

func CreateGIF(framePaths []string, timestamps []string, background image.Image, markerX, markerY int, speed float64, outputPath string) error

CreateGIF creates an animated GIF from radar frames with background, marker, and timestamps

func GetBackground

func GetBackground(ctx context.Context, bounds Bounds, cacheDir string, targetSize int) (image.Image, error)

GetBackground fetches or loads cached background map for given bounds

func LatLonToPixel

func LatLonToPixel(lat, lon float64, bounds Bounds, imageSize int) (x, y int)

LatLonToPixel converts lat/lon to pixel coordinates within the given bounds Uses Mercator projection for accurate Y positioning on OSM-based maps

func LoadFrame

func LoadFrame(path string) (image.Image, error)

LoadFrame loads a PNG frame from disk

Types

type Bounds

type Bounds struct {
	North, South, East, West float64
}

Bounds represents geographic boundaries

type Tile

type Tile struct {
	X, Y, Z int
}

Tile represents an OSM tile coordinate

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL