Commit 13407f09 authored by Cresson Remi's avatar Cresson Remi
Browse files

ADD: find mtp roi test

1 merge request!11Vector bbox
Pipeline #33397 passed with stages
in 3 minutes and 26 seconds
Showing with 5 additions and 1 deletion
+5 -1
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from scenes_test_base import ScenesTestBase from scenes_test_base import ScenesTestBase
from scenes import indexation from scenes import indexation, utils
import tests_data import tests_data
class ImageryTest(ScenesTestBase): class ImageryTest(ScenesTestBase):
...@@ -9,6 +9,8 @@ class ImageryTest(ScenesTestBase): ...@@ -9,6 +9,8 @@ class ImageryTest(ScenesTestBase):
index = indexation.Index(scenes_list=[tests_data.SCENE1]) index = indexation.Index(scenes_list=[tests_data.SCENE1])
self.assertTrue(index.find(bbox_wgs84=(43.706, 43.708, 4.317, 4.420))) self.assertTrue(index.find(bbox_wgs84=(43.706, 43.708, 4.317, 4.420)))
self.assertFalse(index.find(bbox_wgs84=(43.000, 43.001, 3.000, 3.001))) self.assertFalse(index.find(bbox_wgs84=(43.000, 43.001, 3.000, 3.001)))
self.assertTrue(index.find(bbox_wgs84=utils.get_bbox_wgs84_from_vector(tests_data.ROI_MTP_4326)))
self.assertTrue(index.find(bbox_wgs84=utils.get_bbox_wgs84_from_vector(tests_data.ROI_MTP_2154)))
def test_epsg(self): def test_epsg(self):
self.assertTrue(tests_data.SCENE1.epsg == 2154) self.assertTrue(tests_data.SCENE1.epsg == 2154)
......
...@@ -11,6 +11,8 @@ DIMAP1_XS = TEST_DATA_DIR + "/input/ROI_1_Bundle_Ortho_GSD2015/PROD_SPOT6_001/VO ...@@ -11,6 +11,8 @@ DIMAP1_XS = TEST_DATA_DIR + "/input/ROI_1_Bundle_Ortho_GSD2015/PROD_SPOT6_001/VO
"DIM_SPOT6_MS_201503261014386_ORT_SPOT6_20170524_1422391k0ha487979cy_1.XML" "DIM_SPOT6_MS_201503261014386_ORT_SPOT6_20170524_1422391k0ha487979cy_1.XML"
DIMAP1_P = TEST_DATA_DIR + "/input/ROI_1_Bundle_Ortho_GSD2015/PROD_SPOT6_001/VOL_SPOT6_001_A/IMG_SPOT6_P_001_A/" \ DIMAP1_P = TEST_DATA_DIR + "/input/ROI_1_Bundle_Ortho_GSD2015/PROD_SPOT6_001/VOL_SPOT6_001_A/IMG_SPOT6_P_001_A/" \
"DIM_SPOT6_P_201503261014386_ORT_SPOT6_20170524_1422391k0ha487979cy_1.XML" "DIM_SPOT6_P_201503261014386_ORT_SPOT6_20170524_1422391k0ha487979cy_1.XML"
ROI_MTP_2154 = TEST_DATA_DIR + "/input/roi_mtp_2154.gpkg"
ROI_MTP_4326 = TEST_DATA_DIR + "/input/roi_mtp_4326.gpkg"
# Instances # Instances
SCENE1 = spot.Spot67Scene(dimap_file_xs=DIMAP1_XS, dimap_file_pan=DIMAP1_P) SCENE1 = spot.Spot67Scene(dimap_file_xs=DIMAP1_XS, dimap_file_pan=DIMAP1_P)
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment