{ "info": { "author": "Mart\u00ed Bosch", "author_email": "marti.bosch@epfl.ch", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "[![PyPI version fury.io](https://badge.fury.io/py/urban-footprinter.svg)](https://pypi.python.org/pypi/urban-footprinter/)\n[![Build Status](https://travis-ci.org/martibosch/urban-footprinter.svg?branch=master)](https://travis-ci.org/martibosch/urban-footprinter)\n[![Coverage Status](https://coveralls.io/repos/github/martibosch/urban-footprinter/badge.svg?branch=master)](https://coveralls.io/github/martibosch/urban-footprinter?branch=master)\n[![GitHub license](https://img.shields.io/github/license/martibosch/urban-footprinter.svg)](https://github.com/martibosch/urban-footprinter/blob/master/LICENSE)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/martibosch/urban-footprinter/master?filepath=notebooks/overview.ipynb)\n\nUrban footprinter\n===============================\n\nA reusable convolution-based approach to detect urban extents from raster datasets.\n\nLULC | Convolution result | Computed urban extent\n:-------------------------:|:-------------------------:|:-------------------------:\n![LULC](notebooks/figures/zurich-lulc.png) | ![Convolution result](notebooks/figures/zurich-conv-result.png) | ![Urban extent](notebooks/figures/zurich-extent.png)\n\nThe approach is built upon the methods used in the [Atlas of Urban Expansion](http://atlasofurbanexpansion.org/). The main idea is that a pixel is considered part of the urban extent depending on the proportion of built-up pixels that surround it. See the [notebook overview](https://github.com/martibosch/urban-footprinter/tree/master/notebooks/overview.ipynb) or [this blog post](https://martibosch.github.io/urban-footprinter/) for a more detailed description of the procedure.\n\n\nInstallation and usage\n----------------------\n\nTo install use pip:\n\n $ pip install urban-footprinter\n\n\nOr clone the repo:\n\n $ git clone https://github.com/martibosch/urban-footprinter.git\n $ python setup.py install\n\nThen use it as:\n\n```python\nimport urban_footprinter as ufp\n\n# Or use `ufp.urban_footprint_mask_shp` to obtain the urban extent as a \n# shapely geometry\nurban_mask = ufp.urban_footprint_mask(\"path/to/raster.tif\",\n kernel_radius,\n urban_threshold,\n urban_classes=urban_classes)\n```\n\nwhere \n\n\n help(ufp.urban_footprint_mask)\n\n Help on function urban_footprint_mask in module urban_footprinter:\n \n urban_footprint_mask(raster, kernel_radius, urban_threshold, urban_classes=None, largest_patch_only=True, buffer_dist=None, res=None)\n Computes a boolean mask of the urban footprint of a given raster.\n \n Parameters\n ----------\n raster : ndarray or str, file object or pathlib.Path object\n Land use/land cover (LULC) raster. If passing a ndarray (instead of the\n path to a geotiff), the resolution (in meters) must be passed to the\n `res` keyword argument.\n kernel_radius : numeric\n The radius (in meters) of the circular kernel used in the convolution.\n urban_threshold : float from 0 to 1\n Proportion of neighboring (within the kernel) urban pixels after which\n a given pixel is considered urban.\n urban_classes : int or list-like, optional\n Code or codes of the LULC classes that must be considered urban. Not\n needed if `raster` is already a boolean array of urban/non-urban LULC\n classes.\n largest_patch_only : boolean, default True\n Whether the returned urban/non-urban mask should feature only the\n largest urban patch.\n buffer_dist : numeric, optional\n Distance to be buffered around the urban/non-urban mask. If no value is\n provided, no buffer is applied.\n res : numeric, optional\n Resolution of the `raster` (assumes square pixels). Ignored if `raster`\n is a path to a geotiff.\n \n Returns\n -------\n urban_mask : ndarray", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/martibosch/urban-footprinter", "keywords": "", "license": "GPL-3.0", "maintainer": "", "maintainer_email": "", "name": "urban-footprinter", "package_url": "https://pypi.org/project/urban-footprinter/", "platform": "", "project_url": "https://pypi.org/project/urban-footprinter/", "project_urls": { "Homepage": "https://github.com/martibosch/urban-footprinter" }, "release_url": "https://pypi.org/project/urban-footprinter/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "A convolution-based approach to detect urban extents.", "version": "0.2.0", "yanked": false, "yanked_reason": null }, "last_serial": 6749098, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "07c538f7bee2143d543003fc74c317ae", "sha256": "700d1a02a1ef5a16e51aecea0f18a4929f69a0fde63c9aa1e5bc7c1eb59eb299" }, "downloads": -1, "filename": "urban_footprinter-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "07c538f7bee2143d543003fc74c317ae", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15983, "upload_time": "2019-10-21T07:36:19", "upload_time_iso_8601": "2019-10-21T07:36:19.658781Z", "url": "https://files.pythonhosted.org/packages/d0/f8/434ef4220879b473018a16bccb445fa2d4516f215eeb2d55b8d03dda14d2/urban_footprinter-0.0.1-py2.py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "9daf8faa6ec995645fc2410f824ead72", "sha256": "2d8abccdef34a9a2f1b6291a72b09882269ac6b7655f9fd2554259f8896c7044" }, "downloads": -1, "filename": "urban-footprinter-0.0.1.tar.gz", "has_sig": false, "md5_digest": "9daf8faa6ec995645fc2410f824ead72", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16006, "upload_time": "2019-10-21T07:36:23", "upload_time_iso_8601": "2019-10-21T07:36:23.989685Z", "url": "https://files.pythonhosted.org/packages/6a/85/4e15c83643123769b244b640dc6c27ea3cb413d6937a56f4841dd433f77f/urban-footprinter-0.0.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "81ad2eb04845544e067553fdd66a8bb6", "sha256": "e87a539da78096dd5aca9a52637ff1a6597bf9001d794190a3dca9dd177a2c93" }, "downloads": -1, "filename": "urban-footprinter-0.1.0.tar.gz", "has_sig": false, "md5_digest": "81ad2eb04845544e067553fdd66a8bb6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17075, "upload_time": "2019-11-22T09:36:11", "upload_time_iso_8601": "2019-11-22T09:36:11.737156Z", "url": "https://files.pythonhosted.org/packages/c6/6b/15132d9457403ef1fd523a1b4bd9cbee5865c7084b09f69af6037e9721fa/urban-footprinter-0.1.0.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "0e3b99680a10dc7487b24a6cde6cdb54", "sha256": "d01ec04f8f43fdde568fc8cf94a262d9f3e3294196503f36699b4e639c7b9057" }, "downloads": -1, "filename": "urban-footprinter-0.2.0.tar.gz", "has_sig": false, "md5_digest": "0e3b99680a10dc7487b24a6cde6cdb54", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17325, "upload_time": "2020-03-04T16:54:23", "upload_time_iso_8601": "2020-03-04T16:54:23.218509Z", "url": "https://files.pythonhosted.org/packages/86/d0/25cc27bf37940b42b30f1492d172bac7f421d0026fff2754f89aeb28d44d/urban-footprinter-0.2.0.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0e3b99680a10dc7487b24a6cde6cdb54", "sha256": "d01ec04f8f43fdde568fc8cf94a262d9f3e3294196503f36699b4e639c7b9057" }, "downloads": -1, "filename": "urban-footprinter-0.2.0.tar.gz", "has_sig": false, "md5_digest": "0e3b99680a10dc7487b24a6cde6cdb54", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17325, "upload_time": "2020-03-04T16:54:23", "upload_time_iso_8601": "2020-03-04T16:54:23.218509Z", "url": "https://files.pythonhosted.org/packages/86/d0/25cc27bf37940b42b30f1492d172bac7f421d0026fff2754f89aeb28d44d/urban-footprinter-0.2.0.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }