<?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 choose between data frame coordinate or data source coordianate to calculate geometry? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161410#M12338</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Me too I did not test the code. But it is like this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Jul 2015 20:21:27 GMT</pubDate>
    <dc:creator>SaidAkif</dc:creator>
    <dc:date>2015-07-13T20:21:27Z</dc:date>
    <item>
      <title>How to choose between data frame coordinate or data source coordianate to calculate geometry?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161404#M12332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looked on the web for a way to calculate geometry ("shape.area@hectares!") with an easy way to choose between the data frame coordinate or data source coordiane to complete this thast with arcpy (python). Unfortunatly, I fourd something related to the use or the sursor (updateCursor).&lt;/P&gt;&lt;P&gt;is there an easy way to do so?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 18:54:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161404#M12332</guid>
      <dc:creator>SaidAkif</dc:creator>
      <dc:date>2015-07-13T18:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to choose between data frame coordinate or data source coordianate to calculate geometry?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161405#M12333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Unfortunatly, I fourd something related to the use or the sursor (updateCursor).&lt;/P&gt;&lt;P style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;is there an easy way to do so?&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This is confusing. Did you find a solution using updateCursor that is too complicated and you're looking for a simpler solution? If so, post a link to the complicated solution, or better yet, the code itself. If not, please explain further what you are looking for.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 19:55:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161405#M12333</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-07-13T19:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to choose between data frame coordinate or data source coordianate to calculate geometry?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161406#M12334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking for an alternative way to do it, more efficient or a way that I don't know&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 20:02:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161406#M12334</guid>
      <dc:creator>SaidAkif</dc:creator>
      <dc:date>2015-07-13T20:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to choose between data frame coordinate or data source coordianate to calculate geometry?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161407#M12335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please post what you found so we have a starting point.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: I will assume you are looking for a way to use the field calculator (or Calculate Field tool) rather than learning how to use an Update Cursor. I'm guessing the reason Update Cursor works while field calculator does not, is that the field uses the CRS of the layer, while you can specify the CRS of an Update Cursor. I can't say whether simply specifying a different CRS in the Update Cursor will actually yield correct results, but you are free to change it nonetheless.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 20:04:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161407#M12335</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-07-13T20:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to choose between data frame coordinate or data source coordianate to calculate geometry?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161408#M12336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've not tested this code but are you talking about something like below?&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd)[0]
