Hello Community,
I have managed to get myself and Gemini thoroughly turned around with this, so hoping an actual human can illuminate the way forward.
I recently expanded my understanding of how Control Points work when Georeferencing - namely that they cannot be counted on to persist indefinitely without being saved explicitly to a .txt file. I have hundreds of FGDBR raster files stored in a Pro project that have as yet persistent, but unsaved, control points. I want to save the control points without manually opening the Georeferencing tool for each file.
I asked an LLM whether it would be possible to programmatically go through each layer in each map in a Pro project and, if the layer isRasterLayer, find and save the control points that are associated with it (if they exist). The answer seems to be yes, by accessing the CIM object for the raster layer and finding the control points if they exist - but I (nor Gemini) cannot seem to figure out where in the CIMRasterLayer (or if not there, where else) the control points should be, assuming they exist.
I have some background using Arcpy and the API for Python for data management and analysis, but this is my first foray into going under the hood of the CIM. So far I have a script that handles file management and naming and correctly runs lyr.getDefinition(V3) on only raster files in each Map in the Project, but I cannot figure out where to tell it to look for Control Points for each RasterLayer object. I saved one raster as a .lyrx and opened the JSON to look through it - Ctrl+F "Control" yields no results.
Is the LLM hallucinating that this is even possible? Logically it seems like it should be, given that the points exist somewhere in memory associated with the file, but search results so far are swamped with contradictory AI suggestions about where the control points should be.
Any suggestions, clarifying questions, or solutions are gratefully appreciated.