Implemented geometric types

Including binary encoding

Fixes #437