ArcGIS Blog

Announcements

ArcGIS Pro

Calculating Global Distances and Routes

By Liz Graham

With the ArcGIS Spatial Analyst extension in ArcGIS Pro 3.4, you can perform distance analysis on a global scale and compute the most optimal paths worldwide. Enhancements allow you to calculate distances and optimal paths across the boundaries of your map extent.

 

Before ArcGIS Pro 3.4, distance analysis could only perform calculations within the edges of a projection. For instance, when accounting for prevailing wind directions, the shortest calculated sailing route across the ocean from Los Angeles to Singapore would circle the southern tip of South America. This route, shown below, covers about 34,800 kilometers.

Map depicting a sailing route from Los Angeles around the tip of South America to Singapore. A table showing the length of the route.
Using prevailing wind directions, the calculated route prior to ArcGIS 3.4 is 34,815 Kilometers.

With the improvements in ArcGIS Pro 3.4, being able to cross the extent boundary results in a much shorter distance between the start and finish points. The calculated optimal route now cuts a path directly across the Pacific in the northern hemisphere. This significantly reduces the travel distance from Los Angeles to Singapore to about 9,200 kilometers.

Map showing a sailing route from Los Angeles west across the Pacific Ocean, to the edge of the map. On the right of the map the other half of the route starts from the edge and connects to Singapore.
Starting in ArcGIS Pro 3.4 the shortest route, using prevailing wind directions, is 9,187 Kilometers.

Next, you’ll learn how to set up your analysis to use this new enhancement.

Requirements

To ensure that your analysis will find the shortest path around the world, keep the following in mind. The enhanced tools include Distance Accumulation, Distance Allocation, Optimal Path as Line, Optimal Path as Raster and Optimal Region Connections.

  1. Choose the geodesic distance method. When the planar distance method is used, the distance is calculated on a flat earth. When the extent is large, the result is very distorted, making the planar distance calculation inaccurate at a world scale.  Consequently, the planar method is not supported with calculating distances around the world.  When working globally, use the geodesic distance method to get meaningful results.
  2. It is required that your data be in a geographic coordinate system (GCS), or if it is projected, it must be in a cylindrical projection. You can meet this requirement by setting the Spatial reference in the tool Environment settings.
  3. Finally, ensure that your analysis extent spans the width of the world. For example, in the figure below, if the analysis extent is set to the blue box, the analysis will only take place within that extent and the analysis will not generate results that span across the globe. You can set the extent in the Environment settings.

 

Map depicting a sailing route from Los Angeles around the tip of South America to Singapore. The route is contained in a rectangle, representing the analysis extent.
Setting the analysis extent contains the route within that extent.

To summarize, this improvement is available when the Distance Method parameter is set to Geodesic, the data is in either a geographic coordinate system or a cylindrical projection, and the extent of your analysis is the entire world.

 

Example

The following example shows how this new feature can be applied to perform analysis.

This example models the global least-cost historic trade routes. Historically, trading was done by sailing vessels. These routes were impacted by the winds, the currents, and the limitations of the sailing vessels.

This example uses prevailing wind directions to determine sailing routes between ports. Generally, sailboats are least impeded when they travel at a beam reach. A beam reach means a sailboat is traveling at a 90-degree angle to the wind direction. This is the fastest angle relative to the wind for most sailboats. Sailboats move relatively slowly when the wind is coming straight behind them, or they are on what is called a run, and sailboats cannot travel directly into the wind. Instead, they must tack through what is called the no-go zone. How efficiently sailboats travel with respect to the wind direction is specific to different boats, the sail configuration, and other criteria.

This analysis shows a general representation of this information in a table. The first column represents the direction of travel with respect to the wind. A zero in this column means the sailboat is traveling in the same direction as the wind. Ninety degrees means the wind is at a 90-degree angle to the direction of travel and that the boat would be traveling at a beam reach. A 180 difference means that the wind is blowing directly from the direction of travel, a headwind (the no-go zone). The second column applies a cost to travel in that direction. Cost is all relative; a value of 2 in this column means it takes twice as long to travel in that direction than the direction that has a cost of 1. It is important to note that in this example, the wind’s magnitude is not considered.

