Create MBTiles from GDAL files.
Project description
# gdal2mbt
*Create MBTiles from a GDAL file*
## Requirements
- Python 2.7
## Installation
```
pip install https://github.com/icetan/gdal2mbt/archive/master.zip
```
Or from source
```
git clone https://github.com/icetan/gdal2mbt.git
pip install -e gdal2mbt
```
## Creating a MBTile file
```sh
gdal2mbt create goteborg.mbtiles 8 goteborg.vrt
```
Or use a JSON config file with an optional metadata dictionary that will
overwrite the defaults in the MBTiles metadata table.
```json
{
"source": "goteborg.vrt",
"num_levels": 8,
"metadata": {
"name": "goteborg",
"description": "Aerial photos over Göteborg city"
}
}
```
```sh
gdal2mbt create -c goteborg.json goteborg.mbtiles
```
To resume an aborted MBTiles creation process pass the `-r` flag to `create`.
## Parallel jobs
Speed up MBTiles creation by distributing the load over several processors or
even computers by using [GNU Parallel](http://www.gnu.org/software/parallel/).
Create an MBTiles file for each tile on zoom level 0, this will depend on the
second argument which defines how many zoom levels to generate in total.
```sh
gdal2mbt config goteborg.vrt 6 | parallel gdal2mbt create -c
```
Merge all the created MBTiles to one.
```sh
gdal2mbt merge goteborg.mbtiles goteborg.*.mbtiles
```
Or to squash all MBTiles into one to save space use the destructive `-s` flag
which will remove each merged MBTiles file.
```sh
gdal2mbt merge -s goteborg.*.mbtiles
```
Add zoom levels that might have been omitted due to the amount of tiles on zoom
level 0 at time of creation.
```sh
gdal2mbt levels goteborg.mbtiles 8
```
*Create MBTiles from a GDAL file*
## Requirements
- Python 2.7
## Installation
```
pip install https://github.com/icetan/gdal2mbt/archive/master.zip
```
Or from source
```
git clone https://github.com/icetan/gdal2mbt.git
pip install -e gdal2mbt
```
## Creating a MBTile file
```sh
gdal2mbt create goteborg.mbtiles 8 goteborg.vrt
```
Or use a JSON config file with an optional metadata dictionary that will
overwrite the defaults in the MBTiles metadata table.
```json
{
"source": "goteborg.vrt",
"num_levels": 8,
"metadata": {
"name": "goteborg",
"description": "Aerial photos over Göteborg city"
}
}
```
```sh
gdal2mbt create -c goteborg.json goteborg.mbtiles
```
To resume an aborted MBTiles creation process pass the `-r` flag to `create`.
## Parallel jobs
Speed up MBTiles creation by distributing the load over several processors or
even computers by using [GNU Parallel](http://www.gnu.org/software/parallel/).
Create an MBTiles file for each tile on zoom level 0, this will depend on the
second argument which defines how many zoom levels to generate in total.
```sh
gdal2mbt config goteborg.vrt 6 | parallel gdal2mbt create -c
```
Merge all the created MBTiles to one.
```sh
gdal2mbt merge goteborg.mbtiles goteborg.*.mbtiles
```
Or to squash all MBTiles into one to save space use the destructive `-s` flag
which will remove each merged MBTiles file.
```sh
gdal2mbt merge -s goteborg.*.mbtiles
```
Add zoom levels that might have been omitted due to the amount of tiles on zoom
level 0 at time of creation.
```sh
gdal2mbt levels goteborg.mbtiles 8
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gdal2mbt-0.4.1.tar.gz
(8.2 kB
view details)
File details
Details for the file gdal2mbt-0.4.1.tar.gz
.
File metadata
- Download URL: gdal2mbt-0.4.1.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 133e64509f5310bca3ac50290361088a151bec3a671788faeef5a40383695681 |
|
MD5 | 8862f903cb1917c1a86ea4a6e789d368 |
|
BLAKE2b-256 | f4e772c4cb7f7a19be74048dced2d45fc2149fbdd0cb1c00f027fabe9a41cf63 |