Is there any way to modify a map's coordinate system in ArcGIS Pro using Python?
Define Projection or the Project tool are your options ... what are you looking to modify?
If by "map" you mean MapFrame, at ArcGIS Pro 1.3 there is no spatialReference method like there is for a DataFrame in ArcMap. If you mean Map by "map," same issue, no method to access spatial reference. Time to submit an enhancement request and ArcGIS Idea....
My guess is you know you can already manually make the change
Specify a coordinate system—Properties of maps | ArcGIS for Desktop
(I think if you have a default basemap with a different spatial reference, that will also change to the basemaps spatial reference as default....one way to change it)
as Dan asked, what are you looking to modify? And to add, are you trying to do this once, or on-the-fly. Remember that all your layers may need to be reprojected on the fly as well.
some links to look at
Output Coordinate System (Environment setting)—Geoprocessing | ArcGIS for Desktop
Using the spatial reference class—ArcPy Get Started | ArcGIS for Desktop
SpatialReference—ArcPy Classes | ArcGIS for Desktop
Rebecca Strauch, GISP & Dan Patterson, sorry I meant change the spatial reference for either an arcpy.mp.Map or arcpy.mp.MapFrame.
According to Joshua Bixby, looks like it's not possible. If that's true, that's a shame. It will be hard to come up with a Python-based workaround for that limitation.
add an empty data frame, add a layer in the coordinate system you want... the dataframe coordinate system is now set... add/copy your other layers over and remove the 'seed' layer... done... depends how hard you need to have it done
Pro doesn't have data frames. Do you mean a Map? The only way I see to programmatically create a new map is to call the arcpy.mp.ArcGISProject.importDocument() function. However, that would require you to have an mxd pre-authored for any coordinate system the user might want to change to. Then you'd still have to copy over all the existing layers into the new map. Also, if the map had already been used in a MapFrame in a Layout, then you'd really run into some issues...
Unlike most ArcPy modules, ArcPy Mapping (arcpy.mp) had to be rewritten from the ground up since the UI and structure of ArcGIS Pro is completely different than ArcMap. They will be playing catch up for quite some time, which is why it is important for people to open enhancement requests and create ArcGIS Ideas. There is a lot to port over from ArcMap to ArcGIS Pro, and without user feedback, Esri is left to either do what is easiest first or guess at what users want.
OK, vote me up!Allow arcpy.mp to modify spatial reference property of Map/MapFrame
Done. It looked like I was the first vote. Can you vote for your own idea?
Retrieving data ...