versatiles-org / versatiles-rs

VersaTiles - A toolbox for converting, checking and serving map tiles in various formats.
https://versatiles.org
MIT License
57 stars 2 forks source link

Convert of mbtiles with missing metadata results in (nearly) empty versatiles file #65

Closed hinricht closed 10 months ago

hinricht commented 10 months ago

Using latest versatiles 0.6.5 convetring succeeds but results in a nearly empty versatiles file:

$ versatiles --version
versatiles 0.6.5

$ versatiles -v convert fahrradunfälle.mbtiles fahrradunfälle.versatiles
convert from "fahrradunfälle.mbtiles" to "fahrradunfälle.versatiles"
get mbtiles bbox pyramid                                                                             1/1              100.00%                                                 5'682/s        00:00:00        00:00:00
converting tiles                                                                                      0/130            0.00%                                                  0.000/s        00:00:00        00:00:00[DEBUG versatiles_lib::containers::versatiles::converter] start block BlockDefinition { x/y/z: TileCoord3(8, 5, 12), bbox: 8: [107,38,119,47] (130), tiles_range: ByteRange[0,0], index_range: ByteRange[0,0] }
[DEBUG versatiles_lib::containers::versatiles::converter] finish block and write index BlockDefinition { x/y/z: TileCoord3(8, 5, 12), bbox: 8: [107,38,119,47] (130), tiles_range: ByteRange[0,0], index_range: ByteRange[0,0] }
converting tiles                                                                                   130/130            100.00%                                               121'378/s        00:00:00        00:00:00

$ ls -al
total 8860
drwxr-x--- 1 varac varac     154 26. Sep 15:57 .
drwxr-x--- 1 varac varac     262 21. Sep 16:39 ..
-rw-r----- 1 varac varac 8179712 25. Sep 09:41 fahrradunfälle.mbtiles
-rw-r----- 1 varac varac     110 26. Sep 15:57 fahrradunfälle.versatiles

$ strings fahrradunfälle.versatiles 
versatiles_v02
ISN 

Maybe it's still the issue with the missing metadata in the source mbtiles file ?

MichaelKreil commented 10 months ago

So the problem was that the coordinate system of mbtiles is upside down (y=0 is at the south pole). Therefore, I need to mirror the coordinate system. I already implemented everything, but surprisingly forgot to actually activate it. 🫤 Release is on the way ...

hinricht commented 10 months ago

Thanks !