I have ImageCollection. composed of satellite images which shows Zebras on grasslands. The location of each zebra is stored within a point shapefile, which I uploaded as a "table" into Earth Engine.

I wish to extract the pixel values under each point within the shapefile (i.e. the pixel values for each zebra) and then run a supervised classification to detect the zebras.

When I try to run the code on my ImageCollection, this is the error that is returned:

   table2 = ee.FeatureCollection("users/example/abc..."),
    imageCollection = ee.ImageCollection("users/example/wsx...")

// Load training polygons from a Fusion Table.
        // The 'class' property stores known class labels.
        var polygons = ee.FeatureCollection(table2);

// Get the values for all pixels in each polygon in the training.
var training = imageCollection.sampleRegions({
  // Get the sample from the polygons FeatureCollection.
  collection: polygons,
  // Keep this list of properties from the polygons.
  properties: ['class'],
  // Set the scale to get Landsat pixels in the polygons.
  scale: 30

imageCollection.sampleRegions is not a function

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.