Search in sources :

Example 1 with TileBlobStore

use of com.baremaps.tile.TileBlobStore in project baremaps by baremaps.

the class Export method targetTileStore.

private TileStore targetTileStore(TileJSON source, BlobStore blobStore) throws TileStoreException, IOException {
    if (mbtiles) {
        SQLiteDataSource dataSource = new SQLiteDataSource();
        dataSource.setUrl("jdbc:sqlite:" + repository.getPath());
        MBTiles tilesStore = new MBTiles(dataSource);
        tilesStore.initializeDatabase();
        tilesStore.writeMetadata(metadata(source));
        return tilesStore;
    } else {
        return new TileBlobStore(blobStore, repository);
    }
}
Also used : MBTiles(com.baremaps.tile.mbtiles.MBTiles) SQLiteDataSource(org.sqlite.SQLiteDataSource) TileBlobStore(com.baremaps.tile.TileBlobStore)

Aggregations

TileBlobStore (com.baremaps.tile.TileBlobStore)1 MBTiles (com.baremaps.tile.mbtiles.MBTiles)1 SQLiteDataSource (org.sqlite.SQLiteDataSource)1