tile

package
v0.4.11 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2022 License: BSD-3-Clause Imports: 26 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheKeyForPNGTile

func CacheKeyForPNGTile(t slippy.Tile) string

func CacheKeyForRasterzenTile

func CacheKeyForRasterzenTile(t slippy.Tile) string

func CacheKeyForSVGTile

func CacheKeyForSVGTile(t slippy.Tile) string

func CacheKeyForTile

func CacheKeyForTile(t slippy.Tile, prefix string, ext string) string

func Extent4326 added in v0.4.7

func Extent4326(t *slippy.Tile) *geom.Extent

func RasterzenPathToImage

func RasterzenPathToImage(path string) (image.Image, error)

func RasterzenToFeatureCollection

func RasterzenToFeatureCollection(in io.Reader, out io.Writer) error

func RasterzenToGeoJSON

func RasterzenToGeoJSON(in io.Reader, out io.Writer) error

func RasterzenToImage

func RasterzenToImage(in io.Reader) (image.Image, error)

func RasterzenToImageWithOptions added in v0.2.6

func RasterzenToImageWithOptions(in io.Reader, svg_opts *RasterzenSVGOptions) (image.Image, error)

func RasterzenToPNG

func RasterzenToPNG(in io.Reader, out io.Writer, svg_opts *RasterzenSVGOptions) error

func RasterzenToSVG

func RasterzenToSVG(in io.Reader, out io.Writer) error

func RasterzenToSVGWithOptions added in v0.1.1

func RasterzenToSVGWithOptions(in io.Reader, out io.Writer, svg_opts *RasterzenSVGOptions) error

func RenderExtentTile

func RenderExtentTile(t slippy.Tile, c cache.Cache, nz_opts *nextzen.Options) (io.ReadCloser, error)

func RenderGeoJSONTile

func RenderGeoJSONTile(t slippy.Tile, c cache.Cache, nz_opts *nextzen.Options, rz_opts *RasterzenOptions) (io.ReadCloser, error)

func RenderPNGTile

func RenderPNGTile(t slippy.Tile, c cache.Cache, nz_opts *nextzen.Options, rz_opts *RasterzenOptions, svg_opts *RasterzenSVGOptions, png_opts *RasterzenPNGOptions) (io.ReadCloser, error)

func RenderRasterzenTile

func RenderRasterzenTile(t slippy.Tile, c cache.Cache, nz_opts *nextzen.Options, rz_opts *RasterzenOptions) (io.ReadCloser, error)

func RenderSVGTile

func RenderSVGTile(t slippy.Tile, c cache.Cache, nz_opts *nextzen.Options, rz_opts *RasterzenOptions, svg_opts *RasterzenSVGOptions) (io.ReadCloser, error)

func Tile2Lat added in v0.4.7

func Tile2Lat(zoom, y uint) float64

func Tile2Lon added in v0.4.7

func Tile2Lon(zoom, x uint) float64

Types

type Coordinate

type Coordinate []float64

type Coordinates

type Coordinates []Coordinate

type Feature

type Feature struct {
	Type       string            `json:"type"`
	Geometry   Geometry          `json:"geometry"`
	Properties map[string]string `json:"properties"`
}

type FeatureCollection

type FeatureCollection struct {
	Type     string        `json:"type"`
	Features []interface{} `json:"features"`
}

type Geometry

type Geometry struct {
	Type        string      `json:"type"`
	Coordinates interface{} `json:"coordinates"`
}

type Polygon

type Polygon []Coordinates

type RasterzenOptions added in v0.4.0

type RasterzenOptions struct {
	Refresh bool `json:"refresh"`
}

func DefaultRasterzenOptions added in v0.4.0

func DefaultRasterzenOptions() (*RasterzenOptions, error)

func RasterzenOptionsFromBytes added in v0.4.0

func RasterzenOptionsFromBytes(body []byte) (*RasterzenOptions, error)

func RasterzenOptionsFromFile added in v0.4.0

func RasterzenOptionsFromFile(path string) (*RasterzenOptions, error)

func RasterzenOptionsFromReader added in v0.4.0

func RasterzenOptionsFromReader(fh io.Reader) (*RasterzenOptions, error)

func RasterzenOptionsFromString added in v0.4.0

func RasterzenOptionsFromString(body string) (*RasterzenOptions, error)

type RasterzenPNGOptions added in v0.4.0

type RasterzenPNGOptions struct {
	Refresh bool `json:"refresh"`
}

func DefaultRasterzenPNGOptions added in v0.4.0

func DefaultRasterzenPNGOptions() (*RasterzenPNGOptions, error)

func RasterzenPNGOptionsFromBytes added in v0.4.0

func RasterzenPNGOptionsFromBytes(body []byte) (*RasterzenPNGOptions, error)

func RasterzenPNGOptionsFromFile added in v0.4.0

func RasterzenPNGOptionsFromFile(path string) (*RasterzenPNGOptions, error)

func RasterzenPNGOptionsFromReader added in v0.4.0

func RasterzenPNGOptionsFromReader(fh io.Reader) (*RasterzenPNGOptions, error)

func RasterzenPNGOptionsFromString added in v0.4.0

func RasterzenPNGOptionsFromString(body string) (*RasterzenPNGOptions, error)

type RasterzenSVGOptions added in v0.1.1

type RasterzenSVGOptions struct {
	TileSize      float64            `json:"tile_size"`
	TileExtent    *geom.Extent       `json:"tile_extent"`
	Stroke        string             `json:"stroke"`
	StrokeWidth   float64            `json:"stroke_width"`
	StrokeOpacity float64            `json:"stroke_opacity"`
	Fill          string             `json:"fill"`
	FillOpacity   float64            `json:"fill_opacity"`
	Styles        RasterzenSVGStyles `json:"styles"`
	Refresh       bool               `json:"refresh"`
}

func DefaultRasterzenSVGOptions added in v0.1.1

func DefaultRasterzenSVGOptions() (*RasterzenSVGOptions, error)

func RasterzenSVGOptionsFromBytes added in v0.1.1

func RasterzenSVGOptionsFromBytes(body []byte) (*RasterzenSVGOptions, error)

func RasterzenSVGOptionsFromFile added in v0.1.1

func RasterzenSVGOptionsFromFile(path string) (*RasterzenSVGOptions, error)

func RasterzenSVGOptionsFromReader added in v0.1.1

func RasterzenSVGOptionsFromReader(fh io.Reader) (*RasterzenSVGOptions, error)

func RasterzenSVGOptionsFromString added in v0.2.4

func RasterzenSVGOptionsFromString(body string) (*RasterzenSVGOptions, error)

func (*RasterzenSVGOptions) Clone added in v0.2.0

type RasterzenSVGStyles added in v0.1.3

type RasterzenSVGStyles map[string]SVGStyle

type SVGStyle added in v0.1.3

type SVGStyle struct {
	Stroke        string  `json:"stroke"`
	StrokeWidth   float64 `json:"stroke_width"`
	StrokeOpacity float64 `json:"stroke_opacity"`
	Fill          string  `json:"fill"`
	FillOpacity   float64 `json:"fill_opacity"`
}

Jump to

Keyboard shortcuts

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