#MaxDistance
Mar 11:
Max Distance (2025)
Dir. Marissa Goldman
(Sydney Battle, David Brown, Jon Daly, & Anna Seregina)
Short / Comedy / Drama
ever get the ick from a crush? (post watch)
#NowWatching #nw #MaxDistance #Filmsky
March 12, 2025 at 10:09 PM
Calculate the nearest distance between each pixel inside my region of interest to the closest streamline (a FeatureCollection) in Google Earth Engine
I need to find the nearest distance between every pixel in my area of interest to the streamline closest to it. I'm using the following dataset for the streamlines ee.FeatureCollection("WWF/HydroSHEDS/v1/FreeFlowingRivers"). Initially, I thought image.cumulativeCost() would do the trick, but it seems like increasing the maxDistance only increases the buffer around the streamlines. The resulting value of cumulative_cost is 0 when the area is within the 1km buffer of the streamlines, and 'masked' otherwise. What are the values of the 'masked' pixels? Is it even feasible to achieve what I need using image.cumulativeCost()? var streams = ee.FeatureCollection("WWF/HydroSHEDS/v1/FreeFlowingRivers"); var roi = ee.Geometry.Polygon( [[[31.79857587268242, 40.34237834590226], [31.79857587268242, 39.1087726665225], [35.77013348986992, 39.1087726665225], [35.77013348986992, 40.34237834590226]]], null, false); //polylines representing river networks var filteredstreams = streams.filterBounds(roi); var streamImg = filteredstreams .reduceToImage({ properties: ['LENGTH_KM'], //picked a random property here just to convert the FeatureCollection reducer: ee.Reducer.first() //into an image }); //create a source image where the geometry is 1, everything else is 0 var streamsources = ee.Image().toByte().paint(roi, 1); streamsources = streamsources.updateMask(streamImg); var emptysource = ee.Image().toByte().paint(roi, 0); //define distance var maximumdist = 1000; //1km //cost image var thedist = emptysource.cumulativeCost({ source: streamsources , maxDistance: maximumdist, }); print(thedist); Map.addLayer(thedist);
gis.stackexchange.com
May 11, 2026 at 4:06 AM
Calculate the nearest distance between each pixel inside my region of interest to the closest streamline (a FeatureCollection) in Google Earth Engine
I need to find the nearest distance between every pixel in my area of interest to the streamline closest to it. I'm using the following dataset for the streamlines ee.FeatureCollection("WWF/HydroSHEDS/v1/FreeFlowingRivers"). Initially, I thought image.cumulativeCost() would do the trick, but it seems like increasing the maxDistance only increases the buffer around the streamlines. The resulting value of cumulative_cost is 0 when the area is within the 1km buffer of the streamlines, and 'masked' otherwise. What are the values of the 'masked' pixels? Is it even feasible to achieve what I need using image.cumulativeCost()? var streams = ee.FeatureCollection("WWF/HydroSHEDS/v1/FreeFlowingRivers"); var roi = ee.Geometry.Polygon( [[[31.79857587268242, 40.34237834590226], [31.79857587268242, 39.1087726665225], [35.77013348986992, 39.1087726665225], [35.77013348986992, 40.34237834590226]]], null, false); //polylines representing river networks var filteredstreams = streams.filterBounds(roi); var streamImg = filteredstreams .reduceToImage({ properties: ['LENGTH_KM'], //picked a random property here just to convert the FeatureCollection reducer: ee.Reducer.first() //into an image }); //create a source image where the geometry is 1, everything else is 0 var streamsources = ee.Image().toByte().paint(roi, 1); streamsources = streamsources.updateMask(streamImg); var emptysource = ee.Image().toByte().paint(roi, 0); //define distance var maximumdist = 1000; //1km //cost image var thedist = emptysource.cumulativeCost({ source: streamsources , maxDistance: maximumdist, }); print(thedist); Map.addLayer(thedist);
gis.stackexchange.com
December 31, 2025 at 7:10 AM
Calculate the nearest distance between each pixel inside my region of interest to the closest streamline (a FeatureCollection) in Google Earth Engine
I need to find the nearest distance between every pixel in my area of interest to the streamline closest to it. I'm using the following dataset for the streamlines ee.FeatureCollection("WWF/HydroSHEDS/v1/FreeFlowingRivers"). Initially, I thought image.cumulativeCost() would do the trick, but it seems like increasing the maxDistance only increases the buffer around the streamlines. The resulting value of cumulative_cost is 0 when the area is within the 1km buffer of the streamlines, and 'masked' otherwise. What are the values of the 'masked' pixels? Is it even feasible to achieve what I need using image.cumulativeCost()? var streams = ee.FeatureCollection("WWF/HydroSHEDS/v1/FreeFlowingRivers"); var roi = ee.Geometry.Polygon( [[[31.79857587268242, 40.34237834590226], [31.79857587268242, 39.1087726665225], [35.77013348986992, 39.1087726665225], [35.77013348986992, 40.34237834590226]]], null, false); //polylines representing river networks var filteredstreams = streams.filterBounds(roi); var streamImg = filteredstreams .reduceToImage({ properties: ['LENGTH_KM'], //picked a random property here just to convert the FeatureCollection reducer: ee.Reducer.first() //into an image }); //create a source image where the geometry is 1, everything else is 0 var streamsources = ee.Image().toByte().paint(roi, 1); streamsources = streamsources.updateMask(streamImg); var emptysource = ee.Image().toByte().paint(roi, 0); //define distance var maximumdist = 1000; //1km //cost image var thedist = emptysource.cumulativeCost({ source: streamsources , maxDistance: maximumdist, }); print(thedist); Map.addLayer(thedist);
gis.stackexchange.com
August 29, 2025 at 8:13 AM
Calculate the nearest distance between each pixel inside my region of interest to the closest streamline (a FeatureCollection) in Google Earth Engine
I need to find the nearest distance between every pixel in my area of interest to the streamline closest to it. I'm using the following dataset for the streamlines ee.FeatureCollection("WWF/HydroSHEDS/v1/FreeFlowingRivers"). Initially, I thought image.cumulativeCost() would do the trick, but it seems like increasing the maxDistance only increases the buffer around the streamlines. The resulting value of cumulative_cost is 0 when the area is within the 1km buffer of the streamlines, and 'masked' otherwise. What are the values of the 'masked' pixels? Is it even feasible to achieve what I need using image.cumulativeCost()? var streams = ee.FeatureCollection("WWF/HydroSHEDS/v1/FreeFlowingRivers"); var roi = ee.Geometry.Polygon( [[[31.79857587268242, 40.34237834590226], [31.79857587268242, 39.1087726665225], [35.77013348986992, 39.1087726665225], [35.77013348986992, 40.34237834590226]]], null, false); //polylines representing river networks var filteredstreams = streams.filterBounds(roi); var streamImg = filteredstreams .reduceToImage({ properties: ['LENGTH_KM'], //picked a random property here just to convert the FeatureCollection reducer: ee.Reducer.first() //into an image }); //create a source image where the geometry is 1, everything else is 0 var streamsources = ee.Image().toByte().paint(roi, 1); streamsources = streamsources.updateMask(streamImg); var emptysource = ee.Image().toByte().paint(roi, 0); //define distance var maximumdist = 1000; //1km //cost image var thedist = emptysource.cumulativeCost({ source: streamsources , maxDistance: maximumdist, }); print(thedist); Map.addLayer(thedist);
gis.stackexchange.com
April 30, 2025 at 2:09 AM