<?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: Data shift when returning data from FeatureLayer query in a different spatial reference in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/data-shift-when-returning-data-from-featurelayer/m-p/1200498#M7613</link>
    <description>&lt;P&gt;Correct, even when specifying a&amp;nbsp;&lt;SPAN&gt;datum_transformation such as WKID 108190 (WGS_1984_(ITRF00)_To_NAD_1983) the data is still offset.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;FeatureLayer(url).query(out_sr=3734, datum_transformation=108190, return_true_curves=True).save(fgdb, 'data_fc1')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The default is "None" for the datum_transformation but I believe when using FeatureLayer().query() and a transformation is not specified, the best transformation is selected by the system even when set to None. However,&amp;nbsp;FeatureClassToFeatureClass, when the transformation is set to None, does not apply one or applies a different one.&amp;nbsp; &amp;nbsp;Hence the difference between the two code block results.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Aug 2022 17:47:13 GMT</pubDate>
    <dc:creator>LanceCole</dc:creator>
    <dc:date>2022-08-08T17:47:13Z</dc:date>
    <item>
      <title>Data shift when returning data from FeatureLayer query in a different spatial reference</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/data-shift-when-returning-data-from-featurelayer/m-p/1200327#M7611</link>
      <description>&lt;P&gt;Good Morning All,&lt;/P&gt;&lt;P&gt;I am updating a few backend scripts to ArcGIS Pro 3.0, and I am having an issue with a slight data shift in returned data from a third-party map service when requesting data to be returned in a different spatial reference. I believe the data is hosted on a 10.6 server using the WKID: 3857 (WGS 1984 Web Mercator). When I run the following code, I get back a feature class reprojected to WKID: 3734 (NAD 1983 StatePlane Ohio North (US Feet)), but there is a slight shift in the data - blue lines.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;FeatureLayer(url).query(out_sr=3734, datum_transformation=None, return_true_curves=True).save(fgdb, 'data_fc1')&lt;/LI-CODE&gt;&lt;P&gt;I experimented with omitting the datum_transformation parameter and also using many of the common WKID geographic transformation values between 3857 and 3734, but the data does not appear to shift at all. It is always down and to the right slightly.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LanceCole_0-1659958023634.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/48017iF63460A10BE5BAD1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LanceCole_0-1659958023634.png" alt="LanceCole_0-1659958023634.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, if I save the data in memory using the source coordinate system and then save the data to the local GDB using FeatureClass to FeatreClass or a similar tool, as shown in the code below, the data is returned correctly.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;outSR = arcpy.SpatialReference(3734) 
FeatureLayer(url).query(return_true_curves=True).save('in_memory', 'temp')
with arcpy.EnvManager(outputCoordinateSystem=outSR, geographicTransformations=None):
    arcpy.conversion.FeatureClassToFeatureClass(r'in_memory/temp', fgdb, 'data_fc2')&lt;/LI-CODE&gt;&lt;P&gt;Any ideas why the first code block does not work correctly?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 12:01:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/data-shift-when-returning-data-from-featurelayer/m-p/1200327#M7611</guid>
      <dc:creator>LanceCole</dc:creator>
      <dc:date>2022-08-08T12:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: Data shift when returning data from FeatureLayer query in a different spatial reference</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/data-shift-when-returning-data-from-featurelayer/m-p/1200467#M7612</link>
      <description>&lt;P&gt;In your first code block, you have datum_transformation=None.&lt;/P&gt;&lt;P&gt;Are you saying that you tried a transformation value here and it still didn't work?&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 16:47:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/data-shift-when-returning-data-from-featurelayer/m-p/1200467#M7612</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2022-08-08T16:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: Data shift when returning data from FeatureLayer query in a different spatial reference</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/data-shift-when-returning-data-from-featurelayer/m-p/1200498#M7613</link>
      <description>&lt;P&gt;Correct, even when specifying a&amp;nbsp;&lt;SPAN&gt;datum_transformation such as WKID 108190 (WGS_1984_(ITRF00)_To_NAD_1983) the data is still offset.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;FeatureLayer(url).query(out_sr=3734, datum_transformation=108190, return_true_curves=True).save(fgdb, 'data_fc1')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The default is "None" for the datum_transformation but I believe when using FeatureLayer().query() and a transformation is not specified, the best transformation is selected by the system even when set to None. However,&amp;nbsp;FeatureClassToFeatureClass, when the transformation is set to None, does not apply one or applies a different one.&amp;nbsp; &amp;nbsp;Hence the difference between the two code block results.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 17:47:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/data-shift-when-returning-data-from-featurelayer/m-p/1200498#M7613</guid>
      <dc:creator>LanceCole</dc:creator>
      <dc:date>2022-08-08T17:47:13Z</dc:date>
    </item>
  </channel>
</rss>

