I am reading the geemap tutorial and I have question about the sampleRegions function. As I understand, this function "cross" between vector data (feature collection) and a given raster, and generates new feature collection with the pixel value for each point.
However, I don't understand what is the geometries parameter is for:
isn't it suppose by deafult to include point geometry per pixel? why wouldn't it? which geometries will be omitted? not sure I understand how to use this parameter and how it works.
Best Answer
When
false
, the features in the resulting feature collection will not include the geometry of their corresponding region, only the sampled band values.A very common use-case where you don't need to include the geometry is when you are creating a training data-set for a classifier. The classifier only cares about the band values and the class:
https://code.earthengine.google.com/846e1fc668ec69677c03b172e5603d83