Skip to content

Commit

Permalink
Multi-band raster (#40)
Browse files Browse the repository at this point in the history
* correct version number

* add missing test data

* update scheme

* move old files to old

* update scheme

* add exceptions to detect file not found error

* refactor

* move cluster to dataset

* add test data

* add fast to test categories

* generate missing lines in testing

* update example

* add read_file documentations

* add example data

* add documentations for Dataset attributes

* time_stamp attribute returns None if there is no time_stamp

* add dataset attribute image

* update scheme

* update dataset attributes

* add bounds image

* update overall docs structure

* add scheme images

* bump up cleopatra version

* change the comparison of the geotrsndform to use the pivot point and cell size

* refactor _crop_aligned

* encapsulate the _check_no_data_value

* make change_no_data_value use the _set_no_data_value

* add test to check if the no_data_value does not comply with the band data type

* add setter for the no_data_value

* test no_data_value setter

* crop multi bands

* add missing test data

* add missing test data

* use back slash

* use back slash

* add debug statment

* add debug statment

* refactor

* update test data

* clean test and examples files

* change name

* remove tif file as git does not detect changes in tif files

* reupload tif file as git does not detect changes in tif files

* Delete sentinel_crop.tif

* replace the crop tif file

* adjust resample for multi bands rasters

* add test data

* adjust align to work with multi band rasters

* add test data

* extract function works with multiband rasters

* bump up hpc and  cleopatara

* change utils, io, and errors to private modules

* add get driver by extension

* add get_driver_by_extension function

* remove driver from Dataset.to_file function

* refactor

* overlay works with multi band rasters

* to_crs works with multi band rasters

* return array with the same type as the raster band

* plot rgb

* plot rgb example

* fix error in using TkAgg in the test file

* update check list files

* update readme file
  • Loading branch information
MAfarrag authored Apr 23, 2023
1 parent 4df4e15 commit e43ae74
Show file tree
Hide file tree
Showing 75 changed files with 5,147 additions and 2,187 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Main-package
wname: Main-package
on:
push:
branches:
Expand Down Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Generate coverage report
run: |
python -m pytest -m "not plot"
python -m pytest -sv -m "not plot"
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,4 @@ examples/coords.csv
*.pptx
examples/monthly_precipitation_amount_1hour_Accumulation_2022.05.01.00.00.00.tif
tests/data/raster-folder-coello/*
examples/old/*
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ repos:
hooks:
- id: pytest-check
name: pytest-check
entry: pytest -vvv --cov=pyramids
entry: pytest -v --cov=pyramids --cov-report term-missing
language: system
pass_filenames: false
always_run: true
10 changes: 10 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,13 @@ History
* Add dunder methods for all classes.
* add plotting functionality and cleopatra (plotting package) as an optional package.
* remove loops and replace it with ufunc from numpy.

0.4.1 (2023-04-23)
------------------
* adjust all spatial operation functions to work with multi-band rasters.
* use gdal exceptions to capture runtime error of not finding the the file.
* add cluster method to dataset class.
* time_stamp attribute returns None if there is no time_stamp.
* restructure the no_data_value related functions.
* plot function can plot rgb imagr for multi-band rasters.
* to_file detect the driver type from the extension in the path.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/5e3aa4d0acc843d1a91caf33545ecf03)](https://www.codacy.com/gh/Serapieum-of-alex/pyramids/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Serapieum-of-alex/pyramids&utm_campaign=Badge_Grade)


![GitHub commits since latest release (by SemVer including pre-releases)](https://img.shields.io/github/commits-since/mafarrag/pyramids/0.2.1?include_prereleases&style=plastic)
![GitHub commits since latest release (by SemVer including pre-releases)](https://img.shields.io/github/commits-since/mafarrag/pyramids/0.4.1?include_prereleases&style=plastic)
![GitHub last commit](https://img.shields.io/github/last-commit/mafarrag/pyramids)

Current release info
Expand All @@ -25,7 +25,7 @@ Current release info

pyramids - GIS utility package
=====================================================================
**pyramids** is a GIS utility package using gdal, rasterio, ....
**pyramids** is a GIS utility package using gdal, ....

pyramids

Expand All @@ -48,7 +48,7 @@ Installing pyramids
Installing `pyramids` from the `conda-forge` channel can be achieved by:

```
conda install -c conda-forge pyramids=0.4.0
conda install -c conda-forge pyramids=0.4.1
```

It is possible to list all of the versions of `pyramids` available on your platform with:
Expand All @@ -66,7 +66,7 @@ pip install git+https://github.com/Serapieum-of-alex/pyramids
## pip
to install the last release you can easly use pip
```
pip install pyramids-gis==0.4.0
pip install pyramids-gis==0.4.1
```

Quick start
Expand Down
Loading

0 comments on commit e43ae74

Please sign in to comment.