Precipitation

By Location

This provides the total amount of precipitation within a user-defined timespan at a specific location. The location is represented by a latitude/longitude pair.

GET /precipitation/{latitude}/{longitude}

Query String Parameters (Optional)

The default response contains results in inches for 24 hours ending at the time of the request. [1]

Name Type Description Accepted Values / Range Example
start string UTC start time start of 2015 to 7 days in the future 2015-06-01T00:00:00Z
end string UTC end time start of 2015 to 7 days in the future 2015-06-02T00:00:00Z
unit string unit of measure inches, millimeters inches

Request Example

See Headers for request header details.

$ curl -n -X GET "https://agriculture.api.wdtinc.com/precipitation/35.482/-97.535" \
-H "Accept: application/vnd.wdt+json; version=1"

Response Example

See Status Codes for response code details.

HTTP/1.1 200 OK
{
  "latitude": 35.482,
  "longitude": -97.535,
  "startTime": "2015-06-01T00:00:00Z",
  "endTime": "2015-06-02T00:00:00Z",
  "precipitation": 2.5,
  "unit": "inches"
}

By Field

This provides the total amount of precipitation within a user-defined timespan at the centroid of a field, along with the area-weighted arithmetic mean and range of precipitation over that field.

GET /precipitation/{field-uuid}

Query String Parameters (Optional)

The default response contains results in inches for 24 hours ending at the time of the request. [1]

Name Type Description Accepted Values / Range Example
start string UTC start time start of 2015 to 7 days in the future 2015-06-01T00:00:00Z
end string UTC end time start of 2015 to 7 days in the future 2015-06-02T00:00:00Z
unit string unit of measure inches, millimeters inches

Request Example

See Headers for request header details.

$ curl -n -X GET "https://agriculture.api.wdtinc.com/precipitation/fe68c33d-e718-4449-acae-351072ce7749" \
-H "Accept: application/vnd.wdt+json; version=1"

Response Example

See Status Codes for response code details.

HTTP/1.1 200 OK
{
  "field": "/fields/fe68c33d-e718-4449-acae-351072ce7749",
  "startTime": "2015-06-01T00:00:00Z",
  "endTime": "2015-06-02T00:00:00Z",
  "precipitation": 2.5,
  "fieldMean": 2.5,
  "fieldMaximum": 2.6,
  "fieldMinimum": 2.4,
  "unit": "inches",
  "contours": "/precipitation/fe68c33d-e718-4449-acae-351072ce7749/contours?start=2015-06-01T00:00:00Z&end=2015-06-02T00:00:00Z"
}

Contours By Field

This provides a contoured representation (GeoJSON) of the total amount of precipitation within a user-defined timespan, clipped to a field boundary.

GET /precipitation/{field-uuid}/contours

Query String Parameters (Optional)

The default response contains results in inches for 24 hours ending at the time of the request. [1]

Name Type Description Accepted Values / Range Example
start string UTC start time start of 2015 to 7 days in the future 2015-06-01T00:00:00Z
end string UTC end time start of 2015 to 7 days in the future 2015-06-02T00:00:00Z
unit string unit of measure inches, millimeters inches

Request Example

See Headers for request header details.

$ curl -n -X GET "https://agriculture.api.wdtinc.com/precipitation/fe68c33d-e718-4449-acae-351072ce7749/contours" \
-H "Accept: application/vnd.wdt+json; version=1"

Response Example

See Status Codes for response code details.

HTTP/1.1 200 OK
{
  "field": "/fields/fe68c33d-e718-4449-acae-351072ce7749",
  "startTime": "2015-06-01T00:00:00Z",
  "endTime": "2015-06-02T00:00:00Z",
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [ [-102.3555, 39.8420], [-99.8945, 39.8420], ... ]
        ]
      },
      "properties": {
        "precipitation": 2.0
      }
    },
    {
      "type": "Feature",
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [ [-102.3555, 39.8420], [-99.8945, 39.8420], ... ]
        ]
      },
      "properties": {
        "precipitation": 2.5
      }
    }
  ],
  "unit": "inches"
}
[1](1, 2, 3) Timespans less than 48 hours are based on hourly accumulations. Longer timespans and dates prior to 2015 use 24-hour accumulations. Start and end times are rounded accordingly, if needed, and shown in the response.