You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Get a tile layer from a Cloud Optimized GeoTIFF (COG).
2337
+
Source code adapted from https://developmentseed.org/titiler/examples/Working_with_CloudOptimizedGeoTIFF_simple/
2338
+
2339
+
Args:
2340
+
url (str): HTTP URL to a COG, e.g., https://opendata.digitalglobe.com/events/mauritius-oil-spill/post-event/2020-08-12/105001001F1B5B00/105001001F1B5B00.tif
2341
+
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://api.cogeo.xyz/".
"""Get the bounding box of a Cloud Optimized GeoTIFF (COG).
2372
+
2373
+
Args:
2374
+
url (str): HTTP URL to a COG, e.g., https://opendata.digitalglobe.com/events/mauritius-oil-spill/post-event/2020-08-12/105001001F1B5B00/105001001F1B5B00.tif
2375
+
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://api.cogeo.xyz/".
2376
+
2377
+
Returns:
2378
+
list: A list of values representing [left, bottom, right, top]
"""Get the centroid of a Cloud Optimized GeoTIFF (COG).
2395
+
2396
+
Args:
2397
+
url (str): HTTP URL to a COG, e.g., https://opendata.digitalglobe.com/events/mauritius-oil-spill/post-event/2020-08-12/105001001F1B5B00/105001001F1B5B00.tif
2398
+
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://api.cogeo.xyz/".
"""Get band names of a Cloud Optimized GeoTIFF (COG).
2410
+
2411
+
Args:
2412
+
url (str): HTTP URL to a COG, e.g., https://opendata.digitalglobe.com/events/mauritius-oil-spill/post-event/2020-08-12/105001001F1B5B00/105001001F1B5B00.tif
2413
+
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://api.cogeo.xyz/".
"""Get a tile layer from a single SpatialTemporal Asset Catalog (STAC) item.
2433
+
2434
+
Args:
2435
+
url (str): HTTP URL to a STAC item, e.g., https://canada-spot-ortho.s3.amazonaws.com/canada_spot_orthoimages/canada_spot5_orthoimages/S5_2007/S5_11055_6057_20070622/S5_11055_6057_20070622.json
2436
+
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://api.cogeo.xyz/".
"""Get the bounding box of a single SpatialTemporal Asset Catalog (STAC) item.
2482
+
2483
+
Args:
2484
+
url (str): HTTP URL to a STAC item, e.g., https://canada-spot-ortho.s3.amazonaws.com/canada_spot_orthoimages/canada_spot5_orthoimages/S5_2007/S5_11055_6057_20070622/S5_11055_6057_20070622.json
2485
+
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://api.cogeo.xyz/".
2486
+
2487
+
Returns:
2488
+
list: A list of values representing [left, bottom, right, top]
"""Get the centroid of a single SpatialTemporal Asset Catalog (STAC) item.
2505
+
2506
+
Args:
2507
+
url (str): HTTP URL to a STAC item, e.g., https://canada-spot-ortho.s3.amazonaws.com/canada_spot_orthoimages/canada_spot5_orthoimages/S5_2007/S5_11055_6057_20070622/S5_11055_6057_20070622.json
2508
+
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://api.cogeo.xyz/".
"""Get band names of a single SpatialTemporal Asset Catalog (STAC) item.
2520
+
2521
+
Args:
2522
+
url (str): HTTP URL to a STAC item, e.g., https://canada-spot-ortho.s3.amazonaws.com/canada_spot_orthoimages/canada_spot5_orthoimages/S5_2007/S5_11055_6057_20070622/S5_11055_6057_20070622.json
2523
+
titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://api.cogeo.xyz/".
2524
+
2525
+
Returns:
2526
+
list: A list of band names
2527
+
"""
2528
+
importrequests
2529
+
2530
+
r=requests.get(
2531
+
f"{titiler_endpoint}/stac/info",
2532
+
params= {
2533
+
"url": url,
2534
+
}
2535
+
).json()
2536
+
2537
+
returnr
2538
+
2539
+
2540
+
defexplode(coords):
2541
+
"""Explode a GeoJSON geometry's coordinates object and yield
2542
+
coordinate tuples. As long as the input is conforming, the type of
0 commit comments