<?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>idea Python: Add Checksum to Graph Elements in ArcGIS CityEngine Ideas</title>
    <link>https://community.esri.com/t5/arcgis-cityengine-ideas/python-add-checksum-to-graph-elements/idi-p/945406</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The concept of a checksum is based on object's property and would be returned as string, is same way python does it with hash(object) or class.__hash__()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for instance:&lt;/P&gt;&lt;P&gt;- its attributes ( key - pair )&lt;/P&gt;&lt;P&gt;- its geometry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where OID value would not be considered, since the OID value is always unique.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would allow to compare two graph elements in two graph layers, for example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; ce&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;computeChecksum&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; graphNodeFromLayer1 &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; \
&amp;nbsp;&amp;nbsp; ce&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;computeChecksum&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; graphNodeFromLayer2 &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Yikes'&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 11:53:51 GMT</pubDate>
    <dc:creator>deleted-user-F36TjxlqdCoV</dc:creator>
    <dc:date>2021-12-12T11:53:51Z</dc:date>
    <item>
      <title>Python: Add Checksum to Graph Elements</title>
      <link>https://community.esri.com/t5/arcgis-cityengine-ideas/python-add-checksum-to-graph-elements/idi-p/945406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The concept of a checksum is based on object's property and would be returned as string, is same way python does it with hash(object) or class.__hash__()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for instance:&lt;/P&gt;&lt;P&gt;- its attributes ( key - pair )&lt;/P&gt;&lt;P&gt;- its geometry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where OID value would not be considered, since the OID value is always unique.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would allow to compare two graph elements in two graph layers, for example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; ce&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;computeChecksum&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; graphNodeFromLayer1 &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; \
&amp;nbsp;&amp;nbsp; ce&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;computeChecksum&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; graphNodeFromLayer2 &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Yikes'&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 11:53:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-cityengine-ideas/python-add-checksum-to-graph-elements/idi-p/945406</guid>
      <dc:creator>deleted-user-F36TjxlqdCoV</dc:creator>
      <dc:date>2021-12-12T11:53:51Z</dc:date>
    </item>
  </channel>
</rss>

