Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix pc entry creation for load_collection #155

Merged
merged 5 commits into from
Nov 17, 2022
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def create_process_chain_entry(
],
"flags": "g",
}
else:
elif input_object.is_local() is False:
raise Exception("Unsupported datatype")

if importer:
Expand Down Expand Up @@ -356,16 +356,19 @@ def create_process_chain_entry(

# TODO: get root path from link in collection information ?

inputs = [
{"param": "collection", "value": input_object.name},
{"param": "start", "value": temporal_extent[0].split("T")[0]},
{"param": "end", "value": temporal_extent[1].split("T")[0]},
{"param": "output", "value": output_object.grass_name()},
]
if bands:
inputs.append({"param": "bands", "value": ("', '").join(bands)})
metzm marked this conversation as resolved.
Show resolved Hide resolved

importer = {
"id": "t_in_eoarchive_%i" % rn,
"module": "t.in.eoarchive",
"inputs": [
{"param": "collection", "value": input_object.name()},
{"param": "start", "value": temporal_extent[0].split("T")[0]},
{"param": "end", "value": temporal_extent[1].split("T")[0]},
{"param": "bands", "value": ("', '").join(bands)},
{"param": "output", "value": output_object.grass_name()},
],
"inputs": inputs,
}

pc.append(importer)
Expand All @@ -379,7 +382,7 @@ def create_process_chain_entry(
{"param": "e", "value": str(east)},
{"param": "w", "value": str(west)},
{"param": "crs", "value": str(crs)},
{"param": "strds", "value": input_object.grass_name()},
{"param": "strds", "value": output_object.grass_name()},
],
}

Expand Down