brendan-ward / mbtiles-go

Go MBtiles reader

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MBTiles Reader for Go

A simple Go-based mbtiles reader.

Build Status Coverage Status GoDoc Go Report Card

Supports JPG, PNG, WebP, and vector tile tilesets created according to the mbtiles specification.

Example:

// Open an mbtiles file
db, err := mbtiles.Open("testdata/geography-class-jpg.mbtiles")
if err != nil { ... }
defer db.Close()

// read a tile into a byte slice
var data []byte
err = db.ReadTile(0, 0, 0, &data)
if err != nil { ... }

Credits:

This was adapted from the mbtiles package in mbtileserver to use the crawshaw.io/sqlite SQLite library.

About

Go MBtiles reader

License:MIT License


Languages

Language:Go 100.0%