{ "info": { "author": "Kevin Wurster", "author_email": "wursterk@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Multimedia :: Graphics :: Graphics Conversion", "Topic :: Scientific/Engineering :: GIS" ], "description": "===========\nrio-ds-mask\n===========\n\nA `Rasterio `__ plugin for extracting\nan image's dataset-level mask.\n\n.. image:: https://travis-ci.org/geowurster/rio-ds-mask.svg?branch=master\n :target: https://travis-ci.org/geowurster/rio-ds-mask\n\n.. image:: https://coveralls.io/repos/github/geowurster/rio-ds-mask/badge.svg?branch=master\n :target: https://coveralls.io/github/geowurster/rio-ds-mask\n\n\n=====\nUsage\n=====\n\n.. code-block:: console\n\n Usage: rio ds-mask [OPTIONS] INPUT OUTPUT\n\n Extract an image's dataset-level mask.\n\n Both output driver and datatype are derived from the input image if not\n given.\n\n In some cases this plugin alters GDAL's returned mask values. When\n writing masks GDAL uses 0's for opaque and 255's for transparent, but when\n reading masks the returned value differs based on the image's datatype. 8\n bit images produce 8 bit masks where 0's are opaque and 255's are\n transparent, however 16 bit images use 0's for opaque and 1's for\n transparent, still stored as 8 bit. If the image's datatype is 'int16' or\n 'uint16' and the mask's maximum value is 1, then all 1's are translated to\n 255's. The mask's datatype is preserved. I have not fully investigated\n all of GDAL's masking options to determine if the behavior is consistent.\n If it is found to be a deliberate choice then the normalization will be\n removed.\n\n Options:\n -f, --format, --driver TEXT Output format driver\n -t, --dtype [ubyte|uint8|uint16|int16|uint32|int32|float32|float64]\n Output data type.\n --co, --profile NAME=VALUE Driver specific creation options.See the\n documentation for the selected output driver\n for more information.\n --help Show this message and exit.\n\nThis example command creates a singleband ``uint8`` image that is acceptable\nto use as a GDAL mask band, meaning that pixels with a value of ``255`` are\ntransparent and pixels with a vaue of ``0`` are opaque. The image is\nlosslessly compressed and internally tiled.\n\n.. code-block:: console\n\n $ rio ds-mask \\\n --driver GTiff \\\n tests/data/alpha.tif \\\n mask.tif \\\n --co COMPRESS=DEFLATE \\\n --co TILED=YES\n\n\n==========\nInstalling\n==========\n\nFirst `install Rasterio `__,\nthen:\n\n.. code-block:: console\n\n $ pip install rio-ds-mask --user\n\n\nDeveloping\n==========\n\n.. code-block:: console\n\n $ git clone https://github.com/geowurster/rio-ds-mask.git\n $ cd rio-ds-mask\n $ pip install -e .\\[all\\]\n $ pytest --cov rio-ds-mask --cov-report term-missing\n\n\nLicense\n=======\n\nSee `LICENSE.txt `__\n\n\nChangelog\n=========\n\nSee `CHANGES.md `__\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/geowurster/rio-ds-mask", "keywords": "rasterio plugin dataset mask", "license": "New BSD", "maintainer": "", "maintainer_email": "", "name": "rio-ds-mask", "package_url": "https://pypi.org/project/rio-ds-mask/", "platform": "", "project_url": "https://pypi.org/project/rio-ds-mask/", "project_urls": { "Homepage": "https://github.com/geowurster/rio-ds-mask" }, "release_url": "https://pypi.org/project/rio-ds-mask/1.2/", "requires_dist": [ "click", "cligj", "rasterio (>=0.36.0)", "pytest (>=3); extra == 'all'", "pytest-cov; extra == 'all'", "coveralls; extra == 'all'", "pytest (>=3); extra == 'test'", "pytest-cov; extra == 'test'", "coveralls; extra == 'test'" ], "requires_python": "", "summary": "Extract an image's dataset-level mask and write to a new file.", "version": "1.2" }, "last_serial": 3571297, "releases": { "1.1": [ { "comment_text": "", "digests": { "md5": "7c5dcaa4e011fc8099ba57bd802cb504", "sha256": "a786ad935732b0cdc90e8c61097c73bc9a4c10017601e5b01b4344fc54558b00" }, "downloads": -1, "filename": "rio_ds_mask-1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7c5dcaa4e011fc8099ba57bd802cb504", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5916, "upload_time": "2017-12-12T03:31:26", "url": "https://files.pythonhosted.org/packages/1f/5a/b9cc2e70c6a3d0a0c4698aee87f0aa8b2196416f5168ceb01a3131170b6e/rio_ds_mask-1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c35c6600e6319229934c801485904060", "sha256": "d93ad868322dfe50512bd97d6c14093ba0644e4bc45328e2baf37288f29517d9" }, "downloads": -1, "filename": "rio-ds-mask-1.1.tar.gz", "has_sig": false, "md5_digest": "c35c6600e6319229934c801485904060", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4868, "upload_time": "2017-12-12T03:31:29", "url": "https://files.pythonhosted.org/packages/15/30/25801e3249e73d60650421c67affae9eb2a93f1b9da6800ff6574addf2cc/rio-ds-mask-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "7b6810ae98a33f0fd2a7f14f45b123a6", "sha256": "fe07f43f6ab5398cf1902001792f3a6a89fda4379c3008272017083f6d6a3232" }, "downloads": -1, "filename": "rio_ds_mask-1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7b6810ae98a33f0fd2a7f14f45b123a6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7530, "upload_time": "2018-02-11T04:06:24", "url": "https://files.pythonhosted.org/packages/51/ef/efdd7bc1030903cc5172316eeac383f721a8f65ff2a8a7c4f15c7cf19722/rio_ds_mask-1.2-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7b6810ae98a33f0fd2a7f14f45b123a6", "sha256": "fe07f43f6ab5398cf1902001792f3a6a89fda4379c3008272017083f6d6a3232" }, "downloads": -1, "filename": "rio_ds_mask-1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7b6810ae98a33f0fd2a7f14f45b123a6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7530, "upload_time": "2018-02-11T04:06:24", "url": "https://files.pythonhosted.org/packages/51/ef/efdd7bc1030903cc5172316eeac383f721a8f65ff2a8a7c4f15c7cf19722/rio_ds_mask-1.2-py2.py3-none-any.whl" } ] }