{"id":24795236,"url":"https://github.com/souravbhadra/raster4ml","last_synced_at":"2025-06-25T01:34:16.819Z","repository":{"id":50410203,"uuid":"512898984","full_name":"souravbhadra/raster4ml","owner":"souravbhadra","description":"A geospatial raster processing library for machine learning","archived":false,"fork":false,"pushed_at":"2023-11-13T17:15:03.000Z","size":147118,"stargazers_count":123,"open_issues_count":2,"forks_count":14,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-19T16:19:43.232Z","etag":null,"topics":["agriculture-research","data-science","geospatial-data","machine-learning","python","remote-sensing","vegetation","vegetation-index"],"latest_commit_sha":null,"homepage":"https://raster4ml.readthedocs.io","language":"Python","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/souravbhadra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-07-11T20:26:01.000Z","updated_at":"2024-09-18T06:57:35.000Z","dependencies_parsed_at":"2024-01-01T06:14:51.432Z","dependency_job_id":null,"html_url":"https://github.com/souravbhadra/raster4ml","commit_stats":{"total_commits":50,"total_committers":1,"mean_commits":50.0,"dds":0.0,"last_synced_commit":"8a6025417930a1584071e2e80edbfc2a74895820"},"previous_names":["remotesensinglab/raster4ml"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/souravbhadra%2Fraster4ml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/souravbhadra%2Fraster4ml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/souravbhadra%2Fraster4ml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/souravbhadra%2Fraster4ml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/souravbhadra","download_url":"https://codeload.github.com/souravbhadra/raster4ml/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236274054,"owners_count":19122683,"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":["agriculture-research","data-science","geospatial-data","machine-learning","python","remote-sensing","vegetation","vegetation-index"],"created_at":"2025-01-29T23:29:09.198Z","updated_at":"2025-01-29T23:29:09.587Z","avatar_url":"https://github.com/souravbhadra.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![check-status](https://img.shields.io/github/checks-status/remotesensinglab/raster4ml/master)\n![docs](https://img.shields.io/readthedocs/raster4ml)\n![license](https://img.shields.io/github/license/remotesensinglab/raster4ml)\n![downloads](https://img.shields.io/pypi/dm/raster4ml)\n\n\n\n![raster4ml-logo](https://raw.githubusercontent.com/souravbhadra/raster4ml/master/docs/images/raster4ml_logo.png)\n\nWhen geospatial raster data is concerned in a machine learning pipeline, it is often required to extract meaningful features, such as vegetation indices (e.g., NDVI, EVI, NDRE, etc.) or textures. This package provides easy-to-use functions that can automatically calculates the features with one or several lines of codes in Python. It also has the functionality of extracting statistics based on shapefile (i.e., point or polygon) from a raster data. Any type of raster data is supported regardless of satellite or UAVs.\n\n## Key Features\n- **Stack raster bands**\n- **Automatically calculate vegetation indices (supports 350+ indices)**\n- **Extract raster values based on shapefile**\n- **Clip raster based on polygon**\n\n\n## Documentation\nDetailed documentation with tutorials can be found here: https://raster4ml.readthedocs.io/\n\n## How to Use?\n1. Stacking bands\n    ```\n    stack_bands(image_paths=['Band_1.tif', 'Band_2.tif', 'Band_3.tif',\n                             'Band_4.tif', 'Band_5.tif', 'Band_6.tif'],\n                out_file='Stack.tif')\n    ```\n2. Vegetation index calculation\n    ```\n    VI = VegetationIndices(image_path='Landsat8.tif',\n                           wavelengths=[442.96, 482.04, 561.41, 654.59, 864.67, 1608.86, 2200.73])\n    VI.calculate(out_dir='vegetation_indices')\n    ```\n2. Dynamic visualization in Jupyter Notebook\n    ```\n    m = Map()\n    m.add_raster(image_path='Landsat8.tif', bands=[4, 3, 2])\n    ```\n    Output:\n    ![map-output](https://raw.githubusercontent.com/souravbhadra/raster4ml/master/docs/images/tutorial_1_map_output_1.png)\n\n## How to Install?\n### Dependencies\n**Raster4ML** is built on top of [geopandas](https://geopandas.org/en/stable/), [rasterio](https://rasterio.readthedocs.io/en/latest/), [fiona](https://github.com/Toblerity/Fiona), [pyproj](https://pyproj4.github.io/pyproj/stable/), [rtree](https://github.com/Toblerity/rtree), [shapely](https://shapely.readthedocs.io/en/stable/manual.html), [numpy](https://numpy.org/), and [pandas](https://pandas.pydata.org/).\n\n### Virtual Environment\nIt is prefered to use a virtual environment for working with this package. Use [Anaconda](https://www.anaconda.com/) or [Miniconda](https://docs.conda.io/en/latest/miniconda.html) to create a seperate environment and then install the package and its dependencies there.\n```\nconda create --name raster4ml python=3\nconda activate raster4ml\n```\n\n### Windows\nTo install on Windows, first download the wheel files for **GDAL**, **rasterio**, and **fiona** from [Christoph Gohlke's website](https://www.lfd.uci.edu/~gohlke/pythonlibs/) (🤗Thanks Christoph🤗). Go to his website, press \u003ccode\u003eCtrl+F\u003c/code\u003e and type gdal. Download the GDAL file that mostly matches your computer configuration (64-bit or 32-bit) and Python version.\n\nAfter downloading it, \u003ccode\u003ecd\u003c/code\u003e into the downloaded directory while the \u003ccode\u003eraster4ml\u003c/code\u003e environment is activated. Then install using \u003ccode\u003epip\u003c/code\u003e. Do the same for **rasterio** and **fiona**.\n```\npip install GDAL‑3.4.3‑cp310‑cp310‑win_amd64.whl\npip install rasterio‑1.2.10‑cp310‑cp310‑win_amd64.whl\npip install Fiona‑1.8.21‑cp310‑cp310‑win_amd64.whl\n```\nIf these three are installed, the rest of the dependencies can be installed directly through **Raster4ML**'s \u003ccode\u003epip\u003c/code\u003e distribution.\n```\npip install raster4ml\n```\n\n## Tutorials\nThere are two tutorials provided. Find them in ``docs/tutorials``.\n\n## Questions?\nPlease report bugs at [https://github.com/remotesensinglab/raster4ml/issues](https://github.com/remotesensinglab/raster4ml/issues).\n\nIf you are reporting a bug, please include:\n\n* Your operating system name and version.\n* Any details about your local setup that might be helpful in troubleshooting.\n* Detailed steps to reproduce the bug.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsouravbhadra%2Fraster4ml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsouravbhadra%2Fraster4ml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsouravbhadra%2Fraster4ml/lists"}