setting

package
v0.0.0-...-7109a22 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultStrict          = false
	DefaultMaxOutputPixels = 4000 * 4000
)
View Source
const (
	DefaultResamplingMethod          = "bicubic"
	DefaultJpegQuality               = 90
	DefaultStretchFactor             = 1.15
	DefaultMaxShrinkFactor           = 4.0
	DefaultPaletted                  = true
	DefaultTransparentColorTolerance = 5
)
View Source
const (
	DefaultConcurrentTileCreators = 2
	DefaultMetaBuffer             = 80
	DefaultMinimizeMetaRequests   = false
)
View Source
const (
	TILE_OPTION_RASTER = "raster"
	TILE_OPTION_VECTOR = "vector"
	TILE_OPTION_IMAGE  = "image"
)
View Source
const (
	DIRECTORY_LAYOUT_TC      = "tc"
	DIRECTORY_LAYOUT_MP      = "mp"
	DIRECTORY_LAYOUT_TMS     = "tms"
	DIRECTORY_LAYOUT_RE_TMS  = "reverse_tms"
	DIRECTORY_LAYOUT_QUADKEY = "quadkey"
	DIRECTORY_LAYOUT_ARCGIS  = "arcgis"
)
View Source
const MaxJSONSize = 10 * 1024 * 1024 // 10MB

Variables

View Source
var (
	DefaultServer       = []string{"wms", "tms", "wmts", "mapbox"}
	DefaultImageFormats = []string{"image/png", "image/jpeg", "image/gif", "image/GeoTIFF", "image/tiff"}
	DefaultSRS          = []string{"EPSG:4326", "EPSG:4258", "CRS:84", "EPSG:900913", "EPSG:3857", "EPSG:GCJ02", "EPSG:BD09", "EPSG:GCJ02MC", "EPSG:BDMC"}
)
View Source
var (
	DefaultAxisOrderNE = []string{"EPSG:4326", "EPSG:4258", "EPSG:31466", "EPSG:31467", "EPSG:31468"}
	DefaultAxisOrderEN = []string{"CRS:84", "EPSG:900913", "EPSG:25831", "EPSG:25832", "EPSG:25833"}
)
View Source
var (
	DefaultMetaSize = [2]int{4, 4}
	DefaultTileSize = [2]uint32{256, 256}
)
View Source
var (
	DefaultExpiresHours             = 72
	DefaultRequestTimeout           = 60
	DefaultAccessControlAllowOrigin = "*"
	DefaultUserAgent                = "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20100101 Firefox/6.0"
	DefaultRandomDelay              = 0
	DefaultThreads                  = 4
)
View Source
var (
	DefaultGrids = []GridOpts{
		{Srs: "EPSG:4326", Origin: "sw", Name: "GLOBAL_GEODETIC"},
		{Srs: "EPSG:900913", Origin: "sw", Name: "GLOBAL_MERCATOR"},
		{Srs: "EPSG:3857", Origin: "nw", Name: "GLOBAL_WEBMERCATOR"},
		{Srs: "EPSG:GCJ02MC", Origin: "nw", Name: "GCJ02_GLOBAL_WEBMERCATOR"},
		{Srs: "EPSG:BDMC", Origin: "nw", Name: "BD_GLOBAL_WEBMERCATOR"},
	}
)

Functions

func ConvertCesiumTileLayer

func ConvertCesiumTileLayer(l *CesiumTileLayer, globals *GlobalsSetting, instance ProxyInstance) *service.CesiumTileProvider

func ConvertContactInformation

func ConvertContactInformation(contactInformation *WMSContactInformation) *wms130.ContactInformation

func ConvertExtendedCapabilities

func ConvertExtendedCapabilities(extendedCapabilities *WMSExtendedCapabilities) *wms130.ExtendedCapabilities

func ConvertGridOpts

func ConvertGridOpts(opt *GridOpts) *geo.TileGrid

func ConvertLocalCache

func ConvertLocalCache(opt *CacheInfo, opts tile.TileOptions) *cache.LocalCache

func ConvertLocalStore

func ConvertLocalStore(opt *StoreInfo) *resource.LocalStore

func ConvertMapboxTileLayer

func ConvertMapboxTileLayer(l *MapboxTileLayer, globals *GlobalsSetting, instance ProxyInstance) *service.MapboxTileProvider

func ConvertTileLayer

func ConvertTileLayer(l *TileLayer, instance ProxyInstance) *service.TileProvider

func ConvertWMSLayer

func ConvertWMSLayer(l *WMSLayer, instance ProxyInstance) service.WMSLayer

func ConvertWMSLayerMetadata

func ConvertWMSLayerMetadata(metadata *WMSLayerMetadata) *service.WMSLayerMetadata

func ConvertWMTSServiceProvider

