tasmapper

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

README

tasmapper

Mapping library in Go to create SVG maps of Herbarium specimens in Tasmania. Includes King Island but not islands north of the Furneaux Group (Kent Group, Rodondo Island, etc)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExactMap

func ExactMap(records *RecordList, w io.Writer)

exactMap webMap draws a plain map with all records mapped as black disks at their exact coordinates and composes an information box with the taxon name, number of records and date.

func GridMap

func GridMap(records *RecordList, w io.Writer)

voucherMap draws a grid map using lines along a 10 x 10 km UTM grid using datum MGA94. It matches all records to grid cells and draws a black disk for each grid cell that contains at least one record,

func VoucherMap

func VoucherMap(records *RecordList, w io.Writer)

voucherMap draws a grid map and discriminates between cells that contain only anecdotal records (drawn as white disks) and cells that contain at least one vouchered record (drawn as a black disk).

func WebMap

func WebMap(records *RecordList, w io.Writer)

webMap draws a plain map with all records mapped as black disks at their exact coordinates. This type of map is used primarily by the Flora of Tasmania Online site and contains no visually separate information box.

Types

type RecordList

type RecordList struct {
	// contains filtered or unexported fields
}

RecordList is a data structure that holds metadata pertaining to all the records of a taxon, such as the name, how many records there are, how many cells are populated (for grid maps), or how many records are anecdotal or vouchered.

func NewRecordList

func NewRecordList(coordData string, name string) (rl *RecordList)

NewRecordList takes in a string of coordinate data and a name for the taxon being mapped. It compares to regular expressions to decide whether the dataset contains voucher information or not, and passes the data to the correct function to compose a RecordList depending on the data type.

func (*RecordList) FileName

func (r *RecordList) FileName() string

FileName returns the name to be used to save the SVG file, composed from the taxon name

func (*RecordList) GetGridRecords

func (or *RecordList) GetGridRecords() (nr *RecordList)

GetGridRecords populates the voucher information for a RecordList, populating cells if there is a record that falls inside them.

func (*RecordList) RecordNumber

func (r *RecordList) RecordNumber() (n int)

RecordNumber returns the total number of records

Jump to

Keyboard shortcuts

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