What is an APRX file?
Can I open an APRX in QGIS? https://gis.stackexchange.com/questions/335915/opening-arcgis-pro-project-aprx-in-qgis (Spoiler: NO!)
What is CIM?
There are lots of references using the letters C-I-M in the component files. What is CIM and where is it documented?
It stands for "Cartographic Information Model" and it's described here: https://github.com/Esri/cim-spec
The API is described here https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic44.html
Access from Python https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/python-cim-access.htm via ArcPy. Na. Can't install that on my web server.
There is this CIM Viewer thing but it's an add-on for ArcGIS Pro, that is no fun at all. Actually it looks like it's very cool.
Description https://community.esri.com/t5/arcgis-pro-sdk-blog/arcgis-pro-cim-viewer/ba-p/883598
Git repo https://github.com/Esri/arcgis-pro-sdk-cim-viewer It's copyright Esri but Apache License.
Here is a doc you might find enlightening about CIM, search for "" https://pro.arcgis.com/en/pro-app/latest/arcpy/mapping/updatingandfixingdatasources.htm See "Updating data sources via the CIM"
Is there some nice nonproprietary CIM reader Python code out there? There is a scrap of code in the Esri JavaScript API to work wth CIMSymbols.
What is in an APRX?
It's a zip file. "Unzip" these days is smart enough to not make me rename the file. So, "unzip afile.aprx"...
Generally speaking, a bunch of folders and a bunch of XML files. There is a folder for each map and probably one for each layout. There are JSON files.
After digging in deeper I am starting to think the reason it's not documented is that they are embarrassed at how messy it is. Files and folders sometimes seem to be debris.
XML files
I hate XML files, BTW. :-)
Several <hash>.xml files. They appear to describe different basemap services. (Grey, OSM, etc)
The DocumentInfo.XML file contains a CIMDocumentInfo which has an erroneous out of date DocumentTitle in it. I wonder where that shows in Pro? It has other project settings like "UseRelativePath = true".
JSON files
<hash>.json (in this example, 29a99abb376643b596115891928364c8.json) This one appears to describe my aerial photo service.
Index.json -- Looks like a manifest of all the files, gold mine of information, whoo hoo, It is not a CIM document.
GISProject.json -- looks like the top level view of the Project. There is a crazy amount of gunk in here. API doc: https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic1835.html
Map Folders
The "map" folder has an XML file containing a CIMMap document for each map, for example "map9.xml" describes a map called "NAIP 2020".
There are a series of "ground[1-9].json" files that describe the ground elevation for each map, probably.
There are other files in "map" that appear wayward and out of place, such as a few layers like "parks.xml" which is a CIMFeatureLayer. BUG?
Each map folder contains a JSON file describing each layer in the map. And maybe occasionally an XML file too. There are probably competing teams at Esri, and the grey beards prefer XML.
"Layout" folder
"layout" has an XML for each layout. They are CIMLayout documents.
Random other folders
"Metadata" folder
N * <hash>.xml where each XML file contains some metadata for something. The hash must be referenced somewhere?
I love the tag "CreaTime", like "CreateTime would have been just too long? Probably a DOS or UNIX programmer felt a need to restrict it to 8 characters.
Pictures
"Pictures" has a picture in it, in this case it's a BMP of the county logo. I wonder if it's a thumbnail. "Thumbnails" has <hash>.dat files in it. I am sure they are some super secret Esri proprietary image format. PNG is not good enough for us.