new flag -TMS
there is conversion y = 2 ** z - 1 - y for the case where mbtiles are in x-y-zoom Google's format and we need them in TMS format for Osmand but some mbtiles are already in TMS format so my idea is to add flag/parameter
parser.add_argument('-TMS', action='store_true', help='convert tiles from TMS standard instead Google x y zoom')
and change line y = 2 ** z - 1 - y to if(args.TMS): y = 2 ** z - 1 - y
Requires analysis.
MBTiles spec: https://github.com/mapbox/mbtiles-spec/blob/master/1.3/spec.md
columns MUST encode the location of the tile, following the Tile Map Service Specification, with the restriction that the global-mercator (aka Spherical Mercator) profile MUST be used.
But I don't understand which format uses OsmAnd.
https://github.com/osmandapp/Osmand/blob/master/OsmAnd/src/net/osmand/plus/SQLiteTileSource.java
There are some interesting properties: inverted_y, tilenumbering, BIG_PLANET_TILE_NUMBERING.
I'll analyze it later.