Skip to content

Instantly share code, notes, and snippets.

@PratyushTripathy
Last active July 23, 2022 17:52
Show Gist options
  • Save PratyushTripathy/924dc06fad953ea995b2d7b435d74843 to your computer and use it in GitHub Desktop.
Save PratyushTripathy/924dc06fad953ea995b2d7b435d74843 to your computer and use it in GitHub Desktop.
// extract the unique row numbers from the landsat footprint collection
var unique_paths = landsat_footprints.aggregate_array('path').distinct();
print('Unique paths:', unique_paths)
// seggregate the landsat footprints by path
var path_wise_footprints = unique_paths.map(function a(element){
return landsat_footprints.filter(ee.Filter.eq('path', element));
});
print('Path wise footprints', path_wise_footprints)
// add the first FeatureCollection of the list to cross-check
Map.addLayer(ee.FeatureCollection(ee.List(path_wise_footprints).get(1)), {}, 'path_wise_footprints')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment