Documentation ¶
Index ¶
- Variables
- func ConvertSVGToPNG(filename string)
- func Degrees2meters(lon, lat float64) (x, y float64)
- func DrawShapes(f io.Writer, strokeColor, fillColor []color.NRGBA, ...)
- type ColorMap
- func (c *ColorMap) AddArray(data []float64)
- func (c *ColorMap) AddArrayServer(datachan chan []float64, finished chan int)
- func (c *ColorMap) AddGeoJSON(g *GeoJSON, propertyName string)
- func (c *ColorMap) AddMap(data map[string]float64)
- func (cm *ColorMap) GetColor(v float64) color.NRGBA
- func (c *ColorMap) Legend(w io.Writer, label string) (err error)
- func (c *ColorMap) Set()
- type Crs
- type CrsProps
- type GeoJSON
- type GeoJSONfeature
- type MapData
- type Mapper
- type RasterMap
- type UnsupportedGeometryError
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Font = "" // Default font to use
)
Functions ¶
func ConvertSVGToPNG ¶
func ConvertSVGToPNG(filename string)
func Degrees2meters ¶
convert from long/lat to google mercator (or EPSG:4326 to EPSG:900913)
Types ¶
type ColorMap ¶
type ColorMap struct { Type string // "Linear" or "Lincutoff" CutPercentile float64 // Percentile at which discontinuity occurs for "LinCutoff" type. NumDivisions int // "Number of tick marks on legend. ColorScheme string // "optimized" or ... LegendWidth float64 // width of legend in inches LegendHeight float64 // height of legend in inches LineWidth float64 // width of lines in legend in points FontSize float64 // font size in points. Font string // Name of the font to use in legend FontColor string EdgeColor string // Color for legend outline BackgroundColor string BackgroundOpacity float64 // contains filtered or unexported fields }
func NewColorMap ¶
Initialize new color map. Types available are "Linear", and "LinCutoff", which is linear with a discontinuity at a percentile specified by "CutPercentile".
func (*ColorMap) AddArrayServer ¶
func (*ColorMap) AddGeoJSON ¶
type CrsProps ¶
type CrsProps struct {
Name string `json:"name"`
}
Coordinate reference system properties.
type GeoJSON ¶
type GeoJSON struct { Type string `json:"type"` CRS Crs `json:"crs"` Features []*GeoJSONfeature }
func (*GeoJSON) GetProperty ¶
type GeoJSONfeature ¶
type MapData ¶
type MapData struct { Cmap *ColorMap Shapes []geom.T Data []float64 DrawEdges bool EdgeWidth float64 // contains filtered or unexported fields }
func NewMapData ¶
type RasterMap ¶
type RasterMap struct { I draw.Image GC draw2d.GraphicContext // contains filtered or unexported fields }
func NewRasterMapFromRaster ¶
func NewRasterMapFromRaster(S, W, dy, dx float64, ny, nx int, data []float64, cmap *ColorMap, f io.Writer) *RasterMap
Make a new raster map from raster data. It is assumed that the outer axis in the data is the Y-axis (north-south) and the inner axis is the X-axis (west-east) (i.e., len(data)==nx*ny && val[j,i] = data[j*nx+i]).
func (*RasterMap) DrawVector ¶
func (r *RasterMap) DrawVector(g geom.T, strokeColor, fillColor color.NRGBA, linewidth, markersize float64)
Draw a vector on a raster map when given the geometry, stroke and fill colors, the width of the bounding line, and the size of the marker (only used for point shapes).
type UnsupportedGeometryError ¶
func (UnsupportedGeometryError) Error ¶
func (e UnsupportedGeometryError) Error() string
Click to show internal directories.
Click to hide internal directories.