georeader-spaceml

🛰️ Process raster data in python

https://github.com/spaceml-org/georeader

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 8 DOI reference(s) in README
  • Academic publication links
    Links to: nature.com
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.9%) to scientific vocabulary

Keywords

geopandas rasterio satellite-data
Last synced: 6 months ago · JSON representation ·

Repository

🛰️ Process raster data in python

Basic Info
Statistics
  • Stars: 23
  • Watchers: 3
  • Forks: 7
  • Open Issues: 1
  • Releases: 19
Topics
geopandas rasterio satellite-data
Created about 4 years ago · Last pushed 7 months ago
Metadata Files
Readme License Citation

README.md

Article DOI:10.1038/s41598-023-47595-7 GitHub release (latest SemVer including pre-releases) PyPI PyPI - Python Version PyPI - License docs

Logo georeader

georeader is a package to process raster data from different satellite missions. georeader makes easy to read specific areas of your image, to reproject images from different satellites to a common grid (georeader.read), to go from vector to raster formats (georeader.vectorize and georeader.rasterize) or to do radiance to reflectance conversions (georeader.reflectance).

georeader is mainly used to process satellite data for scientific usage, to create ML-ready datasets and to implement end-to-end operational inference pipelines (e.g. the Kherson Dam Break floodmap).

Install

The core package dependencies are numpy, rasterio, shapely and geopandas.

bash pip install georeader-spaceml

Getting started

Read from a Sentinel-2 image a fixed size subimage on an specific lon,lat location (directly from the S2 public Google Cloud bucket):

```python

This snippet requires:

pip install fsspec gcsfs google-cloud-storage

import os os.environ["GSNOSIGN_REQUEST"] = "YES"

from georeader.readers import S2SAFEreader from georeader import read

cordsread = (-104.394, 32.026) # long, lat crscords = "EPSG:4326" s2safepath = S2SAFEreader.s2publicbucketpath("S2BMSIL1C20191008T173219N0208R055T13SER20191008T204555.SAFE") s2obj = S2SAFEreader.s2loader(s2safepath, outres=10, bands=["B04","B03","B02"])

copy to local avoids http errors specially when not using a Google Cloud project.

This will only copy the bands set up above B04, B03 and B02

s2obj = s2obj.cacheproducttolocaldir(".")

See also read.readfrombounds, read.readfrompolygon for different ways of croping an image

data = read.readfromcentercoords(s2obj,cordsread, shape=(2040, 4040), crscentercoords=crs_cords)

data_memory = data.load() # this loads the data to memory

data_memory # GeoTensor object

Transform: | 10.00, 0.00, 537020.00| | 0.00,-10.00, 3553680.00| | 0.00, 0.00, 1.00| Shape: (3, 2040, 4040) Resolution: (10.0, 10.0) Bounds: (537020.0, 3533280.0, 577420.0, 3553680.0) CRS: EPSG:32613 fillvaluedefault: 0 ```

In the .values attribute we have the plain numpy array that we can plot with show:

```python from rasterio.plot import show show(datamemory.values/3500, transform=datamemory.transform)

``` awesome georeader

Saving the GeoTensor as a COG GeoTIFF:

```python from georeader.save import save_cog

Supports writing in bucket location (e.g. gs://bucket-name/s2_crop.tif)

savecog(datamemory, "s2_crop.tif", descriptions=s2obj.bands) ```

Tutorials

Sentinel-2

Read rasters from different satellites

Used in other projects

Citation

If you find this code useful please cite: @article{portales-julia_global_2023, title = {Global flood extent segmentation in optical satellite images}, volume = {13}, issn = {2045-2322}, doi = {10.1038/s41598-023-47595-7}, number = {1}, urldate = {2023-11-30}, journal = {Scientific Reports}, author = {Portalés-Julià, Enrique and Mateo-García, Gonzalo and Purcell, Cormac and Gómez-Chova, Luis}, month = nov, year = {2023}, pages = {20316}, } @article{ruzicka_starcop_2023, title = {Semantic segmentation of methane plumes with hyperspectral machine learning models}, volume = {13}, issn = {2045-2322}, url = {https://www.nature.com/articles/s41598-023-44918-6}, doi = {10.1038/s41598-023-44918-6}, number = {1}, journal = {Scientific Reports}, author = {Růžička, Vít and Mateo-Garcia, Gonzalo and Gómez-Chova, Luis and Vaughan, Anna, and Guanter, Luis and Markham, Andrew}, month = nov, year = {2023}, pages = {19999}, }

Acknowledgments

This research has been supported by the DEEPCLOUD project (PID2019-109026RB-I00) funded by the Spanish Ministry of Science and Innovation (MCIN/AEI/10.13039/501100011033) and the European Union (NextGenerationEU).

DEEPCLOUD project (PID2019-109026RB-I00, University of Valencia) funded by MCIN/AEI/10.13039/501100011033.

Owner

  • Name: SpaceML
  • Login: spaceml-org
  • Kind: organization

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Mateo-Garcia"
  given-names: "Gonzalo"
  orcid: "https://orcid.org/0000-0002-0569-393X"
  affiliation: "Universitat de Valencia"
title: "georeader"
version: 1.0.9
doi: 10.1038/s41598-023-47595-7
date-released: 2022-11-01
url: "https://github.com/spaceml-org/georeader"

GitHub Events

Total
  • Create event: 14
  • Release event: 1
  • Issues event: 1
  • Watch event: 7
  • Delete event: 7
  • Member event: 1
  • Issue comment event: 2
  • Push event: 113
  • Pull request review comment event: 5
  • Pull request review event: 11
  • Pull request event: 19
  • Fork event: 3
Last Year
  • Create event: 14
  • Release event: 1
  • Issues event: 1
  • Watch event: 7
  • Delete event: 7
  • Member event: 1
  • Issue comment event: 2
  • Push event: 113
  • Pull request review comment event: 5
  • Pull request review event: 11
  • Pull request event: 19
  • Fork event: 3

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 249
  • Total Committers: 2
  • Avg Commits per committer: 124.5
  • Development Distribution Score (DDS): 0.301
Past Year
  • Commits: 136
  • Committers: 2
  • Avg Commits per committer: 68.0
  • Development Distribution Score (DDS): 0.449
Top Committers
Name Email Commits
Gonzalo Mateo g****8@g****m 174
Gonzalo Mateo Garcia g****a@u****g 75
Committer Domains (Top 20 + Academic)
un.org: 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 2
  • Total pull requests: 28
  • Average time to close issues: 3 months
  • Average time to close pull requests: 7 days
  • Total issue authors: 2
  • Total pull request authors: 5
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.07
  • Merged pull requests: 25
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 18
  • Average time to close issues: N/A
  • Average time to close pull requests: 6 days
  • Issue authors: 1
  • Pull request authors: 3
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.06
  • Merged pull requests: 16
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • giswqs (1)
Pull Request Authors
  • gonzmg88 (26)
  • montesinoman (3)
  • giswqs (2)
  • Muhammed0mer (2)
  • jejjohnson (2)
Top Labels
Issue Labels
Pull Request Labels
bug (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 1,496 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 0
  • Total versions: 79
  • Total maintainers: 1
pypi.org: georeader-spaceml

🛰️ Process raster data in python

  • Versions: 79
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Downloads: 1,496 Last month
Rankings
Dependent packages count: 7.4%
Average: 38.1%
Dependent repos count: 68.9%
Maintainers (1)
Last synced: 7 months ago

Dependencies

requirements.txt pypi
  • numpy *
  • rasterio *
  • scikit-image *
  • shapely *
setup.py pypi