|
39 | 39 | iowa_images = ['20200925_161029_69_2223', '20200925_161027_48_2223']
|
40 | 40 | iowa_order = planet.order_request.build_request(
|
41 | 41 | 'iowa_order',
|
42 |
| - [planet.order_request.product(iowa_images, 'analytic', 'PSScene4Band')], |
| 42 | + [planet.order_request.product(iowa_images, 'analytic_udm2', 'PSScene')], |
43 | 43 | tools=[planet.order_request.clip_tool(iowa_aoi)])
|
44 | 44 |
|
45 | 45 | oregon_aoi = {
|
|
53 | 53 | oregon_images = ['20200909_182525_1014', '20200909_182524_1014']
|
54 | 54 | oregon_order = planet.order_request.build_request(
|
55 | 55 | 'oregon_order',
|
56 |
| - [planet.order_request.product(oregon_images, 'analytic', 'PSScene4Band')], |
| 56 | + [planet.order_request.product(oregon_images, 'analytic_udm2', 'PSScene')], |
57 | 57 | tools=[planet.order_request.clip_tool(oregon_aoi)])
|
58 | 58 |
|
59 | 59 |
|
60 | 60 | async def create_and_download(order_detail, directory, client):
|
61 | 61 | with planet.reporting.StateBar(state='creating') as reporter:
|
62 | 62 | # create
|
63 | 63 | order = await client.create_order(order_detail)
|
64 |
| - reporter.update(state='created', order_id=order.id) |
| 64 | + reporter.update(state='created', order_id=order['id']) |
65 | 65 |
|
66 | 66 | # wait for completion
|
67 |
| - await client.wait(order.id, report=reporter.update_state) |
| 67 | + await client.wait(order['id'], callback=reporter.update_state) |
68 | 68 |
|
69 | 69 | # download
|
70 |
| - await client.download_order(order.id, progress_bar=True) |
| 70 | + await client.download_order(order['id'], directory, progress_bar=True) |
71 | 71 |
|
72 | 72 |
|
73 | 73 | async def main():
|
|
0 commit comments