Simplified code of non interleaved spatial query in LevelDB backend.

This commit is contained in:
Sascha L. Teichmann
2014-09-01 18:39:42 +02:00
parent 77a35e7096
commit c096b8bbf1
2 changed files with 13 additions and 13 deletions

View File

@ -80,9 +80,13 @@ func DecodeStringFromBytes(key []byte) (pos int64, err error) {
return strconv.ParseInt(string(key), 10, 64)
}
func StringToBytes(key int64) []byte {
return []byte(strconv.FormatInt(key, 10))
}
// Encode a block pos to byte slice.
func EncodeStringToBytes(key int64) ([]byte, error) {
return []byte(strconv.FormatInt(key, 10)), nil
return StringToBytes(key), nil
}
func ToBigEndian(key int64) []byte {