mattritchey commited on
Commit
8aa7c1a
1 Parent(s): 1e71909

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +29 -10
README.md CHANGED
@@ -1,10 +1,29 @@
1
- ---
2
- title: Cog
3
- emoji: 🏆
4
- colorFrom: purple
5
- colorTo: red
6
- sdk: docker
7
- pinned: false
8
- ---
9
-
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Cloud Optimized GeoTIFF Server
2
+
3
+ This Space hosts a server for Cloud Optimized GeoTIFFs (COGs). It provides an API to list and retrieve COGs.
4
+
5
+ ## API Endpoints
6
+
7
+ - `GET /`: Welcome message
8
+ - `GET /cogs`: List all available COGs
9
+ - `GET /cogs/{cog_name}`: Retrieve a specific COG
10
+
11
+ ## Usage
12
+
13
+ To use this Space, you can send HTTP requests to the provided endpoints. For example:
14
+
15
+ ```python
16
+ import requests
17
+
18
+ # List all COGs
19
+ response = requests.get("https://your-space-url.hf.space/cogs")
20
+ print(response.json())
21
+
22
+ # Retrieve a specific COG
23
+ cog_name = "example.tif"
24
+ response = requests.get(f"https://your-space-url.hf.space/cogs/{cog_name}")
25
+ with open(cog_name, "wb") as f:
26
+ f.write(response.content)
27
+ ```
28
+
29
+ Replace `https://your-space-url.hf.space` with the actual URL of your Hugging Face Space.