geojson

package
v0.0.3-beta Latest Latest
Warning

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

Go to latest
Published: May 4, 2022 License: MIT Imports: 9 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 {
	// contains filtered or unexported fields
}

func NewFeature

func NewFeature(id int, properties map[string]interface{}, geometry *Geometry) *Feature

func (*Feature) MarshalJSON

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

json marshaling for struct Feature

type FeatureCollection

type FeatureCollection struct {
	// contains filtered or unexported fields
}

func NewFeatureCollection

func NewFeatureCollection(features []*Feature, results int) *FeatureCollection

func (*FeatureCollection) MarshalJSON

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

json marshaling for struct FeatureCollection

type Geometry

type Geometry struct {
	// contains filtered or unexported fields
}

func NewGeometry

func NewGeometry(geoType string, coordinates interface{}) *Geometry

func NewGeometryFromWkt

func NewGeometryFromWkt(wkt string) (*Geometry, error)

func (*Geometry) MarshalJSON

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

json marshaling for struct Geometry

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewGeoJsonService

func NewGeoJsonService(reflection *database.ReflectionService, records *record.RecordService) *Service

func (*Service) GetType

func (s *Service) GetType(table string) string

func (*Service) HasTable

func (s *Service) HasTable(table string) bool

func (*Service) List

func (s *Service) List(tableName string, params map[string][]string) (*FeatureCollection, error)

func (*Service) Read

func (s *Service) Read(tableName, id string, params map[string][]string) (*Feature, error)

Jump to

Keyboard shortcuts

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