Release notes
0.0.3 (unreleased)
Fixed
-
__version__is now read from the installed distribution metadata instead of being hand-maintained in__init__.py, where it had drifted to0.0.1whilepyproject.tomlsaid0.0.3. The publish workflow smoke-tests by printing__version__, so a release advertised the wrong version. -
A
NaNcell no longer comes back with a finite value of its own. The Horn kernel gives the centre cell weight 0, so a nodata cell never entered its own stencil: the output was a ring ofNaNaround a valid-looking, meaningless centre. Slope, aspect and hillshade now mask the centre explicitly, so oneNaNinput cell yields a full 3x3NaNblock. -
A DEM with a single row or column now raises a
ValueErrorinstead of returning allNaN. Deriving spacing from one coordinate producednp.median([])->NaN, and the only signal was a numpyRuntimeWarning. Passresolution=to work with such a DEM. -
resolution=as a sequence is validated: anything other than a(y_res, x_res)pair raises aValueErrorrather than anIndexErroror a silent truncation. -
Slope no longer saturates near the poles. For a geographic CRS, longitude spacing is scaled to metres by
cos(mean_latitude), which collapses toward zero above ~89.9 degrees and made every cell read as a cliff (88.6 degrees of slope on data that reads 0.2 degrees at the equator). The scaling is now floored at its 89.9-degree value and raises aRuntimeWarningpointing atresolution=or a polar CRS. -
A DataArray whose dimensions are not recognised (
row/colrather thanx/y,lat/lon, …) now raises aValueErrornaming the dimensions it found, the names it looked for, and thex=/y=override, instead of failing insidetranspose.
Added
-
compute_terrain,Slope,Aspect,HillshadeandTerrainModeare exported from the package root. Previously only the two accessor classes were. -
Documentation site at norlandrhagen.github.io/corduroy, with usage, design notes and an API reference.
Changed
- Python 3.12 is now supported (was 3.13+), and dependency floors were lowered to
what the code actually needs:
dask>=2024.1.0,xarray>=2025.9.0,numpy>=2.1.0. CI resolves those exact minimums in a--resolution lowest-directjob and runs the suite against them, alongside 3.12, 3.13 and 3.14.
0.0.2
- Aspect returns
NaNon flat cells (hydro-flattened lakes, plateaus) rather than reporting them as facing due north. z_factorvertical exaggeration on all three methods.
0.0.1
- Initial release:
.demaccessor onDataArrayandDatasetwithslope(),aspect()andhillshade(), Horn (1981) gradients, daskmap_overlapsupport and CRS-aware degree-to-metre scaling.