data

package
v0.0.0-...-68e76a8 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoSuchSource = errors.New("no such source with given name")
)

Common errors

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

Attribute details a field value in a layer.

type Db

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

Db holds the Database connection

func NewDb

func NewDb(cfg *config.Config) (*Db, error)

NewDb opens the database specified at the given path

func (*Db) Close

func (d *Db) Close()

Close will release all resources associated with the database

func (*Db) FetchTile

func (d *Db) FetchTile(box *geo.BBox, name string) (*vtile.Tile, error)

FetchTile queries the database for those features which intersect the given BBOX and the specified layer(s)

func (*Db) Sources

func (d *Db) Sources() map[string][]*Layer

Sources provides a list of the source data this Db instance is managing.

type Layer

type Layer struct {
	Name       string      `json:"name"`
	Attributes []Attribute `json:"attributes"`
	// contains filtered or unexported fields
}

Layer represents a database table

Jump to

Keyboard shortcuts

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