functions for parsing geometry