Sample by feature in JavaScript client

Hi,

I’m trying to run a batch job with the sample_by_feature output format property in the JavaScript client. I tried something like this, but it doesn’t seem to have effect:

let job = await con.createJob(cube, "demo", undefined, undefined, undefined, {"sample_by_feature": true});
await job.startJob();

So I’m wondering, how is this option supposed to be passed to the job?

Hi @stijn.caerts ,

file format options need to be passed to save_result, not create_job. The behavior you are describing seems to be specific to the Python client.

So something like:

....
let result = builder.save_result(cube, "GTiff", {"sample_by_feature": true})
let job = await con.createJob(result, "demo");
...

Does this help? Otherwise, please let me know (ideally with a bit more of the code).

Best,
Matthias

Thank you for your response! I will try if this works for us.