Summary
xrspatial/geotiff/_writer.py:968 defines write() (the eager numpy writer called by to_geotiff). Its docstring at line 1003 says:
compression : str
'none', 'deflate', or 'lzw'.
The actual _compression_tag map at line 114 accepts nine names:
'none', 'deflate', 'lzw', 'jpeg', 'packbits', 'zstd', 'lz4',
'jpeg2000', 'j2k', 'lerc'
The public to_geotiff docstring lists more codecs but still omits some (jpeg2000, lerc). Anyone reading _writer.write to understand the supported set comes away with three codecs out of nine.
Same function omits docstring entries for several real parameters: compression_level, raster_type, x_resolution, y_resolution, resolution_unit, gdal_metadata_xml, extra_tags, bigtiff, max_z_error. They are all in the signature with type hints; the docstring just stops short.
Why this matters
_writer.write is private (_ prefix), but it is the function that actually accepts and validates these kwargs. Maintainers and the public to_geotiff wrapper read the docstring to confirm what is supported. A docstring three codecs short is a docs-vs-code disagreement that grew silently as PRs added codecs.
Proposed fix
Sync _writer.write and to_geotiff docstrings against _compression_tag's map. Add docstring entries for the parameters currently missing. The fix is docs-only.
Found during the geotiff API consistency sweep (Cat 3, MEDIUM).
Summary
xrspatial/geotiff/_writer.py:968defineswrite()(the eager numpy writer called byto_geotiff). Its docstring at line 1003 says:The actual
_compression_tagmap at line 114 accepts nine names:The public
to_geotiffdocstring lists more codecs but still omits some (jpeg2000,lerc). Anyone reading_writer.writeto understand the supported set comes away with three codecs out of nine.Same function omits docstring entries for several real parameters:
compression_level,raster_type,x_resolution,y_resolution,resolution_unit,gdal_metadata_xml,extra_tags,bigtiff,max_z_error. They are all in the signature with type hints; the docstring just stops short.Why this matters
_writer.writeis private (_prefix), but it is the function that actually accepts and validates these kwargs. Maintainers and the publicto_geotiffwrapper read the docstring to confirm what is supported. A docstring three codecs short is a docs-vs-code disagreement that grew silently as PRs added codecs.Proposed fix
Sync
_writer.writeandto_geotiffdocstrings against_compression_tag's map. Add docstring entries for the parameters currently missing. The fix is docs-only.Found during the geotiff API consistency sweep (Cat 3, MEDIUM).