Documentation ¶
Overview ¶
Package geojson implements GeoJSON encoding and decoding.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultLayout = geom.XY
DefaultLayout is the default layout for empty geometries. FIXME This should be Codec-specific, not global
Functions ¶
Types ¶
type ErrDimensionalityTooLow ¶
type ErrDimensionalityTooLow int
ErrDimensionalityTooLow is returned when the dimensionality is too low.
func (ErrDimensionalityTooLow) Error ¶
func (e ErrDimensionalityTooLow) Error() string
type ErrUnsupportedType ¶
type ErrUnsupportedType string
ErrUnsupportedType is returned when the type is unsupported.
func (ErrUnsupportedType) Error ¶
func (e ErrUnsupportedType) Error() string
type Feature ¶
A Feature is a GeoJSON Feature.
func (*Feature) MarshalJSON ¶
MarshalJSON implements json.Marshaler.MarshalJSON.
func (*Feature) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.UnmarshalJSON.
type FeatureCollection ¶
type FeatureCollection struct {
Features []*Feature
}
A FeatureCollection is a GeoJSON FeatureCollection.
func (*FeatureCollection) MarshalJSON ¶
func (fc *FeatureCollection) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.MarshalJSON.
type Geometry ¶
type Geometry struct { Type string `json:"type"` Coordinates *json.RawMessage `json:"coordinates"` }
A Geometry is a geometry in GeoJSON format.
Click to show internal directories.
Click to hide internal directories.