Skip to content

Commit

Permalink
add png format to RemoteSensingDataDownloader
Browse files Browse the repository at this point in the history
  • Loading branch information
mrsmrynk committed May 6, 2024
1 parent 8734e49 commit b8fd5be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/data/remote_sensing_data_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def get_response(self, bounding_box):
response = self.wms.getmap(layers=[self.wms_layer],
srs=f'EPSG:{self.epsg_code}',
bbox=bounding_box,
format='image/tiff',
format='image/png',
size=(settings.IMAGE_SIZE + 2 * settings.BORDER_SIZE
if self.clip_border else settings.IMAGE_SIZE,
settings.IMAGE_SIZE + 2 * settings.BORDER_SIZE
Expand Down
4 changes: 2 additions & 2 deletions src/data/tests/test_remote_sensing_data_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def test_get_response_no_clip_border(mocked_wms):
mocked_wms_instance.getmap.assert_called_once_with(layers=['wms_layer'],
srs='EPSG:25832',
bbox=(0, 0, 256, 256),
format='image/tiff',
format='image/png',
size=(1280, 1280),
bgcolor='#000000')

Expand Down Expand Up @@ -135,7 +135,7 @@ def test_get_response_clip_border(mocked_wms):
mocked_wms_instance.getmap.assert_called_once_with(layers=['wms_layer'],
srs='EPSG:25832',
bbox=(-64, -64, 320, 320),
format='image/tiff',
format='image/png',
size=(1920, 1920),
bgcolor='#000000')

Expand Down

0 comments on commit b8fd5be

Please sign in to comment.