Select to view content in your preferred language

Multiple geographic transformations for mosaic dataset via Python

168
1
3 weeks ago
cgarrity_USGS
Emerging Contributor

Hello. We're unable to apply multiple geographic transformations to a mosaic dataset programmatically. I'm hoping it's a simple syntax issue on our end. SetMosaicDatasetProperties indicates that you can apply multiple transformations via list for {geographic_transform} parameter. I've included code below with the list parameters moved outside the function for clarity. These are all valid transformation members. ERROR 000800: The value is not a member of...

 
        geographic_transforms_list = [
            "NAD_1927_To_WGS_1984_79_CONUS",
            "WGS_1984_(ITRF00)_To_NAD_1983",
            "NAD_1983_HARN_To_WGS_1984",
            "Old_Hawaiian_To_NAD_1983_HARN_Hawaii"
        ]
 
        # Set the mosaic dataset properties and include map types
        for map_type in map_types:
            order_field = 'NEWEST' if map_type == '' else map_type
            arcpy.management.SetMosaicDatasetProperties(
                in_mosaic_dataset=mosaic_dataset,
                allowed_mosaic_methods="ByAttribute",
                default_mosaic_method="ByAttribute",
                order_field=order_field,
                sorting_order="DESCENDING",
                geographic_transform=geographic_transforms_list
            )
0 Kudos
1 Reply
PieterE
Emerging Contributor

The good news:
It's not a simple syntax issue, you're code runs fine on a fresh created mosaic dataset.

The bad news:
This is possibly related to a BUG that we are also affected by. Namely that it is not possible to undo a certain transformation using arcpy.management.SetMosaicDatasetProperties.
Can you check which transformations are now already defined for your mosaic dataset?

The only workaround is to manually delete the transformation, that no longer exists in the transformations folder, from the mosaic dataset.

0 Kudos