All Projects β†’ tidwall β†’ mvt

tidwall / mvt

Licence: MIT License
Draw Mapbox Vector Tiles (MVT) in Go

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to mvt

Leaflet Geoman
πŸ‚πŸ—ΊοΈ The most powerful leaflet plugin for drawing and editing geometry layers
Stars: ✭ 1,088 (+2265.22%)
Mutual labels:  drawing, vector, mapbox
Drawkit
Vector and illustration framework for macOS
Stars: ✭ 299 (+550%)
Mutual labels:  drawing, vector
Celiagg
🎨Anti-Grain Geometry for Python 3 with Cython
Stars: ✭ 17 (-63.04%)
Mutual labels:  drawing, vector
postile
Project migrated to: https://gitlab.com/Oslandia/postile
Stars: ✭ 67 (+45.65%)
Mutual labels:  vector, mapbox
InfiniteCanvas
Proof of concept for a vector drawing app without canvas boundaries.
Stars: ✭ 106 (+130.43%)
Mutual labels:  drawing, vector
powerpaint
Kreative PowerPaint - Library and Application for Bitmap and Vector Image Editing
Stars: ✭ 27 (-41.3%)
Mutual labels:  drawing, vector
Dotgrid
Minimalist Vector Tool
Stars: ✭ 808 (+1656.52%)
Mutual labels:  drawing, vector
Maker.js
πŸ“βš™ 2D vector line drawing and shape modeling for CNC and laser cutters.
Stars: ✭ 1,185 (+2476.09%)
Mutual labels:  drawing, vector
earthwyrm
Vector tile map server for openstreetmap data
Stars: ✭ 16 (-65.22%)
Mutual labels:  tiles, vector
ludigraphix.github.io
Documentation for Ludigraphix
Stars: ✭ 21 (-54.35%)
Mutual labels:  drawing, vector
Geospatial Python CourseV1
This is an collection of blog posts turned into a course format
Stars: ✭ 53 (+15.22%)
Mutual labels:  vector
mapbox-assistant-example
Examples of Amazon Echo, Google Home, and other bots interacting with Mapbox services.
Stars: ✭ 15 (-67.39%)
Mutual labels:  mapbox
HoroscopeDrawer
JavaScript-Library to draw celestial charts in SVG-Format.
Stars: ✭ 51 (+10.87%)
Mutual labels:  drawing
Elementa
A simple, declarative GUI library for Minecraft
Stars: ✭ 160 (+247.83%)
Mutual labels:  drawing
mapus
A map tool with real-time collaboration πŸ—ΊοΈ
Stars: ✭ 2,687 (+5741.3%)
Mutual labels:  drawing
earth
🌏 A map of places I've checked in on Earth.
Stars: ✭ 96 (+108.7%)
Mutual labels:  mapbox
vtm
OpenGL vector map library - running on Android, iOS, Desktop and browser.
Stars: ✭ 212 (+360.87%)
Mutual labels:  vector
pixelino
Pixel-drawing app for iOS ✍️
Stars: ✭ 45 (-2.17%)
Mutual labels:  drawing
geeks-for-geeks-solutions
βœ… My own Amazon, Microsoft and Google SDE Coding challenge Solutions (offered by GeeksForGeeks).
Stars: ✭ 246 (+434.78%)
Mutual labels:  vector
traffic
Massively real-time traffic streaming application
Stars: ✭ 25 (-45.65%)
Mutual labels:  mapbox

mvt

GoDoc

Draw Mapbox Vector Tiles with ease.

Features

  • Mapbox Vector Tiles 2.1 support
  • MoveTo, LineTo, CubicTo, QuadraticTo
  • Defined 256x256 canvas
  • Uses floating points
  • Add tags and IDs to features
  • Fast encoding to MVT protobufs
  • No external dependencies

Install

go get -u github.com/tidwall/mvt

Example

var tile mvt.Tile
l := tile.AddLayer("triforce")
f := l.AddFeature(mvt.Polygon)

f.MoveTo(128, 96)
f.LineTo(148, 128)
f.LineTo(108, 128)
f.LineTo(128, 96)
f.ClosePath()

f.MoveTo(148, 128)
f.LineTo(168, 160)
f.LineTo(128, 160)
f.LineTo(148, 128)
f.ClosePath()

f.MoveTo(108, 128)
f.LineTo(128, 160)
f.LineTo(88, 160)
f.LineTo(108, 128)
f.ClosePath()

data := tile.Render()

// Data now contains a valid mapbox vector tile protobuf 
// for sending over the internets and styling to your 
// heart's content.

Helper functions

  • mvt.LatLonXY: Converts a lat/lon to the pixel offset for a specific tile.
  • mvt.TileBounds: Returns the lat/lon boundary for a tile.

Contact

Josh Baker @tidwall

License

mvt source code is available under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].