TransWikia.com

How to get random points from large FeatureCollection without exceeding the user memory limit?

Geographic Information Systems Asked by cengstro on March 8, 2021

How do you select random points from a large FeatureCollection without exceeding the user memory limit?

var bigData = ee.FeatureCollection('GLIMS/current');
var randomPoints = ee.FeatureCollection.randomPoints(bigData, 100);
print(randomPoints.size()) // Error: User memory limit exceeded

This works on smaller FeatureCollections:

var smallData = bigData.filter(ee.Filter.eq('geog_area','Iceland'))
var smallRandomPoints = ee.FeatureCollection.randomPoints(smallData, 100);
print(smallRandomPoints.size()) // 100

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP