Skip to content

Commit

Permalink
Fix nodata not appearing in representation of Raster (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhugonnet authored Feb 28, 2024
1 parent 9856b11 commit efde049
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion geoutils/raster/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,6 @@ def _repr_html_(self) -> str:
else:
str_data = "\n ".join(self.data.__str__().split("\n"))

# Over-ride Raster's method to remove nodata value (always None)
# Use <pre> to keep white spaces, <span> to keep line breaks
s = (
'<pre><span style="white-space: pre-wrap"><b><em>'
Expand All @@ -888,6 +887,8 @@ def _repr_html_(self) -> str:
+ "\n ".join(self.transform.__str__().split("\n"))
+ "\n <b>crs=</b>"
+ self.crs.__str__()
+ "\n <b>nodata=</b>"
+ self.nodata.__str__()
+ ")</span></pre>"
)

Expand Down

0 comments on commit efde049

Please sign in to comment.