Select to view content in your preferred language

Python: Add Checksum to Graph Elements

307
0
08-15-2017 06:04 AM
Status: Open
deleted-user-F36TjxlqdCoV
Deactivated User

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__()

for instance:

- its attributes ( key - pair )

- its geometry

where OID value would not be considered, since the OID value is always unique.

This would allow to compare two graph elements in two graph layers, for example

if ce.computeChecksum( graphNodeFromLayer1 ) == \
   ce.computeChecksum( graphNodeFromLayer2 ):
    print 'Yikes'