func TestWKBEncode(t *testing.T) { for _, c := range cases { if got, err := wkb.Decode(c.wkb); err != nil || !reflect.DeepEqual(got, c.g) { t.Errorf("wkb.Decode(%#v) == %#v, %#v, want %#v, nil", c.wkb, got, err, c.g) } } }
func Decode(s string) (geom.T, error) { data, err := hex.DecodeString(s) if err != nil { return nil, err } return wkb.Decode(data) }