Implementation of the Vector Tile Spec, version 2.1. This package allows you to efficiently build vector tiles including layers and features with geometry and encode them to protobuf.
The following sample shows how to create a simple vector tile with one layer and one point feature:
aliasVectorTile.{Feature,Layer,Tile}# Create an empty named layerlayer=%Layer{name: "clusters",version: 2}# Add a feature with attributeslayer=Layer.add_feature(layer,Feature.point([128,128]),count: 42,size: "large")# Construct tiletile=%Tile{layers: [layer]}# Encode to protobuf bytesTile.encode(tile)defdepsdo[{:vector_tile,"~> 1.1.0"}]end