0

Is it possible to export an image from Google Earth Engine as ASCII raster

Export.image.toDrive({ image: 'image', region: region, scale: 30, crs: 'EPSG:4326', });

2 Answers2

2

No it is not. Currently the only supported output formats are GeoTIFF and TFRecord. https://developers.google.com/earth-engine/apidocs/export-image-todrive

Jesse Anderson
  • 4,507
  • 26
  • 36
  • Just to add, TIFF to ASCII can be easily done using QGIS: https://wiki.tuflow.com/index.php?title=QGIS_Export_Raster_to_asc – CrossLord Aug 17 '21 at 07:52
0

Not very efficient, you can sample the pixels and export them to CSV.

// Define Region of interest
var roi = ee.Geometry.Polygon(
        [[[11.304653628407992, 42.60010798357459],
          [11.304653628407992, 42.40673200589496],
          [11.605404360829867, 42.40673200589496],
          [11.605404360829867, 42.60010798357459]]], null, false);

// get L8 image
var l8 =  ee.ImageCollection("LANDSAT/LC08/C01/T1_TOA")
          .filterBounds(roi).filterMetadata('CLOUD_COVER','less_than',5).first()

// add Lat/Lon
var ll = ee.Image.pixelLonLat()
var proj  = l8.select('B1').projection()
var image = l8.addBands(ll.reproject(proj)).clip(roi)

// sample the image
var p = image.sample({region:roi, scale:30, projection:proj})

// Display
Map.addLayer(image)

// Export to CSV file
Export.table.toDrive({collection:p, description:'points', fileFormat:'CSV'})
bad_coder
  • 11,289
  • 20
  • 44
  • 72
Ron Drori
  • 11
  • 1