Exemple #1
0
 def test_get_ipf_from_manifest(self):
     self.assertEqual(
         psf.get_ipf_from_manifest(path_testfiles.joinpath("manifest.safe")),
         2.82,
     )
     with self.assertRaises(KeyError, msg="IPF Version not found."):
         psf.get_footprint_from_manifest(os.path.join(path_testfiles, "manifest_bad.safe"))
Exemple #2
0
 def test_get_origin_from_manifest(self):
     self.assertEqual(
         psf.get_origin_from_manifest(path_testfiles.joinpath("manifest.safe")),
         "United Kingdom",
     )
     with self.assertRaises(KeyError, msg="Country of origin not found."):
         psf.get_footprint_from_manifest(os.path.join(path_testfiles, "manifest_bad.safe"))
Exemple #3
0
 def test_get_footprint_from_manifest(self):
     self.assertEqual(
         psf.get_footprint_from_manifest(path_testfiles.joinpath("manifest.safe")).wkt,
         "POLYGON ((149.766922 -24.439564, 153.728622 -23.51771, 154.075058 -24.737713, 150.077042 "
         "-25.668921, 149.766922 -24.439564))",
     )
     with self.assertRaises(KeyError, msg="Footprint not found"):
         psf.get_footprint_from_manifest(os.path.join(path_testfiles, "manifest_bad.safe"))
Exemple #4
0
 def test_get_proj_string(self):
     self.assertEqual(
         psf.get_proj_string(
             psf.get_footprint_from_manifest(
                 path_testfiles.joinpath("manifest.safe"))),
         r"+proj=utm +zone=56J, +ellps=WGS84 +datum=WGS84 +units=m +no_defs",
     )