Click or drag to resize
Location Class
Defines a location for which degree days should be calculated.
Inheritance Hierarchy

Namespace: DegreeDays.Api.Data
Assembly: DegreeDaysApi (in DegreeDaysApi.dll) Version: 1.1.0.0 (1.1.0.0)
Syntax
public abstract class Location

The Location type exposes the following members.

Methods
  NameDescription
Public methodEquals
Two Location objects are equal if it can be ascertained that they both represent the exact same weather station(s) or geographic location, and that two requests for data, one with each Location and identical in every other respect, would return identical data.
(Overrides ObjectEquals(Object).)
Public methodGetHashCode
Overridden to ensure consistency with Equals.
(Overrides ObjectGetHashCode.)
Public methodStatic memberLongLat
Returns a non-null LongLatLocation object with the specified longitude and latitude position.
Public methodStatic memberPostalCode
Returns a non-null PostalCodeLocation object with a postal code (or zip code, post code, or postcode) and a two-letter country code representing the country that the postal code belongs to.
Public methodStatic memberStationId
Returns a non-null StationIdLocation object with the specified weather station ID.
Top
Remarks

To create a Location object you can use the static factory methods of this class. For example:

Location losAngelesAirportWeatherStation = Location.StationId("KLAX");

Location empireStateBuilding = Location.PostalCode("10118", "US");

Location trafalgarSquare = Location.LongLat(new LongLat(-0.12795, 51.50766));

empireStateBuilding and trafalgarSquare are examples of geographic locations, which provide a powerful way to get data for locations around the world. See GeographicLocation for more on how these geographic locations work.

This abstract class is not designed to be extended by third-party code, which is why it does not have an accessible constructor.

Thread Safety
All concrete subclasses of this abstract class are immutable. You can safely reuse them and call them from multiple threads at once.
See Also