{"id":32566771,"url":"https://github.com/wpgp/python_tools","last_synced_at":"2025-10-29T05:24:42.183Z","repository":{"id":122024944,"uuid":"525049675","full_name":"wpgp/python_tools","owner":"wpgp","description":"This repo contains some python-based tools for processing geospatial data","archived":false,"fork":false,"pushed_at":"2024-04-18T11:47:05.000Z","size":543,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-18T13:25:50.486Z","etag":null,"topics":["geospatial-data","raster"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wpgp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-08-15T15:58:16.000Z","updated_at":"2024-03-04T07:40:15.000Z","dependencies_parsed_at":"2024-01-18T08:39:04.967Z","dependency_job_id":"8f4278b9-ce99-4000-a82e-504dee15904b","html_url":"https://github.com/wpgp/python_tools","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"2234c7ce4100ba06551c95b605133a6aa96ed8c7"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wpgp/python_tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpgp%2Fpython_tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpgp%2Fpython_tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpgp%2Fpython_tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpgp%2Fpython_tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wpgp","download_url":"https://codeload.github.com/wpgp/python_tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wpgp%2Fpython_tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281563976,"owners_count":26522739,"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","status":"online","status_checked_at":"2025-10-29T02:00:06.901Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["geospatial-data","raster"],"created_at":"2025-10-29T05:24:40.130Z","updated_at":"2025-10-29T05:24:42.178Z","avatar_url":"https://github.com/wpgp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python command line tools\n\nThis module contains several command line tools that might be useful for spatial data analysis and modelling. The development of these tools aims for the ease of use. Most of the tools are built upon the following packages such that installing them are necessary:\n- [numpy](https://numpy.org)\n- [pandas](https://pandas.pydata.org)\n- [geopandas](https://geopandas.org)\n- [rasterio](https://rasterio.readthedocs.io)\n- [rasterstats](https://pythonhosted.org/rasterstats/)\n\nTo install the required package, open the command prompt or [Anaconda](https://www.anaconda.com) and use `pip install [package name]`. Alternatively, `conda install [package name]` can also be used in the Anaconda.\n\n### Zonal Statistics\n`zonal_statistics.py` is a script to extract zonal statistics from raster input based on the list of features provided. Copy the script to the working directory to use it. Type `python zonal_statistics.py --help` to know how to use this script.\n\n### Dynamic World Wrapper\n`dworld_wrapper.py` can be used to acquire [Dynamic World](https://dynamicworld.app) land use/land cover (LULC) class for a specific area. Tiles of annually aggregated Dynamic World data (from 2016-2021) are available at the WorldPop drive. The spatial resolution of the rasters is 100 m. The `dworld_wrapper.py` script helps to merge and clip the tiles.\n\nUsage: `python dworld_wrapper.py -y year -b band -c boundary -o output.tif`\n- Available years: 2016, 2017, 2018, 2019, 2020, 2021\n- Available bands: water, trees, grass, flooded_vegetation, crops, shrub_and_scrub, built, bare, snow_and_ice\n- Clipping boundary: can either be a shapefile or coordinate boundary (xmin, xmax, ymin, ymax)\n\nExample:\n- `python dworld_wrapper.py -y 2020 -b crops,built -c 100,105,0,5 -o sumatra.tif` will produce a raster with two bands (crops, built) clipped on the rectangular boundary between 100-105 longitude and 0-5 latitude. The output will be binary integer, 1 represents pixel categorised as a certain (crops, built) class.\n- `python dworld_wrapper.py -y 2021 -b built -c gadm41_IND_0.shp -o india.tif` will produce a raster of artificially built area in India (defined by `gadm41_IDN_0.shp`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpgp%2Fpython_tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwpgp%2Fpython_tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwpgp%2Fpython_tools/lists"}