For completeness, this contains the same content of the C# script, also translated into Python.
collectgeo.gh (10.5 KB)