Fix encoding of geometry type