algorithm for hierarchical geometric edge
