surfacers

package
v0.0.0-...-40e05f8 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2017 License: MIT Imports: 1 Imported by: 0

README

Slide Surfacers

Slide is based on the concept to sliding lines into the valleys of a surface. This surface can be based on any data. To wire it up you'll need to implement the Surfacer interface:

// A Surfacer defines what a surface needs to do to be used for sliding.
// It should define a surface in the mercator projected space (EPSG:3857).
// Better values should be positive with a maximum of 1 meter, scaled up
// to be consistent with the EPSG:3857 scaling factor for that latitude.
type Surfacer interface {
	// GradientAt and ValueAt should accept points in the EPSG:3857 (mercator) space.
	GradientAt(point *geo.Point) *geo.Point // typically derived from a smoothed surface
	ValueAt(point *geo.Point) float64       // typically the original surface value (pre smooth)

	// SuggestedOptions allows the surfacer to tell slide what the defaults should be.
	SuggestedOptions() *SuggestedOptions
}

Tile Overlay Surfacer

This surfacer is provided as a basic example. It downloads Mapbox TIGER tile layer tiles making yellow areas "deep". Vector data can now be "slided" to updated TIGER geometry. Checkout the demo.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrBoundEmpty is returned when trying to build a surface
	// for an empty latlng boundary.
	ErrBoundEmpty = errors.New("surface area bound is empty")

	// ErrStdDevNegative is returned building a surface for a negative Std Dev.
	ErrStdDevNegative = errors.New("standard deviation negative")
)

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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