save_result png wrong colors - set BRG instead of RGb
Closed this issue · 2 comments
After some tests I've noticed that the stored PNG has wrong colors. To have the correct color mapping set:
red = blue
green = red
blue = green
So the function saving pngs is expecting an image with BRG order instead of RGB.
It's actually GEE that is storing the PNG.
I'm passing [parameters.red, parameters.green, parameters.blue]
to GEE's visualize
function, which seems correct according to the GEE docs: https://developers.google.com/earth-engine/image_visualization
Are you sure? I can't really imagine GEE is really doing wrong things in this popular function?! I'd rather think it's wrong in my implementation, but I can't find any issue.
Also, this process graph seems to work just fine:
{
"process_graph": {
"1": {
"process_id": "load_collection",
"arguments": {
"id": "USDA/NAIP/DOQQ",
"spatial_extent": {
"west": -76.74021005630493,
"south": 39.956530315364915,
"east": -76.71158552169801,
"north": 39.96843762340802
},
"temporal_extent": [
"2017-01-01T00:00:00Z",
"2017-12-31T23:59:59Z"
],
"bands": null
}
},
"2": {
"process_id": "save_result",
"arguments": {
"data": {
"from_node": "1"
},
"format": "PNG",
"options": {
"red": "R",
"green": "G",
"blue": "B",
"gray": null
}
},
"result": true
}
}
}
So I need a reproduction example, otherwise I can't help you. Will re-open once there's a repro available.
Sorry my mistake, I had an error in my process graph! I re-checked and it is indeed right.