func ConvertWMTSServiceProvider(provider *WMTSServiceProvider) *wsc110.ServiceProvider

func GetPreferredSrcSRS

func GetPreferredSrcSRS(srs *Srs) geo.PreferredSrcSRS

func IsValidSRS

func IsValidSRS(srs string) bool

func LoadArcGISInfoSource

func LoadArcGISInfoSource(s *ArcGISSource, globals *GlobalsSetting) *sources.ArcGISInfoSource

func LoadArcGISSource

func LoadArcGISSource(s *ArcGISSource, instance ProxyInstance, globals *GlobalsSetting) *sources.ArcGISSource

func LoadCacheManager

func LoadCacheManager(c *CacheSource, globals *GlobalsSetting, instance ProxyInstance, fac CacheFactory, manager cache.Manager)

func LoadCesiumService

func LoadCesiumService(s *CesiumService, globals *GlobalsSetting, instance ProxyInstance, fac CacheFactory) *service.CesiumService

func LoadCesiumTileSource

func LoadCesiumTileSource(s *CesiumTileSource, globals *GlobalsSetting, instance ProxyInstance, fac CacheFactory) *sources.CesiumTileSource

func LoadCoverage

func LoadCoverage(cov *Coverage) geo.Coverage

func LoadFilter

func LoadFilter(f interface{}) cache.Filter

func LoadMapboxService

func LoadMapboxService(s *MapboxService, globals *GlobalsSetting, instance ProxyInstance, fac CacheFactory) *service.MapboxService

func LoadMapboxTileSource

func LoadMapboxTileSource(s *MapboxTileSource, globals *GlobalsSetting, instance ProxyInstance, fac CacheFactory) *sources.MapboxTileSource

func LoadTMSService

func LoadTMSService(s *TMSService, instance ProxyInstance) *service.TileService

func LoadTileSource

func LoadTileSource(s *TileSource, globals *GlobalsSetting, instance ProxyInstance) *sources.TileSource

func LoadWMSInfoSource

func LoadWMSInfoSource(s *WMSSource, globals *GlobalsSetting) *sources.WMSInfoSource

func LoadWMSLegendsSource

func LoadWMSLegendsSource(s *WMSSource, globals *GlobalsSetting, fac CacheFactory) *sources.WMSLegendSource

func LoadWMSMapSource

func LoadWMSMapSource(s *WMSSource, instance ProxyInstance, globals *GlobalsSetting) *sources.WMSSource

func LoadWMSService

func LoadWMSService(s *WMSService, instance ProxyInstance, globals *GlobalsSetting) *service.WMSService

func LoadWMTSRestfulService

func LoadWMTSRestfulService(s *WMTSService, instance ProxyInstance) *service.WMTSRestService

func LoadWMTSService

func LoadWMTSService(s *WMTSService, instance ProxyInstance) *service.WMTSService

func NewBBox

func NewBBox(s vec3d.Box) *vec3d.Box

func NewBool

func NewBool(f bool) *bool

func NewDuration

func NewDuration(t time.Duration) *time.Duration

func NewFloat32

func NewFloat32(f float32) *float32

func NewFloat64

func NewFloat64(f float64) *float64

func NewFloat644

func NewFloat644(f [4]float64) *[4]float64

func NewFormat

func NewFormat(s tile.TileFormat) *tile.TileFormat

func NewImageOptions

func NewImageOptions(opt *ImageOpts) *imagery.ImageOptions

func NewIn64

func NewIn64(s int64) *int64

func NewInt

func NewInt(s int) *int

func NewInt2

func NewInt2(i [2]int) *[2]int

func NewInt32

func NewInt32(s int32) *int32

func NewRasterOptions

func NewRasterOptions(opt *RasterOpts) *terrain.RasterOptions

func NewRect

func NewRect(s vec2d.Rect) *vec2d.Rect

func NewResolutionRange

func NewResolutionRange(conf *ScaleHints) *geo.ResolutionRange

func NewString

func NewString(s string) *string

func NewUInt32

func NewUInt32(s uint32) *uint32

func NewUInt64

func NewUInt64(s uint64) *uint64

func NewUInt82

func NewUInt82(i [4]uint8) *[4]uint8

func NewUInt322

func NewUInt322(s [2]uint32) *[2]uint32

func NewVec2d

func NewVec2d(s vec2d.T) *vec2d.T

func NewVec3d

func NewVec3d(s vec3d.T) *vec3d.T

func NewVectorOptions

func NewVectorOptions(opt *VectorOpts) *vector.VectorOptions

func PreLoadCacheManager

func PreLoadCacheManager(c *CacheSource, globals *GlobalsSetting, instance ProxyInstance, fac CacheFactory) cache.Manager

func TileOptionUnmarshal

