MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / DecodeUntaggedBox2DValue

Function DecodeUntaggedBox2DValue

pkg/util/encoding/encoding.go:3034–3055  ·  view source on GitHub ↗

DecodeUntaggedBox2DValue decodes a value encoded by EncodeUntaggedBox2DValue.

(b []byte)

Source from the content-addressed store, hash-verified

3032
3033// DecodeUntaggedBox2DValue decodes a value encoded by EncodeUntaggedBox2DValue.
3034func DecodeUntaggedBox2DValue(b []byte) (remaining []byte, box geopb.BoundingBox, err error) {
3035 box = geopb.BoundingBox{}
3036 remaining = b
3037
3038 remaining, box.LoX, err = DecodeFloatAscending(remaining)
3039 if err != nil {
3040 return b, box, err
3041 }
3042 remaining, box.HiX, err = DecodeFloatAscending(remaining)
3043 if err != nil {
3044 return b, box, err
3045 }
3046 remaining, box.LoY, err = DecodeFloatAscending(remaining)
3047 if err != nil {
3048 return b, box, err
3049 }
3050 remaining, box.HiY, err = DecodeFloatAscending(remaining)
3051 if err != nil {
3052 return b, box, err
3053 }
3054 return remaining, box, err
3055}
3056
3057// DecodeUntaggedGeoValue decodes a value encoded by EncodeUntaggedGeoValue into
3058// the provided geopb.SpatialObject reference. The so parameter must already be

Callers

nothing calls this directly

Calls 1

DecodeFloatAscendingFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…