<?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 Questions regarding the difference between reading a geometry and writing a geometry? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/questions-regarding-the-difference-between-reading/m-p/1240575#M66254</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have some questions regarding geometries in python. I am currently working on a script to read/write the geometry of one feature class and analyzing the &lt;EM&gt;contains&amp;nbsp;&lt;/EM&gt;method to determine if the center of a line is contained by the input polygon geometry. A question that I have is, what is the difference between making a new geometry object vs reading and utilizing the existing geometry object?&lt;/P&gt;&lt;P&gt;Ex: ['SHAPE@'] field to read the geometry vs&amp;nbsp;Polygon (inputs, {spatial_reference}, {has_z}, {has_m}) to make a new geometry object.&lt;/P&gt;&lt;P&gt;The other question is can this be utilized with the&amp;nbsp;&lt;EM&gt;contains&lt;/EM&gt; method or will I need to create a whole new object in order to do so?&lt;/P&gt;&lt;P&gt;Any help on this would be greatly appreciated.&lt;/P&gt;</description>
    <pubDate>Tue, 13 Dec 2022 14:06:51 GMT</pubDate>
    <dc:creator>RPGIS</dc:creator>
    <dc:date>2022-12-13T14:06:51Z</dc:date>
    <item>
      <title>Questions regarding the difference between reading a geometry and writing a geometry?</title>
      <link>https://community.esri.com/t5/python-questions/questions-regarding-the-difference-between-reading/m-p/1240575#M66254</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have some questions regarding geometries in python. I am currently working on a script to read/write the geometry of one feature class and analyzing the &lt;EM&gt;contains&amp;nbsp;&lt;/EM&gt;method to determine if the center of a line is contained by the input polygon geometry. A question that I have is, what is the difference between making a new geometry object vs reading and utilizing the existing geometry object?&lt;/P&gt;&lt;P&gt;Ex: ['SHAPE@'] field to read the geometry vs&amp;nbsp;Polygon (inputs, {spatial_reference}, {has_z}, {has_m}) to make a new geometry object.&lt;/P&gt;&lt;P&gt;The other question is can this be utilized with the&amp;nbsp;&lt;EM&gt;contains&lt;/EM&gt; method or will I need to create a whole new object in order to do so?&lt;/P&gt;&lt;P&gt;Any help on this would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 14:06:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/questions-regarding-the-difference-between-reading/m-p/1240575#M66254</guid>
      <dc:creator>RPGIS</dc:creator>
      <dc:date>2022-12-13T14:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: Questions regarding the difference between reading a geometry and writing a geometry?</title>
      <link>https://community.esri.com/t5/python-questions/questions-regarding-the-difference-between-reading/m-p/1240592#M66255</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;what is the difference between making a new geometry object vs reading and utilizing the existing geometry object?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;There is no difference. Reading the SHAPE@ token returns a geometry object, same as when you create it on your own.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;extracted_geometry = [row[0] for row in arcpy.da.SearchCursor("TestPoints", ["SHAPE@"])][0]
created_geometry = arcpy.PointGeometry(arcpy.Point(523433, 5848821), arcpy.SpatialReference(25832))

extracted_geometry
#&amp;lt;PointGeometry object at ...&amp;gt;
created_geometry
#&amp;lt;PointGeometry object at ...&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;can this be utilized with the&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;contains&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;method or will I need to create a whole new object in order to do so?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;EM&gt;contains()&lt;/EM&gt; is a method of the Geometry classes, so you can call it on the extracted geometries without problem.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Dec 2022 14:47:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/questions-regarding-the-difference-between-reading/m-p/1240592#M66255</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2022-12-13T14:47:12Z</dc:date>
    </item>
  </channel>
</rss>

