Resolves a user-provided location to latitude/longitude. Prefer explicit coordinates when available; optionally fall back to AI/geocoding rules if needed.

resolve_location(
  location_input = NULL,
  latitude = NULL,
  longitude = NULL,
  use_ai = TRUE,
  use_cache = TRUE
)

Arguments

location_input

Character. Free-text location description (e.g. "Wagga Wagga, NSW").

latitude

Numeric. Latitude if already known.

longitude

Numeric. Longitude if already known.

use_ai

Logical. Whether to use AI fallback when no coordinates are provided. Default: TRUE.

use_cache

Logical. Whether to use caching for AI responses. Default: TRUE.

Value

A list with latitude, longitude, display_name, source, confidence, raw_input, assumptions.