EncodeGeoDescending encodes a geopb.SpatialObject value in descending order and returns the new buffer. It is sorted by the given curve index, followed by the bytes of the spatial object.
(b []byte, curveIndex uint64, so *geopb.SpatialObject)
| 1368 | // returns the new buffer. |
| 1369 | // It is sorted by the given curve index, followed by the bytes of the spatial object. |
| 1370 | func EncodeGeoDescending(b []byte, curveIndex uint64, so *geopb.SpatialObject) ([]byte, error) { |
| 1371 | b = append(b, geoDescMarker) |
| 1372 | b = EncodeUint64Descending(b, curveIndex) |
| 1373 | |
| 1374 | data, err := protoutil.Marshal(so) |
| 1375 | if err != nil { |
| 1376 | return nil, err |
| 1377 | } |
| 1378 | n := len(b) |
| 1379 | b = encodeBytesAscendingWithTerminator(b, data, ascendingGeoEscapes.escapedTerm) |
| 1380 | onesComplement(b[n:]) |
| 1381 | return b, nil |
| 1382 | } |
| 1383 | |
| 1384 | // DecodeGeoAscending decodes a geopb.SpatialObject value that was encoded |
| 1385 | // in ascending order back into a geopb.SpatialObject. The so parameter |
nothing calls this directly
no test coverage detected
searching dependent graphs…