Documentation
¶
Overview ¶
Package postgis implements Well Known Binary encoding and decoding. If you are encoding geometries in WKB to send to PostgreSQL/PostGIS, then you must specify binary_parameters=yes in the data source name that you pass to sql.Open.
Index ¶
- Variables
- func Marshal(g geo.Geometry, byteOrder binary.ByteOrder) ([]byte, error)
- func NewEncoder(g geo.Geometry, params ...types.Params) geo.DBEncoder
- func Read(r io.Reader) (geo.Geometry, error)
- func Unmarshal(data []byte) (geo.Geometry, error)
- func Write(w io.Writer, byteOrder binary.ByteOrder, g geo.Geometry) error
- type Encoder
- type HexEncoder
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // XDR is big endian. XDR = wkbcommon.XDR // NDR is little endian. NDR = wkbcommon.NDR )
Functions ¶
func NewEncoder ¶
NewEncoder returns a new encoder
Types ¶
type Encoder ¶
Encoder is the ewkb encoder struct
type HexEncoder ¶
type HexEncoder struct {
Encoder
}
HexEncoder is the ewkbhex encoder struct
func (*HexEncoder) Scan ¶
func (m *HexEncoder) Scan(data interface{}) error
Scan implements the sql.Scanner interface
Click to show internal directories.
Click to hide internal directories.