1. Stubmation
  2. Address and Coordinate converter

Stubmation

Address and Coordinate converter

Converts location data between text addresses and GPS coordinates depending on which format is needed for the requested task.

Uses

A scenario for this could be:

  • You have a street address and need to retrieve latitude and longitude
  • You have latitude and longitude and need to retrieve a formatted address
  • You have Coordinates in different formats and want a standard way to process them through one workflow

This stubmation supports all of those patterns.

What Happens behind the scenes

The stubmation receives a flow_data object that tells it which conversion action to perform.

The action key inside flow_data determines the mode of operation.

The action_params object contains the actual values to use for the lookup.

Depending on the action used, the workflow will either:

  • covert an address into coordinates
  • convert coordinates into an address

All template actions built for this workflow call the same stubmation name:

address_and_gps_coordinates_converter

The only difference between them is the flow_data.action value and the structure of flow_data.action_params.

Coordinates from Address

Use this when you have a full address string and need latitude and longitude.

loading...

Flow Data Explained

action
required
string

The operation the stubmation should perform.

For this use case the value must be:

editor
        "coordinates_from_address";

      

action_params
required
json object

Contains the data required for the selected action.


action_params.address
required
string

The full address string to convert from.

Example:

editor
        "2510 6th Avenue, Seattle, WA 98121";

      

Address from Comma Separated LatLng String

Use this when latitude and longitude are provided as a single comma separated string.

loading...

Flow Data Explained

action
required
string

The geo-coding operation the stubmation should perform.

For this use case the value must be:

editor
        "address_from_coordinates";

      

action_params
required
json object

Contains the data required for the selected action.


action_params.latlng
required
string

A comma separated latitude and longitude string.

Example:

editor
        "47.6183249, -122.3446599";

      

Address from Separate Lat and Lng String Values

Use this when latitude and longitude are provided as separate string values.

loading...

Flow Data Explained

action
required
string

The geo-coding operation the stubmation should perform.

For this use case the value must be:

editor
        "address_from_coordinates";

      

action_params
required
json object

Contains the data required for the selected action.


action_params.lat
required
string

The latitude value as a string.

Example:

editor
        "47.6183249";

      

action_params.lng
required
string

The longitude value as a string.

Example:

editor
        "-122.3446599";

      

Address from Separate Lat and Lng Numeric Values

Use this when latitude and longitude are provided separately and should be sent as numeric values.

loading...

Flow Data Explained

action
required
string

The geo-coding operation the stubmation should perform.

For this use case the value must be:

editor
        "address_from_coordinates";

      

action_params
required
json object

Contains the data required for the selected action.


action_params.lat
required
number

The latitude value as a number.

Example:

editor
        47.6183249;

      

action_params.lng
required
number

The longitude value as a number.

Example:

editor
        -122.3446599;

      

Summary of Supported Payloads

This stubmation currently supports these payload shapes.

Address to Coordinates

loading...

Coordinates to Address using latlng

loading...

Coordinates to Address using string lat and lng

loading...

Coordinates to Address using numeric lat and lng

loading...

Notes

  • Use coordinates_from_address when starting with a normal address
  • Use address_from_coordinates when starting with latitude and longitude
  • Use the string variants when the downstream process expects string values
  • Use the numeric variant when the downstream process expects true numbers