I am making a time-series plot with data extracted from a point, and I would like to include the point coordinates in the title text.
e.g. 'Timeseries from point (61.08457, 6.03583)'
However, I can't see how to get the coordinates as a simple string object that can be concatenated neatly.
See the code below.
var centre_pt = (ee.Geometry.Point(6.10736, 61.49845));
var coordinates = (centre_pt.coordinates())
var lat = ee.Number(coordinates.get(1)).format('%.6f')
var long = ee.Number(coordinates.get(0)).format('%.6f')
var coordinates = (ee.String('(').cat(long).cat(', ').cat(lat).cat(')'));
print(coordinates)
var title = ('Timeseries from point: ' + coordinates)
print(title)
When I print it, it comes up as:
Timeseries from point: ee.String({
"type": "Invocation",
"arguments": {
"string1": {
"type": "Invocation",
"arguments": {
...etc
I don't want all the extra bits. How do I get just the coordinates to use in a concatenated string?