Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommandID ¶
type CommandID uint8
CommandID represents the command to be executed.
const ( // MoveTo creates a new point in a point geometry, // or starts a new vertex in a linestring or polygon geometry. MoveTo CommandID = 1 // LineTo extends the current line or ring in a linestring or polygon geometry. LineTo CommandID = 2 // ClosePath closes the current rin in a polygon geometry. ClosePath CommandID = 7 )
type CommandInteger ¶
type CommandInteger uint32
CommandInteger consists of a command ID, and the number of times to execute that command.
func MakeCommandInteger ¶
func MakeCommandInteger(id CommandID, count uint32) (CommandInteger, error)
MakeCommandInteger encodes a CommandInteger from a command ID and count.
func (CommandInteger) Count ¶
func (i CommandInteger) Count() uint32
Count returns the encoded count.
func (CommandInteger) ID ¶
func (i CommandInteger) ID() CommandID
ID returns the encoded command ID.
func (CommandInteger) Validate ¶
func (i CommandInteger) Validate() error
Validate the encoded command integer.
type ParameterInteger ¶
type ParameterInteger uint32
ParameterInteger are encoded integers that represent coordinates as arguments to MoveTo and LineTo commands.
func MakeParameterInteger ¶
func MakeParameterInteger(value int32) (ParameterInteger, error)
MakeParameterInteger encodes a ParameterInteger from an integer.
func (ParameterInteger) Validate ¶
func (i ParameterInteger) Validate() error
Validate the encoded parameter integer.
func (ParameterInteger) Value ¶
func (i ParameterInteger) Value() int32
Value returns the encoded integer.
type RawShape ¶
type RawShape []uint32
RawShape is a raw encoded geometry.
func (RawShape) MarshalJSON ¶
MarshalJSON returns the JSON encoding of s.
func (RawShape) Type ¶
func (s RawShape) Type() geojson.GeometryType
Type returns the geometry type.
func (*RawShape) UnmarshalJSON ¶
UnmarshalJSON sets s to the JSON decoding of of s.