Documentation
¶
Index ¶
- Constants
- Variables
- func CombinedLayers(layers []layer.Layer, query *layer.MapQuery) []layer.Layer
- func MapboxTileTypeToString(tp MapboxTileType) string
- func StatusCode(code int) string
- func WMS100Format(format string) string
- func WMS100InfoFormat(format string) string
- func WMS111MetaDataType(type_ string) string
- type BaseService
- func (s *BaseService) DecorateTile(image tile.Source, service string, layers []string, ...) tile.Source
- func (s *BaseService) Reload() error
- func (s *BaseService) RequestParser(r *http.Request) request.Request
- func (s *BaseService) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (s *BaseService) Start() error
- func (s *BaseService) Stop() error
- type CesiumExceptionHandler
- type CesiumLayerMetadata
- type CesiumMetadata
- type CesiumService
- type CesiumServiceOptions
- type CesiumTileOptions
- type CesiumTileProvider
- func (t *CesiumTileProvider) GetBBox() vec2d.Rect
- func (t *CesiumTileProvider) GetExtent() *geo.MapExtent
- func (t *CesiumTileProvider) GetFormat() string
- func (t *CesiumTileProvider) GetFormatMimeType() string
- func (t *CesiumTileProvider) GetGrid() *geo.TileGrid
- func (t *CesiumTileProvider) GetLonlatBBox() vec2d.Rect
- func (t *CesiumTileProvider) GetMaxZoom() int
- func (t *CesiumTileProvider) GetMinZoom() int
- func (t *CesiumTileProvider) GetName() string
- func (t *CesiumTileProvider) GetRequestFormat() string
- func (t *CesiumTileProvider) GetSrs() geo.Proj
- func (t *CesiumTileProvider) GetTileBBox(req request.TiledRequest, useProfiles bool, limit bool) (*RequestError, vec2d.Rect)
- func (tl *CesiumTileProvider) Render(req request.TiledRequest, use_profiles bool, coverage geo.Coverage, ...) (*RequestError, TileResponse)
- func (c *CesiumTileProvider) RenderTileJson(req *request.CesiumLayerJSONRequest) []byte
- type ExceptionHandler
- type LayerRenderer
- type MapboxException
- type MapboxExceptionHandler
- type MapboxLayerMetadata
- type MapboxMetadata
- type MapboxService
- type MapboxServiceOptions
- type MapboxTileOptions
- type MapboxTileProvider
- func (t *MapboxTileProvider) GetBBox() vec2d.Rect
- func (t *MapboxTileProvider) GetExtent() *geo.MapExtent
- func (t *MapboxTileProvider) GetFormat() string
- func (t *MapboxTileProvider) GetFormatMimeType() string
- func (t *MapboxTileProvider) GetGrid() *geo.TileGrid
- func (t *MapboxTileProvider) GetLonlatBBox() vec2d.Rect
- func (t *MapboxTileProvider) GetMaxZoom() int
- func (t *MapboxTileProvider) GetMinZoom() int
- func (t *MapboxTileProvider) GetName() string
- func (t *MapboxTileProvider) GetSrs() geo.Proj
- func (t *MapboxTileProvider) GetTileBBox(req request.TiledRequest, useProfiles bool, limit bool) (*RequestError, vec2d.Rect)
- func (t *MapboxTileProvider) IsRaster() bool
- func (t *MapboxTileProvider) IsRasterDem() bool
- func (t *MapboxTileProvider) IsVector() bool
- func (tl *MapboxTileProvider) Render(req request.TiledRequest, use_profiles bool, coverage geo.Coverage, ...) (*RequestError, TileResponse)
- func (c *MapboxTileProvider) RenderTileJson(req *request.MapboxSourceJSONRequest) []byte
- func (c *MapboxTileProvider) RenderTileStats(req *request.MapboxSourceJSONRequest) []byte
- type MapboxTileType
- type MockCacheManager
- func (m *MockCacheManager) ApplyTileFilter(tile *cache.Tile) (*cache.Tile, error)
- func (m *MockCacheManager) Cleanup() bool
- func (m *MockCacheManager) Creator(dimensions utils.Dimensions) *cache.TileCreator
- func (m *MockCacheManager) ExpireTimestamp(tile *cache.Tile) *time.Time
- func (m *MockCacheManager) GetCache() cache.Cache
- func (m *MockCacheManager) GetFormat() string
- func (m *MockCacheManager) GetGrid() *geo.TileGrid
- func (m *MockCacheManager) GetMetaGrid() *geo.MetaGrid
- func (m *MockCacheManager) GetMinimizeMetaRequests() bool
- func (m *MockCacheManager) GetQueryBuffer() *int
- func (m *MockCacheManager) GetReprojectDstSrs() geo.Proj
- func (m *MockCacheManager) GetReprojectSrcSrs() geo.Proj
- func (m *MockCacheManager) GetRequestFormat() string
- func (m *MockCacheManager) GetRescaleTiles() int
- func (m *MockCacheManager) GetSources() []layer.Layer
- func (m *MockCacheManager) GetTileOptions() tile.TileOptions
- func (m *MockCacheManager) IsCached(tileCoord [3]int, dimensions utils.Dimensions) bool
- func (m *MockCacheManager) IsStale(tileCoord [3]int, dimensions utils.Dimensions) bool
- func (m *MockCacheManager) LoadTileCoord(tileCoord [3]int, dimensions utils.Dimensions, with_metadata bool) (*cache.Tile, error)
- func (m *MockCacheManager) LoadTileCoords(tileCoord [][3]int, dimensions utils.Dimensions, with_metadata bool) (*cache.TileCollection, error)
- func (m *MockCacheManager) Lock(ctx context.Context, tile *cache.Tile, run func() error) error
- func (m *MockCacheManager) RemoveTileCoords(tileCoord [][3]int) error
- func (m *MockCacheManager) SetCache(c cache.Cache)
- func (m *MockCacheManager) SetExpireTimestamp(t *time.Time)
- func (m *MockCacheManager) SetMinimizeMetaRequests(f bool)
- func (m *MockCacheManager) SetSources(layer []layer.Layer)
- func (m *MockCacheManager) SetTileOptions(opt tile.TileOptions)
- func (m *MockCacheManager) SiteURL() string
- func (m *MockCacheManager) StoreTile(tile *cache.Tile) error
- func (m *MockCacheManager) StoreTiles(tiles *cache.TileCollection) error
- type MockTileResponse
- type MockTileSource
- func (m *MockTileSource) GetBuffer(format *tile.TileFormat, opts tile.TileOptions) []byte
- func (m *MockTileSource) GetCacheable() *tile.CacheInfo
- func (m *MockTileSource) GetFileName() string
- func (m *MockTileSource) GetGeoReference() *geo.GeoReference
- func (m *MockTileSource) GetSize() [2]uint32
- func (m *MockTileSource) GetSource() interface{}
- func (m *MockTileSource) GetTile() interface{}
- func (m *MockTileSource) GetTileOptions() tile.TileOptions
- func (m *MockTileSource) GetType() tile.TileType
- func (m *MockTileSource) SetCacheable(cacheable *tile.CacheInfo)
- func (m *MockTileSource) SetSource(source interface{})
- func (m *MockTileSource) SetTileOptions(options tile.TileOptions)
- type PlainExceptionHandler
- type Provider
- type RequestError
- type Response
- func (r *Response) GetBuffer() []byte
- func (r *Response) GetContentLength() int
- func (r *Response) GetContentType() string
- func (r *Response) GetETag() string
- func (r *Response) GetLastModified() *time.Time
- func (r *Response) GetStatus() int
- func (r *Response) SetETag(value string)
- func (r *Response) SetLastModified(date time.Time)
- func (r *Response) SetStatus(status int)
- func (r *Response) Write(w http.ResponseWriter)
- type RestfulCapabilities
- type Service
- type TMSExceptionHandler
- type TileMatrixSet
- type TileMetadata
- type TileProvider
- func (t *TileProvider) GetBBox() vec2d.Rect
- func (t *TileProvider) GetExtent() *geo.MapExtent
- func (t *TileProvider) GetFormat() string
- func (t *TileProvider) GetFormatMimeType() string
- func (t *TileProvider) GetGrid() *geo.TileGrid
- func (t *TileProvider) GetName() string
- func (t *TileProvider) GetSrs() geo.Proj
- func (tl *TileProvider) GetTileBBox(req request.TiledRequest, useProfiles bool, limit bool) (*RequestError, vec2d.Rect)
- func (tl *TileProvider) Render(req request.TiledRequest, useProfiles bool, coverage geo.Coverage, ...) (*RequestError, TileResponse)
- type TileProviderMetadata
- type TileProviderOptions
- type TileResponse
- type TileService
- type TileServiceGrid
- func (t *TileServiceGrid) ExternalTileCoord(tile_coord [3]int, use_profiles bool) []int
- func (t *TileServiceGrid) GetBBox() vec2d.Rect
- func (t *TileServiceGrid) GetOrigin() string
- func (t *TileServiceGrid) GetTileSets() []float64
- func (t *TileServiceGrid) InternalTileCoord(tile_coord [3]int, use_profiles bool) []int
- type TileServiceOptions
- type WMS130ExceptionHandler
- type WMSBlankExceptionHandler
- type WMSCapabilities
- type WMSGroupLayer
- type WMSGroupLayerOptions
- type WMSImageExceptionHandler
- type WMSLayer
- type WMSLayerBase
- func (l *WMSLayerBase) GetExtent() *geo.MapExtent
- func (l *WMSLayerBase) GetLegendSize() []int
- func (l *WMSLayerBase) GetLegendURL() string
- func (l *WMSLayerBase) GetMetadata() *WMSLayerMetadata
- func (l *WMSLayerBase) GetName() string
- func (l *WMSLayerBase) GetResolutionRange() *geo.ResolutionRange
- func (l *WMSLayerBase) GetTitle() string
- func (l *WMSLayerBase) HasLegend() bool
- func (l *WMSLayerBase) Queryable() bool
- type WMSLayerMetadata
- type WMSMetadata
- type WMSNodeLayer
- type WMSNodeLayerOptions
- type WMSService
- type WMSServiceOptions
- type WMTS100ExceptionHandler
- type WMTSCapabilities
- type WMTSMetadata
- type WMTSRestService
- type WMTSRestServiceOptions
- type WMTSService
- type WMTSServiceOptions
- type WMTSTileLayer
- func (l WMTSTileLayer) GetBBox() vec2d.Rect
- func (l WMTSTileLayer) GetFormat() string
- func (l WMTSTileLayer) GetFormatMimeType() string
- func (l WMTSTileLayer) GetGrid() *geo.TileGrid
- func (l WMTSTileLayer) GetGrids() []*geo.TileGrid
- func (l WMTSTileLayer) GetName() string
- func (l WMTSTileLayer) GetSrs() geo.Proj
- func (l WMTSTileLayer) GetTileBBox(request request.TiledRequest, use_profiles bool, limit bool) (*RequestError, vec2d.Rect)
- func (l WMTSTileLayer) GetTitle() string
- func (l WMTSTileLayer) LLBBox() vec2d.Rect
Constants ¶
View Source
const ( Charset = "utf-8" DefaultContentType = "text/plain" BlockSize = 1024 * 32 )
View Source
const ( DEFAULT_WMTS_TEMPLATE = "/{Layer}/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}.{Format}" DEFAULT_WMTS_INFO_TEMPLATE = "/{Layer}/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}/{I}/{J}.{InfoFormat}" )
View Source
const (
METERS_PER_DEEGREE = 111319.4907932736
)
Variables ¶
View Source
var ( MapboxExceptionMessages = map[string]string{ "Invalid_Range": "Invalid Range", "Too_Many_Font": "Maximum of 10 font faces permitted", "No_Token": "Not Authorized - No Token", "Invalid_Token": "Not Authorized - Invalid Token", "Forbidden": "Forbidden", "Requires_Token": "This endpoint requires a token with %s scope", "Tileset_Not_Exist": "Tileset %s does not exist", "Tile_Not_Found": "Tile not found", "Style_Not_Found": "Style not found", "Not_Found": "Not Found", "Invalid_Zoom_Level": "Zoom level must be between 0-30.", "Tileset_Not_Ref_Vector": "Tileset does not reference vector data", "Invalid_Quality_Value": "Invalid quality value %s for raster format %s", } MapboxExceptionCodes = map[string]int{ "Invalid_Range": 400, "Too_Many_Font": 400, "No_Token": 401, "Invalid_Token": 401, "Forbidden": 403, "Requires_Token": 403, "Tileset_Not_Exist": 404, "Tile_Not_Found": 404, "Style_Not_Found": 404, "Not_Found": 404, "Invalid_Zoom_Level": 422, "Tileset_Not_Ref_Vector": 422, "Invalid_Quality_Value": 422, } )
View Source
var ( TILE_SERVICE_NAMES = []string{"tiles", "tms"} TILE_SERVICE_REQUEST_METHODS = []string{"map", "tms_capabilities", "tms_root_resource"} )
View Source
var ( DEFAULT_EXTENTS = map[string]*geo.MapExtent{ "EPSG:3857": geo.MapExtentFromDefault(), "EPSG:4326": geo.MapExtentFromDefault(), "EPSG:900913": geo.MapExtentFromDefault(), } )
View Source
var (
WMS130ExceptionCodes = map[string]string{
"InvalidFormat": "Request contains a Format not offered by the server.",
"InvalidCRS": "Request contains a CRS not offered by the server for one or more of the Layers in the request.",
"LayerNotDefined": "GetMap request is for a Layer not offered by the server, or GetFeatureInfo request is for a Layer not shown on the map.",
"StyleNotDefined": "Request is for a Layer in a Style not offered by the server.",
"LayerNotQueryable": "GetFeatureInfo request is applied to a Layer which is not declared queryable.",
"InvalidPoint": "GetFeatureInfo request contains invalid I or J value.",
"CurrentUpdateSequence": "Value of (optional) UpdateSequence parameter in GetCapabilities request is equal to current value of service metadata update sequence number.",
"InvalidUpdateSequence": "Value of (optional) UpdateSequence parameter in GetCapabilities request is greater than current value of service metadata update sequence number.",
"MissingDimensionValue": "Request does not include a sample dimension value, and the server did not declare a default value for that dimension.",
"InvalidDimensionValue": "Request contains an invalid sample dimension value. OperationNotSupported Request is for an optional operation that is not supported by the server.",
}
)
View Source
var (
WMTSStatusCodes = map[string]int{
"TileOutOfRange": 400,
"MissingParameterValue": 400,
"InvalidParameterValue": 400,
"OperationNotSupported": 501,
}
)
Functions ¶
func CombinedLayers ¶
func MapboxTileTypeToString ¶
func MapboxTileTypeToString(tp MapboxTileType) string
func StatusCode ¶
func WMS100Format ¶
func WMS100InfoFormat ¶
func WMS111MetaDataType ¶
Types ¶
type BaseService ¶
type BaseService struct {
Service
OnStart func() error
OnStop func() error
OnReload func() error
// contains filtered or unexported fields
}
func (*BaseService) DecorateTile ¶
func (*BaseService) Reload ¶
func (s *BaseService) Reload() error
func (*BaseService) RequestParser ¶
func (s *BaseService) RequestParser(r *http.Request) request.Request
func (*BaseService) ServeHTTP ¶
func (s *BaseService) ServeHTTP(w http.ResponseWriter, r *http.Request)
func (*BaseService) Start ¶
func (s *BaseService) Start() error
func (*BaseService) Stop ¶
func (s *BaseService) Stop() error
type CesiumExceptionHandler ¶
type CesiumExceptionHandler struct {
ExceptionHandler
}
func (*CesiumExceptionHandler) Render ¶
func (h *CesiumExceptionHandler) Render(request_error *RequestError) *Response
type CesiumLayerMetadata ¶
type CesiumMetadata ¶
type CesiumService ¶
type CesiumService struct {
BaseService
Tilesets map[string]Provider
Metadata *CesiumMetadata
MaxTileAge *time.Duration
}
func NewCesiumService ¶
func NewCesiumService(opts *CesiumServiceOptions) *CesiumService
func (*CesiumService) GetLayerJSON ¶
func (s *CesiumService) GetLayerJSON(req request.Request) *Response
type CesiumServiceOptions ¶
type CesiumServiceOptions struct {
Tilesets map[string]Provider
Metadata *CesiumMetadata
MaxTileAge *time.Duration
}
type CesiumTileOptions ¶
type CesiumTileOptions struct {
Name string
Metadata *CesiumLayerMetadata
TileManager cache.Manager
ZoomRange *[2]int
Extensions []string
LayerjsonSource layer.CesiumLayerJSONLayer
}
type CesiumTileProvider ¶
type CesiumTileProvider struct {
Provider
// contains filtered or unexported fields
}
func NewCesiumTileProvider ¶
func NewCesiumTileProvider(opts *CesiumTileOptions) *CesiumTileProvider
func (*CesiumTileProvider) GetBBox ¶
func (t *CesiumTileProvider) GetBBox() vec2d.Rect
func (*CesiumTileProvider) GetExtent ¶
func (t *CesiumTileProvider) GetExtent() *geo.MapExtent
func (*CesiumTileProvider) GetFormat ¶
func (t *CesiumTileProvider) GetFormat() string
func (*CesiumTileProvider) GetFormatMimeType ¶
func (t *CesiumTileProvider) GetFormatMimeType() string
func (*CesiumTileProvider) GetGrid ¶
func (t *CesiumTileProvider) GetGrid() *geo.TileGrid
func (*CesiumTileProvider) GetLonlatBBox ¶
func (t *CesiumTileProvider) GetLonlatBBox() vec2d.Rect
func (*CesiumTileProvider) GetMaxZoom ¶
func (t *CesiumTileProvider) GetMaxZoom() int
func (*CesiumTileProvider) GetMinZoom ¶
func (t *CesiumTileProvider) GetMinZoom() int
func (*CesiumTileProvider) GetName ¶
func (t *CesiumTileProvider) GetName() string
func (*CesiumTileProvider) GetRequestFormat ¶
func (t *CesiumTileProvider) GetRequestFormat() string
func (*CesiumTileProvider) GetSrs ¶
func (t *CesiumTileProvider) GetSrs() geo.Proj
func (*CesiumTileProvider) GetTileBBox ¶
func (t *CesiumTileProvider) GetTileBBox(req request.TiledRequest, useProfiles bool, limit bool) (*RequestError, vec2d.Rect)
func (*CesiumTileProvider) Render ¶
func (tl *CesiumTileProvider) Render(req request.TiledRequest, use_profiles bool, coverage geo.Coverage, decorateTile func(image tile.Source) tile.Source) (*RequestError, TileResponse)
func (*CesiumTileProvider) RenderTileJson ¶
func (c *CesiumTileProvider) RenderTileJson(req *request.CesiumLayerJSONRequest) []byte
type ExceptionHandler ¶
type ExceptionHandler interface {
Render(err *RequestError) *Response
}
type LayerRenderer ¶
type LayerRenderer struct {
// contains filtered or unexported fields
}
type MapboxException ¶
type MapboxException struct {
Message string `json:"message"`
}
type MapboxExceptionHandler ¶
type MapboxExceptionHandler struct {
ExceptionHandler
}
func (*MapboxExceptionHandler) Render ¶
func (h *MapboxExceptionHandler) Render(request_error *RequestError) *Response
type MapboxLayerMetadata ¶
type MapboxMetadata ¶
type MapboxService ¶
type MapboxService struct {
BaseService
Tilesets map[string]Provider
Metadata *MapboxMetadata
MaxTileAge *time.Duration
}
func NewMapboxService ¶
func NewMapboxService(opts *MapboxServiceOptions) *MapboxService
func (*MapboxService) GetTileJSON ¶
func (s *MapboxService) GetTileJSON(req request.Request) *Response
type MapboxServiceOptions ¶
type MapboxServiceOptions struct {
Tilesets map[string]Provider
Metadata *MapboxMetadata
MaxTileAge *time.Duration
}
type MapboxTileOptions ¶
type MapboxTileOptions struct {
Name string
Type MapboxTileType
Metadata *MapboxLayerMetadata
TileManager cache.Manager
TilejsonSource layer.MapboxSourceJSONLayer
TileStatsSource layer.MapboxTileStatsLayer
VectorLayers []*resource.VectorLayer
ZoomRange *[2]int
}
type MapboxTileProvider ¶
type MapboxTileProvider struct {
Provider
// contains filtered or unexported fields
}
func NewMapboxTileProvider ¶
func NewMapboxTileProvider(opts *MapboxTileOptions) *MapboxTileProvider
func (*MapboxTileProvider) GetBBox ¶
func (t *MapboxTileProvider) GetBBox() vec2d.Rect
func (*MapboxTileProvider) GetExtent ¶
func (t *MapboxTileProvider) GetExtent() *geo.MapExtent
func (*MapboxTileProvider) GetFormat ¶
func (t *MapboxTileProvider) GetFormat() string
func (*MapboxTileProvider) GetFormatMimeType ¶
func (t *MapboxTileProvider) GetFormatMimeType() string
func (*MapboxTileProvider) GetGrid ¶
func (t *MapboxTileProvider) GetGrid() *geo.TileGrid
func (*MapboxTileProvider) GetLonlatBBox ¶
func (t *MapboxTileProvider) GetLonlatBBox() vec2d.Rect
func (*MapboxTileProvider) GetMaxZoom ¶
func (t *MapboxTileProvider) GetMaxZoom() int
func (*MapboxTileProvider) GetMinZoom ¶
func (t *MapboxTileProvider) GetMinZoom() int
func (*MapboxTileProvider) GetName ¶
func (t *MapboxTileProvider) GetName() string
func (*MapboxTileProvider) GetSrs ¶
func (t *MapboxTileProvider) GetSrs() geo.Proj
func (*MapboxTileProvider) GetTileBBox ¶
func (t *MapboxTileProvider) GetTileBBox(req request.TiledRequest, useProfiles bool, limit bool) (*RequestError, vec2d.Rect)
func (*MapboxTileProvider) IsRaster ¶
func (t *MapboxTileProvider) IsRaster() bool
func (*MapboxTileProvider) IsRasterDem ¶
func (t *MapboxTileProvider) IsRasterDem() bool
func (*MapboxTileProvider) IsVector ¶
func (t *MapboxTileProvider) IsVector() bool
func (*MapboxTileProvider) Render ¶
func (tl *MapboxTileProvider) Render(req request.TiledRequest, use_profiles bool, coverage geo.Coverage, decorateTile func(image tile.Source) tile.Source) (*RequestError, TileResponse)
func (*MapboxTileProvider) RenderTileJson ¶
func (c *MapboxTileProvider) RenderTileJson(req *request.MapboxSourceJSONRequest) []byte
func (*MapboxTileProvider) RenderTileStats ¶
func (c *MapboxTileProvider) RenderTileStats(req *request.MapboxSourceJSONRequest) []byte
type MapboxTileType ¶
type MapboxTileType uint32
const ( MapboxVector MapboxTileType = 0 MapboxRaster MapboxTileType = 1 MapboxRasterDem MapboxTileType = 2 )
func GetMapboxTileType ¶
func GetMapboxTileType(tp string) MapboxTileType
type MockCacheManager ¶
type MockCacheManager struct {
// contains filtered or unexported fields
}
MockCacheManager implements cache.Manager interface for testing
func (*MockCacheManager) ApplyTileFilter ¶
func (*MockCacheManager) Cleanup ¶
func (m *MockCacheManager) Cleanup() bool
func (*MockCacheManager) Creator ¶
func (m *MockCacheManager) Creator(dimensions utils.Dimensions) *cache.TileCreator
func (*MockCacheManager) ExpireTimestamp ¶
func (m *MockCacheManager) ExpireTimestamp(tile *cache.Tile) *time.Time
func (*MockCacheManager) GetCache ¶
func (m *MockCacheManager) GetCache() cache.Cache
func (*MockCacheManager) GetFormat ¶
func (m *MockCacheManager) GetFormat() string
func (*MockCacheManager) GetGrid ¶
func (m *MockCacheManager) GetGrid() *geo.TileGrid
func (*MockCacheManager) GetMetaGrid ¶
func (m *MockCacheManager) GetMetaGrid() *geo.MetaGrid
func (*MockCacheManager) GetMinimizeMetaRequests ¶
func (m *MockCacheManager) GetMinimizeMetaRequests() bool
func (*MockCacheManager) GetQueryBuffer ¶
func (m *MockCacheManager) GetQueryBuffer() *int
func (*MockCacheManager) GetReprojectDstSrs ¶
func (m *MockCacheManager) GetReprojectDstSrs() geo.Proj
func (*MockCacheManager) GetReprojectSrcSrs ¶
func (m *MockCacheManager) GetReprojectSrcSrs() geo.Proj
func (*MockCacheManager) GetRequestFormat ¶
func (m *MockCacheManager) GetRequestFormat() string
func (*MockCacheManager) GetRescaleTiles ¶
func (m *MockCacheManager) GetRescaleTiles() int
func (*MockCacheManager) GetSources ¶
func (m *MockCacheManager) GetSources() []layer.Layer
func (*MockCacheManager) GetTileOptions ¶
func (m *MockCacheManager) GetTileOptions() tile.TileOptions
func (*MockCacheManager) IsCached ¶
func (m *MockCacheManager) IsCached(tileCoord [3]int, dimensions utils.Dimensions) bool
func (*MockCacheManager) IsStale ¶
func (m *MockCacheManager) IsStale(tileCoord [3]int, dimensions utils.Dimensions) bool
func (*MockCacheManager) LoadTileCoord ¶
func (m *MockCacheManager) LoadTileCoord(tileCoord [3]int, dimensions utils.Dimensions, with_metadata bool) (*cache.Tile, error)
func (*MockCacheManager) LoadTileCoords ¶
func (m *MockCacheManager) LoadTileCoords(tileCoord [][3]int, dimensions utils.Dimensions, with_metadata bool) (*cache.TileCollection, error)
func (*MockCacheManager) RemoveTileCoords ¶
func (m *MockCacheManager) RemoveTileCoords(tileCoord [][3]int) error
func (*MockCacheManager) SetCache ¶
func (m *MockCacheManager) SetCache(c cache.Cache)
func (*MockCacheManager) SetExpireTimestamp ¶
func (m *MockCacheManager) SetExpireTimestamp(t *time.Time)
func (*MockCacheManager) SetMinimizeMetaRequests ¶
func (m *MockCacheManager) SetMinimizeMetaRequests(f bool)
func (*MockCacheManager) SetSources ¶
func (m *MockCacheManager) SetSources(layer []layer.Layer)
func (*MockCacheManager) SetTileOptions ¶
func (m *MockCacheManager) SetTileOptions(opt tile.TileOptions)
func (*MockCacheManager) SiteURL ¶
func (m *MockCacheManager) SiteURL() string
func (*MockCacheManager) StoreTiles ¶
func (m *MockCacheManager) StoreTiles(tiles *cache.TileCollection) error
type MockTileResponse ¶
type MockTileResponse struct {
// contains filtered or unexported fields
}
MockTileResponse implements TileResponse interface for testing
func (*MockTileResponse) GetFormatMime ¶
func (m *MockTileResponse) GetFormatMime() string
type MockTileSource ¶
type MockTileSource struct {
// contains filtered or unexported fields
}
MockTileSource implements tile.Source interface for testing
func (*MockTileSource) GetBuffer ¶
func (m *MockTileSource) GetBuffer(format *tile.TileFormat, opts tile.TileOptions) []byte
func (*MockTileSource) GetCacheable ¶
func (m *MockTileSource) GetCacheable() *tile.CacheInfo
func (*MockTileSource) GetFileName ¶
func (m *MockTileSource) GetFileName() string
func (*MockTileSource) GetGeoReference ¶
func (m *MockTileSource) GetGeoReference() *geo.GeoReference
func (*MockTileSource) GetSize ¶
func (m *MockTileSource) GetSize() [2]uint32
func (*MockTileSource) GetSource ¶
func (m *MockTileSource) GetSource() interface{}
func (*MockTileSource) GetTile ¶
func (m *MockTileSource) GetTile() interface{}
func (*MockTileSource) GetTileOptions ¶
func (m *MockTileSource) GetTileOptions() tile.TileOptions
func (*MockTileSource) GetType ¶
func (m *MockTileSource) GetType() tile.TileType
func (*MockTileSource) SetCacheable ¶
func (m *MockTileSource) SetCacheable(cacheable *tile.CacheInfo)
func (*MockTileSource) SetSource ¶
func (m *MockTileSource) SetSource(source interface{})
func (*MockTileSource) SetTileOptions ¶
func (m *MockTileSource) SetTileOptions(options tile.TileOptions)
type PlainExceptionHandler ¶
type PlainExceptionHandler struct {
ExceptionHandler
}
func (*PlainExceptionHandler) Render ¶
func (h *PlainExceptionHandler) Render(request_error *RequestError) *Response
type Provider ¶
type Provider interface {
GetName() string
GetGrid() *geo.TileGrid
GetBBox() vec2d.Rect
GetSrs() geo.Proj
GetExtent() *geo.MapExtent
GetFormatMimeType() string
GetFormat() string
GetTileBBox(request request.TiledRequest, use_profiles bool, limit bool) (*RequestError, vec2d.Rect)
Render(tile_request request.TiledRequest, use_profiles bool, coverage geo.Coverage, decorateTile func(image tile.Source) tile.Source) (*RequestError, TileResponse)
}
type RequestError ¶
type RequestError struct {
Message string
Code string
Request request.Request
Internal bool
Status *int
Handler ExceptionHandler
}
func NewRequestError ¶
func NewRequestError(message string, code string, handler ExceptionHandler, request request.Request, internal bool, status *int) *RequestError
func (*RequestError) Render ¶
func (e *RequestError) Render() *Response
func (*RequestError) ToString ¶
func (e *RequestError) ToString() string
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
func (*Response) GetContentLength ¶
func (*Response) GetContentType ¶
func (*Response) GetLastModified ¶
func (*Response) SetLastModified ¶
func (*Response) Write ¶
func (r *Response) Write(w http.ResponseWriter)
type RestfulCapabilities ¶
type RestfulCapabilities struct {
WMTSCapabilities
// contains filtered or unexported fields
}
type TMSExceptionHandler ¶
type TMSExceptionHandler struct {
ExceptionHandler
}
func (*TMSExceptionHandler) Render ¶
func (h *TMSExceptionHandler) Render(err *RequestError) *Response
type TileMatrixSet ¶
type TileMatrixSet struct {
// contains filtered or unexported fields
}
func NewTileMatrixSet ¶
func NewTileMatrixSet(grid *geo.TileGrid) *TileMatrixSet
func (*TileMatrixSet) GetTileMatrices ¶
func (s *TileMatrixSet) GetTileMatrices() []map[string]string
type TileMetadata ¶
type TileProvider ¶
type TileProvider struct {
Provider
// contains filtered or unexported fields
}
func NewTileProvider ¶
func NewTileProvider(opts *TileProviderOptions) *TileProvider
func (*TileProvider) GetBBox ¶
func (t *TileProvider) GetBBox() vec2d.Rect
func (*TileProvider) GetExtent ¶
func (t *TileProvider) GetExtent() *geo.MapExtent
func (*TileProvider) GetFormat ¶
func (t *TileProvider) GetFormat() string
func (*TileProvider) GetFormatMimeType ¶
func (t *TileProvider) GetFormatMimeType() string
func (*TileProvider) GetGrid ¶
func (t *TileProvider) GetGrid() *geo.TileGrid
func (*TileProvider) GetName ¶
func (t *TileProvider) GetName() string
func (*TileProvider) GetSrs ¶
func (t *TileProvider) GetSrs() geo.Proj
func (*TileProvider) GetTileBBox ¶
func (tl *TileProvider) GetTileBBox(req request.TiledRequest, useProfiles bool, limit bool) (*RequestError, vec2d.Rect)
func (*TileProvider) Render ¶
func (tl *TileProvider) Render(req request.TiledRequest, useProfiles bool, coverage geo.Coverage, decorateTile func(image tile.Source) tile.Source) (*RequestError, TileResponse)
type TileProviderMetadata ¶
type TileProviderOptions ¶
type TileProviderOptions struct {
Name string
Title string
Metadata *TileProviderMetadata
TileManager cache.Manager
InfoSources []layer.InfoLayer
Dimensions utils.Dimensions
ErrorHandler ExceptionHandler
}
type TileResponse ¶
type TileResponse interface {
GetFormatMime() string
// contains filtered or unexported methods
}
type TileService ¶
type TileService struct {
BaseService
Layers map[string]Provider
Metadata *TileMetadata
MaxTileAge *time.Duration
UseDimensionLayers bool
Origin string
}
func NewTileService ¶
func NewTileService(opts *TileServiceOptions) *TileService
func (*TileService) GetCapabilities ¶
func (s *TileService) GetCapabilities(req request.Request) *Response
func (*TileService) RootResource ¶
func (s *TileService) RootResource(req request.Request) *Response
type TileServiceGrid ¶
type TileServiceGrid struct {
// contains filtered or unexported fields
}
func NewTileServiceGrid ¶
func NewTileServiceGrid(grid *geo.TileGrid) *TileServiceGrid
func (*TileServiceGrid) ExternalTileCoord ¶
func (t *TileServiceGrid) ExternalTileCoord(tile_coord [3]int, use_profiles bool) []int
func (*TileServiceGrid) GetBBox ¶
func (t *TileServiceGrid) GetBBox() vec2d.Rect
func (*TileServiceGrid) GetOrigin ¶
func (t *TileServiceGrid) GetOrigin() string
func (*TileServiceGrid) GetTileSets ¶
func (t *TileServiceGrid) GetTileSets() []float64
func (*TileServiceGrid) InternalTileCoord ¶
func (t *TileServiceGrid) InternalTileCoord(tile_coord [3]int, use_profiles bool) []int
type TileServiceOptions ¶
type WMS130ExceptionHandler ¶
type WMS130ExceptionHandler struct {
ExceptionHandler
}
func (*WMS130ExceptionHandler) Render ¶
func (h *WMS130ExceptionHandler) Render(err *RequestError) *Response
type WMSBlankExceptionHandler ¶
type WMSBlankExceptionHandler struct {
WMSImageExceptionHandler
}
func (*WMSBlankExceptionHandler) Render ¶
func (h *WMSBlankExceptionHandler) Render(request_error *RequestError) *Response
type WMSCapabilities ¶
type WMSCapabilities struct {
// contains filtered or unexported fields
}
type WMSGroupLayer ¶
type WMSGroupLayer struct {
WMSLayerBase
// contains filtered or unexported fields
}
func NewWMSGroupLayer ¶
func NewWMSGroupLayer(opts *WMSGroupLayerOptions) *WMSGroupLayer
func (*WMSGroupLayer) GetChildLayers ¶
func (l *WMSGroupLayer) GetChildLayers() map[string]WMSLayer
func (*WMSGroupLayer) GetLegendSize ¶
func (l *WMSGroupLayer) GetLegendSize() []int
func (*WMSGroupLayer) GetLegendURL ¶
func (l *WMSGroupLayer) GetLegendURL() string
type WMSGroupLayerOptions ¶
type WMSImageExceptionHandler ¶
type WMSImageExceptionHandler struct {
ExceptionHandler
}
func (*WMSImageExceptionHandler) Render ¶
func (h *WMSImageExceptionHandler) Render(request_error *RequestError) *Response
type WMSLayerBase ¶
type WMSLayerBase struct {
WMSLayer
// contains filtered or unexported fields
}
func (*WMSLayerBase) GetExtent ¶
func (l *WMSLayerBase) GetExtent() *geo.MapExtent
func (*WMSLayerBase) GetLegendSize ¶
func (l *WMSLayerBase) GetLegendSize() []int
func (*WMSLayerBase) GetLegendURL ¶
func (l *WMSLayerBase) GetLegendURL() string
func (*WMSLayerBase) GetMetadata ¶
func (l *WMSLayerBase) GetMetadata() *WMSLayerMetadata
func (*WMSLayerBase) GetName ¶
func (l *WMSLayerBase) GetName() string
func (*WMSLayerBase) GetResolutionRange ¶
func (l *WMSLayerBase) GetResolutionRange() *geo.ResolutionRange
func (*WMSLayerBase) GetTitle ¶
func (l *WMSLayerBase) GetTitle() string
func (*WMSLayerBase) HasLegend ¶
func (l *WMSLayerBase) HasLegend() bool
func (*WMSLayerBase) Queryable ¶
func (l *WMSLayerBase) Queryable() bool
type WMSLayerMetadata ¶
type WMSLayerMetadata struct {
Abstract string
KeywordList *wms130.Keywords
AuthorityURL *wms130.AuthorityURL
Identifier *wms130.Identifier
MetadataURL []*wms130.MetadataURL
Style []*wms130.Style
}
type WMSMetadata ¶
type WMSNodeLayer ¶
type WMSNodeLayer struct {
WMSLayerBase
// contains filtered or unexported fields
}
func NewWMSNodeLayer ¶
func NewWMSNodeLayer(opts *WMSNodeLayerOptions) *WMSNodeLayer
type WMSNodeLayerOptions ¶
type WMSNodeLayerOptions struct {
Name string
Title string
MapLayers map[string]layer.Layer
Infos map[string]layer.InfoLayer
Legends []layer.LegendLayer
ResRange *geo.ResolutionRange
Metadata *WMSLayerMetadata
}
type WMSService ¶
type WMSService struct {
BaseService
RootLayer *WMSGroupLayer
Layers map[string]WMSLayer
Strict bool
ImageFormats map[string]*imagery.ImageOptions
Metadata *WMSMetadata
InfoFormats map[string]string
Srs *geo.SupportedSRS
SrsExtents map[string]*geo.MapExtent
MaxOutputPixels int
MaxTileAge *time.Duration
FeatureTransformers map[string]*resource.XSLTransformer
// contains filtered or unexported fields
}
func NewWMSService ¶
func NewWMSService(opts *WMSServiceOptions) *WMSService
func (*WMSService) GetCapabilities ¶
func (s *WMSService) GetCapabilities(req request.Request) *Response
func (*WMSService) GetFeatureInfo ¶
func (s *WMSService) GetFeatureInfo(req request.Request) *Response
func (*WMSService) Legendgraphic ¶
func (s *WMSService) Legendgraphic(req request.Request) *Response
type WMSServiceOptions ¶
type WMSServiceOptions struct {
RootLayer *WMSGroupLayer
Layers map[string]WMSLayer
Metadata *WMSMetadata
Srs *geo.SupportedSRS
ImageFormats map[string]*imagery.ImageOptions
InfoFormats map[string]string
SrsExtents map[string]*geo.MapExtent
MaxOutputPixels int
MaxTileAge *time.Duration
Strict bool
Transformers map[string]*resource.XSLTransformer
}
type WMTS100ExceptionHandler ¶
type WMTS100ExceptionHandler struct {
ExceptionHandler
}
func (*WMTS100ExceptionHandler) Render ¶
func (h *WMTS100ExceptionHandler) Render(err *RequestError) *Response
type WMTSCapabilities ¶
type WMTSCapabilities struct {
Service *WMTSMetadata
Layers []WMTSTileLayer
MatrixSets map[string]*TileMatrixSet
InfoFormats map[string]string
}
type WMTSMetadata ¶
type WMTSRestService ¶
type WMTSRestService struct {
WMTSService
// contains filtered or unexported fields
}
func NewWMTSRestService ¶
func NewWMTSRestService(opts *WMTSRestServiceOptions) *WMTSRestService
type WMTSRestServiceOptions ¶
type WMTSService ¶
type WMTSService struct {
BaseService
Metadata *WMTSMetadata
MaxTileAge *time.Duration
Layers map[string]WMTSTileLayer
MatrixSets map[string]*TileMatrixSet
InfoFormats map[string]string
}
func NewWMTSService ¶
func NewWMTSService(opts *WMTSServiceOptions) *WMTSService
func (*WMTSService) GetCapabilities ¶
func (s *WMTSService) GetCapabilities(req request.Request) *Response
func (*WMTSService) GetFeatureInfo ¶
func (s *WMTSService) GetFeatureInfo(req request.Request) *Response
type WMTSServiceOptions ¶
type WMTSTileLayer ¶
func (WMTSTileLayer) GetBBox ¶
func (l WMTSTileLayer) GetBBox() vec2d.Rect
func (WMTSTileLayer) GetFormat ¶
func (l WMTSTileLayer) GetFormat() string
func (WMTSTileLayer) GetFormatMimeType ¶
func (l WMTSTileLayer) GetFormatMimeType() string
func (WMTSTileLayer) GetGrid ¶
func (l WMTSTileLayer) GetGrid() *geo.TileGrid
func (WMTSTileLayer) GetGrids ¶
func (l WMTSTileLayer) GetGrids() []*geo.TileGrid
func (WMTSTileLayer) GetName ¶
func (l WMTSTileLayer) GetName() string
func (WMTSTileLayer) GetSrs ¶
func (l WMTSTileLayer) GetSrs() geo.Proj
func (WMTSTileLayer) GetTileBBox ¶
func (l WMTSTileLayer) GetTileBBox(request request.TiledRequest, use_profiles bool, limit bool) (*RequestError, vec2d.Rect)
func (WMTSTileLayer) GetTitle ¶
func (l WMTSTileLayer) GetTitle() string
func (WMTSTileLayer) LLBBox ¶
func (l WMTSTileLayer) LLBBox() vec2d.Rect
Click to show internal directories.
Click to hide internal directories.