I want to have random points across Peru and their properties (the band values of IMAGE) for statistical analysis in GEE. I found two options which are sampling and random points. I have tried the following lines:
var samplevalues= IMAGE.sample({ region: peru.geometry(),numPixels: 10000, geometries: true});
var randompoints = ee.FeatureCollection.randomPoints(peru.geometry(), 1000).set('samplenumber');
None of them gave me the desired output. samplevalues keeps the bands in IMAGE and shows them as properties of each sample points, but the points are within IMAGE borders. Whereas, randompoints gives points without properties across Peru.
How can I get random points over Peru, and IMAGE bands as their properties?