Having watched GEE tutorials, pieced together code from several StackExchange questions and received help from Kuik and Jobbo90 I managed to write a code for a MODIS/006/MOD11A1 surface temperature time series; https://code.earthengine.google.com/e66a97bf90ceff11d81331be86e0f969.
I would now like to adapt the code so that the CSV output file includes three new columns; 1) Pixel longitude 2) Pixel latitude 3) Pixel area name (either a Tokyo district name or if not within a district and within the rectangle then labelled vicinity).
Having watched the GEE Tables and Vectors tutorial; https://www.youtube.com/watch?v=XLE-apehUCk and sought help from StackExchange questions such as; Extract Pixel Values for Multiple Polygons and Images and Extracting pixel values by points and converting to table in Google Earth Engine? I attempted to adjust the code but have failed to do so.
In the Tables and Vectors tutorial Nick Clinton states "here`s one way" to make a table which suggests that there are multiple ways to formulate a table and perhaps this explains why I am struggling to adjust my code with information from different sources.
I predict that I need to adjust something in the following section of my code from the first link but I can`t figure out how/where;
function spacedPoints(fc, proj) {
var latlon = ee.Image.pixelLonLat().reproject(proj);
var coords = latlon.select(['longitude', 'latitude'])
.reduceRegion({reducer: ee.Reducer.toList(),
geometry: fc.geometry(1).buffer(proj.nominalScale().toInt()),
scale: proj.nominalScale().toInt()
});
var point_list = ee.List(coords.get('longitude')).zip(ee.List(coords.get('latitude')));
print(point_list);
var list = ee.List([0]);
var feats = ee.FeatureCollection(point_list.map(function(point){
var ind = point_list.indexOf(point);
var feat = ee.Feature(ee.Geometry.Point(point_list.get(ind)), {'ID': ind});
return list.add(feat);
}).flatten().removeAll([0]));
return feats.filterBounds(fc.geometry(1));
}
How can I adjust the above code so that three new columns; 1) Pixel longitude 2) Pixel latitude 3) Pixel area name are added to the exported CSV file?