{ "info": { "author": "Tom MacWright", "author_email": "tom@macwright.org", "bugtrack_url": null, "classifiers": [], "description": "# MBUtil\n\nMBUtil is a utility for importing and exporting the [MBTiles](http://mbtiles.org/) format,\ntypically created with [MapBox](http://mapbox.com/) [TileMill](http://mapbox.com/tilemill/).\n\nBefore exporting tiles to disk, see if there's a [MapBox Hosting plan](http://mapbox.com/plans/)\nor an open source [MBTiles server implementation](https://github.com/mapbox/mbtiles-spec/wiki/Implementations)\nthat works for you - tiles on disk are notoriously difficult to manage.\n\n## Installation\n\nGit checkout (requires git)\n\n git clone git://github.com/Alpstein/mbutil.git\n cd mbutil\n ./mb-util -h\n\n # then to install the mb-util command globally:\n sudo python setup.py install\n # then you can run:\n mb-util\n\nPython installation (requires easy_install)\n\n easy_install mbutil\n mb-util -h\n\n## Usage\n\n mb-util [command] [options] file|directory [file|directory ...]\n\n Examples:\n\n Export an mbtiles database to a directory of files:\n $ mb-util --export world.mbtiles tiles\n\n Import a directory of tiles into an mbtiles database:\n $ mb-util --import tiles world.mbtiles\n\n Create an empty mbtiles file:\n $ mb-util --create empty.mbtiles\n\n Execute commands on all tiles in the mbtiles file:\n $ mb-util --process --execute \"COMMAND ARGUMENTS\" [--execute \"SECOND COMMAND\"] world.mbtiles\n\n Merge two or more mbtiles files (receiver will be the first file):\n $ mb-util --merge receiver.mbtiles file1.mbtiles [file2.mbtiles ...]\n\n Fill a mbtiles database with a given tile image\n $ mb-util --fill --min-zoom=7 --max-zoom=12 world.mbtiles transparent.png\n\n Check if a mbtiles file contains all tiles at a specific zoom level:\n $ mb-util --check --zoom=7 world.mbtiles\n\n Test tiles with a command, print tile coordinates for non-zero return values\n $ mb-util --test --execute \"COMMAND ARGUMENTS\" world.mbtiles\n\n Compact a mbtiles file by eliminating duplicate images:\n $ mb-util --compact world.mbtiles\n\n Convert tile coordinates and bounding boxes:\n $ mb-util --convert=\"13/4328/2861\"\n $ mb-util --convert=\"10.195312,47.546872,10.239258,47.576526\" --min-zoom=12 --max-zoom=13\n\n\n Options:\n -h, --help show this help message and exit\n\n Commands:\n These are the commands to use on mbtiles databases\n\n -e, --export Export an mbtiles database to a directory of files. If\n the directory exists, any already existing tiles will\n be overwritten.\n -i, --import Import a directory of tiles into an mbtiles database.\n If the mbtiles database already exists, existing tiles\n will be overwritten with the imported tiles.\n -m, --merge Merge two or more databases. The receiver will be\n created if it doesn't yet exist.\n -p, --process Processes a mbtiles databases. Only usefull together\n with one or more --execute.\n --check Check the database for missing tiles.\n --test Test every tile with the given command, print the tile\n coordinate if the command returns anything non-zero.\n --fill Fill a mbtiles database with tiles where\n it doesn't already contain a tile. Only usefull with\n --min-zoom/--max-zoom and --tile-bbox/--bbox.\n --compact Eliminate duplicate images to reduce mbtiles filesize.\n --create Create an empty mbtiles database.\n --convert=CONVERT Convert tile coordinates 'y/x/z' to bounding box\n 'left,bottom,right,top' or vice versa.\n\n Options:\n --execute=COMMAND Commands to execute for each tile image. %s will be\n replaced with the file name. This argument may be\n repeated several times and can be used together with\n --import/--export/--merge/--compact/--process.\n --flip-y Flip the y tile coordinate during\n --export/--import/--merge/--convert.\n --min-zoom=MIN_ZOOM\n Minimum zoom level for\n --export/--import/--merge/--process/--check/--convert.\n --max-zoom=MAX_ZOOM\n Maximum zoom level for\n --export/--import/--merge/--process/--check/--convert.\n --zoom=ZOOM Zoom level for\n --export/--import/--process/--check/--convert.\n (Overrides --min-zoom and --max-zoom)\n --min-timestamp=MIN_TIMESTAMP\n Minimum numerical timestamp for --export/--merge.\n --max-timestamp=MAX_TIMESTAMP\n Maximum numerical timestamp for --export/--merge.\n --bbox=BBOX Bounding box in coordinates 'left,bottom,right,top'\n (10.195312,47.546872,10.239258,47.576526)\n --tile-bbox=TILE_BBOX\n Bounding box in tile coordinates\n 'left,bottom,right,top' (10,10,20,20). Can only be\n used with --zoom.\n --no-overwrite don't overwrite existing tiles during\n --merge/--import/--export.\n --revert-test For --test, print the tile coordinates if the command\n returns zero.\n --auto-commit Enable auto commit for --merge/--import/--process.\n --synchronous-off DANGEROUS!!! Set synchronous=OFF for the database\n connections.\n --use-wal-journal Use journal_mode=WAL for the databases (default is\n DELETE).\n --check-before-merge\n Runs some basic checks (like --check) on mbtiles\n before merging them.\n --delete-after-export\n DANGEROUS!!! After a --merge or --export, this option\n will delete all the merged/exported tiles from the\n (sending) database. Only really usefull with --min-\n zoom/--max-zoom or --zoom since it would remove all\n tiles from the database otherwise.\n --delete-vanished-tiles\n DANGEROUS!!! If a tile vanishes during --execute then\n delete it also from the database or ignore it during\n --merge/--process.\n --poolsize=POOLSIZE\n Pool size for processing tiles with --process/--merge.\n Default is to use a pool size equal to the number of\n cpus/cores.\n --tmp-dir=TMP_DIR Temporary directory to use for --execute.\n --vacuum VACUUM the mbtiles database after\n --import/--merge/--process/--compact.\n --analyze ANALYZE the mbtiles database after\n --import/--merge/--process/--compact.\n --progress Print progress updates and keep them on one line\n during --import/--merge/--export/--compact/--process.\n -q, --quiet don't print any status messages to stdout except\n errors.\n -d, --debug print debug messages to stdout (exclusive to --quiet).\n\n\n## Special considerations\n\n* All mbtiles databases must be on the same host as the mb-util binary if you want to use the WAL locking mode.\n* Using --synchronous-off is dangerous since your database might get corrupted.\n* Use --tmp-dir=/dev/shm on Ubuntu to place temporary files on a ram disk.\n* Use --use-wal-journal if you want to udpate a database which is at the same time used for reading.\n* --auto-commit will disable transactions and therefore most probably slow down any insert operations to the database.\n\n## Requirements\n\n* Python `>= 2.6`\n* SQLite `>= 3.7.0`\n\n## Metadata\n\nmb-util imports and exports metadata as JSON, in the root of the tile directory, as a file named `metadata.json`.\n\n```javascript\n{\n \"name\": \"World Light\",\n \"description\": \"A Test Metadata\",\n \"version\": \"3\"\n}\n```\n\n## Testing\n\nThis project uses [nosetests](http://readthedocs.org/docs/nose/en/latest/) for testing. Install nosetests\nand run\n\n nosetests\n\n## License\n\nBSD - see LICENSE.md\n\n## Authors\n\n- Tom MacWright (tmcw)\n- Dane Springmeyer (springmeyer)\n- Mathieu Leplatre (leplatrem)\n- Thomas Rasch (trasch)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/urbanmapping/mbutil", "keywords": null, "license": "LICENSE.md", "maintainer": null, "maintainer_email": null, "name": "umimbutil", "package_url": "https://pypi.org/project/umimbutil/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/umimbutil/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/urbanmapping/mbutil" }, "release_url": "https://pypi.org/project/umimbutil/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "An importer and exporter for MBTiles", "version": "0.1.0" }, "last_serial": 801207, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "0cf6095b5d5c1b7923dec4e033d24419", "sha256": "c36aec02f4aebe446a0d4f18e45a2b2fba3831c89a44fedf4759300f2989a1ef" }, "downloads": -1, "filename": "umimbutil-0.1.0.tar.gz", "has_sig": false, "md5_digest": "0cf6095b5d5c1b7923dec4e033d24419", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18524, "upload_time": "2013-01-30T22:16:08", "url": "https://files.pythonhosted.org/packages/a6/96/4ef3997d4a51bf88b52411538e862b685a38a84cff3203a780d5f0eec252/umimbutil-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0cf6095b5d5c1b7923dec4e033d24419", "sha256": "c36aec02f4aebe446a0d4f18e45a2b2fba3831c89a44fedf4759300f2989a1ef" }, "downloads": -1, "filename": "umimbutil-0.1.0.tar.gz", "has_sig": false, "md5_digest": "0cf6095b5d5c1b7923dec4e033d24419", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18524, "upload_time": "2013-01-30T22:16:08", "url": "https://files.pythonhosted.org/packages/a6/96/4ef3997d4a51bf88b52411538e862b685a38a84cff3203a780d5f0eec252/umimbutil-0.1.0.tar.gz" } ] }