func TileOptionUnmarshal(obj interface{}) (interface{}, error)

Types

type ArcGISSource

type ArcGISSource struct {
	SourceCommons
	Type               SourceType       `json:"type,omitempty"`
	Image              WMSImageOpts     `json:"image"`
	Url                string           `json:"url,omitempty"`
	Dpi                *int             `json:"dpi,omitempty"`
	Layers             []string         `json:"layers"`
	Transparent        *bool            `json:"transparent,omitempty"`
	Format             string           `json:"format,omitempty"`
	LercVersion        *int             `json:"lerc_version,omitempty"`
	PixelType          *string          `json:"pixel_type,omitempty"`
	CompressionQuality *int             `json:"compression_quality,omitempty"`
	Opts               ArcGISSourceOpts `json:"opts"`
	SupportedFormats   []string         `json:"supported_formats,omitempty"`
	SupportedSrs       []string         `json:"supported_srs,omitempty"`
}

type ArcGISSourceOpts

type ArcGISSourceOpts struct {
	Featureinfo                 *bool   `json:"featureinfo,omitempty"`
	FeatureinfoTolerance        *int    `json:"featureinfo_tolerance,omitempty"`
	FeatureinfoReturnGeometries *bool   `json:"featureinfo_return_geometries,omitempty"`
	AccessToken                 *string `json:"access_token,omitempty"`
	AccessTokenName             *string `json:"access_token_name,omitempty"`
}

type BBoxSrs

type BBoxSrs struct {
	Srs  string     `json:"srs"`
	BBox [4]float64 `json:"bbox,omitempty"`
}

type CacheFactory

type CacheFactory interface {
	CreateCache(cache *CacheInfo, opts tile.TileOptions) cache.Cache
	CreateStore(cache *StoreInfo) resource.Store
}

type CacheInfo

type CacheInfo struct {
	Type            CacheType `json:"type,omitempty"`
	DirectoryLayout string    `json:"directory_layout,omitempty"`
	Directory       string    `json:"directory,omitempty"`
}

type CacheSource

type CacheSource struct {
	Type                 SourceType    `json:"type,omitempty"`
	Sources              []string      `json:"sources,omitempty"`
	Name                 string        `json:"name,omitempty"`
	Grid                 string        `json:"grid,omitempty"`
	LockDir              string        `json:"lock_dir,omitempty"`
	LockRetryDelay       int           `json:"lock_retry_delay,omitempty"`
	MetaSize             []uint32      `json:"meta_size,omitempty"`
	MetaBuffer           *int          `json:"meta_buffer,omitempty"`
	BulkMetaTiles        *bool         `json:"bulk_meta_tiles,omitempty"`
	MinimizeMetaRequests *bool         `json:"minimize_meta_requests,omitempty"`
	Format               string        `json:"format,omitempty"`
	RequestFormat        string        `json:"request_format,omitempty"`
	CacheRescaledTiles   *bool         `json:"cache_rescaled_tiles,omitempty"`
	UpscaleTiles         *int          `json:"upscale_tiles,omitempty"`
	DownscaleTiles       *int          `json:"downscale_tiles,omitempty"`
	Filters              []interface{} `json:"filters,omitempty"`
	CacheInfo            *CacheInfo    `json:"cache,omitempty"`
	ReprojectSrs         *Reproject    `json:"reproject,omitempty"`
	QueryBuffer          *int          `json:"query_buffer,omitempty"`
	TileOptions          interface{}   `json:"tile_options,omitempty"`
}

func (*CacheSource) FromJson

func (c *CacheSource) FromJson(data []byte) error

type CacheType

type CacheType string
const (
	CACHE_TYPE_FILE   CacheType = "local"
	CACHE_TYPE_CUSTOM CacheType = "custom"
)

type CesiumService

type CesiumService struct {
	Type       string            `json:"type,omitempty"`
	Layers     []CesiumTileLayer `json:"layers,omitempty"`
	MaxTileAge *int              `json:"max_tile_age,omitempty"`
}

type CesiumTileLayer

type CesiumTileLayer struct {
	Source      string  `json:"source"`
	Name        string  `json:"name,omitempty"`
	Title       string  `json:"title"`
	ZoomRange   *[2]int `json:"zoom_range,omitempty"`
	LayerJSON   string  `json:"layerjson,omitempty"`
	Attribution *string `json:"attribution,omitempty"`
	Description *string `json:"description,omitempty"`
}

type CesiumTileSource

type CesiumTileSource struct {
	SourceCommons
	Type           SourceType  `json:"type,omitempty"`
	AuthUrl        string      `json:"auth_url,omitempty"`
	Url            string      `json:"url,omitempty"`
	Version        string      `json:"version,omitempty"`
	AssetId        int         `json:"asset_id,omitempty"`
	AccessToken    string      `json:"access_token,omitempty"`
	Grid           string      `json:"grid,omitempty"`
	LayerjsonStore *StoreInfo  `json:"layerjson_store"`
	Options        interface{} `json:"options,omitempty"`
}

