Documentation
¶
Index ¶
- Variables
- func DecodeTile(opts tile.TileOptions, tile [3]int, reader io.Reader) (tile.Source, error)
- func EncodeTile(opts tile.TileOptions, tile [3]int, data tile.Source) ([]byte, error)
- func GetEmptyTile(size [2]uint32, opts tile.TileOptions) tile.Source
- func GetSourceCreater(opts tile.TileOptions) tile.SourceCreater
- func MaskImageSourceFromCoverage(source tile.Source, bbox vec2d.Rect, bbox_srs geo.Proj, coverage geo.Coverage, ...) (tile.Source, error)
- func MergeTiles(layers []tile.Source, opts tile.TileOptions, query *layer.MapQuery, ...) (tile.Source, error)
- func ResampleTiles(layers []tile.Source, queryBBox vec2d.Rect, querySrs geo.Proj, ...) (tile.Source, error)
- func ScaleTiles(layers []tile.Source, queryBBox vec2d.Rect, querySrs geo.Proj, ...) (tile.Source, error)
- func TransformCoord(coord [3]int, src *geo.TileGrid, dst *geo.TileGrid) ([3]int, error)
- type Cache
- type CacheMapLayer
- type CacheSource
- type DummyCache
- func (d *DummyCache) IsCached(tile *Tile) bool
- func (d *DummyCache) LevelLocation(level int) string
- func (d *DummyCache) LoadTile(tile *Tile, withMetadata bool) error
- func (d *DummyCache) LoadTileMetadata(tile *Tile) error
- func (d *DummyCache) LoadTiles(tiles *TileCollection, withMetadata bool) error
- func (d *DummyCache) RemoveTile(tile *Tile) error
- func (d *DummyCache) RemoveTiles(tile *TileCollection) error
- func (d *DummyCache) StoreTile(tile *Tile) error
- func (d *DummyCache) StoreTiles(tiles *TileCollection) error
- type DummyTileLocker
- type FileTileLocker
- type Filter
- type InMemoryTileLocker
- type LocalCache
- func (c *LocalCache) IsCached(tile *Tile) bool
- func (c *LocalCache) LevelLocation(level int) string
- func (c *LocalCache) LoadTile(tile *Tile, withMetadata bool) error
- func (c *LocalCache) LoadTileMetadata(tile *Tile) error
- func (c *LocalCache) LoadTiles(tiles *TileCollection, withMetadata bool) error
- func (c *LocalCache) RemoveTile(tile *Tile) error
- func (c *LocalCache) RemoveTiles(tiles *TileCollection) error
- func (c *LocalCache) StoreTile(tile *Tile) error
- func (c *LocalCache) StoreTiles(tiles *TileCollection) error
- func (c *LocalCache) TileLocation(tile *Tile, create_dir bool) (string, error)
- type Manager
- type Tile
- func (t *Tile) Eq(o *Tile) bool
- func (t *Tile) GetCacheInfo() *tile.CacheInfo
- func (t *Tile) GetSource() tile.Source
- func (t *Tile) GetSourceBuffer(format *tile.TileFormat, in_image_opts tile.TileOptions) []byte
- func (t *Tile) GetSourceImage() image.Image
- func (t *Tile) IsMissing() bool
- func (t *Tile) SetCacheInfo(cache *tile.CacheInfo)
- type TileCollection
- func (c *TileCollection) AllBlank() bool
- func (c *TileCollection) Contains(idx_or_coord interface{}) bool
- func (c *TileCollection) Empty() bool
- func (c *TileCollection) GetItem(idx_or_coord interface{}) *Tile
- func (c *TileCollection) GetMap() map[[3]int]*Tile
- func (c *TileCollection) GetSlice() []*Tile
- func (c *TileCollection) SetItem(tile *Tile)
- func (c *TileCollection) UpdateItem(i int, tile *Tile)
- type TileCreator
- type TileLocationFunc
- type TileLocker
- type TileManager
- func (tm *TileManager) ApplyTileFilter(tile *Tile) (*Tile, error)
- func (tm *TileManager) Cleanup() bool
- func (tm *TileManager) Creator(dimensions utils.Dimensions) *TileCreator
- func (tm *TileManager) ExpireTimestamp(tile *Tile) *time.Time
- func (tm *TileManager) GetCache() Cache
- func (tm *TileManager) GetFormat() string
- func (tm *TileManager) GetGrid() *geo.TileGrid
- func (tm *TileManager) GetMetaGrid() *geo.MetaGrid
- func (tm *TileManager) GetMinimizeMetaRequests() bool
- func (tm *TileManager) GetQueryBuffer() *int
- func (tm *TileManager) GetReprojectDstSrs() geo.Proj
- func (tm *TileManager) GetReprojectSrcSrs() geo.Proj
- func (tm *TileManager) GetRequestFormat() string
- func (tm *TileManager) GetRescaleTiles() int
- func (tm *TileManager) GetSources() []layer.Layer
- func (tm *TileManager) GetTileOptions() tile.TileOptions
- func (tm *TileManager) IsCached(tile_coord [3]int, dimensions utils.Dimensions) bool
- func (tm *TileManager) IsStale(tile_coord [3]int, dimensions utils.Dimensions) bool
- func (tm *TileManager) LoadTileCoord(tileCoord [3]int, dimensions utils.Dimensions, with_metadata bool) (*Tile, error)
- func (tm *TileManager) LoadTileCoords(tileCoords [][3]int, dimensions utils.Dimensions, with_metadata bool) (*TileCollection, error)
- func (tm *TileManager) Lock(ctx context.Context, tile *Tile, run func() error) error
- func (tm *TileManager) RemoveTileCoords(tile_coords [][3]int) error
- func (tm *TileManager) SetCache(c Cache)
- func (tm *TileManager) SetExpireTimestamp(t *time.Time)
- func (tm *TileManager) SetMinimizeMetaRequests(f bool)
- func (tm *TileManager) SetSources(layer []layer.Layer)
- func (tm *TileManager) SetTileOptions(opt tile.TileOptions)
- func (tm *TileManager) SiteURL() string
- func (tm *TileManager) StoreTile(tile *Tile) error
- func (tm *TileManager) StoreTiles(tiles *TileCollection) error
- type TileManagerOptions
- type Watermark
Constants ¶
This section is empty.
Variables ¶
View Source
var (
RESCALE_TILE_MISSING = imagery.NewBlankImageSource([2]uint32{256, 256}, &imagery.ImageOptions{}, nil)
)
Functions ¶
func DecodeTile ¶
func EncodeTile ¶
func GetEmptyTile ¶
func GetEmptyTile(size [2]uint32, opts tile.TileOptions) tile.Source
func GetSourceCreater ¶
func GetSourceCreater(opts tile.TileOptions) tile.SourceCreater
func MergeTiles ¶
func ResampleTiles ¶
func ScaleTiles ¶
Types ¶
type Cache ¶
type Cache interface {
LoadTile(tile *Tile, withMetadata bool) error
LoadTiles(tiles *TileCollection, withMetadata bool) error
StoreTile(tile *Tile) error
StoreTiles(tiles *TileCollection) error
RemoveTile(tile *Tile) error
RemoveTiles(tile *TileCollection) error
IsCached(tile *Tile) bool
LoadTileMetadata(tile *Tile) error
LevelLocation(level int) string
}
type CacheMapLayer ¶
func NewCacheMapLayer ¶
type CacheSource ¶
type CacheSource struct {
CacheMapLayer
// contains filtered or unexported fields
}
func NewCacheSource ¶
type DummyCache ¶
type DummyCache struct {
}
func (*DummyCache) IsCached ¶
func (d *DummyCache) IsCached(tile *Tile) bool
func (*DummyCache) LevelLocation ¶
func (d *DummyCache) LevelLocation(level int) string
func (*DummyCache) LoadTileMetadata ¶
func (d *DummyCache) LoadTileMetadata(tile *Tile) error
func (*DummyCache) LoadTiles ¶
func (d *DummyCache) LoadTiles(tiles *TileCollection, withMetadata bool) error
func (*DummyCache) RemoveTile ¶
func (d *DummyCache) RemoveTile(tile *Tile) error
func (*DummyCache) RemoveTiles ¶
func (d *DummyCache) RemoveTiles(tile *TileCollection) error
func (*DummyCache) StoreTile ¶
func (d *DummyCache) StoreTile(tile *Tile) error
func (*DummyCache) StoreTiles ¶
func (d *DummyCache) StoreTiles(tiles *TileCollection) error
type DummyTileLocker ¶
type DummyTileLocker struct {
}
type FileTileLocker ¶
type FileTileLocker struct {
TileLocker
// contains filtered or unexported fields
}
type InMemoryTileLocker ¶
type InMemoryTileLocker struct {
TileLocker
// contains filtered or unexported fields
}
type LocalCache ¶
type LocalCache struct {
Cache
// contains filtered or unexported fields
}
func NewLocalCache ¶
func NewLocalCache(cache_dir string, directory_layout string, creater tile.SourceCreater) *LocalCache
func (*LocalCache) IsCached ¶
func (c *LocalCache) IsCached(tile *Tile) bool
func (*LocalCache) LevelLocation ¶
func (c *LocalCache) LevelLocation(level int) string
func (*LocalCache) LoadTileMetadata ¶
func (c *LocalCache) LoadTileMetadata(tile *Tile) error
func (*LocalCache) LoadTiles ¶
func (c *LocalCache) LoadTiles(tiles *TileCollection, withMetadata bool) error
func (*LocalCache) RemoveTile ¶
func (c *LocalCache) RemoveTile(tile *Tile) error
func (*LocalCache) RemoveTiles ¶
func (c *LocalCache) RemoveTiles(tiles *TileCollection) error
func (*LocalCache) StoreTile ¶
func (c *LocalCache) StoreTile(tile *Tile) error
func (*LocalCache) StoreTiles ¶
func (c *LocalCache) StoreTiles(tiles *TileCollection) error
func (*LocalCache) TileLocation ¶
func (c *LocalCache) TileLocation(tile *Tile, create_dir bool) (string, error)
type Manager ¶
type Manager interface {
SiteURL() string
GetSources() []layer.Layer
SetSources(layer []layer.Layer)
GetGrid() *geo.TileGrid
GetCache() Cache
SetCache(c Cache)
GetMetaGrid() *geo.MetaGrid
GetTileOptions() tile.TileOptions
SetTileOptions(opt tile.TileOptions)
GetReprojectSrcSrs() geo.Proj
GetReprojectDstSrs() geo.Proj
GetQueryBuffer() *int
Cleanup() bool
GetFormat() string
GetRequestFormat() string
SetMinimizeMetaRequests(f bool)
GetMinimizeMetaRequests() bool
GetRescaleTiles() int
LoadTileCoord(tileCoord [3]int, dimensions utils.Dimensions, with_metadata bool) (*Tile, error)
LoadTileCoords(tileCoord [][3]int, dimensions utils.Dimensions, with_metadata bool) (*TileCollection, error)
RemoveTileCoords(tileCoord [][3]int) error
StoreTile(tile *Tile) error
StoreTiles(tiles *TileCollection) error
IsCached(tileCoord [3]int, dimensions utils.Dimensions) bool
IsStale(tileCoord [3]int, dimensions utils.Dimensions) bool
ExpireTimestamp(tile *Tile) *time.Time
SetExpireTimestamp(t *time.Time)
ApplyTileFilter(tile *Tile) (*Tile, error)
Creator(dimensions utils.Dimensions) *TileCreator
Lock(ctx context.Context, tile *Tile, run func() error) error
}
type Tile ¶
type Tile struct {
Coord [3]int
Source tile.Source
Location string
Stored bool
Cacheable bool
Size int64
Timestamp time.Time
// contains filtered or unexported fields
}
func (*Tile) GetCacheInfo ¶
func (*Tile) GetSourceBuffer ¶
func (t *Tile) GetSourceBuffer(format *tile.TileFormat, in_image_opts tile.TileOptions) []byte
func (*Tile) GetSourceImage ¶
func (*Tile) SetCacheInfo ¶
type TileCollection ¶
type TileCollection struct {
// contains filtered or unexported fields
}
func NewTileCollection ¶
func NewTileCollection(tileCoords [][3]int) *TileCollection
func SplitTiles ¶
func SplitTiles(layers tile.Source, tiles []geo.TilePattern, tile_size [2]uint32, opts tile.TileOptions) (*TileCollection, error)
func (*TileCollection) AllBlank ¶
func (c *TileCollection) AllBlank() bool
func (*TileCollection) Contains ¶
func (c *TileCollection) Contains(idx_or_coord interface{}) bool
func (*TileCollection) Empty ¶
func (c *TileCollection) Empty() bool
func (*TileCollection) GetItem ¶
func (c *TileCollection) GetItem(idx_or_coord interface{}) *Tile
func (*TileCollection) GetMap ¶
func (c *TileCollection) GetMap() map[[3]int]*Tile
func (*TileCollection) GetSlice ¶
func (c *TileCollection) GetSlice() []*Tile
func (*TileCollection) SetItem ¶
func (c *TileCollection) SetItem(tile *Tile)
func (*TileCollection) UpdateItem ¶
func (c *TileCollection) UpdateItem(i int, tile *Tile)
type TileCreator ¶
type TileCreator struct {
// contains filtered or unexported fields
}
func NewTileCreator ¶
func NewTileCreator(m Manager, dimensions utils.Dimensions, merger tile.Merger, bulkMetaTiles bool) *TileCreator
func (*TileCreator) CreateTiles ¶
func (c *TileCreator) CreateTiles(tiles []*Tile) ([]*Tile, error)
func (*TileCreator) IsCached ¶
func (c *TileCreator) IsCached(tile [3]int) bool
type TileLocationFunc ¶
func LocationPaths ¶
type TileLocker ¶
func NewFileTileLocker ¶
func NewFileTileLocker(basePath string, retryDelay time.Duration) TileLocker
func NewInMemoryTileLocker ¶
func NewInMemoryTileLocker() TileLocker
type TileManager ¶
type TileManager struct {
Manager
// contains filtered or unexported fields
}
func NewTileManager ¶
func NewTileManager(opts *TileManagerOptions) *TileManager
func (*TileManager) ApplyTileFilter ¶
func (tm *TileManager) ApplyTileFilter(tile *Tile) (*Tile, error)
func (*TileManager) Cleanup ¶
func (tm *TileManager) Cleanup() bool
func (*TileManager) Creator ¶
func (tm *TileManager) Creator(dimensions utils.Dimensions) *TileCreator
func (*TileManager) ExpireTimestamp ¶
func (tm *TileManager) ExpireTimestamp(tile *Tile) *time.Time
func (*TileManager) GetCache ¶
func (tm *TileManager) GetCache() Cache
func (*TileManager) GetFormat ¶
func (tm *TileManager) GetFormat() string
func (*TileManager) GetGrid ¶
func (tm *TileManager) GetGrid() *geo.TileGrid
func (*TileManager) GetMetaGrid ¶
func (tm *TileManager) GetMetaGrid() *geo.MetaGrid
func (*TileManager) GetMinimizeMetaRequests ¶
func (tm *TileManager) GetMinimizeMetaRequests() bool
func (*TileManager) GetQueryBuffer ¶
func (tm *TileManager) GetQueryBuffer() *int
func (*TileManager) GetReprojectDstSrs ¶
func (tm *TileManager) GetReprojectDstSrs() geo.Proj
func (*TileManager) GetReprojectSrcSrs ¶
func (tm *TileManager) GetReprojectSrcSrs() geo.Proj
func (*TileManager) GetRequestFormat ¶
func (tm *TileManager) GetRequestFormat() string
func (*TileManager) GetRescaleTiles ¶
func (tm *TileManager) GetRescaleTiles() int
func (*TileManager) GetSources ¶
func (tm *TileManager) GetSources() []layer.Layer
func (*TileManager) GetTileOptions ¶
func (tm *TileManager) GetTileOptions() tile.TileOptions
func (*TileManager) IsCached ¶
func (tm *TileManager) IsCached(tile_coord [3]int, dimensions utils.Dimensions) bool
func (*TileManager) IsStale ¶
func (tm *TileManager) IsStale(tile_coord [3]int, dimensions utils.Dimensions) bool
func (*TileManager) LoadTileCoord ¶
func (tm *TileManager) LoadTileCoord(tileCoord [3]int, dimensions utils.Dimensions, with_metadata bool) (*Tile, error)
func (*TileManager) LoadTileCoords ¶
func (tm *TileManager) LoadTileCoords(tileCoords [][3]int, dimensions utils.Dimensions, with_metadata bool) (*TileCollection, error)
func (*TileManager) RemoveTileCoords ¶
func (tm *TileManager) RemoveTileCoords(tile_coords [][3]int) error
func (*TileManager) SetCache ¶
func (tm *TileManager) SetCache(c Cache)
func (*TileManager) SetExpireTimestamp ¶
func (tm *TileManager) SetExpireTimestamp(t *time.Time)
func (*TileManager) SetMinimizeMetaRequests ¶
func (tm *TileManager) SetMinimizeMetaRequests(f bool)
func (*TileManager) SetSources ¶
func (tm *TileManager) SetSources(layer []layer.Layer)
func (*TileManager) SetTileOptions ¶
func (tm *TileManager) SetTileOptions(opt tile.TileOptions)
func (*TileManager) SiteURL ¶
func (tm *TileManager) SiteURL() string
func (*TileManager) StoreTile ¶
func (tm *TileManager) StoreTile(tile *Tile) error
func (*TileManager) StoreTiles ¶
func (tm *TileManager) StoreTiles(tiles *TileCollection) error
type TileManagerOptions ¶
type TileManagerOptions struct {
Sources []layer.Layer
Grid *geo.TileGrid
Cache Cache
Locker TileLocker
Identifier string
Format string
RequestFormat string
Options tile.TileOptions
MinimizeMetaRequests bool
BulkMetaTiles bool
PreStoreFilter []Filter
RescaleTiles int
CacheRescaledTiles bool
MetaBuffer int
MetaSize [2]uint32
ReprojectSrcSrs geo.Proj
ReprojectDstSrs geo.Proj
QueryBuffer *int
SiteURL string
}
type Watermark ¶
type Watermark struct {
Filter
// contains filtered or unexported fields
}
func NewWatermark ¶
Click to show internal directories.
Click to hide internal directories.