Package nwsWeatherApi

Class Point

java.lang.Object
nwsWeatherApi.Point

public class Point extends Object
Wraps the PointGeoJson schema of the NWS API.
Author:
cobalt
  • Constructor Details

    • Point

      public Point(double latitude, double longitude)
      Creates a Point object with the given latitude and longitude. Coordinates must be in the NWS's jurisdiction.
      Parameters:
      latitude -
      longitude -
    • Point

      public Point(com.github.cliftonlabs.json_simple.JsonObject obj)
      Creates a point object using a valid NWS API JSON of the PointGeoJson schema.
      Parameters:
      obj -
  • Method Details

    • office

      public Office office()
      Returns the WFO responsible for the point.
      Returns:
    • gridX

      public int gridX()
      Returns the X coordinate of the Point's grid within the WFO.
      Returns:
    • gridY

      public int gridY()
      Returns the Y coordinate of the Point's grid within the WFO.
      Returns:
    • bearingFromCity

      public int bearingFromCity()
      Returns the compass angle from the point towards the city returned by city().
      Returns:
    • zone

      public String zone()
      Returns the zone code for the point.
      Returns:
    • fireZone

      public String fireZone()
      Returns the fire weather zone code for the point.
      Returns:
    • county

      public String county()
      Returns the county code for the point.
      Returns:
    • radar

      public String radar()
      Returns the callsign of the radar station responsible for the point.
      Returns:
    • city

      public String city()
      Returns the nearest city. Direction and distance from the point can be found using bearingFromCity() and distanceFromCity().
      Returns:
    • timezone

      public String timezone()
      Returns a String representation of the Point's timezone.
      Returns:
    • distanceFromCity

      public double distanceFromCity()
      Returns the Point's distance from the city returned by city() in meters.
      Returns:
    • latitude

      public double latitude()
      Returns the Point's latitude.
      Returns:
    • longitude

      public double longitude()
      Returns the Point's longitude.
      Returns:
    • zoneForecast

      public ZoneForecast zoneForecast()
      Returns the ZoneForecast for the point.
      Returns:
    • gridpointForecast

      public GridpointForecast gridpointForecast()
      Returns the GridpointForecast for the point.
      Returns: