geobuf_raw

package
Version: v0.0.0-...-49798c9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2020 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendAll

func AppendAll(b ...[]byte) []byte

func BoundingBox_GeometryCollection

func BoundingBox_GeometryCollection(gs []*geojson.Geometry) []float64

Returns a BoundingBox for a geometry collection

func BoundingBox_LineStringGeometry

func BoundingBox_LineStringGeometry(line [][]float64) []float64

Returns BoundingBox for a LineString

func BoundingBox_MultiLineStringGeometry

func BoundingBox_MultiLineStringGeometry(multiline [][][]float64) []float64

Returns BoundingBox for a MultiLineString

func BoundingBox_MultiPointGeometry

func BoundingBox_MultiPointGeometry(pts [][]float64) []float64

Returns BoundingBox for a MultiPoint

func BoundingBox_MultiPolygonGeometry

func BoundingBox_MultiPolygonGeometry(multipolygon [][][][]float64) []float64

Returns BoundingBox for a Polygon

func BoundingBox_PointGeometry

func BoundingBox_PointGeometry(pt []float64) []float64

boudning box on a normal point geometry relatively useless

func BoundingBox_Points

func BoundingBox_Points(pts [][]float64) []float64

BoundingBox implementation as per https://tools.ietf.org/html/rfc7946 BoundingBox syntax: "bbox": [west, south, east, north] BoundingBox defaults "bbox": [-180.0, -90.0, 180.0, 90.0]

func BoundingBox_PolygonGeometry

func BoundingBox_PolygonGeometry(polygon [][][]float64) []float64

Returns BoundingBox for a Polygon

func ConvertPt

func ConvertPt(pt []float64) []int64

converts a single pt

func EncodeVarint32

func EncodeVarint32(x uint32) []byte

encodes a var int for 32 bit number

func EncodeVarint_Value

func EncodeVarint_Value(x uint64, typeint int) []byte

encodes are var int value

func Expand_BoundingBoxs

func Expand_BoundingBoxs(bboxs [][]float64) []float64

this functions takes an array of bounding box objects and pushses them all out

func FloatVal32

func FloatVal32(f float32) []byte

writes a float32 into a float value

func FloatVal64

func FloatVal64(f float64) []byte

writes a float64 into a double value

func Get_BoundingBox

func Get_BoundingBox(g *geojson.Geometry) []float64

retrieves a boundingbox for a given geometry

func MakeKeyValue

func MakeKeyValue(key string, value interface{}) []byte

func MakeLine

func MakeLine(line [][]float64) ([]byte, []int64)

makes a line

func MakeLine2

func MakeLine2(line [][]float64) ([]uint64, []int64)

makes a line

func MakeMultiPolygon

func MakeMultiPolygon(multipolygon [][][][]float64) ([]byte, []int64)

creates a multi polygon array

func MakePoint

func MakePoint(pt []float64) []byte

makes a given point

func MakePolygon

func MakePolygon(polygon [][][]float64) ([]byte, []int64)

creates a polygon

func MakePolygon2

func MakePolygon2(polygon [][][]float64) ([]uint64, []int64)

creates a polygon

func Push_Two_BoundingBoxs

func Push_Two_BoundingBoxs(bb1 []float64, bb2 []float64) []float64

func ReadFeature

func ReadFeature(bytevals []byte) *geojson.Feature

reads a feature

func WriteFeature

func WriteFeature(feat *geojson.Feature) []byte

writes a feature

func WritePackedUint64

func WritePackedUint64(geom []uint64) []byte

writes a packed uint32 number this function was benchmarked against several implementations to reduce allocations, i found this one to be the best

func WritePackedUint64_2

func WritePackedUint64_2(geom []uint64) []byte

writes a packed uint32 number this function was benchmarked against several implementations to reduce allocations, i found this one to be the best

func WriteValue

func WriteValue(value interface{}) []byte

writes a value and returns the bytes of such value does not implement write sint currently

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL