tilepack

package
v0.0.0-...-9a48755 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: MIT Imports: 25 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateTileRanges

func GenerateTileRanges(opts *GenerateRangesOptions)

func GenerateTiles

func GenerateTiles(opts *GenerateTilesOptions)

func NewDiskOutputter

func NewDiskOutputter(dsnStr string) (*diskOutputter, error)

func NewMbtilesOutputter

func NewMbtilesOutputter(dsn string, batchSize int) (*mbtilesOutputter, error)

Types

type GenerateBoxesConsumerFunc

type GenerateBoxesConsumerFunc func(ll maptile.Tile, ur maptile.Tile, z maptile.Zoom)

type GenerateRangesOptions

type GenerateRangesOptions struct {
	Bounds       orb.Bound
	Zooms        []maptile.Zoom
	ConsumerFunc GenerateBoxesConsumerFunc
}

type GenerateTilesConsumerFunc

type GenerateTilesConsumerFunc func(tile maptile.Tile)

type GenerateTilesOptions

type GenerateTilesOptions struct {
	Bounds       orb.Bound
	Zooms        []maptile.Zoom
	ConsumerFunc GenerateTilesConsumerFunc
	InvertedY    bool
}

type HTTPError

type HTTPError struct {
	Code   int
	Status string
}

func (*HTTPError) Error

func (e *HTTPError) Error() string

func (*HTTPError) String

func (e *HTTPError) String() string

type JobGenerator

type JobGenerator interface {
	CreateWorker() (func(id int, jobs chan *TileRequest, results chan *TileResponse), error)
	CreateJobs(jobs chan *TileRequest) error
}

func NewFileTransportXYZJobGenerator

func NewFileTransportXYZJobGenerator(root string, urlTemplate string, bounds orb.Bound, zooms []maptile.Zoom, httpTimeout time.Duration, invertedY bool, ensureGzip bool) (JobGenerator, error)

func NewMetatileJobGenerator

func NewMetatileJobGenerator(bucket string, requesterPays bool, pathTemplate string, layerName string, format string, metatileSize uint, maxDetailZoom maptile.Zoom, zooms []maptile.Zoom, bounds orb.Bound) (JobGenerator, error)

func NewTapalcatl2JobGenerator

func NewTapalcatl2JobGenerator(bucket string, requesterPays bool, pathTemplate string, layerName string, materializedZooms []maptile.Zoom, zooms []maptile.Zoom, bounds orb.Bound) (JobGenerator, error)

func NewXYZJobGenerator

func NewXYZJobGenerator(urlTemplate string, bounds orb.Bound, zooms []maptile.Zoom, httpTimeout time.Duration, invertedY bool, ensureGzip bool) (JobGenerator, error)

type MbtilesReader

type MbtilesReader interface {
	Close() error
	GetTile(tile maptile.Tile) (*TileData, error)
	VisitAllTiles(visitor func(maptile.Tile, []byte)) error
}

func NewMbtilesReader

func NewMbtilesReader(dsn string) (MbtilesReader, error)

func NewMbtilesReaderWithDatabase

func NewMbtilesReaderWithDatabase(db *sql.DB) (MbtilesReader, error)

type TileData

type TileData struct {
	Tile maptile.Tile
	Data *[]byte
}

type TileOutputter

type TileOutputter interface {
	CreateTiles() error
	Save(tile maptile.Tile, data []byte) error
	Close() error
}

type TileRequest

type TileRequest struct {
	Tile maptile.Tile
	URL  string
}

type TileResponse

type TileResponse struct {
	Tile    maptile.Tile
	Data    []byte
	Elapsed float64
}

Jump to

Keyboard shortcuts

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