Discover Packages
github.com/brendan-ward/tilemerge
package
module
Version:
v0.0.0-...-8df384c
Opens a new window with list of versions in this module.
Published: Apr 12, 2018
License: MIT
Opens a new window with license information.
Imports: 7
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
tilemerge
Merge 2D map tiles into a single image.
Requires Go 1.9+
Under heavy development!
Purpose
This library is intended to assist with merging individual map tiles into a single image.
A common use case is to create a static map image from an interactive Leaflet.
TODO:
Handle anti-meridian wrapping and several world-widths
Handle negative offets and width / height larger than tiles
Flag for test to update golden files
Test with transparency
Test with missing tiles
Test with paletted PNGs
Test with webp tiles
Documentation
Dependencies
Dependencies are managed using dep
Similar libraries
Expand ▾
Collapse ▴
Documentation
¶
TILE_SIZE uses default size of map tiles for now
TODO: probably should be a parameter or detected from the input images
Merge merges input Tiles into a single Image with dimenensions `width` and `height`,
and crops based on xOff, yOff from upper left of image.
Tile x and y coordinates increase from the upper left of the image.
Any tile that
Tile is a container for basic information about a tile
type Tiles struct {
Tiles []Tile
X0, Y0, X1, Y1 int
}
Tiles wraps Tile structs with information about the x and y tile index ranges
Source Files
¶
Click to show internal directories.
Click to hide internal directories.