pmtiles

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: BSD-3-Clause Imports: 18 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Matches

func Matches(z uint8, minX uint32, minY uint32, maxX uint32, maxY uint32, candidate Zxy) bool

func ParseEntry

func ParseEntry(b []byte) (uint8, Zxy, Range)

func SubpyramidXY

func SubpyramidXY(logger *log.Logger, input string, output string, z uint8, minX uint32, minY uint32, maxX uint32, maxY uint32, bounds string)

Types

type Datum

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

type DatumKind

type DatumKind int
const (
	Root DatumKind = iota
	Tile
	Leaf
)

type Directory

type Directory struct {
	Entries map[Zxy]Range
	LeafZ   uint8
	Leaves  map[Zxy]Range
}

func ParseDirectory

func ParseDirectory(dir_bytes []byte) Directory

func ParseHeader

func ParseHeader(reader io.Reader) ([]byte, Directory)

func (Directory) SizeBytes

func (d Directory) SizeBytes() int

type Entry

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

type EntryAscending

type EntryAscending []Entry

func (EntryAscending) Len

func (e EntryAscending) Len() int

func (EntryAscending) Less

func (e EntryAscending) Less(i, j int) bool

func (EntryAscending) Swap

func (e EntryAscending) Swap(i, j int)

type Fetcher

type Fetcher interface {
	Do(key Key, readFunc func(io.Reader)) bool
}

type FileFetcher

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

func (FileFetcher) Do

func (fetcher FileFetcher) Do(key Key, readFunc func(io.Reader)) bool

type HTTPFetcher

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

func (HTTPFetcher) Do

func (fetcher HTTPFetcher) Do(key Key, readFunc func(io.Reader)) bool

type Key

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

type Loop

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

func NewLoop

func NewLoop(path string, logger *log.Logger, cacheSize int, cors string) Loop

func (Loop) Get

func (loop Loop) Get(path string) (int, map[string]string, []byte)

func (Loop) Start

func (loop Loop) Start()

type Metadata

type Metadata struct {
	Format      string `json:"format"`
	Minzoom     string `json:"minzoom"`
	Maxzoom     string `json:"maxzoom"`
	Bounds      string `json:"bounds"`
	Compress    string `json:"compress"`
	Attribution string `json:"attribution"`
}

type Range

type Range struct {
	Offset uint64
	Length uint32
}

type Request

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

type Response

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

type Writer

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

func NewWriter

func NewWriter(path string) Writer

func (*Writer) Finalize

func (writer *Writer) Finalize(metadata_bytes []byte)

func (*Writer) WriteTile

func (writer *Writer) WriteTile(zxy Zxy, data []byte)

type Zxy

type Zxy struct {
	Z uint8
	X uint32
	Y uint32
}

func GetParentTile

func GetParentTile(tile Zxy, level uint8) Zxy

func PointToTile

func PointToTile(z int, lng float64, lat float64) Zxy

Jump to

Keyboard shortcuts

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