# java-vector-tile **Repository Path**: mirrors_ElectronicChartCentre/java-vector-tile ## Basic Information - **Project Name**: java-vector-tile - **Description**: A java encoder and decoder for vector tiles according to Mapbox vector tile spec - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2020-08-08 - **Last Updated**: 2026-01-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Java Vector Tiles A java encoder and decoder for vector tiles according to [Mapbox vector tile spec](https://github.com/mapbox/vector-tile-spec) ## Encode a vector tile ```java VectorTileEncoder encoder = new VectorTileEncoder(); // Add one or more features with a layer name, a Map with attributes and a JTS Geometry. // The Geometry uses (0,0) in upper left and (256,256) in lower right. encoder.addFeature("road", attributes, geometry); // Finally, get the byte array byte[] encoded = encoder.encode(); ``` or, specifying the feature id: ```java VectorTileEncoder encoder = new VectorTileEncoder(); encoder.addFeature("road", attributes, geometry, id); byte[] encoded = encoder.encode(); ``` ## Maven ``` ECC https://maven.ecc.no/releases no.ecc.vectortile java-vector-tile 1.4.1 ``` ## Generate VectorTile.java ``` protoc --java_out=src/main/java/ src/main/protobuf/vector_tile.proto ``` ## License [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0) ## Credits Mapbox for their [vector tile spec](https://github.com/mapbox/vector-tile-spec), Google for their [Protocol Buffers](https://code.google.com/p/protobuf/) and Dr JTS and LocationTech for [JTS](https://github.com/locationtech/jts)