Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CRS ¶
type CRS struct { Type string `json:"type"` Properties CRSProperties `json:"properties"` }
CRS describes a coordinate reference system according to the GeoJSON format specification
type CRSProperties ¶
type CRSProperties struct { Name string `json:"name,omitempty"` Href string `json:"href,omitempty"` Type string `json:"type,omitempty"` }
CRSProperties are coordinate reference system properties according to the GeoJSON format specification
type Feature ¶
Feature represents a geographical feature
func LoadGeoJSONFeature ¶
LoadGeoJSONFeature parses an array of bytes conforming to a GeoJSON feature to a Feature
type FeatureCollection ¶
FeatureCollection represents a collection of geographical features and accompanying information
func LoadGeoJSON ¶
func LoadGeoJSON(input []byte) (FeatureCollection, error)
LoadGeoJSON parses an array of bytes conforming to the GeoJSON format to a FeatureCollection
func NewFeatureCollection ¶
func NewFeatureCollection() FeatureCollection
NewFeatureCollection returns a new blank FeatureCollection with an instantiated feature array
func ReadShapefile ¶
func ReadShapefile(shapeFile string) (FeatureCollection, error)
ReadShapefile reads a shapefile (and accompanying dBASE-table, if any) into a FeatureCollection
func (*FeatureCollection) AddFeature ¶
func (fc *FeatureCollection) AddFeature(f Feature)
AddFeature adds a feature to a FeatureCollection
func (*FeatureCollection) ToGeoJSON ¶
func (fc *FeatureCollection) ToGeoJSON() ([]byte, error)
ToGeoJSON exports a FeatureCollection to a byte array containing JSON conforming to the GeoJSON format
func (*FeatureCollection) ToGeoJSONFeatureArray ¶
func (fc *FeatureCollection) ToGeoJSONFeatureArray() ([]byte, error)
ToGeoJSONFeatureArray exports a FeatureCollection to a byte array conforming to the GeoJSON format but discards everything except the feature array
func (*FeatureCollection) ToPrettyGeoJSON ¶
func (fc *FeatureCollection) ToPrettyGeoJSON() ([]byte, error)
ToPrettyGeoJSON exports a FeatureCollection to a byte array containing indented JSON conforming to the GeoJSON format
func (*FeatureCollection) ToWKT ¶
func (fc *FeatureCollection) ToWKT() (string, error)
ToWKT writes a WKT string representing a FeatureCollection
type GeoFormatError ¶
type GeoFormatError struct {
Msg string
}
GeoFormatError describes an error involving badly formatted geographical information
func (GeoFormatError) Error ¶
func (g GeoFormatError) Error() string
type GeoTypeError ¶
type GeoTypeError struct {
Type string
}
GeoTypeError describes an error involving an unsupported geographical type
func (GeoTypeError) Error ¶
func (g GeoTypeError) Error() string
type LineString ¶
type LineString []Point
LineString describes a collection of points which together form a line
type Polygon ¶
type Polygon []MultiPoint
Polygon describes a collection of point collections which together form a polygon