Documentation ¶
Overview ¶
Package wkt implements Well Known Text encoding and decoding.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBraceMismatch = errors.New("wkt: brace mismatch")
ErrBraceMismatch is returned when braces do not match.
Functions ¶
func Marshal ¶
func Marshal(g geom.T, applyOptFns ...EncodeOption) (string, error)
Marshal translates a geometry to the corresponding WKT.
Types ¶
type EncodeOption ¶
type EncodeOption func(*Encoder)
EncodeOptions specify options to apply to the encoder.
func EncodeOptionWithMaxDecimalDigits ¶
func EncodeOptionWithMaxDecimalDigits(maxDecimalDigits int) EncodeOption
EncodeWithMaxDecimalDigits sets the maximum decimal digits to encode.
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
Encoder encodes WKT based on specified parameters.
func NewEncoder ¶
func NewEncoder(applyOptFns ...EncodeOption) *Encoder
NewEncoder returns a new encoder with the given options set.
Click to show internal directories.
Click to hide internal directories.