Get Horizon Angles

View as Markdown
GET/data/geographic/horizon_angle

Returns a circular profile of angles to the horizon for a location at a given latitude, longitude point. The angles are calculated based on the surrounding terrain elevation from a 90m horizontal-resolution digital elevation model.

The angle returned is relative to due north, with negative angles eastwards and positive values westward . Varies from -180 to 180. A value of -90 means east, 0 means north, and 90 means west.

Query Parameters

4 fields
latituderequired
number (double)

The latitude of the location you request data for. Must be a decimal number between -90 and 90.

longituderequired
number (double)

The longitude of the location you request data for. Must be a decimal number between -180 and 180.

azimuth_intervalsrequired
integer (int32)

Number of sections to divide the azimuth circle into, governing how many items are returned in the response. E.g. 10 = [-180°, -144°, -108°, -72°, -36°, 0°, 36°, 72°, 108°, 144°] Maximum 360

format
string

Response format. Default is HTML if not supplied.

Accepted values
jsoncsv

Responses

200

OK

HorizonAngleResponse
horizon_angles
HorizonAngle[]optionalview definition
azimuth
number (double)optional
angle
number (double)optional
response_status
ResponseStatusoptionalview definition
error_code
stringoptional
message
stringoptional
stack_trace
stringoptional
errors
ResponseError[]optionalview definition
error_code
stringoptional
field_name
stringoptional
message
stringoptional
meta
objectoptional
meta
objectoptional

GET/data/geographic/horizon_angle

Request
curl -X GET "https://api.solcast.com.au/data/geographic/horizon_angle?latitude=-33.8567&longitude=151.2152&azimuth_intervals=18&format=json" \
  -H "Authorization: Bearer $API_KEY"
Response
live example
200
{
  "horizon_angles": [
    {
      "azimuth": -180,
      "angle": 3.711284
    },
    {
      "azimuth": -160,
      "angle": 1.892235
    },
    {
      "azimuth": -140,
      "angle": 1.117183
    }
  ]
}