<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Accessing Custom Geographic Transformation in Map Properties in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/accessing-custom-geographic-transformation-in-map/m-p/1646868#M13105</link>
    <description>&lt;P&gt;Glad to help. Happy transforming.&lt;/P&gt;</description>
    <pubDate>Fri, 29 Aug 2025 15:58:51 GMT</pubDate>
    <dc:creator>PeterYurkosky</dc:creator>
    <dc:date>2025-08-29T15:58:51Z</dc:date>
    <item>
      <title>Accessing Custom Geographic Transformation in Map Properties</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/accessing-custom-geographic-transformation-in-map/m-p/1645391#M13099</link>
      <description>&lt;P&gt;Hi there--&lt;/P&gt;&lt;P&gt;In the ArcGIS Pro SDK for 3.4, we are attempting to save a custom geographic transformation to the current Map.&lt;/P&gt;&lt;P&gt;As an example, the transformation that we are using transforms between the European Datum of 1950 to WGS 1984 by using the position vector method with customize parameters.&amp;nbsp; This is the custom WKT that we&amp;nbsp; have for this transformation:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;GEOGTRAN["European Datum (1950) - NW Spain",GEOGCS["GCS_European_1950",DATUM["D_European_1950",SPHEROID["International_1924",6378388.0,297.0]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],METHOD["Position_Vector"],PARAMETER["X_Axis_Translation",-178.4],PARAMETER["Y_Axis_Translation",-83.2],PARAMETER["Z_Axis_Translation",-221.3],PARAMETER["X_Axis_Rotation",0.54],PARAMETER["Y_Axis_Rotation",-0.532],PARAMETER["Z_Axis_Rotation",-0.126],PARAMETER["Scale_Difference",21.2],OPERATIONACCURACY[1.5]]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then we create the Geographic Transformation using the WKT:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;//wkt is equal to the string pasted previously.
GeographicTransformation transform = GeographicTransformation.Create(wkt); &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The WKT used above is valid, as it's able to be used for transforming coordinates using the GeometryEngine, for instance.&lt;/P&gt;&lt;P&gt;When we go to store it in the Map, we do the following:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;await QueuedTask.Run(() =&amp;gt; 
{
    CIMMap mapDef = map.GetDefinition();

    List&amp;lt;CIMDatumTransform&amp;gt; cimDatumTransforms = mapDef.DatumTransforms.ToList();

    //add the previous geographic transformation to the list
    CIMDatumTransform newTransform = new CIMDatumTransform() 
    {
        GeoTransformation = transform,
        Forward = true
    };
    
    cimDatumTransforms.Add(newTransform);
    mapDef.DatumTransforms = cimDatumTransforms;

    map.SetDefinition(mapDef);
});&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The adding of the new transformation occurs without error;&amp;nbsp; if I export the map to a MapX file and open it in a external editor, I can see the custom datum transformation is added to two other transformations generated by Pro for these two datum pairs.&lt;/P&gt;&lt;P&gt;However, when I open the map properties and go to Transformations, then scroll through the list in the combobox, the custom transformation does not show up.&lt;/P&gt;&lt;P&gt;Additionally, we have found that using the Custom Geographic Transformation geoprocessing tool to create the geographic transformation and saving it to a file in %appdata%\ESRI\ArcGISPro\ArcToolbox\CustomTransformations does cause it to be read by the Transformations page and added to the list, as might be expected.&amp;nbsp; However, we would like to avoid this if possible and keep things in memory.&lt;/P&gt;&lt;P&gt;The question then is:&amp;nbsp; Is there a way to add a custom geographic transformation to the map and have it viewable (and selectable) in the map properties' Transformations page without having to use the geoprocessing tool to create a file copy of it?&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Matt Winslett&lt;/P&gt;&lt;P&gt;T-Kartor&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2025 15:14:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/accessing-custom-geographic-transformation-in-map/m-p/1645391#M13099</guid>
      <dc:creator>mwinslett</dc:creator>
      <dc:date>2025-08-27T15:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Custom Geographic Transformation in Map Properties</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/accessing-custom-geographic-transformation-in-map/m-p/1646224#M13100</link>
      <description>&lt;P&gt;Hey Matt, this is Pete from Esri, I'm the developer in that area of the software. Can you paste in a screenshot of the Map Properties dialog when you opened it? I'm trying to understand how the system interpreted your custom transformation.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also: does your data appear to draw correctly, after adding your custom transformation via the SDK? Or is it difficult to tell?&lt;/P&gt;&lt;P&gt;Finally: could you include a copy of your .mapx file? Even if the data links are broken, it may still be useful.&lt;/P&gt;&lt;P&gt;Generally, yes, you need the Create Custom Geographic Transformation tool to create a transformation that will appear in the drop-down of the transformation page.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2025 18:48:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/accessing-custom-geographic-transformation-in-map/m-p/1646224#M13100</guid>
      <dc:creator>PeterYurkosky</dc:creator>
      <dc:date>2025-08-27T18:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Custom Geographic Transformation in Map Properties</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/accessing-custom-geographic-transformation-in-map/m-p/1646667#M13101</link>
      <description>&lt;P&gt;Hi Pete --&lt;/P&gt;&lt;P&gt;Thanks for the information.&amp;nbsp; Here is the screenshot you requested, along with a copy of a .mapx file after the custom transformation is added to the map's definition via the SDK.&amp;nbsp; I had to rename the .mapx file with a .txt extension as .mapx files do not appear to be accepted by the Esri community site.&lt;/P&gt;&lt;P&gt;As near as I can tell, it appears that everything draws correctly in the map document.&amp;nbsp; I haven't noticed any issues with layers being misaligned or anything like that.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2025 21:22:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/accessing-custom-geographic-transformation-in-map/m-p/1646667#M13101</guid>
      <dc:creator>mwinslett</dc:creator>
      <dc:date>2025-08-28T21:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Custom Geographic Transformation in Map Properties</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/accessing-custom-geographic-transformation-in-map/m-p/1646689#M13103</link>
      <description>&lt;P&gt;Hi Matt.&lt;/P&gt;&lt;P&gt;It's tricky to interpret your Transformations page, because it behaves differently when you have live data in your map (like you do) versus when it has broken links (like I do in the .mapx).&lt;/P&gt;&lt;P&gt;But I can tell you about what's in the map, thanks to your .mapx. It has &lt;EM&gt;two&lt;/EM&gt;&amp;nbsp;custom transformations stored in it, and they're both meant to transform&amp;nbsp;between ED50 and WGS84.&amp;nbsp;One is named &lt;STRONG&gt;Test&lt;/STRONG&gt; and the other&amp;nbsp;is named &lt;STRONG&gt;European Datum (1950) - NW Spain&lt;/STRONG&gt;.&amp;nbsp;This is unusual because Pro expects that the map will contain just one transformation for each unique pair of coordinate systems (so, one for ED50 &amp;lt;--&amp;gt; WGS84, one for WGS84 &amp;lt;--&amp;gt; NAD83, and so on).&amp;nbsp;Pro only shows the first unique one it finds (&lt;STRONG&gt;Test&lt;/STRONG&gt;) in the Transformations page, and it discards the other as a duplicate (you may have noticed 4 entries in the .mapx file; that's because we store the transformation once for the "forward" direction and again for the "reverse").&amp;nbsp;I suggest you open the map in the Transformations page, delete everything you see, and then run your code again, and then see what Transformations shows. It should just show you&amp;nbsp;&lt;STRONG&gt;European Datum (1950) - NW Spain&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;More generally: the Transformation page should always&amp;nbsp;&lt;EM&gt;show&lt;/EM&gt; you a custom transformation you're using, but you're right: in order to re-use that transformation in the future, you've got to save it somewhere (using the&amp;nbsp;Custom Geographic Transformation tool).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pete&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2025 22:25:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/accessing-custom-geographic-transformation-in-map/m-p/1646689#M13103</guid>
      <dc:creator>PeterYurkosky</dc:creator>
      <dc:date>2025-08-28T22:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Custom Geographic Transformation in Map Properties</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/accessing-custom-geographic-transformation-in-map/m-p/1646863#M13104</link>
      <description>&lt;P&gt;Thanks Pete!&amp;nbsp; With your feedback and information, I was able to get what we are trying to do to work correctly, without having to write the transformation out to disk.&lt;/P&gt;&lt;P&gt;-- Matt&lt;/P&gt;</description>
      <pubDate>Fri, 29 Aug 2025 15:43:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/accessing-custom-geographic-transformation-in-map/m-p/1646863#M13104</guid>
      <dc:creator>mwinslett</dc:creator>
      <dc:date>2025-08-29T15:43:29Z</dc:date>
    </item>
    <item>
      <title>Re: Accessing Custom Geographic Transformation in Map Properties</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/accessing-custom-geographic-transformation-in-map/m-p/1646868#M13105</link>
      <description>&lt;P&gt;Glad to help. Happy transforming.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Aug 2025 15:58:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/accessing-custom-geographic-transformation-in-map/m-p/1646868#M13105</guid>
      <dc:creator>PeterYurkosky</dc:creator>
      <dc:date>2025-08-29T15:58:51Z</dc:date>
    </item>
  </channel>
</rss>

