OpenWeatherMap · Arazzo Workflow

OpenWeatherMap Weather Map Overlay Context

Version 1.0.0

Geocode a city, read its current weather, then fetch a matching weather map tile.

1 workflow 3 source APIs 1 provider
View Spec View on GitHub WeatherForecastClimateAir PollutionAir QualitySolarGeocodingHistoryMapsRoad RiskPublic APIsArazzoWorkflows

Provider

openweathermap

Workflows

weather-map-overlay-context
Resolve a city, read current weather, then fetch a weather map tile overlay.
Calls direct geocoding to turn a city query into coordinates, reads current weather at that point, then fetches a PNG weather map tile for the requested layer and z, x, y tile coordinate.
3 steps inputs: appid, layer, q, units, x, y, z outputs: currentConditions, currentTemp, lat, lon, tileStatus
1
geocodeCity
getDirectGeocoding
Resolve the supplied city query into geographic coordinates, keeping the first and best match.
2
currentWeather
getCurrentWeather
Read current weather at the geocoded coordinates to provide ground-truth conditions alongside the map overlay.
3
mapTile
getWeatherMapTile
Fetch the PNG weather map tile for the requested layer and z, x, y tile coordinate to overlay on a base map.

Source API Descriptions

Arazzo Workflow Specification

openweathermap-weather-map-overlay-context-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: OpenWeatherMap Weather Map Overlay Context
  summary: Geocode a city, read its current weather, then fetch a matching weather map tile.
  description: >-
    Pairs a tile overlay with ground-truth conditions. The workflow resolves a
    city name into coordinates with the geocoding API, reads the current weather
    at that point, then fetches a PNG weather map tile for a chosen layer so a
    map UI can show the overlay alongside the live reading. The tile service
    addresses imagery by z, x, and y tile coordinates rather than latitude and
    longitude, so those tile coordinates are supplied as inputs (a slippy-map
    projection step that the OpenAPI descriptions do not expose and so cannot be
    chained from the geocoding result). Every step spells out its request
    inline, including the appid API key the security scheme requires, so the flow
    can be read and executed without opening the underlying OpenAPI
    descriptions.
  version: 1.0.0
sourceDescriptions:
- name: geocodingApi
  url: ../openapi/openweathermap-geocoding-openapi.yml
  type: openapi
- name: currentWeatherApi
  url: ../openapi/openweathermap-current-weather-openapi.yml
  type: openapi
- name: weatherMapsApi
  url: ../openapi/openweathermap-weather-maps-openapi.yml
  type: openapi
workflows:
- workflowId: weather-map-overlay-context
  summary: Resolve a city, read current weather, then fetch a weather map tile overlay.
  description: >-
    Calls direct geocoding to turn a city query into coordinates, reads current
    weather at that point, then fetches a PNG weather map tile for the requested
    layer and z, x, y tile coordinate.
  inputs:
    type: object
    required:
    - q
    - layer
    - z
    - x
    - y
    - appid
    properties:
      q:
        type: string
        description: City name, optionally with state and ISO country codes, comma-separated.
      layer:
        type: string
        description: Weather layer to render (clouds_new, precipitation_new, pressure_new, wind_new, or temp_new).
      z:
        type: integer
        description: Tile zoom level.
      x:
        type: integer
        description: Tile X coordinate.
      y:
        type: integer
        description: Tile Y coordinate.
      units:
        type: string
        description: Units of measurement (standard, metric, or imperial).
      appid:
        type: string
        description: OpenWeather API key.
  steps:
  - stepId: geocodeCity
    description: >-
      Resolve the supplied city query into geographic coordinates, keeping the
      first and best match.
    operationId: getDirectGeocoding
    parameters:
    - name: q
      in: query
      value: $inputs.q
    - name: appid
      in: query
      value: $inputs.appid
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      lat: $response.body#/0/lat
      lon: $response.body#/0/lon
      name: $response.body#/0/name
  - stepId: currentWeather
    description: >-
      Read current weather at the geocoded coordinates to provide ground-truth
      conditions alongside the map overlay.
    operationId: getCurrentWeather
    parameters:
    - name: lat
      in: query
      value: $steps.geocodeCity.outputs.lat
    - name: lon
      in: query
      value: $steps.geocodeCity.outputs.lon
    - name: units
      in: query
      value: $inputs.units
    - name: appid
      in: query
      value: $inputs.appid
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      temp: $response.body#/main/temp
      conditions: $response.body#/weather/0/main
  - stepId: mapTile
    description: >-
      Fetch the PNG weather map tile for the requested layer and z, x, y tile
      coordinate to overlay on a base map.
    operationId: getWeatherMapTile
    parameters:
    - name: layer
      in: path
      value: $inputs.layer
    - name: z
      in: path
      value: $inputs.z
    - name: x
      in: path
      value: $inputs.x
    - name: y
      in: path
      value: $inputs.y
    - name: appid
      in: query
      value: $inputs.appid
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      tileStatus: $statusCode
  outputs:
    lat: $steps.geocodeCity.outputs.lat
    lon: $steps.geocodeCity.outputs.lon
    currentTemp: $steps.currentWeather.outputs.temp
    currentConditions: $steps.currentWeather.outputs.conditions
    tileStatus: $steps.mapTile.outputs.tileStatus