コード例 #1
0
ファイル: test_sar.py プロジェクト: stac-utils/pystac
    def test_observation_direction(self) -> None:
        collection = self.collection.clone()
        summaries_ext = SarExtension.summaries(collection, True)
        observation_direction_list = [ObservationDirection.LEFT]

        summaries_ext.observation_direction = observation_direction_list

        self.assertEqual(
            summaries_ext.observation_direction,
            observation_direction_list,
        )

        summaries_dict = collection.to_dict()["summaries"]

        self.assertEqual(
            summaries_dict["sar:observation_direction"],
            observation_direction_list,
        )
コード例 #2
0
ファイル: test_sar.py プロジェクト: stac-utils/pystac
    def test_looks_azimuth(self) -> None:
        collection = self.collection.clone()
        summaries_ext = SarExtension.summaries(collection, True)
        looks_azimuth_range = RangeSummary(400, 600)

        summaries_ext.looks_azimuth = looks_azimuth_range

        self.assertEqual(
            summaries_ext.looks_azimuth,
            looks_azimuth_range,
        )

        summaries_dict = collection.to_dict()["summaries"]

        self.assertEqual(
            summaries_dict["sar:looks_azimuth"],
            looks_azimuth_range.to_dict(),
        )
コード例 #3
0
ファイル: test_sar.py プロジェクト: stac-utils/pystac
    def test_looks_equivalent_number(self) -> None:
        collection = self.collection.clone()
        summaries_ext = SarExtension.summaries(collection, True)
        looks_equivalent_number_range = RangeSummary(400.0, 600.0)

        summaries_ext.looks_equivalent_number = looks_equivalent_number_range

        self.assertEqual(
            summaries_ext.looks_equivalent_number,
            looks_equivalent_number_range,
        )

        summaries_dict = collection.to_dict()["summaries"]

        self.assertEqual(
            summaries_dict["sar:looks_equivalent_number"],
            looks_equivalent_number_range.to_dict(),
        )
コード例 #4
0
ファイル: test_sar.py プロジェクト: stac-utils/pystac
    def test_resolution_azimuth(self) -> None:
        collection = self.collection.clone()
        summaries_ext = SarExtension.summaries(collection, True)
        resolution_azimuth_range = RangeSummary(800.0, 1200.0)

        summaries_ext.resolution_azimuth = resolution_azimuth_range

        self.assertEqual(
            summaries_ext.resolution_azimuth,
            resolution_azimuth_range,
        )

        summaries_dict = collection.to_dict()["summaries"]

        self.assertEqual(
            summaries_dict["sar:resolution_azimuth"],
            resolution_azimuth_range.to_dict(),
        )
コード例 #5
0
ファイル: test_sar.py プロジェクト: stac-utils/pystac
    def test_pixel_spacing_azimuth(self) -> None:
        collection = self.collection.clone()
        summaries_ext = SarExtension.summaries(collection, True)
        pixel_spacing_azimuth_range = RangeSummary(400.0, 600.0)

        summaries_ext.pixel_spacing_azimuth = pixel_spacing_azimuth_range

        self.assertEqual(
            summaries_ext.pixel_spacing_azimuth,
            pixel_spacing_azimuth_range,
        )

        summaries_dict = collection.to_dict()["summaries"]

        self.assertEqual(
            summaries_dict["sar:pixel_spacing_azimuth"],
            pixel_spacing_azimuth_range.to_dict(),
        )
コード例 #6
0
ファイル: test_sar.py プロジェクト: stac-utils/pystac
    def test_center_frequency(self) -> None:
        collection = self.collection.clone()
        summaries_ext = SarExtension.summaries(collection, True)
        center_frequency_range = RangeSummary(4.405, 6.405)

        summaries_ext.center_frequency = center_frequency_range

        self.assertEqual(
            summaries_ext.center_frequency,
            center_frequency_range,
        )

        summaries_dict = collection.to_dict()["summaries"]

        self.assertEqual(
            summaries_dict["sar:center_frequency"],
            center_frequency_range.to_dict(),
        )
コード例 #7
0
ファイル: test_sar.py プロジェクト: stac-utils/pystac
    def test_product_type(self) -> None:
        collection = self.collection.clone()
        summaries_ext = SarExtension.summaries(collection, True)
        product_type_list = ["SSC"]

        summaries_ext.product_type = product_type_list

        self.assertEqual(
            summaries_ext.product_type,
            product_type_list,
        )

        summaries_dict = collection.to_dict()["summaries"]

        self.assertEqual(
            summaries_dict["sar:product_type"],
            product_type_list,
        )
コード例 #8
0
ファイル: test_sar.py プロジェクト: stac-utils/pystac
    def test_polarizations(self) -> None:
        collection = self.collection.clone()
        summaries_ext = SarExtension.summaries(collection, True)
        polarizations_list = [Polarization.HH]

        summaries_ext.polarizations = polarizations_list

        self.assertEqual(
            summaries_ext.polarizations,
            polarizations_list,
        )

        summaries_dict = collection.to_dict()["summaries"]

        self.assertEqual(
            summaries_dict["sar:polarizations"],
            polarizations_list,
        )
コード例 #9
0
ファイル: test_sar.py プロジェクト: stac-utils/pystac
    def test_frequency_band(self) -> None:
        collection = self.collection.clone()
        summaries_ext = SarExtension.summaries(collection, True)
        frequency_band_list = [FrequencyBand.P, FrequencyBand.L]

        summaries_ext.frequency_band = frequency_band_list

        self.assertEqual(
            summaries_ext.frequency_band,
            frequency_band_list,
        )

        summaries_dict = collection.to_dict()["summaries"]

        self.assertEqual(
            summaries_dict["sar:frequency_band"],
            frequency_band_list,
        )
コード例 #10
0
ファイル: test_sar.py プロジェクト: stac-utils/pystac
    def test_instrument_mode(self) -> None:
        collection = self.collection.clone()
        summaries_ext = SarExtension.summaries(collection, True)
        instrument_mode_list = ["WV"]

        summaries_ext.instrument_mode = instrument_mode_list

        self.assertEqual(
            summaries_ext.instrument_mode,
            instrument_mode_list,
        )

        summaries_dict = collection.to_dict()["summaries"]

        self.assertEqual(
            summaries_dict["sar:instrument_mode"],
            instrument_mode_list,
        )