File size: 790 Bytes
8aa7c1a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Cloud Optimized GeoTIFF Server

This Space hosts a server for Cloud Optimized GeoTIFFs (COGs). It provides an API to list and retrieve COGs.

## API Endpoints

- `GET /`: Welcome message
- `GET /cogs`: List all available COGs
- `GET /cogs/{cog_name}`: Retrieve a specific COG

## Usage

To use this Space, you can send HTTP requests to the provided endpoints. For example:

```python
import requests

# List all COGs
response = requests.get("https://your-space-url.hf.space/cogs")
print(response.json())

# Retrieve a specific COG
cog_name = "example.tif"
response = requests.get(f"https://your-space-url.hf.space/cogs/{cog_name}")
with open(cog_name, "wb") as f:
    f.write(response.content)
```

Replace `https://your-space-url.hf.space` with the actual URL of your Hugging Face Space.