database

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: BSD-3-Clause Imports: 16 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IndexDatabaseWithFS added in v0.6.0

func IndexDatabaseWithFS(ctx context.Context, db SpatialDatabase, index_fs fs.FS) error

IndexDatabaseWithFS will walk the files contained in 'index_fs' indexing each in 'db'

func IndexDatabaseWithIterator added in v0.1.1

func IndexDatabaseWithIterator(ctx context.Context, db SpatialDatabase, iterator_uri string, iterator_sources ...string) error

IndexDatabaseWithIterator is a general-purpose method for indexing a `database.Spatial.Database` instance with a whosonfirst/go-whosonfirst-iterate/v2 iterator. Only records whose geometry type are 'Polygon' or 'MultiPolygon' will be indexed.

func IndexDatabaseWithReader added in v0.7.2

func IndexDatabaseWithReader(ctx context.Context, db SpatialDatabase, r io.Reader) error

IndexDatabaseWithReader will index the data contained in 'r' in 'db'.

func RegisterSpatialDatabase

func RegisterSpatialDatabase(ctx context.Context, scheme string, f SpatialDatabaseInitializeFunc) error

func Schemes added in v0.0.6

func Schemes() []string

Types

type SpatialDatabase

type SpatialDatabase interface {
	reader.Reader
	writer.Writer
	spatial.SpatialIndex
}

func NewSpatialDatabase

func NewSpatialDatabase(ctx context.Context, uri string) (SpatialDatabase, error)

type SpatialDatabaseInitializeFunc

type SpatialDatabaseInitializeFunc func(ctx context.Context, uri string) (SpatialDatabase, error)

Jump to

Keyboard shortcuts

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