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

Function SpatialObjectToWKBHex

pkg/geo/encode.go:159–166  ·  view source on GitHub ↗

SpatialObjectToWKBHex transforms a given SpatialObject to WKBHex.

(so geopb.SpatialObject)

Source from the content-addressed store, hash-verified

157
158// SpatialObjectToWKBHex transforms a given SpatialObject to WKBHex.
159func SpatialObjectToWKBHex(so geopb.SpatialObject) (string, error) {
160 t, err := ewkb.Unmarshal([]byte(so.EWKB))
161 if err != nil {
162 return "", err
163 }
164 ret, err := wkbhex.Encode(t, DefaultEWKBEncodingFormat, wkbcommon.WKBOptionEmptyPointHandling(wkbcommon.EmptyPointHandlingNaN))
165 return strings.ToUpper(ret), err
166}
167
168// SpatialObjectToKML transforms a given SpatialObject to KML.
169func SpatialObjectToKML(so geopb.SpatialObject) (string, error) {

Callers

nothing calls this directly

Calls 2

UnmarshalMethod · 0.65
EncodeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…