EncodeGeoAscending encodes a geopb.SpatialObject value in ascending 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)
| 1353 | // returns the new buffer. |
| 1354 | // It is sorted by the given curve index, followed by the bytes of the spatial object. |
| 1355 | func EncodeGeoAscending(b []byte, curveIndex uint64, so *geopb.SpatialObject) ([]byte, error) { |
| 1356 | b = append(b, geoMarker) |
| 1357 | b = EncodeUint64Ascending(b, curveIndex) |
| 1358 | |
| 1359 | data, err := protoutil.Marshal(so) |
| 1360 | if err != nil { |
| 1361 | return nil, err |
| 1362 | } |
| 1363 | b = encodeBytesAscendingWithTerminator(b, data, ascendingGeoEscapes.escapedTerm) |
| 1364 | return b, nil |
| 1365 | } |
| 1366 | |
| 1367 | // EncodeGeoDescending encodes a geopb.SpatialObject value in descending order and |
| 1368 | // returns the new buffer. |
nothing calls this directly
no test coverage detected
searching dependent graphs…