geojson

package
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feature

type Feature struct {
	Type       string      `json:"type"`
	Geometry   Geometry    `json:"geometry"`
	Properties interface{} `json:"properties"`
}

func GeometryCollection

func GeometryCollection(geometries []Geometry, properties interface{}) *Feature

func LineString

func LineString(coordinates [][]float64, properties interface{}) *Feature

func MultiLineString

func MultiLineString(coordinates [][][]float64, properties interface{}) *Feature

func MultiPoint

func MultiPoint(coordinates [][]float64, properties interface{}) *Feature

func MultiPolygon

func MultiPolygon(coordinates [][][][]float64, properties interface{}) *Feature

func Point

func Point(coordinates []float64, properties interface{}) *Feature

func Polygon

func Polygon(coordinates [][][]float64, properties interface{}) *Feature

type GeoJSON

type GeoJSON struct {
	Type        geojsontypes.GeoJSONType `json:"type"` // types/geojson_types
	BBox        types.BBox               `json:"bbox"`
	Features    []Feature                `json:"features"`
	Coordinates any                      `json:"coordinates"`
	Geometries  []Geometry               `json:"geometries"`
	Geometry    Geometry                 `json:"geometry"`
	Properties  interface{}              `json:"properties"`
}

func FeatureCollection

func FeatureCollection(features []Feature) *GeoJSON

type Geometry

type Geometry struct {
	Type        geometrytypes.GeometryType `json:"type"` // types/geometry_types
	Coordinates any                        `json:"coordinates"`
	Geometries  []Geometry                 `json:"geometries"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL