Skip to content

Commit 4a72b0d

Browse files
committed
Add GeoTIFF API docs and update README for GPU COG overviews (#1150)
New docs/source/reference/geotiff.rst covers the public I/O functions. README feature matrix now lists write_geotiff_gpu and shows COG overview usage examples.
1 parent 6399e66 commit 4a72b0d

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ Native GeoTIFF and Cloud Optimized GeoTIFF reader/writer. No GDAL required.
145145
|:-----|:------------|:-----:|:----:|:--------:|:-------------:|:-----:|
146146
| [open_geotiff](xrspatial/geotiff/__init__.py) | Read GeoTIFF / COG / VRT | ✅️ | ✅️ | ✅️ | ✅️ | ✅️ |
147147
| [to_geotiff](xrspatial/geotiff/__init__.py) | Write DataArray as GeoTIFF / COG | ✅️ | ✅️ | ✅️ | ✅️ | ✅️ |
148+
| [write_geotiff_gpu](xrspatial/geotiff/__init__.py) | GPU-accelerated GeoTIFF / COG write | | | ✅️ | | |
148149
| [write_vrt](xrspatial/geotiff/__init__.py) | Generate VRT mosaic from GeoTIFFs | ✅️ | | | | |
149150

150151
`open_geotiff` and `to_geotiff` auto-dispatch to the correct backend:
@@ -163,6 +164,10 @@ open_geotiff('mosaic.vrt') # VRT mosaic (auto-detected
163164
to_geotiff(cupy_array, 'out.tif') # auto-detects GPU
164165
to_geotiff(data, 'out.tif', gpu=True) # force GPU compress
165166
to_geotiff(data, 'ortho.tif', compression='jpeg') # JPEG for orthophotos
167+
to_geotiff(data, 'cog.tif', cog=True) # COG with auto overviews
168+
to_geotiff(data, 'cog.tif', cog=True, # COG with explicit levels
169+
overview_levels=[2, 4, 8],
170+
overview_resampling='nearest')
166171
write_vrt('mosaic.vrt', ['tile1.tif', 'tile2.tif']) # generate VRT
167172

168173
open_geotiff('dem.tif', dtype='float32') # half memory
@@ -189,7 +194,7 @@ ds.xrs.open_geotiff('large_dem.tif') # read windowed to Dataset
189194
- Cloud storage: S3 (`s3://`), GCS (`gs://`), Azure (`az://`) via fsspec
190195
- GPUDirect Storage: SSD→GPU direct DMA via KvikIO (optional)
191196
- Thread-safe mmap reads, atomic writes, HTTP connection reuse (urllib3)
192-
- Overview generation: mean, nearest, min, max, median, mode, cubic
197+
- Overview generation (CPU and GPU): mean, nearest, min, max, median, mode, cubic
193198
- Planar config, big-endian byte swap, PixelIsArea/PixelIsPoint
194199

195200
**Read performance** (real-world files, A6000 GPU):

docs/source/reference/geotiff.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.. _reference.geotiff:
2+
3+
***************
4+
GeoTIFF / COG
5+
***************
6+
7+
Reading
8+
=======
9+
.. autosummary::
10+
:toctree: _autosummary
11+
12+
xrspatial.geotiff.open_geotiff
13+
xrspatial.geotiff.read_vrt
14+
15+
Writing
16+
=======
17+
.. autosummary::
18+
:toctree: _autosummary
19+
20+
xrspatial.geotiff.to_geotiff
21+
xrspatial.geotiff.write_geotiff_gpu
22+
xrspatial.geotiff.write_vrt

docs/source/reference/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Reference
1414
fire
1515
flood
1616
focal
17+
geotiff
1718
hydrology
1819
interpolation
1920
kde

0 commit comments

Comments
 (0)