arazzo: 1.0.1 info: title: Tomorrow.io Map Tile Precipitation Overlay summary: Read realtime precipitation for a point, then fetch the matching weather map tile. description: >- A visualization flow that connects point data to a map overlay. The workflow reads the realtime precipitation intensity for a location, then retrieves the corresponding Web Mercator PNG tile for the precipitation layer at the chosen XYZ address and time, branching on whether precipitation is currently present. This pairs the numeric reading with the renderable tile for a map UI. Every step spells out its request inline so the flow can be read and executed without opening the underlying OpenAPI description. version: 1.0.0 sourceDescriptions: - name: weatherApi url: ../openapi/tomorrow-io-weather-api-openapi.yml type: openapi - name: mapTilesApi url: ../openapi/tomorrow-io-map-tiles-api-openapi.yml type: openapi workflows: - workflowId: map-tile-precipitation-overlay summary: Read realtime precipitation, then fetch the matching map tile with branching. description: >- Reads current precipitation intensity for a location, branches on whether it is raining, and fetches the precipitation map tile for the supplied XYZ address and time. inputs: type: object required: - apikey - location - zoom - x - y properties: apikey: type: string description: Tomorrow.io API key passed as the apikey query parameter. location: type: string description: Either 'lat,lng' or a Tomorrow.io locationId. zoom: type: integer description: XYZ tile zoom level (0-12). x: type: integer description: XYZ tile column. y: type: integer description: XYZ tile row. field: type: string description: Map data layer field to render. default: precipitationIntensity timeFormat: type: string description: ISO-8601 timestamp or 'now' for the tile time reference. default: now units: type: string description: Unit system for the realtime response (metric or imperial). default: metric steps: - stepId: getRealtime description: >- Read the current precipitation intensity for the location to decide whether an overlay is worth rendering. operationId: getRealtimeWeather parameters: - name: location in: query value: $inputs.location - name: units in: query value: $inputs.units - name: apikey in: query value: $inputs.apikey successCriteria: - condition: $statusCode == 200 outputs: precipitationIntensity: $response.body#/data/values/precipitationIntensity onSuccess: - name: precipitating type: goto stepId: getTile criteria: - context: $response.body condition: $.data.values.precipitationIntensity > 0 type: jsonpath - name: dry type: goto stepId: getTile criteria: - context: $response.body condition: $.data.values.precipitationIntensity == 0 type: jsonpath - stepId: getTile description: >- Retrieve the Web Mercator PNG tile for the precipitation layer at the supplied XYZ address and time reference. operationId: getMapTile parameters: - name: zoom in: path value: $inputs.zoom - name: x in: path value: $inputs.x - name: y in: path value: $inputs.y - name: field in: path value: $inputs.field - name: timeFormat in: path value: $inputs.timeFormat - name: apikey in: query value: $inputs.apikey successCriteria: - condition: $statusCode == 200 outputs: tileStatus: $statusCode outputs: precipitationIntensity: $steps.getRealtime.outputs.precipitationIntensity tileStatus: $steps.getTile.outputs.tileStatus