Skip to content

NielsCharlier/java-vector-tile

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Java Vector Tiles

A java encoder and decoder for vector tiles according to Mapbox vector tile spec

Encode a vector tile

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 lower left and (256,256) in upper right.
encoder.addFeature("road", attributes, geometry);

// Finally, get the byte array
byte[] encoded = encoder.encode();

Maven

<repository>
    <id>ECC</id>
    <url>https://github.com/ElectronicChartCentre/ecc-mvn-repo/raw/master/releases</url>
</repository>

<dependency>
    <groupId>no.ecc.vectortile</groupId>
    <artifactId>java-vector-tile</artifactId>
    <version>1.0.7</version>
</dependency>

Generate VectorTile.java

protoc --javanano_out=store_unknown_fields=true,optional_field_style=accessors:src/main/java/ src/main/resources/vector_tile.proto

License

Apache License, version 2.0

Credits

Mapbox for their vector tile spec, Google for their Protocol Buffers and JTS

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 92.4%
  • Protocol Buffer 7.6%