示例#1
0
    def test_get_available_collections(self):
        collections = DataCollection.get_available_collections()
        self._check_collection_list(collections)

        config = SHConfig()
        config.sh_base_url = ServiceUrl.EOCLOUD
        eocloud_collections = DataCollection.get_available_collections(
            config=config)
        self._check_collection_list(eocloud_collections)
        self.assertNotEqual(eocloud_collections, collections)
request_all_bands.save_data()

print(f'The output directory has been created and a tiff file with all 13 bands was saved into ' \
      'the following structure:\n')
for folder, _, filenames in os.walk(request_all_bands.data_folder):
    for filename in filenames:
        print(os.path.join(folder, filename))


# Example 5: Other Data Collections
"""
The sentinelhub package supports various data collections. The previous examples
have used 'DataCollection.SENTINEL2_L1C'.
"""
print('Supported DataCollections:\n')
for collection in DataCollection.get_available_collections():
    print(collection)

# try Digital Elevation Model (DEM) type:
# use FLOAT32 since the values can be negative (below sea level)
evalscript_dem = '''
//VERSION=3
function setup() {
  return {
    input: ["DEM"],
    output: {
      id: "default",
      bands: 1,
      sampleType: SampleType.FLOAT32
    }
  }