Geometry in shape decomposition, feature detection, matching, retrieval, clustering, and nearest neighbor search