Method

GWeatherLocationfind_by_station_code

Declaration [src]

GWeatherLocation*
gweather_location_find_by_station_code (
  GWeatherLocation* world,
  const char* station_code
)

Description [src]

Retrieves the weather station identifier by station_code.

Note that multiple instances of the same weather station can exist in the database, and this function will return any of them, so this not usually what you want.

See gweather_location_deserialize() to recover a stored location.

Parameters

station_code const char*
 

A 4 letter METAR code.

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.

Return value

Returns: GWeatherLocation
 

A weather station level location for the given station code, or NULL if none exists in the database.

 The caller of the method takes ownership of the data, and is responsible for freeing it.
 The return value can be NULL.