Geographic Information Systems Asked by Sourav Karmakar on January 19, 2021
I want to export my classified image to drive in GEE, for presenting in a document.
I have used this code.
Export.image.toDrive({
image: classified,
description: 'classified_basin_with_points',
scale: 30,
region: geometry,
fileFormat: 'GeoTIFF',
});
But the exported image showed no color whereas my cassified layer have 4 clssifying color on it. How can i get a colorful image that will cover my classifying layer color?
Based on the Google Earth Engine documentation, to get an image exported as it appears in Google Earth Engine, you need to create Visualization images.
Exporting images as they appear in the Code Editor To export imagery as rendered on screen in Earth Engine, create visualization images as demonstrated in the Visualization images and the Compositing and Mosaicking sections. Since the Code Editor uses the 'EPSG:3857' CRS, specify a CRS of 'EPSG:3857' in the export to get an image in the same projection as that displayed in the Code Editor map. See the section on configuring image exports for details on specifying the resolution and coordinate system of the output.
https://developers.google.com/earth-engine/image_visualization#visualization-images
Visualization images
Use the
image.visualize()
method to convert an image into an 8-bit RGB image for display or export. For example, to convert the false-color composite and NDWI to 3-band display images, use:
// Create visualization layers.
var imageRGB = image.visualize({bands: ['B5', 'B4', 'B3'], max: 0.5});
var ndwiRGB = ndwiMasked.visualize({min: 0.5, max: 1, palette: ['00FFFF', '0000FF'] });
Answered by smiller on January 19, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP