If you could share some output from your code that shows a valid request with clipping working and an invalid request with harmonization on I should be able to help.
Hi @cholmes, thanks for your help!
We checked your code and has the same structure as ours, we tried again but got the same result.
The toolbox’s execution goes well with the clip tool, but we got this error when we try to add the harmonization (The status of the request is 400):
We hope this could help to deepen the case. Our best regards.
Can you share the JSON in text? Like attach (or post as a gist like I did) the request made that has the harmonize & clip calls with the aoi in it, so I can try to run it on my end? And/or paste in the error response the server is returning.
Thanks again @cholmes for your reply and your valuable help
Unfortunately, we’ve been working on this toolbox and noticed that the output folder is empty even when the state of the process is “success” for the clip tool. We have a simpler version of the script just to download 4 band scenes, this is our base to implement the PSScene product and the clip and harmonized tools. To share our resources, in this reply we provide a link to a folder where are both files in .pyt format, Download is the initial script, and Download 2 is the version we want to implement with the improvements we comment you.
Interesting. Unfortunately I don’t have arcpy so I don’t think I can actually run the script.
Would it be possible for you to run both versions of your program but add in a line that prints out the ‘order’ variable, like the JSON that gets sent to the server, and share that with me?
If it does say the process is ‘success’ then it sounds like perhaps your download isn’t working? Can you check https://www.planet.com/account/#/orders and click through on your order (or if you know the id you can just go to https://www.planet.com/account/#/orders/<order-id>). Can you download the results from there? If so then it’d just be that download isn’t working.
Happy to jump on a zoom to try to look this over together, will send you my contact info in a private message.
I am having the same issue. Please see below the code:
@asing075 - Just talked to the core team, and they said that if you want to use Sentinel-2 as the harmonization target then you need to use PSScene. PSScene4Band only supports PS2 as the sensor target, see https://developers.planet.com/apis/orders/tools-reference/#harmonization (apologies for the wrong link above - meant to link to the orders tool).
PSScene is better in just about every way, so I’d recommend just shifting your code / workflows to using PSScene.
Hi @cholmes , Thank you for pointing that out! Below are the changes I made to the my search filter and order:
I think this should do it, but just wanted to confirm with you first. Please let me know if you notice anything wrong
It’s hard to confirm 100% just by looking at the code, but it looks right to me.
Thank you @cholmes, It is working for me now.
Hi everyone! As @chrisholmes said, we met the Planet team some days ago and they help us find the error. We were missing some divisions in our script which impede the order was successfully received. The correct way to call the tools is the following: