Skip to content

Commit

Permalink
Add projection in to_image for datacube
Browse files Browse the repository at this point in the history
  • Loading branch information
vale95-eng committed May 2, 2024
1 parent 7a6e9c3 commit 112bab0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions geokube/core/datacube.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,13 +463,14 @@ def to_image(
format='png',
transparent=True,
bgcolor='FFFFFF',
cmap='RdBu_r'
cmap='RdBu_r',
projection=None
):
# TODO: support multiple fields
if len(self.fields) > 1:
raise ValueError("to_image support only 1 field")
else:
next(iter(self.fields.values())).to_image(filepath, width, height, dpi, format, transparent, bgcolor, cmap)
next(iter(self.fields.values())).to_image(filepath, width, height, dpi, format, transparent, bgcolor, cmap, projection)

@classmethod
@geokube_logging
Expand Down

0 comments on commit 112bab0

Please sign in to comment.