Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Reference = PlateCarre{
Width: 8192,
Height: 4096,
}
Reference defines the coordinates for default reference image.
Functions ¶
Types ¶
type Grid ¶
type Grid struct { // CountX defines number of dots in X dimension. CountX int // Thshold defines minimum average Y value, where dot should be placed. Threshold float32 // Coord define image coordinate system. Coord PlateCarre }
Grid defines arguments for deriving a Map from an image.
type GridPosition ¶
GridPosition represents the integer row and column of a location on a grid.
type Map ¶
type Map struct {
CountX, CountY int
Grid *Grid
Bounds image.Rectangle
Locations map[GridPosition]*Location
}
Map defines a location map with dots.
func (*Map) Lookup ¶
func (m *Map) Lookup(pos S2) GridPosition
Lookup finds the appropriate row and column in the grid for the given S2 location.
func (*Map) Nearest ¶
func (m *Map) Nearest(pos GridPosition) *Location
Nearest returns the requested grid position, or a close by neighbor if the requested one isn't found. Returns nil if nothing is found.
type PlateCarre ¶
PlateCarree defines parameters for Plate Carree projection.
func (*PlateCarre) Forward ¶
func (pc *PlateCarre) Forward(s S2) P2
Forward converts from LatLong to pixel coordinates.
func (*PlateCarre) Reverse ¶
func (pc *PlateCarre) Reverse(p P2) S2
Reverse converts from pixel coordinates to LatLong.
Click to show internal directories.
Click to hide internal directories.