4

I'm trying to add the pixel coordinates (latitude and longitude) as bands to export (code below). However, the export returns 1 decimal place for the latitude and longitude. How can I increase the precision (# decimals) in my export for the coordinates?

//function to add coordinates
var getLatLong = (function(img) {

  var proj = img.select([0]).projection()
  // get coordinates image
 var latlon = ee.Image.pixelLonLat().reproject(proj)
 var img1 = img.addBands(latlon.select('longitude','latitude'))



  return img1;
});

1 Answer 1

1

I just need to lose the 'reproject'

 var getLatLong = (function(img) {

  // Get the projection
  var proj = img.select([0]).projection()
  // get coordinates image
 var latlon = ee.Image.pixelLonLat()//.reproject(proj)
 var img1 = img.addBands(latlon.select('longitude','latitude'))



  return img1;
});
1
  • If your problem is solved, please mark this as answer.
    – Padmanabha
    Commented Aug 15, 2021 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.