Defined generic geometry data structure and using it