{"id":22328004,"url":"https://github.com/yannforget/builtup-classification-osm","last_synced_at":"2025-07-29T18:31:10.271Z","repository":{"id":95217997,"uuid":"133227237","full_name":"yannforget/builtup-classification-osm","owner":"yannforget","description":"Replication code for \"Supervised Classification of Built-up Areas in Sub-Saharan African Cities using Landsat Imagery and OpenStreetMap\"","archived":false,"fork":false,"pushed_at":"2019-06-14T15:36:08.000Z","size":937,"stargazers_count":17,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-01-29T21:14:20.848Z","etag":null,"topics":["landsat","openstreetmap","remote-sensing","supervised-learning"],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yannforget.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-05-13T10:36:02.000Z","updated_at":"2023-07-11T14:05:18.000Z","dependencies_parsed_at":"2023-04-12T11:24:10.020Z","dependency_job_id":null,"html_url":"https://github.com/yannforget/builtup-classification-osm","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.3571428571428571,"last_synced_commit":"61c24d6ffdb909225e16579e8e8ca0c953bc7820"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yannforget%2Fbuiltup-classification-osm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yannforget%2Fbuiltup-classification-osm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yannforget%2Fbuiltup-classification-osm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yannforget%2Fbuiltup-classification-osm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yannforget","download_url":"https://codeload.github.com/yannforget/builtup-classification-osm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228034977,"owners_count":17859245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["landsat","openstreetmap","remote-sensing","supervised-learning"],"created_at":"2024-12-04T03:11:22.640Z","updated_at":"2024-12-04T03:11:23.179Z","avatar_url":"https://github.com/yannforget.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![DOI](https://zenodo.org/badge/133227237.svg)](https://zenodo.org/badge/latestdoi/133227237)\n\n# Description\n\nThis repository contains all the code required to reproduce the results presented in the following paper:\n\n* Y. Forget, C. Linard, M. Gilbert. *Supervised Classification of Built-up Areas in Sub-Saharan African Cities using Landsat Imagery and OpenStreetMap*, 2018.\n\nThe results of the study can be explored [here](http://maupp.ulb.ac.be/page/forget2018/) in an interactive map.\n\nInput, intermediary and output data can be downloaded from [zenodo](https://zenodo.org/record/1291961).\n\n# Dependencies\n\nDependencies are listed in the `environment.yml` file at the root of the repository. Using the [Anaconda](https://www.anaconda.com/download) distribution, a virtual environment containing all the required dependencies can be created automatically:\n\n``` sh\n# Clone the repository\ngit clone https://github.com/yannforget/builtup-classification-osm.git\ncd builtup-classification-osm\n\n# Create the Python environment\nconda env create --file environment.yml\n\n# Activate the environment\nsource activate landsat-osm\n# Or, depending on the system:\nconda activate landsat-osm\n```\n\n# Data\n\nDue to storage constraints, input data are not integrated to this repository. However, input and intermediary files required to run the analysis can be downloaded from a [zenodo deposit](https://zenodo.org/record/1291961). Alternatively, output files of the study can be directly downloaded from this repository. To run the following code, input and intermediary files must be downloaded in the `/data` folder. For example, in Linux:\n\n``` sh\n# Create the data directory\ncd builtup-classification-osm\nmkdir data\ncd data\n\n# Download input and intermediary data\nwget -O input.zip https://zenodo.org/record/1291961/files/input.zip?download=1\nwget -O intermediary.zip https://zenodo.org/record/1291961/files/intermediary.zip?download=1\n\n# Decompress the archives\nunzip input.zip\nunzip intermediary.zip\nrm *.zip\n```\n\nLikewise, the Global Humans Settlements Layer is required to run the notebook `02-External_Datasets.ipynb`:\n\n``` sh\ncd builtup-classification-osm/data/input\nwget http://cidportal.jrc.ec.europa.eu/ftp/jrc-opendata/GHSL/GHS_BUILT_LDSMT_GLOBE_R2015B/GHS_BUILT_LDSMT_GLOBE_R2015B_3857_38/V1-0/GHS_BUILT_LDSMT_GLOBE_R2015B_3857_38_v1_0.zip\nunzip GHS_BUILT_LDSMT_GLOBE_R2015B_3857_38_v1_0.zip\nrm GHS_BUILT_LDSMT_GLOBE_R2015B_3857_38_v1_0.zip\nmv GHS_BUILT_LDSMT_GLOBE_R2015B_3857_38_v1_0 ghsl\n```\n\n# Code\n\nThe code of the analysis in divided in two parts: the Python scripts and modules used to support the analysis, and the notebooks where the outputs of the analysis have been produced.\n\n## Notebooks\n\n* `notebooks/01-Evolution_of_OSM.ipynb` : Analysis of OSM data availability and its evolution from 2011 to 2018. Please note that this analysis requires additionnal files and softwares: the full historic OSM data dump (available through the geofabrik.de website for OpenStreetMap members, and the `osmium` command-line tool).\n* `notebooks/02-External_Datasets.ipynb` : Assessment of the GHSL and HBASE datasets in the context of our case studies.\n* `notebooks/03-Buildings_Footprints.ipynb` : Assessment of OSM buildings footprints as built-up training samples.\n* `notebooks/04-Nonbuilt_Tags.ipynb` : Assessment of OSM non-built polygons (leisure, natural or landuse objects) as non-built-up training samples.\n* `notebooks/05-Urban_Blocks.ipynb` : Assessment of OSM-based urban blocks as built-up training samples.\n* `notebooks/06-Urban_Distance.ipynb` : Assessment of OSM-based urban distance as non-built-up training samples.\n* `notebooks/07-Comparative_Analysis.ipynb` : Supervised classification of built-up areas.\n\nTo run the notebooks, `input` and `intermediary` data must have been downloaded (see above). Additionnaly, the following pre-processing scripts must be executed:\n\n``` sh\npython src/preprocess_reference.py\npython src/preprocess_osm.py\n```\n\nThe outputs of the other pre-processing scripts are already included in the `intermediary` zenodo archive.\n\n## Scripts\n\n* `src/download_osm.py` : script used for the acquisition of OSM data.\n* `src/generate_aoi.py` : script used to generate 40km x 40km area of interest for each case study.\n* `src/preprocess_landsat.py` : script used to mask input landsat data according to our areas of interest.\n* `src/preprocess_osm.py` : script used to produce the intermediary OSM products: rasterized buildings and non-built objects, urban blocks, urban distance, water mask...\n* `src/preprocess_reference.py` : script used to rasterize the reference polygons used as validation data.\n\n## Modules\n\n* `src/metadata.py` : used to access metadata specific to each case study.\n* `src/landsat.py` : processing of Landsat data.\n* `src/raster.py` : raster processing functions.\n* `src/classification.py` : supervised classification and performance assessment.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyannforget%2Fbuiltup-classification-osm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyannforget%2Fbuiltup-classification-osm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyannforget%2Fbuiltup-classification-osm/lists"}