Version: v1.2.0 Latest Latest

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

Go to latest
Published: May 17, 2021 License: Apache-2.0 Imports: 6 Imported by: 1



Package config implements configuration file parser for magnacarto.



This section is empty.


This section is empty.


This section is empty.


type Datasource

type Datasource struct {
	ShapefileDirs []string `toml:"shapefile_dirs"`
	SQLiteDirs    []string `toml:"sqlite_dirs"`
	ImageDirs     []string `toml:"image_dirs"`
	DataDirs      []string `toml:"data_dirs"`
	FontDirs      []string `toml:"font_dirs"`

type Locator

type Locator interface {
	Font(string) string
	SQLite(string) string
	Shape(string) string
	Image(string) string
	Data(string) string
	PostGIS(mml.PostGIS) mml.PostGIS
	MissingFiles() []string

type LookupLocator

type LookupLocator struct {
	// contains filtered or unexported fields

func (*LookupLocator) AddDataDir

func (l *LookupLocator) AddDataDir(dir string)

func (*LookupLocator) AddFontDir

func (l *LookupLocator) AddFontDir(dir string)

func (*LookupLocator) AddImageDir

func (l *LookupLocator) AddImageDir(dir string)

func (*LookupLocator) AddSQLiteDir

func (l *LookupLocator) AddSQLiteDir(dir string)

func (*LookupLocator) AddShapeDir

func (l *LookupLocator) AddShapeDir(dir string)

func (*LookupLocator) Data

func (l *LookupLocator) Data(basename string) string

func (*LookupLocator) Font

func (l *LookupLocator) Font(basename string) string

func (*LookupLocator) Image

func (l *LookupLocator) Image(basename string) string

func (*LookupLocator) MissingFiles

func (l *LookupLocator) MissingFiles() []string

func (*LookupLocator) PostGIS

func (l *LookupLocator) PostGIS(ds mml.PostGIS) mml.PostGIS

func (*LookupLocator) SQLite

func (l *LookupLocator) SQLite(basename string) string

func (*LookupLocator) SetBaseDir

func (l *LookupLocator) SetBaseDir(dir string)

func (*LookupLocator) SetOutDir

func (l *LookupLocator) SetOutDir(dir string)

func (*LookupLocator) SetPGConfig

func (l *LookupLocator) SetPGConfig(pgConfig PostGIS)

func (*LookupLocator) Shape

func (l *LookupLocator) Shape(basename string) string

func (*LookupLocator) UseRelPaths

func (l *LookupLocator) UseRelPaths(rel bool)

type Magnacarto

type Magnacarto struct {
	Mapnik      Mapnik
	StylesDir   string `toml:"styles_dir"`
	OutDir      string `toml:"out_dir"`
	Datasources Datasource
	PostGIS     PostGIS
	BaseDir     string

func Load

func Load(fileName string) (*Magnacarto, error)

func (*Magnacarto) Load

func (m *Magnacarto) Load(fileName string) error

func (*Magnacarto) Locator

func (m *Magnacarto) Locator() Locator

type Mapnik

type Mapnik struct {
	PluginDirs []string `toml:"plugin_dirs"`
	FontDirs   []string `toml:"font_dirs"`

type PostGIS

type PostGIS struct {
	Host     string
	Port     string
	Database string
	Username string
	Password string
	SRID     string

Source Files

Jump to

Keyboard shortcuts

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