converter

package
v0.0.0-...-e43e367 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configurations

type Configurations struct {
	Height        int    `json:"height"`           // Initial image height
	Width         int    `json:"width"`            // Initial image width
	OptimizedSize bool   `json:"optimized_size"`   // Reduces the image dimension if possible.
	CutForMaxZoom bool   `json:"cut_for_max_zoom"` // Cuts object into smaller ones to archive max zoom if needed. Every feature is also applied on the sub images
	Clipping      bool   `json:"clipping"`         // Clips the image
	MapType       string `json:"map_type"`         // Map type for image generation
}

type Converter

type Converter interface {
	Convert(ctx context.Context, geo model.GeoData, configuration Configurations) (Result, error)
	Information(ctx context.Context) Information
}

type Image

type Image struct {
	Data  io.Reader     `json:"-"`   // raw image data
	Error error         `json:"-"`   // error happened during image conversion
	Geo   model.GeoData `json:"geo"` // geo data for the image
}

type Information

type Information struct {
	Name           string   `json:"name"`             // Module name
	Clipping       bool     `json:"clipping"`         // Clipping feature enabled
	MapTypes       []string `json:"map_types"`        // Available map types
	DefaultMapType string   `json:"default_map_type"` // Default map type
	DefaultHeight  int      `json:"default_height"`   // Default height
	DefaultWidth   int      `json:"default_width"`    // Default width
}

type OpenStreet

type OpenStreet struct {
	Name                    string
	Signature               string
	OptimizedSizeToleration float64
	AreaWeight              float64
	DefaultHeight           int
	DefaultWidth            int
	MaxZoom                 int
	MaximalArea             float64
	GeoDataMultiplier       float64
	Cache                   sm.TileCache
	ParallelAtNumberOf      int
}

func (OpenStreet) Convert

func (o OpenStreet) Convert(ctx context.Context, data model.GeoData, configuration Configurations) (Result, error)

func (OpenStreet) Information

func (o OpenStreet) Information(ctx context.Context) Information

type Result

type Result struct {
	ContentType string
	Images      []Image
}

func (Result) ParseResponse

func (r Result) ParseResponse(ctx context.Context, writer http.ResponseWriter) error

type SentinelSat

type SentinelSat struct{}

func (SentinelSat) Convert

func (s SentinelSat) Convert(ctx context.Context, data []model.GeoPoint, configuration Configurations) (Result, error)

func (SentinelSat) Information

func (s SentinelSat) Information(ctx context.Context) Information

Jump to

Keyboard shortcuts

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