Click or drag to resize

LocationInfoResponseStationId Property

Gets the non-null, non-empty canonical ID of the weather station or combination of weather stations that would be used to generate data for an equivalent LocationDataResponse.

Namespace: DegreeDays.Api.Data
Assembly: DegreeDays (in DegreeDays.dll) Version: 1.4
Syntax
public string StationId { get; }

Property Value

String
Remarks

If the Location in the LocationInfoRequest was a StationIdLocation, this method will simply hold the canonical form of that weather station's ID. We say "canonical" because it's possible for a station ID to be expressed in more than one way, like upper case or lower case. The canonical form of the station ID is the form that you should display in a UI or store in a database if appropriate.

If the Location in the LocationInfoRequest was a GeographicLocation, then:

  • If the data for an equivalent LocationDataResponse would be calculated using temperature data from a single station (the usual case), this method will return the canonical form of that station's ID.
  • If the data for an equivalent LocationDataResponse would be calculated using temperature data combined from multiple stations (something that the API might optionally start doing at some point in the future), this method will return the ID of a "virtual station" that represents the specific combination of weather stations used.

Either way, the station ID held by this property can be used to fetch data from the same station(s) that would have been used to generate data in response to an equivalent LocationDataRequest. Typically you would use this to get the station ID to best represent a GeographicLocation, and then use that ID in LocationDataRequests going forward.

See Also