BeachSnapshot

marola.beaches.BeachSnapshot
object BeachSnapshot

A committed list of beaches for one (origin, radius, limit): OSM beaches change over years, and an Overpass timeout was the most common way the three-hourly site build died. CI reads the file and never calls Overpass; refresh deliberately with just beaches-refresh.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def decode(json: JsonValue): List[Beach]
def encode(beaches: List[Beach]): JsonValue
def fileFor(dir: Path, origin: Coordinates, radiusKm: Double, limit: Int): Path
def key(origin: Coordinates, radiusKm: Double, limit: Int): String

Stable, human-readable, and unique per query — the file name is the cache key, so a changed radius or limit cannot silently reuse the wrong list.

Stable, human-readable, and unique per query — the file name is the cache key, so a changed radius or limit cannot silently reuse the wrong list.

Attributes

def read(file: Path): List[Beach]

Nil for a missing or unreadable file: a broken snapshot must fall through to Overpass, not fail the build.

Nil for a missing or unreadable file: a broken snapshot must fall through to Overpass, not fail the build.

Attributes

def write(file: Path, beaches: List[Beach]): Unit