Replies: 2 comments
-
I don't think MVT to PNG conversion is really in the scope of the PMTiles project, you may be able to find test fixtures in projects like https://github.com/mapbox/vector-tile-js/tree/main/test/fixtures For rasterization the main programs people use are Mapnik and MapLibre GL Native. Both of those may have java bindings. If you are implementing a more basic program to do that e.g. without labeling you could use just Cairo, Skia or Java equivalent instead. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ok great, I think I can work with those Thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @bdon , hope all is well!
I'm trying to implement a minimal Java server that can read and serve PMTiles content using Java only, with minimal dependencies.
I have managed to implement enough code to read a
.pmtiles
file and unpack MVT vector data from the MapBox Proto-buffer specification given someZ/X/Y
coordinates.However, I am now struggling to render the vector data into a 2d
BufferedImage
that can then be saved as a PNG raster data. I have some preliminary code, but it renders garbled images.Do you know where could I find a simple MVT/PBF file with some simple lines and shapes (circles, triangles, whatever) that I could use to validate how a rendered MVT vector tile should look like?
Alternatively, do you know of any specific rasterization source code or technical notes I could reference from any other projects?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions