I want to select random 90000 pixels/points from region of interest wherever there is built-up area. To my surprise when I print number of pixels selected it shows only 1044. I am literally lost how is this possible. I tried even with 3000 also and got 113 only output. Can anyone help me in identifying how I can get my desired sample.
Here is my code:
var Districts = ee.FeatureCollection('users/phd20muddasira/Districts_geom_corrected_ID')
var JK= Districts.filter(ee.Filter.eq('ST_NM', 'Jammu & Kashmir'))
var HP= Districts.filter(ee.Filter.eq('ST_NM', 'Himachal Pradesh'))
var PUN= Districts.filter(ee.Filter.eq('ST_NM', 'Punjab'))
// Map.addLayer(JK,{color:'pink'},'JK')
// Map.addLayer(HP,{color:'purple'},'HP')
// Map.addLayer(PUN,{color:'green'},'PUN')
// We will make a feature collection of three states
var States = JK.merge(HP).merge(PUN)
Map.addLayer(States,{color:'blue'},'States')
//Map.addLayer(Districts,{color:'pink'},'Districts')
// We will use ESA Land cover dataset to use builtup class to identify urban areas
var ESA = ee.ImageCollection("ESA/WorldCover/v100")
var classification = ee.Image(ESA.first()).select('Map').clip(States)
//Map.addLayer(classification,{},'worldCover Classification')
var builtup = classification.eq(50).selfMask();
Map.addLayer(builtup,{palette:'red'},'builtup')
var NLSample = builtup.sample({
region:States,
scale:10,
numPixels:90000,
tileScale:2,
geometries:true})
print(NLSample.size())
// // Due to computation time out we will export samples as an asset and then import it
var NLPixels = ee.FeatureCollection(NLSample);
// print(result)
Export.table.toAsset({
collection: NLPixels,
description: 'NLSample90K'})
I have given access to my used asset
GEE code link
https://code.earthengine.google.com/c6ea827262ae7706dd79edce85168f87