geojson

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 6 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 {
	ID         interface{}            `json:"id,omitempty"`
	Type       string                 `json:"type"`
	Geometry   *Geometry              `json:"geometry"`
	Properties map[string]interface{} `json:"properties"`
	CRS        map[string]interface{} `json:"crs,omitempty"`
}

func (*Feature) MarshalJSON

func (f *Feature) MarshalJSON() ([]byte, error)

func (Feature) MarshalText

func (f Feature) MarshalText() ([]byte, error)

func (*Feature) UnmarshalText

func (f *Feature) UnmarshalText(data []byte) error

type FeatureCollection

type FeatureCollection struct {
	Type     string                 `json:"type"`
	Features []*Feature             `json:"features"`
	CRS      map[string]interface{} `json:"crs,omitempty"`
	// contains filtered or unexported fields
}

func NewFeatureCollection

func NewFeatureCollection() *FeatureCollection

New FeatureCollection

func (*FeatureCollection) AddMapTileFeature

func (fc *FeatureCollection) AddMapTileFeature(features ...maptile.Feature) *FeatureCollection

func (*FeatureCollection) MarshalJSON

func (fc *FeatureCollection) MarshalJSON() ([]byte, error)

MarshalJSON

func (FeatureCollection) MarshalText

func (fc FeatureCollection) MarshalText() ([]byte, error)

func (*FeatureCollection) SetCoordsTransform

func (fc *FeatureCollection) SetCoordsTransform(coordsTransform *coordstransform.CoordsTransform)

func (*FeatureCollection) ToJSON

func (fc *FeatureCollection) ToJSON() ([]byte, error)

func (*FeatureCollection) UnmarshalText

func (fc *FeatureCollection) UnmarshalText(data []byte) error

type Geometry

type Geometry struct {
	Type            string `json:"type"`
	Point           *geography.Point
	MultiPoint      *geography.MultiPoint
	LineString      *geography.LineString
	MultiLineString *geography.MultiLineString
	Polygon         *geography.Polygon
	MultiPolygon    *geography.MultiPolygon
	Geometries      []*Geometry
	CRS             map[string]interface{} `json:"crs,omitempty"`
}

几何体关联对象

func (*Geometry) IsCollection

func (g *Geometry) IsCollection() bool

func (*Geometry) IsLineString

func (g *Geometry) IsLineString() bool

func (*Geometry) IsMultiLineString

func (g *Geometry) IsMultiLineString() bool

func (*Geometry) IsMultiPoint

func (g *Geometry) IsMultiPoint() bool

func (*Geometry) IsMultiPolygon

func (g *Geometry) IsMultiPolygon() bool

func (*Geometry) IsPoint

func (g *Geometry) IsPoint() bool

func (*Geometry) IsPolygon

func (g *Geometry) IsPolygon() bool

func (*Geometry) MarshalJSON

func (g *Geometry) MarshalJSON() ([]byte, error)

func (Geometry) MarshalText

func (g Geometry) MarshalText() ([]byte, error)

func (*Geometry) UnmarshalJSON

func (g *Geometry) UnmarshalJSON(data []byte) error

func (*Geometry) UnmarshalText

func (g *Geometry) UnmarshalText(data []byte) error

Jump to

Keyboard shortcuts

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