func (*CesiumTileSource) FromJson

func (c *CesiumTileSource) FromJson(data []byte) error

type ConfigValidator

type ConfigValidator interface {
	Validate() error
	GetWarnings() []string
}

type Coverage

type Coverage struct {
	Name         string      `json:"name"`
	Polygons     string      `json:"polygons,omitempty"`
	PolygonsSrs  string      `json:"polygons_srs,omitempty"`
	BBox         *[4]float64 `json:"bbox,omitempty"`
	BBoxSrs      string      `json:"bbox_srs,omitempty"`
	Geometry     string      `json:"geometry,omitempty"`
	GeometrySrs  string      `json:"geometry_srs,omitempty"`
	ExpireTiles  [][3]int    `json:"expire_tiles,omitempty"`
	Union        []Coverage  `json:"union,omitempty"`
	Intersection []Coverage  `json:"intersection,omitempty"`
	Difference   []Coverage  `json:"difference,omitempty"`
	Clip         *bool       `json:"clip,omitempty"`
}

type FeatureinfoFormat

type FeatureinfoFormat struct {
	MimeType string `json:"mimetype"`
	Suffix   string `json:"suffix,omitempty"`
}

type FilterType

type FilterType string
const (
	FILTER_TYPE_WATERMARK FilterType = "watermark"
)

type Geoid

type Geoid struct {
	GeoidDataDir string `json:"geoid_data_dir,omitempty"`
}

type GlobalsSetting

type GlobalsSetting struct {
	Image ImageSetting `json:"image,omitempty"`
	Http  struct {
		HttpSetting
		AccessControlAllowOrigin string `json:"access_control_allow_origin,omitempty"`
	} `json:"http,omitempty"`
	Cache struct {
		BaseDir              string   `json:"base_dir,omitempty"`
		MetaSize             []uint32 `json:"meta_size,omitempty"`
		MetaBuffer           int      `json:"meta_buffer,omitempty"`
		BulkMetaTiles        bool     `json:"bulk_meta_tiles,omitempty"`
		MinimizeMetaRequests bool     `json:"minimize_meta_requests,omitempty"`
	} `json:"cache,omitempty"`
	Grid struct {
		TileSize []uint32 `json:"tile_size,omitempty"`
	} `json:"grid,omitempty"`
	Srs   Srs   `json:"srs,omitempty"`
	Geoid Geoid `json:"geoid,omitempty"`
	Tiles struct {
		ExpiresHours int `json:"expires_hours,omitempty"`
	}
}

type GridOpts

type GridOpts struct {
	Name                 string      `json:"name,omitempty"`
	Srs                  string      `json:"srs,omitempty"`
	BBox                 *[4]float64 `json:"bbox,omitempty"`
	BBoxSrs              string      `json:"bbox_srs,omitempty"`
	NumLevels            *int        `json:"num_levels,omitempty"`
	Resolutions          []float64   `json:"res,omitempty"`
	ResFactor            interface{} `json:"res_factor,omitempty"`
	MaxRes               *float64    `json:"max_res,omitempty"`
	MinRes               *float64    `json:"min_res,omitempty"`
	MaxStretchFactor     *float64    `json:"max_stretch_factor,omitempty"`
	MaxShrinkFactor      *float64    `json:"max_shrink_factor,omitempty"`
	AlignResolutionsWith string      `json:"align_resolutions_with,omitempty"`
	Origin               string      `json:"origin,omitempty"`
	TileSize             *[2]uint32  `json:"tile_size,omitempty"`
	ThresholdRes         []float64   `json:"threshold_res,omitempty"`
	InitialResMin        *bool       `json:"initial_res_min,omitempty"`
}

type HttpSetting

type HttpSetting struct {
	SiteURL           string         `json:"site_url,omitempty"`
	UserAgent         *string        `json:"user_agent,omitempty"`
	RandomDelay       *int           `json:"random_delay,omitempty"`
	DisableKeepAlives *bool          `json:"disable_keep_alives,omitempty"`
	Proxys            []string       `json:"proxys,omitempty"`
	RequestTimeout    *time.Duration `json:"request_timeout,omitempty"`
	Threads           *int           `json:"thread_size,omitempty"`
}

type ImageOpts