dfsr = df.spatialReference
for row in arcpy.da.UpdateCursor(fc, ["SHAPE@XY","Xfield","Yfield"],"",dfsr):
&amp;nbsp;&amp;nbsp;&amp;nbsp; row[1],row[2] = row[0]
&amp;nbsp;&amp;nbsp;&amp;nbsp; updateRow(row)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 08:28:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161408#M12336</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2021-12-11T08:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to choose between data frame coordinate or data source coordianate to calculate geometry?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161409#M12337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I just past rapidly when I see not easy (efficient procedure)&lt;/P&gt;&lt;P&gt;http//:gis.stackexchange.com/questions/73170&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 20:16:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161409#M12337</guid>
      <dc:creator>SaidAkif</dc:creator>
      <dc:date>2015-07-13T20:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to choose between data frame coordinate or data source coordianate to calculate geometry?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161410#M12338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Me too I did not test the code. But it is like this&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 20:21:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161410#M12338</guid>
      <dc:creator>SaidAkif</dc:creator>
      <dc:date>2015-07-13T20:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to choose between data frame coordinate or data source coordianate to calculate geometry?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161411#M12339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry but I dont know why i can't copy/paste here&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 20:22:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161411#M12339</guid>
      <dc:creator>SaidAkif</dc:creator>
      <dc:date>2015-07-13T20:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to choose between data frame coordinate or data source coordianate to calculate geometry?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161412#M12340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could use the tool "&lt;EM&gt;Add Geometry Attributes (Data Management)&lt;/EM&gt;", this will add a new field of the property (e.g. AREA or AREA_GEODESIC) to your featureclass: &lt;A href="http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/add-geometry-attributes.htm" title="http://desktop.arcgis.com/en/desktop/latest/tools/data-management-toolbox/add-geometry-attributes.htm"&gt;Add Geometry Attributes—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;arcpy.AddGeometryAttributes_management (Input_Features, Geometry_Properties, {Length_Unit}, {Area_Unit}, {Coordinate_System})&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see you can provide the coordinate system as parameter.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 02:42:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161412#M12340</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2015-07-14T02:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to choose between data frame coordinate or data source coordianate to calculate geometry?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161413#M12341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe this tool is available just in 10.2 and I use 10.1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 12:30:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161413#M12341</guid>
      <dc:creator>SaidAkif</dc:creator>
      <dc:date>2015-07-14T12:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to choose between data frame coordinate or data source coordianate to calculate geometry?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161414#M12342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right click the field you want to calculate choose "Calculate Geometry" you'll find the choices your looking for there. The field must be Type "Double"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 13:11:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161414#M12342</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2015-07-14T13:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to choose between data frame coordinate or data source coordianate to calculate geometry?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161415#M12343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks but I want to do exactly what you described in Python&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 13:16:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161415#M12343</guid>
      <dc:creator>SaidAkif</dc:creator>
      <dc:date>2015-07-14T13:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to choose between data frame coordinate or data source coordianate to calculate geometry?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161416#M12344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you want to do it in python or do you want the tool that does it? &lt;/P&gt;&lt;P&gt;If you want to do it in python use the code above as a starting point pluck out some sample data and work through it.&lt;/P&gt;&lt;P&gt;If it's the tool follow the instructions above and you'll find it to be very easy. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 13:53:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161416#M12344</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2015-07-14T13:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to choose between data frame coordinate or data source coordianate to calculate geometry?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161417#M12345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may also be interested in this tool &lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//001700000191000000&amp;quot;" title="http://resources.arcgis.com/en/help/main/10.2/index.html#//001700000191000000&amp;quot;"&gt;ArcGIS Help (10.2, 10.2.1, and 10.2.2)&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 14:01:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161417#M12345</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2015-07-14T14:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to choose between data frame coordinate or data source coordianate to calculate geometry?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161418#M12346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;True, this tool was introduced at 10.2 and is not available in 10.1.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is exactly the reason that you are asking for a python script?&amp;nbsp; If it is just a single time you have to apply this, there is no need to script it and with a few clicks you can get the result. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it something that you have to do repetitively (on multiple featureclasses)?&lt;/P&gt;&lt;P&gt;Do you want to create a tool and offer the functionality to other users? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is possible to create a tool and/or to create a script that loops through multiple datasets, but knowing a little more of what you are after, helps to define what option is best for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 17:25:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161418#M12346</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2015-07-14T17:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to choose between data frame coordinate or data source coordianate to calculate geometry?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161419#M12347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is for processing several feature calsses at a time. But the real reason is some time you want to process mutilple feature calsses that have different characteristics as projection. instead of reprojecting and calculating areas for example you have just to base your calculation on the data frame projection which is easier (time and memory reducing)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 17:41:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161419#M12347</guid>
      <dc:creator>SaidAkif</dc:creator>
      <dc:date>2015-07-14T17:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to choose between data frame coordinate or data source coordianate to calculate geometry?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161420#M12348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From a user's perspective, I can imagine that this can be easier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a catch though. If the data has a different projection then the dataframe and no transformation is defined the on-the-fly projection might not be so accurate and will cause errors in the area calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I did a little test:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;myAREA1: Calculate Geometry using the coordinate system of the dataframe (Web Mercator Aux Sphere) while the source data is in GCS_MAGNA and no geographic transformation defined (very bad!)&lt;/LI&gt;&lt;LI&gt;myAREA2: Calculate Geometry using the coordinate system of the dataframe (Web Mercator Aux Sphere) while the source data is in GCS_MAGNA and the geographic transformation defined (less bad)&lt;/LI&gt;&lt;LI&gt;myAREA3: Calculate Geometry after projecting the data to Web Mercator Aux Sphere using a transformation (correct)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/117288_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;Although the differences in area (ha) are small, they are all different. Maybe a tool that would project in memory to the output sr (using the transformation defined in the dataframe) and calculate the area and then link it back to the input featureclass would be an option...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 18:16:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161420#M12348</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2015-07-14T18:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to choose between data frame coordinate or data source coordianate to calculate geometry?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161421#M12349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;That is interesting and the option 2 will wor for me&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 13:14:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-choose-between-data-frame-coordinate-or/m-p/161421#M12349</guid>
      <dc:creator>SaidAkif</dc:creator>
      <dc:date>2015-07-16T13:14:39Z</dc:date>
    </item>
  </channel>
</rss>

