Pixel values in the masked area change from 'masked' to 0 during image export using geemap.ee_export_image_to_drive() #1857
-
Beta Was this translation helpful? Give feedback.
Answered by
jdbcode
Dec 29, 2023
Replies: 1 comment
-
You should be able to use the Based on your example, you'd do something like this: # unmask the masked pixels - set to -9999 in this example
nodata = -9999
test_int = test_int.unmask(nodata)
geemap.ee_export_image_to_drive(friction_motorized_reproj, \
description = 'test_int', \
region = roi, \
crs = export_projection, scale = export_projection.nominalScale(), \
maxPixels = 1e13, \
formatOptions = {"noData": nodata}) # <---- add this to set noData! Here is a toy example you can play with from the JS Code Editor (sorry, I don't have a py/geemap version): https://code.earthengine.google.com/443a155ef777970c727314318988e26e |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
jdbcode
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should be able to use the
formatOptions.noData
option to set the nodata value in GeoTIFF exports.Based on your example, you'd do something like this:
Here is a …