Skip to content

Commit

Permalink
add pyrosar geocoding module
Browse files Browse the repository at this point in the history
  • Loading branch information
ninsbl committed Aug 10, 2023
1 parent 9ea4cdd commit cdeec65
Showing 1 changed file with 54 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
"""Test i.sentinel1.pyrosargeocode for Sentinel-1
(C) 2023 by NVE, Stefan Blumentrath and the GRASS GIS Development Team
This program is free software under the GNU General Public
License (>=v2). Read the file COPYING that comes with GRASS
for details.
:authors: Stefan Blumentrath
"""
import os

import grass.script as gs

from grass.gunittest.case import TestCase


class TestPyrosarGeocoding(TestCase):
"""Basic class covering all test cases"""

@classmethod
def setUpClass(cls):
"""Initiate the working environment"""
os.putenv("GRASS_OVERWRITE", "1")
cls.tempdir = gs.tempdir()
cls.output_dir = gs.tempdir()

@classmethod
def tearDownClass(cls):
"""Remove the temporary data"""
gs.utils.try_rmdir(cls.tempdir)

def test_asf_download(self):
"""Test geocoding of Sentinel-1 data with pyrosar
Tests cannot succeed due to missing test data
asserting fail until that is solved
"""
self.assertModuleFail(
"i.sentinel1.pyrosargeocode",
input="S1A_XXXXXXXXXXX",
flags="fndm",
speckle_filter="refined_lee",
temporary_directory=self.tempdir,
nprocs=2,
elevation="DTM_10m@DTM",
aoi="./data/roi.geojson",
output_directory=self.output_dir,
verbose=True,
)


if __name__ == "__main__":
from grass.gunittest.main import test

test()

0 comments on commit cdeec65

Please sign in to comment.