<?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: How to get the geographic transformation programatically in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-the-geographic-transformation/m-p/567702#M15290</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can use the SpatialReferenceEnvironmentClass.&amp;nbsp; Cast it to an ISpatialReferenceFactory and use the "CreateGeographicCoordinateSystem" method.&amp;nbsp; For ex:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ISpatialReferenceFactory spatial_reference_factory = new SpatialReferenceEnvironmentClass();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;int wgs_84 = (int)esriSRGeoCSType.esriSRGeoCS_WGS1984;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IGeographicCoordinateSystem geo = spatial_reference_factory.CreateGeographicCoordinateSystem(wgs_84);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ISpatialReference spatial_reference = geo as ISpatialReference;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// you can set your spatial reference domain / etc... here if you'd like&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;spatial_reference.SetDomain(-180, 180, -90, 90);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then you can use this spatial reference when you call Project.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Jan 2014 19:21:42 GMT</pubDate>
    <dc:creator>JosephArmbruster</dc:creator>
    <dc:date>2014-01-13T19:21:42Z</dc:date>
    <item>
      <title>How to get the geographic transformation programatically</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-the-geographic-transformation/m-p/567701#M15289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I need to project a dataset to a different spatial reference.&amp;nbsp; The input and output spatial references have different datums so I need a geographic transformation.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I use the out of the box GP tool it gives me a list and a default.&amp;nbsp; You can also look at the ArcMap data frame properties and see the default.&amp;nbsp; At 10.1 the transformations presented in the drop-down list on the data frame properties are sorted by suitability for the layer's extent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have also found a python method do to this called ListTransformations.&amp;nbsp; The problem with this is that I'm using C# so it I cannot call a python method directly (at least not that I know of).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anybody know the best way to get the ESRI recommended default transformation using C#?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Jan 2014 17:46:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-the-geographic-transformation/m-p/567701#M15289</guid>
      <dc:creator>LynneBridgford</dc:creator>
      <dc:date>2014-01-10T17:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the geographic transformation programatically</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-the-geographic-transformation/m-p/567702#M15290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can use the SpatialReferenceEnvironmentClass.&amp;nbsp; Cast it to an ISpatialReferenceFactory and use the "CreateGeographicCoordinateSystem" method.&amp;nbsp; For ex:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ISpatialReferenceFactory spatial_reference_factory = new SpatialReferenceEnvironmentClass();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;int wgs_84 = (int)esriSRGeoCSType.esriSRGeoCS_WGS1984;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IGeographicCoordinateSystem geo = spatial_reference_factory.CreateGeographicCoordinateSystem(wgs_84);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;ISpatialReference spatial_reference = geo as ISpatialReference;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// you can set your spatial reference domain / etc... here if you'd like&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;spatial_reference.SetDomain(-180, 180, -90, 90);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then you can use this spatial reference when you call Project.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jan 2014 19:21:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-the-geographic-transformation/m-p/567702#M15290</guid>
      <dc:creator>JosephArmbruster</dc:creator>
      <dc:date>2014-01-13T19:21:42Z</dc:date>
    </item>
  </channel>
</rss>

