wkb: factor geom type fetching into separate function
wkb: factor geom type fetching into separate function

This includes some doctests to indicate what is expected.

geomet/geomet,larsbutler/geomet,geomet/geomet,larsbutler/geomet