type ImageOpts struct {
	Type             string                 `json:"type"`
	Mode             string                 `json:"mode,omitempty"`
	Transparent      *bool                  `json:"transparent,omitempty"`
	Opacity          *float64               `json:"opacity,omitempty"`
	ResamplingMethod string                 `json:"resampling_method,omitempty"`
	Format           string                 `json:"format,omitempty"`
	EncodingOptions  map[string]interface{} `json:"encoding_options,omitempty"`
	BgColor          *[4]uint8              `json:"bgcolor,omitempty"`
}

type ImageSetting

type ImageSetting struct {
	ResamplingMethod string               `json:"resampling_method,omitempty"`
	Paletted         *bool                `json:"paletted,omitempty"`
	MaxStretchFactor *float64             `json:"max_stretch_factor,omitempty"`
	MaxShrinkFactor  *float64             `json:"max_shrink_factor,omitempty"`
	FontDir          *string              `json:"font_dir,omitempty"`
	Formats          map[string]ImageOpts `json:"formats,omitempty"`
}

type MapboxService

type MapboxService struct {
	Type       string            `json:"type,omitempty"`
	Layers     []MapboxTileLayer `json:"layers,omitempty"`
	MaxTileAge *int              `json:"max_tile_age,omitempty"`
}

type MapboxTileLayer

type MapboxTileLayer struct {
	Source       string                  `json:"source"`
	Name         string                  `json:"name,omitempty"`
	Title        string                  `json:"title"`
	VectorLayers []*resource.VectorLayer `json:"vector_layers,omitempty"`
	TileType     string                  `json:"tile_type,omitempty"`
	ZoomRange    *[2]int                 `json:"zoom_range,omitempty"`
	TileJSON     string                  `json:"tilejson,omitempty"`
	Attribution  *string                 `json:"attribution,omitempty"`
	Description  *string                 `json:"description,omitempty"`
	Legend       *string                 `json:"legend,omitempty"`
	FillZoom     *uint32                 `json:"fill_zoom,omitempty"`
}

type MapboxTileSource

type MapboxTileSource struct {
	SourceCommons
	Type            SourceType  `json:"type,omitempty"`
	Url             string      `json:"url,omitempty"`
	Tiles           []string    `json:"tiles,omitempty"`
	TileStatsUrl    string      `json:"tile_stats_url,omitempty"`
	Sku             string      `json:"sku,omitempty"`
	AccessToken     string      `json:"access_token,omitempty"`
	AccessTokenName string      `json:"access_token_name,omitempty"`
	Grid            string      `json:"grid,omitempty"`
	ResourceStore   *StoreInfo  `json:"resource_store"`
	Options         interface{} `json:"options,omitempty"`
}

func (*MapboxTileSource) FromJson

func (c *MapboxTileSource) FromJson(data []byte) error

type ProxyInstance

type ProxyInstance interface {
	GetGrid(name string) geo.Grid
	GetSource(name string) layer.Layer
	GetCache(name string) cache.Manager
	GetCacheSource(name string, opt tile.TileOptions) layer.Layer
	GetInfoSource(name string) layer.InfoLayer
	GetLegendSource(name string) layer.LegendLayer
}

type ProxyService

type ProxyService struct {
	Id        string                 `json:"id,omitempty"`
	Service   interface{}            `json:"service,omitempty"`
	Coverages map[string]Coverage    `json:"coverages,omitempty"`
	Grids     map[string]GridOpts    `json:"grids,omitempty"`
	Sources   map[string]interface{} `json:"sources,omitempty"`
	Caches    map[string]interface{} `json:"caches,omitempty"`
}

func CreateProxyServiceFromJSON

func CreateProxyServiceFromJSON(content []byte) (*ProxyService, error)

func NewProxyService

func NewProxyService(id string) *ProxyService

func (*ProxyService) GetWarnings

func (ps *ProxyService) GetWarnings() []string

func (*ProxyService) ToJSON

func (gs *ProxyService) ToJSON() []byte

func (*ProxyService) Validate

func (ps *ProxyService) Validate() error

type RasterOpts

type RasterOpts struct {
	Type         string   `json:"type"`
	Format       string   `json:"format,omitempty"`
	Mode         *string  `json:"mode,omitempty"`
	MaxError     float64  `json:"max_error,omitempty"`
	Nodata       *float64 `json:"nodata,omitempty"`
	Interpolator *string  `json:"interpolator,omitempty"`
	DataType     *string  `json:"data_type,omitempty"`
	HeightModel  *string  `json:"height_model,omitempty"`
	HeightOffset *float64 `json:"height_offset,omitempty"`
}

type Reproject

type Reproject struct {
	SrcSrs  string `json:"src_srs,omitempty"`
	DestSrs string `json:"dest_srs,omitempty"`
}

type ScaleHints

type ScaleHints struct {
	MaxScale *float64 `json:"max_scale,omitempty"`
	MinScale *float64 `json:"min_scale,omitempty"`
	MaxRes   *float64 `json:"max_res,omitempty"`
	MinRes   *float64 `json:"min_res,omitempty"`
}

