Combining multiple bands from different image collection into one collection Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar ManaraImporting Sentinel-1 Image Collection to Google Earth Engine APIEarth Engine sampleRegions: keep track of original pixels geometry/location?Merging two image collection into one with two bands (LST and NDVI )Randomly splitting Feature Collection in Google Earth Engine?Merging Aqua + Terra MODIS image collectionsMedian image of merged image collectionsSet property disappears in ImageCollection mapped function (Earth Engine)Calculate yearly mean/median in merged Landsat image collectionData organization in Google Earth Engine image collection?How to use the reducer.mean function to average multiple data points?
Second order approximation of the loss function (Deep learning book, 7.33)
Can you stand up from being prone using Skirmisher outside of your turn?
Arriving in Atlanta after US Preclearance in Dublin. Will I go through TSA security in Atlanta to transfer to a connecting flight?
Did the Roman Empire have penal colonies?
Is Bran literally the world's memory?
A strange hotel
How to avoid introduction cliches
Expansion//Explosion and Siren Stormtamer
How to use @AuraEnabled base class method in Lightning Component?
Where did Arya get these scars?
My admission is revoked after accepting the admission offer
What is the term for a person whose job is to place products on shelves in stores?
Why did Israel vote against lifting the American embargo on Cuba?
How can I wire a 9-position switch so that each position turns on one more LED than the one before?
Book with legacy programming code on a space ship that the main character hacks to escape
Split coins into combinations of different denominations
Married in secret, can marital status in passport be changed at a later date?
Error: Syntax error. Missing ')' for CASE Statement
A Paper Record is What I Hamper
Reattaching fallen shelf to wall?
Can I criticise the more senior developers around me for not writing clean code?
What's parked in Mil Moscow helicopter plant?
Is a 5 watt UHF/VHF handheld considered QRP?
Has a Nobel Peace laureate ever been accused of war crimes?
Combining multiple bands from different image collection into one collection
Unicorn Meta Zoo #1: Why another podcast?
Announcing the arrival of Valued Associate #679: Cesar ManaraImporting Sentinel-1 Image Collection to Google Earth Engine APIEarth Engine sampleRegions: keep track of original pixels geometry/location?Merging two image collection into one with two bands (LST and NDVI )Randomly splitting Feature Collection in Google Earth Engine?Merging Aqua + Terra MODIS image collectionsMedian image of merged image collectionsSet property disappears in ImageCollection mapped function (Earth Engine)Calculate yearly mean/median in merged Landsat image collectionData organization in Google Earth Engine image collection?How to use the reducer.mean function to average multiple data points?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I did some calculations on variety of image collections and have generated products and saved them in variables, say a, b and c. Now I want to combine all these products (All one bands) into a multiband image collection.
What function should i use?
I tried with:
a.combine(b).combine(c)
a.merge(b).merge(c)
a.add(b).add(c)
But, these functions are not working.
google-earth-engine
New contributor
add a comment |
I did some calculations on variety of image collections and have generated products and saved them in variables, say a, b and c. Now I want to combine all these products (All one bands) into a multiband image collection.
What function should i use?
I tried with:
a.combine(b).combine(c)
a.merge(b).merge(c)
a.add(b).add(c)
But, these functions are not working.
google-earth-engine
New contributor
add a comment |
I did some calculations on variety of image collections and have generated products and saved them in variables, say a, b and c. Now I want to combine all these products (All one bands) into a multiband image collection.
What function should i use?
I tried with:
a.combine(b).combine(c)
a.merge(b).merge(c)
a.add(b).add(c)
But, these functions are not working.
google-earth-engine
New contributor
I did some calculations on variety of image collections and have generated products and saved them in variables, say a, b and c. Now I want to combine all these products (All one bands) into a multiband image collection.
What function should i use?
I tried with:
a.combine(b).combine(c)
a.merge(b).merge(c)
a.add(b).add(c)
But, these functions are not working.
google-earth-engine
google-earth-engine
New contributor
New contributor
edited 2 days ago
PolyGeo♦
54k1782246
54k1782246
New contributor
asked 2 days ago
RamlaRamla
242
242
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Assuming you made a unique name for each band, and that you want to obtain one image with 3 bands (one for a
, one for b
and one for c
) you have to addBands
, like this:
var a = ee.Image(1).rename('one') // product one
var b = ee.Image(2).rename('two')
var c = ee.Image(3).rename('three')
var final = a.addBands([b, c])
link: https://code.earthengine.google.com/5c3ceef589fc8cbe6036f8f2ef22f2ca
I tried with this one already. It works on single images, but not on image collections.
– Ramla
yesterday
The combine function works for three bands, but combining more then 3 prompts the error of empty ImageCollection
– Ramla
yesterday
You should show your code and error message, at least a link to the code editor
– Rodrigo E. Principe
yesterday
code.earthengine.google.com/1060f78574bd1d88c437f2b54ec5c36a
– Ramla
yesterday
This is why you must post all the code (or a code that can reproduce the error) when you make the question..combine
function is what you need, but you are trying to combine collections that have images with different IDs, and if you seecombine
documentation it says that combines by ID, so when applying a join it doesn't find a match. If you want to join by date, you have to make the process yourself (join first and then add bands)
– Rodrigo E. Principe
yesterday
|
show 1 more comment
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "79"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Ramla is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f319501%2fcombining-multiple-bands-from-different-image-collection-into-one-collection%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Assuming you made a unique name for each band, and that you want to obtain one image with 3 bands (one for a
, one for b
and one for c
) you have to addBands
, like this:
var a = ee.Image(1).rename('one') // product one
var b = ee.Image(2).rename('two')
var c = ee.Image(3).rename('three')
var final = a.addBands([b, c])
link: https://code.earthengine.google.com/5c3ceef589fc8cbe6036f8f2ef22f2ca
I tried with this one already. It works on single images, but not on image collections.
– Ramla
yesterday
The combine function works for three bands, but combining more then 3 prompts the error of empty ImageCollection
– Ramla
yesterday
You should show your code and error message, at least a link to the code editor
– Rodrigo E. Principe
yesterday
code.earthengine.google.com/1060f78574bd1d88c437f2b54ec5c36a
– Ramla
yesterday
This is why you must post all the code (or a code that can reproduce the error) when you make the question..combine
function is what you need, but you are trying to combine collections that have images with different IDs, and if you seecombine
documentation it says that combines by ID, so when applying a join it doesn't find a match. If you want to join by date, you have to make the process yourself (join first and then add bands)
– Rodrigo E. Principe
yesterday
|
show 1 more comment
Assuming you made a unique name for each band, and that you want to obtain one image with 3 bands (one for a
, one for b
and one for c
) you have to addBands
, like this:
var a = ee.Image(1).rename('one') // product one
var b = ee.Image(2).rename('two')
var c = ee.Image(3).rename('three')
var final = a.addBands([b, c])
link: https://code.earthengine.google.com/5c3ceef589fc8cbe6036f8f2ef22f2ca
I tried with this one already. It works on single images, but not on image collections.
– Ramla
yesterday
The combine function works for three bands, but combining more then 3 prompts the error of empty ImageCollection
– Ramla
yesterday
You should show your code and error message, at least a link to the code editor
– Rodrigo E. Principe
yesterday
code.earthengine.google.com/1060f78574bd1d88c437f2b54ec5c36a
– Ramla
yesterday
This is why you must post all the code (or a code that can reproduce the error) when you make the question..combine
function is what you need, but you are trying to combine collections that have images with different IDs, and if you seecombine
documentation it says that combines by ID, so when applying a join it doesn't find a match. If you want to join by date, you have to make the process yourself (join first and then add bands)
– Rodrigo E. Principe
yesterday
|
show 1 more comment
Assuming you made a unique name for each band, and that you want to obtain one image with 3 bands (one for a
, one for b
and one for c
) you have to addBands
, like this:
var a = ee.Image(1).rename('one') // product one
var b = ee.Image(2).rename('two')
var c = ee.Image(3).rename('three')
var final = a.addBands([b, c])
link: https://code.earthengine.google.com/5c3ceef589fc8cbe6036f8f2ef22f2ca
Assuming you made a unique name for each band, and that you want to obtain one image with 3 bands (one for a
, one for b
and one for c
) you have to addBands
, like this:
var a = ee.Image(1).rename('one') // product one
var b = ee.Image(2).rename('two')
var c = ee.Image(3).rename('three')
var final = a.addBands([b, c])
link: https://code.earthengine.google.com/5c3ceef589fc8cbe6036f8f2ef22f2ca
answered 2 days ago
Rodrigo E. PrincipeRodrigo E. Principe
4,54111021
4,54111021
I tried with this one already. It works on single images, but not on image collections.
– Ramla
yesterday
The combine function works for three bands, but combining more then 3 prompts the error of empty ImageCollection
– Ramla
yesterday
You should show your code and error message, at least a link to the code editor
– Rodrigo E. Principe
yesterday
code.earthengine.google.com/1060f78574bd1d88c437f2b54ec5c36a
– Ramla
yesterday
This is why you must post all the code (or a code that can reproduce the error) when you make the question..combine
function is what you need, but you are trying to combine collections that have images with different IDs, and if you seecombine
documentation it says that combines by ID, so when applying a join it doesn't find a match. If you want to join by date, you have to make the process yourself (join first and then add bands)
– Rodrigo E. Principe
yesterday
|
show 1 more comment
I tried with this one already. It works on single images, but not on image collections.
– Ramla
yesterday
The combine function works for three bands, but combining more then 3 prompts the error of empty ImageCollection
– Ramla
yesterday
You should show your code and error message, at least a link to the code editor
– Rodrigo E. Principe
yesterday
code.earthengine.google.com/1060f78574bd1d88c437f2b54ec5c36a
– Ramla
yesterday
This is why you must post all the code (or a code that can reproduce the error) when you make the question..combine
function is what you need, but you are trying to combine collections that have images with different IDs, and if you seecombine
documentation it says that combines by ID, so when applying a join it doesn't find a match. If you want to join by date, you have to make the process yourself (join first and then add bands)
– Rodrigo E. Principe
yesterday
I tried with this one already. It works on single images, but not on image collections.
– Ramla
yesterday
I tried with this one already. It works on single images, but not on image collections.
– Ramla
yesterday
The combine function works for three bands, but combining more then 3 prompts the error of empty ImageCollection
– Ramla
yesterday
The combine function works for three bands, but combining more then 3 prompts the error of empty ImageCollection
– Ramla
yesterday
You should show your code and error message, at least a link to the code editor
– Rodrigo E. Principe
yesterday
You should show your code and error message, at least a link to the code editor
– Rodrigo E. Principe
yesterday
code.earthengine.google.com/1060f78574bd1d88c437f2b54ec5c36a
– Ramla
yesterday
code.earthengine.google.com/1060f78574bd1d88c437f2b54ec5c36a
– Ramla
yesterday
This is why you must post all the code (or a code that can reproduce the error) when you make the question..
combine
function is what you need, but you are trying to combine collections that have images with different IDs, and if you see combine
documentation it says that combines by ID, so when applying a join it doesn't find a match. If you want to join by date, you have to make the process yourself (join first and then add bands)– Rodrigo E. Principe
yesterday
This is why you must post all the code (or a code that can reproduce the error) when you make the question..
combine
function is what you need, but you are trying to combine collections that have images with different IDs, and if you see combine
documentation it says that combines by ID, so when applying a join it doesn't find a match. If you want to join by date, you have to make the process yourself (join first and then add bands)– Rodrigo E. Principe
yesterday
|
show 1 more comment
Ramla is a new contributor. Be nice, and check out our Code of Conduct.
Ramla is a new contributor. Be nice, and check out our Code of Conduct.
Ramla is a new contributor. Be nice, and check out our Code of Conduct.
Ramla is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Geographic Information Systems Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f319501%2fcombining-multiple-bands-from-different-image-collection-into-one-collection%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown