Documentation
¶
Overview ¶
Package wkt is for decoding Well Known Text (WKT) format specification at https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry#Well-known_binary
Index ¶
- Constants
- func MarshalString(geom space.Geometry) string
- func UnmarshalString(s string) (space.Geometry, error)
- type Lexer
- type Parser
- type Token
- type WKTEncoder
- func (e *WKTEncoder) Decode(s []byte) (space.Geometry, error)
- func (e *WKTEncoder) Encode(g space.Geometry) []byte
- func (e *WKTEncoder) Read(r io.Reader) (space.Geometry, error)
- func (e *WKTEncoder) ReadGeoJSON(r io.Reader) (*geojson.FeatureCollection, error)
- func (e *WKTEncoder) Write(w io.Writer, g space.Geometry) error
- func (e *WKTEncoder) WriteGeoJSON(w io.Writer, g *geojson.FeatureCollection) error
Constants ¶
View Source
const ( // Separator LeftParen tokenType = iota RightParen Comma EqualSign Semicolon // Keyword Empty Z M ZM Srid // Geometry type PointEnum Linestring PolygonEnum Multipoint MultilineString MultiPolygonEnum GeometryCollection // Values Float Int EOF )
const ...
Variables ¶
This section is empty.
Functions ¶
Types ¶
type WKTEncoder ¶
type WKTEncoder struct {
geojson.BaseEncoder
}
func (*WKTEncoder) Decode ¶
func (e *WKTEncoder) Decode(s []byte) (space.Geometry, error)
Decode Returns geometry of that decode string by codeType.
func (*WKTEncoder) Encode ¶
func (e *WKTEncoder) Encode(g space.Geometry) []byte
Encode Returns string of that encode geometry by codeType.
func (*WKTEncoder) ReadGeoJSON ¶
func (e *WKTEncoder) ReadGeoJSON(r io.Reader) (*geojson.FeatureCollection, error)
ReadGeoJSON Returns geometry from reader .
func (*WKTEncoder) WriteGeoJSON ¶
func (e *WKTEncoder) WriteGeoJSON(w io.Writer, g *geojson.FeatureCollection) error
WriteGeoJSON write geometry to writer.
Click to show internal directories.
Click to hide internal directories.