type ServiceType

type ServiceType string
const (
	NONE_SERVICE   ServiceType = "none"
	WMS_SERVICE    ServiceType = "wms"
	TMS_SERVICE    ServiceType = "tms"
	WMTS_SERVICE   ServiceType = "wmts"
	MAPBOX_SERVICE ServiceType = "mapbox"
	CESIUM_SERVICE ServiceType = "cesium"
)

type Source

type Source interface {
	GetCoverage() *Coverage
}

type SourceCommons

type SourceCommons struct {
	ScaleHints
	Coverage *Coverage    `json:"coverage,omitempty"`
	Http     *HttpSetting `json:"http,omitempty"`
	Name     string       `json:"name"`
}

func (*SourceCommons) GetCoverage

func (s *SourceCommons) GetCoverage() *Coverage

type SourceType

type SourceType string
const (
	NONE_SOURCE       SourceType = "none"
	WMS_SOURCE        SourceType = "wms"
	TILE_SOURCE       SourceType = "tile"
	MAPBOXTILE_SOURCE SourceType = "mapbox"
	ARCGIS_SOURCE     SourceType = "arcgis"
	CESIUMTILE_SOURCE SourceType = "cesium"
)

type Srs

type Srs struct {
	AxisOrderNE      []string            `json:"axis_order_ne,omitempty"`
	AxisOrderEN      []string            `json:"axis_order_en,omitempty"`
	ProjDataDir      string              `json:"proj_data_dir,omitempty"`
	PreferredSrcProj map[string][]string `json:"preferred_src_proj,omitempty"`
}

type StoreInfo

type StoreInfo struct {
	Type      CacheType `json:"type,omitempty"`
	Directory string    `json:"directory,omitempty"`
}

func DefaultStoreInfo

func DefaultStoreInfo() *StoreInfo

type TMSService

type TMSService struct {
	Type       string      `json:"type,omitempty"`
	Title      string      `json:"title,omitempty"`
	Abstract   string      `json:"abstract,omitempty"`
	Origin     string      `json:"origin,omitempty"`
	Layers     []TileLayer `json:"layers,omitempty"`
	MaxTileAge *int        `json:"max_tile_age,omitempty"`
}

type TileLayer

type TileLayer struct {
	Name        string                   `json:"name,omitempty"`
	Title       string                   `json:"title,omitempty"`
	Description string                   `json:"description,omitempty"`
	Source      string                   `json:"source"`
	InfoSources []string                 `json:"info_sources"`
	Dimensions  map[string][]interface{} `json:"dimensions,omitempty"`
}

type TileSource

type TileSource struct {
	SourceCommons
	Type          SourceType  `json:"type,omitempty"`
	URLTemplate   string      `json:"url_template,omitempty"`
	AccessToken   *string     `json:"access_token,omitempty"`
	Grid          string      `json:"grid,omitempty"`
	RequestFormat string      `json:"request_format,omitempty"`
	Subdomains    []string    `json:"subdomains,omitempty"`
	Options       interface{} `json:"options,omitempty"`
}

func (*TileSource) FromJson

func (c *TileSource) FromJson(data []byte) error

type VectorOpts

type VectorOpts struct {
	Type        string   `json:"type"`
	Format      string   `json:"format,omitempty"`
	Tolerance   *float64 `json:"tolerance,omitempty"`
	Extent      uint16   `json:"extent,omitempty"`
	Buffer      *uint16  `json:"buffer,omitempty"`
	LineMetrics *bool    `json:"line_metrics,omitempty"`
	MaxZoom     *uint8   `json:"max_zoom,omitempty"`
	Proto       *int     `json:"proto,omitempty"`
}

type WMSAuthorityURL

type WMSAuthorityURL struct {
	Name           string            `json:"name,omitempty"`
	OnlineResource WMSOnlineResource `json:"onlineresource,omitempty"`
}

type WMSContactInformation

type WMSContactInformation struct {
	ContactPersonPrimary struct {
		ContactPerson       string `json:"contactperson,omitempty"`
		ContactOrganization string `json:"contactorganization,omitempty"`
	} `json:"contactpersonprimary,omitempty"`
	ContactPosition string `json:"contactposition,omitempty"`
	ContactAddress  struct {
		AddressType     string `json:"addresstype,omitempty"`
		Address         string `json:"address,omitempty"`
		City            string `json:"city,omitempty"`
		StateOrProvince string `json:"stateorprovince,omitempty"`
		PostCode        string `json:"postalcode,omitempty"`
		Country         string `json:"country,omitempty"`
	} `json:"contactaddress,omitempty"`
	ContactVoiceTelephone        string `json:"contactvoicetelephone,omitempty"`
	ContactFacsimileTelephone    string `json:"contactfacsimiletelephone,omitempty"`
	ContactElectronicMailAddress string `json:"contactelectronicmailaddress,omitempty"`
}

