svg

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2022 License: BSD-3-Clause Imports: 11 Imported by: 11

README

go-whosonfirst-svg

Tools for working with Who's On First and SVG documents.

Install

You will need to have both Go (specifically a version 1.12 or higher) and the make programs installed on your computer. Assuming you do just type:

make tools

All of this package's dependencies are bundled with the code in the vendor directory.

Tools

wof2svg

For example:

go run -mod vendor cmd/wof2svg/main.go sfo.geojson sfo.svg

Will produce:

And:

go run -mod vendor cmd/wof2svg/main.go --mercator sfo.geojson sfo-merc.svg

Will produce:

See also

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FeatureToSVG

func FeatureToSVG(f []byte, opts *Options) error

Types

type Options

type Options struct {
	Width         float64
	Height        float64
	Mercator      bool
	Writer        io.Writer
	StyleFunction StyleFunction
}

func NewDefaultOptions

func NewDefaultOptions() *Options

type StyleFunction

type StyleFunction func(f []byte) (map[string]string, error)

func NewDefaultStyleFunction

func NewDefaultStyleFunction() StyleFunction

func NewDopplrStyleFunction

func NewDopplrStyleFunction() StyleFunction

func NewFillStyleFunction

func NewFillStyleFunction(colour string) StyleFunction

Directories

Path Synopsis
cmd
wof-build-svg command
wof2svg command

Jump to

Keyboard shortcuts

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