diff --git a/src/aws/osml/gdal/sicd_sensor_model_builder.py b/src/aws/osml/gdal/sicd_sensor_model_builder.py index 9d9ea5b..35b4004 100644 --- a/src/aws/osml/gdal/sicd_sensor_model_builder.py +++ b/src/aws/osml/gdal/sicd_sensor_model_builder.py @@ -136,8 +136,8 @@ def from_dataclass(sicd: Union[sicd121.SICD, sicd130.SICD]) -> Optional[SensorMo projection_set = None ugpn = None - if sicd.grid.type_value == sicd121.ImageGridType.RGAZIM: - if sicd.image_formation.image_form_algo == sicd121.ImageFormAlgo.PFA: + if sicd.grid.type_value.value == sicd121.ImageGridType.RGAZIM.value: + if sicd.image_formation.image_form_algo.value == sicd121.ImageFormAlgo.PFA.value: ugpn = xyztype_to_ndarray(sicd.pfa.fpn) projection_set = PFAProjectionSet( scp_ecf=scp_ecf, @@ -146,11 +146,11 @@ def from_dataclass(sicd: Union[sicd121.SICD, sicd130.SICD]) -> Optional[SensorMo coa_time_poly=time_coa_poly, arp_poly=arp_poly, ) - elif sicd.image_formation.image_form_algo == sicd121.ImageFormAlgo.RGAZCOMP: + elif sicd.image_formation.image_form_algo.value == sicd121.ImageFormAlgo.RGAZCOMP.value: projection_set = RGAZCOMPProjectionSet( scp_ecf=scp_ecf, az_scale_factor=sicd.rg_az_comp.az_sf, coa_time_poly=time_coa_poly, arp_poly=arp_poly ) - elif sicd.grid.type_value == sicd121.ImageGridType.RGZERO: + elif sicd.grid.type_value.value == sicd121.ImageGridType.RGZERO.value: projection_set = INCAProjectionSet( r_ca_scp=sicd.rma.inca.r_ca_scp, inca_time_coa_poly=poly1d_to_native(sicd.rma.inca.time_capoly), @@ -158,10 +158,10 @@ def from_dataclass(sicd: Union[sicd121.SICD, sicd130.SICD]) -> Optional[SensorMo coa_time_poly=time_coa_poly, arp_poly=arp_poly, ) - elif sicd.grid.type_value in [ - sicd121.ImageGridType.PLANE, - sicd121.ImageGridType.XCTYAT, - sicd121.ImageGridType.XRGYCR, + elif sicd.grid.type_value.value in [ + sicd121.ImageGridType.PLANE.value, + sicd121.ImageGridType.XCTYAT.value, + sicd121.ImageGridType.XRGYCR.value, ]: projection_set = PlaneProjectionSet( scp_ecf=scp_ecf, diff --git a/test/aws/osml/gdal/test_sensor_model_factory.py b/test/aws/osml/gdal/test_sensor_model_factory.py index c347ad9..bbd8d29 100644 --- a/test/aws/osml/gdal/test_sensor_model_factory.py +++ b/test/aws/osml/gdal/test_sensor_model_factory.py @@ -174,6 +174,8 @@ def test_sicd_sensor_models(self): "./test/data/sicd/capella-sicd121-chip1.ntf", "./test/data/sicd/capella-sicd121-chip2.ntf", "./test/data/sicd/umbra-sicd121-chip1.ntf", + "./test/data/sicd/capella-sicd130-chip1.ntf", + "./test/data/sicd/capella-sicd130-chip2.ntf", ] for image_path in test_examples: ds = gdal.Open(image_path) diff --git a/test/data/sicd/capella-sicd130-chip1.ntf b/test/data/sicd/capella-sicd130-chip1.ntf new file mode 100644 index 0000000..1f44644 --- /dev/null +++ b/test/data/sicd/capella-sicd130-chip1.ntf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1993e8693fc96961ec4b65dd4ebb7ee975fe63f029a18282396852072ba81c48 +size 1092304 diff --git a/test/data/sicd/capella-sicd130-chip2.ntf b/test/data/sicd/capella-sicd130-chip2.ntf new file mode 100644 index 0000000..9d898d8 --- /dev/null +++ b/test/data/sicd/capella-sicd130-chip2.ntf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:393a166f78c30cc7ca108306f6e38771feb7c54bced301bdd598b1f73470ed09 +size 1088372