Stay organized with collections Save and categorize content based on your preferences.
Computes a cumulative cost map based on an image containing costs to traverse each pixel and an image containing source locations.

Image.cumulativeCost(source, maxDistance, geodeticDistance)Image
this: costImageAn image representing the cost to traverse each pixel. Masked pixels can't be traversed.
sourceImageA single-band image representing the sources. A pixel value different from 0 defines a source pixel.
maxDistanceFloatMaximum distance for computation, in meters.
geodeticDistanceBoolean, default: trueIf true, geodetic distance along the curved surface is used, assuming a spherical Earth of radius 6378137.0. If false, euclidean distance in the 2D plane of the map projection is used (faster, but less accurate).