type WMSExtendedCapabilities

type WMSExtendedCapabilities struct {
	MetadataURL struct {
		URL       string `json:"url,omitempty"`
		MediaType string `json:"mediatype,omitempty"`
	} `json:"metadataurl,omitempty"`
	SupportedLanguages struct {
		DefaultLanguage struct {
			Language string `json:"language,omitempty"`
		} `json:"defaultlanguage,omitempty"`
		SupportedLanguage *[]struct {
			Language string `json:"language,omitempty"`
		} `json:"supportedlanguage,omitempty"`
	} `json:"supportedlanguages,omitempty"`
	ResponseLanguage struct {
		Language string `json:"language,omitempty"`
	} `json:"responselanguage,omitempty"`
}

type WMSIdentifier

type WMSIdentifier struct {
	Authority string `json:"authority,omitempty"`
	Value     string `json:"value,omitempty"`
}

type WMSImageOpts

type WMSImageOpts struct {
	ImageOpts
	TransparentColor          *[4]uint8 `json:"transparent_color,omitempty"`
	TransparentColorTolerance *float64  `json:"transparent_color_tolerance,omitempty"`
}

type WMSKeywords

type WMSKeywords struct {
	Keyword []string `json:"keyword,omitempty"`
}

type WMSLayer

type WMSLayer struct {
	ScaleHints
	Sources            []string                 `json:"sources"`
	FeatureinfoSources []string                 `json:"featureinfo_sources,omitempty"`
	LegendSources      []string                 `json:"legend_sources,omitempty"`
	Name               string                   `json:"name,omitempty"`
	Title              string                   `json:"title"`
	Description        string                   `json:"description,omitempty"`
	LegendURL          string                   `json:"legend_url,omitempty"`
	Metadata           *WMSLayerMetadata        `json:"metadata,omitempty"`
	Layers             []WMSLayer               `json:"layers,omitempty"`
	Dimensions         map[string][]interface{} `json:"dimensions,omitempty"`
	LegendStore        interface{}              `json:"legendstore"`
}

type WMSLayerMetadata

type WMSLayerMetadata struct {
	Abstract     string            `json:"abstract"`
	KeywordList  *WMSKeywords      `json:"keyword_list,omitempty"`
	AuthorityURL *WMSAuthorityURL  `json:"authority_url,omitempty"`
	Identifier   *WMSIdentifier    `json:"identifier,omitempty"`
	MetadataURL  []*WMSMetadataURL `json:"metadata_url,omitempty"`
	Style        []*WMSStyle       `json:"style,omitempty"`
}

type WMSMetadataURL

type WMSMetadataURL struct {
	Type           *string           `json:"type,omitempty"`
	Format         *string           `json:"format,omitempty"`
	OnlineResource WMSOnlineResource `json:"onlineresource,omitempty"`
}

type WMSOnlineResource

type WMSOnlineResource struct {
	Xlink *string `json:"xlink,omitempty"`
	Type  *string `json:"type,omitempty"`
	Href  *string `json:"href,omitempty"`
}

type WMSService

type WMSService struct {
	Type               string              `json:"type,omitempty"`
	Srs                []string            `json:"srs,omitempty"`
	BBoxSrs            []BBoxSrs           `json:"bbox_srs,omitempty"`
	ImageFormats       []string            `json:"image_formats,omitempty"`
	FeatureinfoFormats []FeatureinfoFormat `json:"featureinfo_formats,omitempty"`
	FeatureinfoXslt    map[string]string   `json:"featureinfo_xslt,omitempty"`
	MaxOutputPixels    *int                `json:"max_output_pixels,omitempty"`
	Strict             *bool               `json:"strict,omitempty"`
	Title              string              `json:"title,omitempty"`
	Abstract           string              `json:"abstract,omitempty"`
	KeywordList        []string            `json:"keyword_list,omitempty"`
	OnlineResource     struct {
		Xlink *string `json:"xlink,omitempty"`
		Type  *string `json:"type,omitempty"`
		Href  *string `json:"href,omitempty"`
	} `json:"online_resource"`
	Fees                 *string                  `json:"fees,omitempty"`
	AccessConstraints    *string                  `json:"access_constraints,omitempty"`
	RootLayer            *WMSLayer                `json:"root_layer,omitempty"`
	Layers               []WMSLayer               `json:"layers,omitempty"`
	MaxTileAge           *int                     `json:"max_tile_age,omitempty"`
	ExtendedCapabilities *WMSExtendedCapabilities `json:"extended_capabilities,omitempty"`
	ContactInformation   *WMSContactInformation   `json:"contact_information,omitempty"`
}

