Skip links

Geo Providers for Geocoding and Distance and Time Calculations

This documentation covers which geo providers one can use with Cosmic Frog, and how they can be used for geocoding and distance and time calculations.

Supported Geocoding Providers

Currently, there are 4 geo providers that can be used for geocoding locations in Cosmic Frog: MapBox, Bing, Google, and PTV. MapBox is the default provider and comes free of cost with Cosmic Frog. To use any of the other 3 providers, you will need to obtain a license key from the company and add this to Cosmic Frog through your Account. The steps to do so are described in this support article “Using Alternate Geocoding Providers”.

Different geocoding providers may specialize in different geographies; refer to your provider for guidelines.

How to Geocode Locations

Geocoding a location (e.g. a customer, facility or supplier) means finding the latitude and longitude for it. Once a location is geocoded it can be shown on a map in the correct location which helps with visualizing the network itself and building a visual story using model inputs and outputs that are shown on maps.

Geocode 1

To geocode a location:

  1. You will need to give it some detail on where it is by populating the Address, City, Region (used for States and Provinces), Postal Code, and Country fields in the Customers, Facilities, and Suppliers tables.
    • You do not need to fill out all of these fields for every location. However, the more detailed the location information entered, the more precise the latitude and longitude will be. For example, only populating the Country field will geocode the location to the center of the country, populating Region and Country will geocode the location to the center of the State or Province that was specified in the Region field, etc.
    • For Optimization and Simulation going down to the City or sometimes even Region level is typically sufficient for accurate costing and transport times, also keeping in mind that Address information is often not consistently formatted and therefore the most challenging for a geocoder to match against. For Transportation Optimization applications, going down to the Address level may be necessary.
    • For best results, it is recommended to use the standard 2 letter ISO Country code in the Country field. For example, use US rather than USA, and use GB rather than UK. These standardized country codes can be found in the A-2 column of the table listed on this Wikipedia
  2. Click on the Geocode button. Cosmic Frog will now attempt to geocode all records that have blank latitude and longitude fields in the table; locations that already have latitude and longitude specified will not be overwritten.
    • When a subset of records is selected by selecting them in the grid or only a subset of records is shown in the grid due to the application of any filters, the geocoding will still be done for all records in the table that have blank latitude and longitude fields, not just the selected/shown records.
    • If the latitude and longitude fields contain 0’s (rather than being left blank), these will be interpreted as valid coordinates, and the record will not be geocoded.
      Geocode 2
  3. When using the default geo provider for Geocoding, MapBox, a message comes up asking the user to choose if they want to return 100% matched results only (when the checkbox is checked) or the best matched result which can be less than a 100% match (when the checkbox is unchecked)
    • Typically, not all locations will be geocoded when requiring 100% matches only. Therefore, a 2-step strategy where first only 100% matches are geocoded, marking the locations that were not geocoded in this step by for example putting a note in the Notes field or a custom field, then doing a second geocoding pass through where 100% matches are not required and checking these latter locations visually on a map (filtering them out using the Notes of custom field) can help achieve the most accurate geocoding results.
  4. Best practice is to check the geocoding results on a map as missed assignments are possible and often easiest to identify visually.

How to Calculate Distances and Transport Times

Geocode 3

Currently, if the Transport Distance and Transport Time fields in the Transportation Policies table are not populated by the user, Cosmic Frog will calculate these during an Optimization or Simulation run using the latitude & longitude pairs of origin and destination. For Distance, a straight-line calculation + Circuity Factor is used, and Time is calculated as Distance / Average Speed. The Circuity Factor and Average Speed are specified in the Model Settings table, defaults are 17% and 55 MPH respectively.

A Distance Lookup utility that can leverage PCMiler and Bing as geo providers will become available in Cosmic Frog soon; this documentation will be updated with those details once the utility is live.

Have More Questions?

Contact Support Contact Sales Visit Frogger Pond Community