A text file with 2 columns of numbers the first column is 0, 30, 60, 90, 120, 150, and 180. The second column is 3, 2, 1.25, 1, 1.25, 2, and 100.
This Horizontal Factor table will apply different costs relative to the direction of travel.

Wind direction data for August 2024 can be used in conjunction with the table to predict the routes the sailboats would take.

A map representing wind direction over the oceans. The values range from 0 degrees to 360 degrees.
Wind Direction (August 2024) calculated from Copernicus Climate Data Store ERA5 monthly averaged data.

To calculate optimal routes, run two tools: Distance Accumulation and Optimal Path as Line.

In the Distance Accumulation tool, set the following parameters:

  1. Specify the input source to the Port of Los Angeles
  2. Give output names for the Distance Accumulation and Back Direction rasters.
  3. Specify the Geodesic distance method.
  4. Specify the Input Horizontal Raster as the Wind Direction raster and specify the Horizontal Factor parameter as the table relating the cost of travel relative to wind direction.
  5. If your input data is not in a geographic coordinate system or a cylindrical projection, specify an output coordinate system. Also, your analysis must cover an extent that spans from -180 to +180.
  6. Run the tool

 

Distance Accumulation tool parameters and environments numbered with values set.
Setting these parameters and environments is the first step in calculating an optimal sailing route.

This is the Distance Accumulation raster generated by running the Distance Accumulation tool. Every location in this result has a value that is the distance back to the Los Angeles port following the most optimal or least cost path.

A map of the least cost distance value from the port of Los Angeles to every other location on the ocean.
The Distance Accumulation result.

This is the Back Direction raster generated by running the Distance Accumulation tool. The Back Direction rasters have values from 0 to 360, indicating the directions back along the least cost path to the sources.

A map and a legend with values from 0 to 360, covering the oceans.
The Back Direction raster result from the Distance Accumulation tool.

Next, you will use the Distance Accumulation and the Back Direction rasters to run the Optimal Path As Line tool.

In the Optimal Path as Line tool, set the following parameters:

  1. Specify the destinations. In this example, the destinations are the ports we want to generate sailing routes to.
  2. Specify the inputs you just created in the Distance Accumulation tool.
  3. Provide an output name.
  4. Run the tool.
The Optimal Path as Line tool showing set parameters.
Setting these parameters for the Optimal Path as Line is the second step in calculating an optimal sailing route.

In the map below, you can see the most optimal paths from the Port of Los Angeles to several ports around the globe. Some of these optimal paths go across the Pacific while others go around the Cape Horn, the tip of South America.

A map showing optimal sailing routes from the Port of Los Angeles to eight destination ports.
Without changing the central meridian of the map, this analysis created sailing routes that go beyond the boundary of the map extent, allowing for around the world calculations in both directions.

Learn more

Before ArcGIS Pro 3.4, distance analysis could only perform calculations within the edges of a projection. However, starting at ArcGIS Pro 3.4, distance analysis can be performed around the globe. Remember to use the geodesic method, specify a supported coordinate system, and ensure your extent spans the global extent.

To learn more about distance analysis and recent improvements, visit the Distance Analysis help documentation and the blog series Distance Analysis Simplified.

Thanks

This enhancement request and example are inspired by the workflow described here:

Roberts, L., Merson, J., and Wong, W. F. (2025). Global-TRANSIT: modeling global historic sailing using a least-cost surface analysis. Cartography and Geographic Information Science, 1–19. https://doi.org/10.1080/15230406.2024.2445262

To learn more about mapping ancient sailing-powered vessels, see this article:

Alberti, G. (2017). TRANSIT: a GIS toolbox for estimating the duration of ancient sail-powered navigation. Cartography and Geographic Information Science, 45(6), 510–528. https://doi.org/10.1080/15230406.2017.1403376

Share this article

Subscribe
Notify of
0 Comments
Oldest
Newest
Inline Feedbacks
View all comments