# README
testing
This package contains functions and variables for using pre made geometries.
The tile variables are very large and are initially stored as strings. In order
to access them, you must first compile compile them by calling CompileTiles
.
Once compiled, access the tiles via the Tiles
function (this does no processing
besides endusring that compilation has already occured).
package my_test
import (
"github.com/go-spatial/geom/encoding/wkt"
gtesting "github.com/go-spatial/testing"
)
func init {
// put this in init so benchmarks aren't skewed
gtesting.CompileTiles(wkt.DecodeString)
}
func TestMy(t *testing) {
tiles := gtesting.Tiles()
...
}
# Packages
Package must provides helpers to decode wkt geometries to be used in tests.
# Functions
BoxPolygon returns a polygon that is a box with side lengths of dim, a clockwise winding order, and points at (0, 0) and (dim, dim).
CompileTiles will compile some Natural Earth tiles so they are accessible through the Tiles function.
FuncLineString returns a line string constructed from calling fn in the interval [start, end] points number of times.
SinLineString returns a line string that is a sin wave with the given amplitude and domain (x values) of the set [start, end].
Tiles returns geom.Collections that represent Natural Earth tiles generated with the utility https://github.com/ear7h/tile-dump.
# Variables
South Africa has a hole in it.