type WMSSource

type WMSSource struct {
	SourceCommons
	Type             SourceType        `json:"type,omitempty"`
	Opts             WMSSourceOpts     `json:"wms_opts"`
	Image            WMSImageOpts      `json:"image"`
	ForwardReqParams map[string]string `json:"forward_req_params,omitempty"`
	SupportedFormats []string          `json:"supported_formats,omitempty"`
	SupportedSrs     []string          `json:"supported_srs,omitempty"`
	Url              string            `json:"url,omitempty"`
	Layers           []string          `json:"layers"`
	Transparent      *bool             `json:"transparent,omitempty"`
	Format           string            `json:"format,omitempty"`
	Store            *StoreInfo        `json:"store"`
	AccessToken      *string           `json:"access_token,omitempty"`
	AccessTokenName  *string           `json:"access_token_name,omitempty"`
}

type WMSSourceOpts

type WMSSourceOpts struct {
	Version              string `json:"version,omitempty"`
	Map                  *bool  `json:"map,omitempty"`
	FeatureInfo          *bool  `json:"featureinfo,omitempty"`
	LegendGraphic        *bool  `json:"legend_graphic,omitempty"`
	LegendURL            string `json:"legend_url,omitempty"`
	LegendID             string `json:"legend_id,omitempty"`
	FeatureinfoFormat    string `json:"featureinfo_format,omitempty"`
	FeatureinfoXslt      string `json:"featureinfo_xslt,omitempty"`
	FeatureinfoOutFormat string `json:"featureinfo_out_format,omitempty"`
}

type WMSStyle

type WMSStyle struct {
	Name      string `json:"name"`
	Title     string `json:"title"`
	Abstract  string `json:"abstract"`
	LegendURL struct {
		Width          int               `json:"width"`
		Height         int               `json:"height"`
		Format         string            `json:"format"`
		OnlineResource WMSOnlineResource `json:"onlineresource"`
	} `json:"legendurl"`
	StyleSheetURL *struct {
		Format         string            `json:"format"`
		OnlineResource WMSOnlineResource `json:"onlineresource"`
	} `json:"stylesheeturl"`
}

type WMTSService

type WMTSService struct {
	Type                       string               `json:"type,omitempty"`
	Restful                    *bool                `json:"restful,omitempty"`
	RestfulTemplate            string               `json:"restful_template,omitempty"`
	RestfulFeatureinfoTemplate string               `json:"restful_featureinfo_template,omitempty"`
	Title                      string               `json:"title,omitempty"`
	Abstract                   string               `json:"abstract,omitempty"`
	KeywordList                []string             `json:"keyword_list,omitempty"`
	Fees                       *string              `json:"fees,omitempty"`
	AccessConstraints          *string              `json:"access_constraints,omitempty"`
	Provider                   *WMTSServiceProvider `json:"provider,omitempty"`
	FeatureinfoFormats         []FeatureinfoFormat  `json:"featureinfo_formats,omitempty"`
	Layers                     []TileLayer          `json:"layers,omitempty"`
	MaxTileAge                 *int                 `json:"max_tile_age,omitempty"`
}

type WMTSServiceProvider

type WMTSServiceProvider struct {
	ProviderName string `json:"providername"`
	ProviderSite struct {
		Type string `json:"type"`
		Href string `json:"href"`
	} `json:"providersite"`
	ServiceContact struct {
		IndividualName string `json:"individualname"`
		PositionName   string `json:"positionname"`
		ContactInfo    struct {
			Phone struct {
				Voice     string `json:"voice"`
				Facsimile string `json:"facsimile"`
			} `json:"phone"`
			Address struct {
				DeliveryPoint         string `json:"deliverypoint"`
				City                  string `json:"city"`
				AdministrativeArea    string `json:"administrativearea"`
				PostalCode            string `json:"postalcode"`
				Country               string `json:"country"`
				ElectronicMailAddress string `json:"electronicmailaddress"`
			} `json:"address"`
			OnlineResource *struct {
				Type string `json:"type"`
				Href string `json:"href"`
			} `json:"onlineresource,omitempty"`
			HoursOfService      string `json:"hoursofservice"`
			ContactInstructions string `json:"contactinstructions"`
		} `json:"contactinfo"`
		Role string `json:"role"`
	} `json:"servicecontact"`
}

type WaterMark

type WaterMark struct {
	Type     string    `json:"type"`
	Text     string    `json:"text"`
	FontSize *int      `json:"font_size,omitempty"`
	Color    *[4]uint8 `json:"color,omitempty"`
	Opacity  *float64  `json:"opacity,omitempty"`
	Spacing  *string   `json:"spacing,omitempty"`
}

Jump to

Keyboard shortcuts

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