#!/usr/bin/env python # coding: utf-8 # # Getmapping AOI-Clipped 12.5cm Base Resolution # # Getmapping AOI-Clipped 12.5cm Base Resolution provides RGB aerial imagery of Great Britain with a GSD of 12.5 cm. # The archive has been collected from 2000 to today. The imagery is retrieved using Web Map Tile Services (WMTS). # # In the example, the workflow, the area of interest and the workflow parameters are defined. After running the job, the results are downloaded and visualized. For more information, refer to the block's [UP42 Marketplace page](https://marketplace.up42.com/block/f2acfa3c-bcf9-49d6-a7b8-79b122890987). # In[1]: import up42 # In[2]: up42.authenticate(project_id="1234", project_api_key="abcd") project = up42.initialize_project() # In[3]: # Construct workflow workflow = project.create_workflow(name="Getmapping-example", use_existing=True) input_tasks = ["Getmapping AOI-Clipped 12.5cm Base Resolution"] workflow.add_workflow_tasks(input_tasks) # In[4]: uk_example_aoi = { "type": "FeatureCollection","features": [{"type": "Feature","properties": {}, "geometry": {"type": "Polygon","coordinates": [ [[-0.077623,51.490115], [-0.073857,51.4895], [-0.073643,51.487236], [-0.078084,51.487049], [-0.077623,51.490115]]]}}]} # In[5]: # Define the aoi and input parameters of the workflow to run it. input_parameters = workflow.construct_parameters(geometry=uk_example_aoi, geometry_operation="intersects") # In[6]: # Price estimation workflow.estimate_job(input_parameters) # In[7]: # Run a test job to query data availability and check the configuration. test_job = workflow.test_job(input_parameters, track_status=True) # In[8]: # Run the actual job. job = workflow.run_job(input_parameters, track_status=True) # In[ ]: # Download the results job.download_results() # In[10]: job.plot_results(figsize=(6,6)) # In[ ]: