Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cast single-band Raster to 2D #360

Closed
wants to merge 173 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
173 commits
Select commit Hold shift + click to select a range
787ab1a
Add Mask subclass
rhugonnet Feb 7, 2023
83c0f99
Add arithmetic tests and move __eq__ to raster_equal()
rhugonnet Feb 7, 2023
8967f2b
Incremental commit on tests
rhugonnet Feb 8, 2023
a69262c
Finalize tests and linting
rhugonnet Feb 8, 2023
f0036df
Linting
rhugonnet Feb 8, 2023
9d8e2ac
Merge remote-tracking branch 'upstream/main' into mask_class
rhugonnet Feb 9, 2023
94bb65e
Make mypy happy
rhugonnet Feb 10, 2023
16795fc
Update nbands into count after merge of related PR
rhugonnet Feb 10, 2023
7122c03
Move doc to sphinx-book-theme
rhugonnet Feb 10, 2023
f01304d
Restructure
rhugonnet Feb 11, 2023
5aad281
Skeleton
rhugonnet Feb 12, 2023
fed7ff2
Incremental commit on doc
rhugonnet Feb 12, 2023
7903969
Incremental commit on doc
rhugonnet Feb 12, 2023
fcec613
Incremental commit on doc
rhugonnet Feb 12, 2023
3d2175c
Incremental commit on doc
rhugonnet Feb 12, 2023
4bdea6f
Incremental commit on doc
rhugonnet Feb 13, 2023
87ba89d
Incremental commit on doc
rhugonnet Feb 13, 2023
f311195
Merge branch 'mask_class' into docs
rhugonnet Feb 13, 2023
a77bd90
Incremental commit on doc
rhugonnet Feb 13, 2023
e4c08db
Incremental commit on doc
rhugonnet Feb 13, 2023
84f159e
Quick start finalized!
rhugonnet Feb 14, 2023
98d2343
Incremental commit on docs
rhugonnet Feb 14, 2023
9110aad
Incremental commit on doc
rhugonnet Feb 14, 2023
d9085d4
Pin dependencies for sphinx
rhugonnet Feb 14, 2023
02bb6f0
Incremental commit on doc
rhugonnet Feb 15, 2023
a304191
Incremental commit on doc
rhugonnet Feb 15, 2023
aacae89
Remove jupyter myst folder
rhugonnet Feb 15, 2023
19035d9
Incremental commit on doc
rhugonnet Feb 16, 2023
0c223fc
Incremental commit on doc
rhugonnet Feb 16, 2023
dc5ada0
Incremental commit on doc
rhugonnet Feb 16, 2023
fbf8af3
Incremental commit on documentation
rhugonnet Feb 17, 2023
98d6438
Incremental commit on doc
rhugonnet Feb 17, 2023
f2d2db1
Incremental commit on doc
rhugonnet Feb 18, 2023
683ff9a
Fix behaviour of load() with load_data=False as default, add and modi…
rhugonnet Feb 20, 2023
56fae7c
Add _repr_html_ functions
rhugonnet Feb 20, 2023
d747d62
Fix behaviour with load_data=False in _overloading_check and tests in…
rhugonnet Feb 21, 2023
caea527
Update quick start with myst-nd and start new gallery of examples
rhugonnet Feb 21, 2023
016a8d6
Incremental commit on gallery examples
rhugonnet Feb 21, 2023
4666f27
Merge remote-tracking branch 'upstream/main' into docs
rhugonnet Feb 21, 2023
bc957b6
Merge and add new gallery folders to gitignore
rhugonnet Feb 21, 2023
65a6ce4
Incremental commit on example gallery
rhugonnet Feb 21, 2023
9af03dc
Update sphinx env method
rhugonnet Feb 21, 2023
bbc6921
Add mamba to readthedocs build
rhugonnet Feb 21, 2023
cd7cd4f
Add self package install in dev-env
rhugonnet Feb 21, 2023
3c07e0f
Incremental commit on documentation
rhugonnet Feb 21, 2023
f1b75b7
Add logo to documentation
rhugonnet Feb 22, 2023
15fb475
Incremental commit on doc
rhugonnet Feb 22, 2023
c636e85
Incremental commit on doc
rhugonnet Feb 23, 2023
9928eb0
Incremental commit on doc
rhugonnet Feb 24, 2023
af7ed0b
Add Vector.show and simplify gallery examples
rhugonnet Feb 24, 2023
48e5452
Fix sphinx errors
rhugonnet Feb 24, 2023
f2cbf80
Fix tests
rhugonnet Feb 24, 2023
3d22013
Fix tests
rhugonnet Feb 25, 2023
0e58426
Linting
rhugonnet Feb 25, 2023
6ffc72e
Make mypy ignore other files than core and tests
rhugonnet Feb 25, 2023
da3c2eb
Fix example
rhugonnet Feb 25, 2023
dfaf1b6
Fix diff calculation with self install in dev env
rhugonnet Feb 25, 2023
6d9ef61
Now should work
rhugonnet Feb 25, 2023
b6ab9c6
What about now?
rhugonnet Feb 25, 2023
ebfb6f1
Hard reset cache
rhugonnet Feb 25, 2023
aa4878b
Try to remove jinja condition now that mamba is solving
rhugonnet Feb 25, 2023
6ea16a8
Try pip --user option for Windows
rhugonnet Feb 25, 2023
46a1f16
Array ufunc fixes
rhugonnet Feb 25, 2023
af3623a
Ensure array functions are cast to Raster if they preserve the shape …
rhugonnet Feb 26, 2023
2e52fc9
Linting
rhugonnet Feb 26, 2023
fa33398
Fix typo
rhugonnet Feb 26, 2023
8efcc32
Linting
rhugonnet Feb 26, 2023
dc57efe
Try to hard reset cache to fix Mac tests
rhugonnet Feb 28, 2023
02a8393
Update quick start
rhugonnet Mar 1, 2023
934b4d2
Linting
rhugonnet Mar 1, 2023
a4d784a
Force reset cache
rhugonnet Mar 1, 2023
1da32b7
Update with sphinx-book-theme 1.0 release
rhugonnet Mar 1, 2023
cd8ebd7
Linting
rhugonnet Mar 1, 2023
c944ff2
Force cache reset again
rhugonnet Mar 1, 2023
173febe
Fix path to doc
rhugonnet Mar 1, 2023
3e225bb
Force cache reset again
rhugonnet Mar 2, 2023
a738644
Add graphviz to dev environment for inheritance diagrams
rhugonnet Mar 2, 2023
66c20f9
Add pygraphviz to dev environment as well...
rhugonnet Mar 2, 2023
6f37c7c
Fix incorrect parameter description in reproject
rhugonnet Mar 2, 2023
3267726
Fix operator in value_to_coords
rhugonnet Mar 2, 2023
147363e
Adapt tests to value_to_coords to check all values on pixel are resolved
rhugonnet Mar 2, 2023
04b1b7d
Fix cache re-loading error by moving all dependencies to conda-forge …
rhugonnet Mar 2, 2023
6ca58a0
Fix parameter description
rhugonnet Mar 2, 2023
39126b6
Linting
rhugonnet Mar 2, 2023
8d768ff
Clarify conf and modify title
rhugonnet Mar 4, 2023
104917a
Merge remote-tracking branch 'upstream/main' into docs
rhugonnet Mar 6, 2023
7d34e0a
Add option as_array to Vector.create_mask() and index and index assig…
rhugonnet Mar 8, 2023
1dc3ef5
Add tests to pass a Mask to set_mask
rhugonnet Mar 8, 2023
bbad406
Make nodata values a tuple and not list to be immutable, and thus has…
rhugonnet Mar 8, 2023
4ee41e9
Add test for shift
rhugonnet Mar 8, 2023
9594393
Add tests for diff_env_yml
rhugonnet Mar 8, 2023
3224198
Add test for diff_yml
rhugonnet Mar 8, 2023
3fe5e7a
Linting
rhugonnet Mar 8, 2023
3611461
Refactor crop_geom to remove camel-case, add geovector tests on missi…
rhugonnet Mar 8, 2023
9a61aab
Fix cropGeom refactoring
rhugonnet Mar 8, 2023
62f3430
Streamline main description of functions in raster
rhugonnet Mar 8, 2023
6b715f4
Streamline the function and attribute descriptions in geovector
rhugonnet Mar 8, 2023
0d20da0
Linting
rhugonnet Mar 8, 2023
c06afc9
Add test for to_xarray
rhugonnet Mar 9, 2023
a283e8e
Linting
rhugonnet Mar 9, 2023
ece179e
Fix test_init
rhugonnet Mar 9, 2023
a3bd710
Linting
rhugonnet Mar 9, 2023
0d3d19d
Add tests for diff_yml
rhugonnet Mar 9, 2023
a77c074
Add tests for mask overloaded functions and logical bitwise operations
rhugonnet Mar 9, 2023
dc0760a
Linting
rhugonnet Mar 9, 2023
6cab5b3
Fix mask class methods
rhugonnet Mar 9, 2023
df823d6
Adjust repr test for mask
rhugonnet Mar 9, 2023
c9ec2af
Add more tests to spatial tools and georaster
rhugonnet Mar 9, 2023
fd9f486
Add tests for geoviewer
rhugonnet Mar 10, 2023
47827d2
Linting
rhugonnet Mar 10, 2023
2aa785d
Add tests in satimg
rhugonnet Mar 10, 2023
531147f
Linting
rhugonnet Mar 10, 2023
080f3c4
Homogenize errors and add tests for geoviewer
rhugonnet Mar 10, 2023
30689c4
Add random state tests for subsample
rhugonnet Mar 10, 2023
02fb399
Linting
rhugonnet Mar 10, 2023
14e429d
Add coveragerc file to exclude overload and importerrors that do not …
rhugonnet Mar 10, 2023
56bb9f1
Linting
rhugonnet Mar 10, 2023
b561c60
Fix tempfile error on Windows
rhugonnet Mar 10, 2023
02e7bfb
Add tests for coords(), that was malfunctioning
rhugonnet Mar 10, 2023
6c7d7f2
Reorganize spatial tools into georaster/ modules
rhugonnet Mar 13, 2023
fc45903
Linting
rhugonnet Mar 13, 2023
f52609c
Rename modules georaster and geovector into raster and vector (geo is…
rhugonnet Mar 13, 2023
56dfce4
Linting
rhugonnet Mar 13, 2023
07ab0fd
Homogenize syntax in docstrings
rhugonnet Mar 13, 2023
e0fd5a5
Linting
rhugonnet Mar 13, 2023
d66c72d
Reset cache for pip setup of new geoviewer
rhugonnet Mar 15, 2023
7aedc98
Try to remove graphviz
rhugonnet Mar 16, 2023
0202624
Incremental commit on wrapping GeoPandas API
rhugonnet Mar 21, 2023
bb94f02
Finalize tests for GeoPandas interface
rhugonnet Mar 21, 2023
f30fafa
Linting
rhugonnet Mar 21, 2023
605a3ce
Fix misc description
rhugonnet Mar 21, 2023
db1d77a
Update pre-commit
rhugonnet Mar 21, 2023
48d9758
Remove not implemented geopandas functions
rhugonnet Mar 21, 2023
6795693
Wrap I/O geopandas method and fix tests
rhugonnet Mar 22, 2023
244bfe5
Linting
rhugonnet Mar 22, 2023
9bae25f
Define raster transform and crs as properties, remove the old attrs
rhugonnet Mar 22, 2023
dfa2ae3
Linting
rhugonnet Mar 23, 2023
f4d3369
Try to rename raster.py in raster to avoid errors on Mac and Windows
rhugonnet Mar 24, 2023
7d1862b
Fix renaming with core
rhugonnet Mar 24, 2023
c7c5b52
Try to re-order init imports
rhugonnet Mar 24, 2023
6239334
Change package setup to try fix on mac and windows
rhugonnet Mar 24, 2023
24bb5c3
Try re-installing via pip
rhugonnet Mar 24, 2023
a0cc1fb
Fix raster into core in sphinx conf and doc
rhugonnet Mar 24, 2023
f9c6545
Only run docs on Linux
rhugonnet Mar 27, 2023
69c780b
Linting
rhugonnet Mar 27, 2023
68226d7
Re-refactor into raster.py (not the source of error), and fix tempora…
rhugonnet Mar 27, 2023
b02b3bb
Linting
rhugonnet Mar 27, 2023
9d487d0
Make sphinx gallery thumbnail not visible, remove open_save example f…
rhugonnet Mar 27, 2023
d5b5ddf
Linting
rhugonnet Mar 27, 2023
f1027f3
Update logo
rhugonnet Mar 29, 2023
a829521
Move forward on Vector documentation
rhugonnet Mar 29, 2023
e110657
Linting
rhugonnet Mar 30, 2023
16101a8
Incremental commit on doc
rhugonnet Mar 30, 2023
4cde058
Linting
rhugonnet Mar 30, 2023
ba6cad1
Add tests for get_footprint_projected
rhugonnet Mar 31, 2023
07f34a3
Add get_metric_crs and tests
rhugonnet Mar 31, 2023
ab3aa35
Add description of functions in projtools
rhugonnet Mar 31, 2023
efcbfd2
Linting
rhugonnet Mar 31, 2023
a9405a5
Streamline README and CONTRIBUTING
rhugonnet Apr 1, 2023
ce102b6
Linting
rhugonnet Apr 1, 2023
fa53a1f
Streamline README further
rhugonnet Apr 1, 2023
5f58c35
Streamline README further
rhugonnet Apr 1, 2023
61f27e7
Streamline agaaain
rhugonnet Apr 1, 2023
f08df58
Finish README
rhugonnet Apr 1, 2023
ade54cf
Again
rhugonnet Apr 1, 2023
6211fc9
Try this
rhugonnet Apr 1, 2023
dfd3c8d
Make a bit better again
rhugonnet Apr 1, 2023
e6058b4
And a bit more again
rhugonnet Apr 1, 2023
1416b5a
Linting
rhugonnet Apr 1, 2023
67bed6a
Cast .data of single-band rasters to 2D, fix methods and tests
rhugonnet Apr 6, 2023
d5e66ce
Linting and fix some inconsistencies
rhugonnet Apr 6, 2023
20094d7
Fix docs
rhugonnet Apr 6, 2023
c57778f
Add xarray and rioxarray to main environment
rhugonnet Apr 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[report]
exclude_lines =
pragma: not covered
@overload
except ImportError
4 changes: 2 additions & 2 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
path: ${{ env.CONDA }}/envs
key: conda-${{ matrix.os }}-${{ matrix.python-version }}-${{ steps.get-date.outputs.month }}-${{ hashFiles('dev-environment.yml') }}-${{ env.CACHE_NUMBER }}
env:
CACHE_NUMBER: 5 # Increase this value to reset cache if environment.yml has not changed
CACHE_NUMBER: 102 # Increase this value to reset cache if environment.yml has not changed
id: cache

# The trick below is necessary because the generic environment file does not specify a Python version, and only
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
pkgs_pip_dev=`python -c "import geoutils; geoutils.misc.diff_environment_yml('environment.yml', 'dev-environment.yml', 'pip')"`
mamba install $pkgs_conda_dev --freeze-installed
if [[ "$pkgs_pip_dev" != "None" ]]; then
pip install $pkgs_pip_dev
pip install --user $pkgs_pip_dev
fi

# Stop the build if there are Python syntax errors or undefined names
Expand Down
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,17 @@ geoutils/version.py
# End of https://www.gitignore.io/api/python
.vim/
doc/source/file.txt
doc/source/auto_examples/
doc/source/io_examples/
doc/source/handling_examples/
doc/source/analysis_examples/
doc/source/gen_modules/

# Directories where example data is downloaded
examples/data/

# Directory where myst_nb executes jupyter code
doc/jupyter_execute/

# Files that should have been deleted by Sphinx at end of build (but can exist if build fails)
examples/io/open_save/myraster.tif
examples/io/open_save/myvector.gpkg
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
types_or: [python, rst, markdown]
files: ^(geoutils|doc|tests)/

# Replace relative imports (e.g. 'from . import georaster' -> 'from geoutils import georaster')
# Replace relative imports (e.g. 'from . import raster' -> 'from geoutils import raster')
- repo: https://github.com/MarcoGorelli/absolufy-imports
rev: v0.3.1
hooks:
Expand Down Expand Up @@ -44,7 +44,7 @@ repos:
files: ^(geoutils|tests)
# Lint the code using mypy
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.982
rev: v1.1.1
hooks:
- id: mypy
args: [
Expand All @@ -54,12 +54,12 @@ repos:
--show-error-codes,
--no-warn-unused-ignores, # Ignore 'type: ignore' comments that are not used.
--disable-error-code=attr-defined, # "Module has no attribute 'XXX'" occurs because of the pre-commit env.
--disable-error-code=name-defined # "Name 'XXX' is not defined" occurs because of the pre-commit env.

--disable-error-code=name-defined, # "Name 'XXX' is not defined" occurs because of the pre-commit env.
--disable-error-code=var-annotated,
--disable-error-code=no-any-return
]
additional_dependencies: [tokenize-rt==3.2.0]


files: ^(geoutils|tests)

# Sort imports using isort
- repo: https://github.com/PyCQA/isort
Expand Down
14 changes: 8 additions & 6 deletions .readthedocs.yml → .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
# Required
version: 2

build:
os: "ubuntu-20.04"
tools:
python: "mambaforge-4.10"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: doc/source/conf.py
Expand All @@ -13,9 +18,6 @@ sphinx:
# Optionally build your docs in additional formats such as PDF and ePub
formats: []

python:
version: 3.8
install:
- requirements: dev-requirements.txt
- method: pip
path: .

conda:
environment: dev-environment.yml
92 changes: 21 additions & 71 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,103 +1,53 @@
# How to contribute

## Overview: making a contribution

For more details, see the rest of this document.

1. Fork and clone the repository.
2. Set up the development environment.
1. Fork _GlacioHack/geoutils_ and clone your fork repository locally.
2. Set up the development environment (section below).
3. Create a branch for the new feature or bug fix.
4. Make your changes, ensuring they are conventions-compliant.
4. Make your changes, and add or modify related tests in _tests/_.
5. Commit, making sure to run `pre-commit` separately if not installed as git hook.
6. Push.
7. Open a Pull Request to discuss and eventually merge.
8. You can now delete your feature branch.


## Rights
The license (see LICENSE) applies to all contributions.


## Issue Conventions
When submitting bugs, please fill out the bug report template in full.

Please search existing issues, open and closed, before creating a new one.


## Git conventions
Work on features should be made on a fork of `geoutils` and submitted as a pull request (PR) to master or a relevant branch.


## Code conventions

Contributors of `geoutils` should attempt to conform to pep8 coding standards.
An exception to the standard is having a 120 max character line length (instead of 80).

Suggested linters are:
1. prospector
2. mypy (git version)
3. pydocstyle

Suggested formatters are:
1. autopep8
2. isort

## Test conventions
At least one test per feature (in the associated `tests/test_*.py` file) should be included in the PR, but more than one is suggested.
We use `pytest`.

6. Push to your fork.
7. Open a pull request from GitHub to discuss and eventually merge.

## Development environment
We target Python 3 or higher for `geoutils`.
Some features may require later versions of Python (3.6+) to function correctly.

GeoUtils currently supports only Python versions of 3.8 and higher, see `environment.yml` for detailed dependencies.

### Setup

Clone the git repo and create a conda environment:
Clone the git repo and create a `mamba` environment (see how to install `mamba` in the [mamba documentation](https://mamba.readthedocs.io/en/latest/)):

```bash
git clone https://github.com/GlacioHack/geoutils.git
cd geoutils
conda env create -f environment.yml # add '-n custom_name' if you want.
conda activate geoutils # or any other name specified above
pip install -e . # Install geoutils in developer mode
mamba env create -f dev-environment.yml # Add '-n custom_name' if you want.
mamba activate geoutils-dev # Or any other name specified above
```

Now install the additional development dependencies:
```bash
pip install -r dev-requirements.txt
```

Finally, we also recommend installing the formatting and linting tools listed above to help with adhering to code conventions:
```bash
pip install prospector git+https://github.com/python/mypy.git pydocstyle autopep8 isort
```

Note that your text editor of choice will also need to be configured with these tools (and max character line length changed to 120).
### Tests

At least one test per feature (in the associated `tests/test_*.py` file) should be included in the PR, using `pytest` (see existing tests for examples).

### Running the tests
To run the entire test suite, run `pytest` in the current directory:
```bash
pytest
```

It is also recommended to try the tests from the parent directory, to validate that import statements work as they should:
```bash
cd ../ # Change to the parent directory
pytest geoutils
```

### Formatting and linting
To merge a PR in geoutils, the code has to adhere to the standards set in place.
We use a number of tools to validate contributions, triggered using `pre-commit` (see `.pre-commit-config.yaml` for the exact tools).

`pre-commit` is made to be installed as a "pre-commit hook" for git, so the checks have to pass before committing. Before committing for the first time, you need to install the hook:
```bash
pre-commit install
```
Install and run `pre-commit` (see [pre-commit documentation](https://pre-commit.com/)), which will use `.pre-commit-config.yaml` to verify spelling errors,
import sorting, type checking, formatting and linting.

Pre-commit can also be run as a separate tool:
You can then run pre-commit manually:
```bash
pre-commit run --all-files
```

Optionally, `pre-commit` can be installed as a git hook to ensure checks have to pass before committing.

## Rights

The license (see LICENSE) applies to all contributions.
64 changes: 27 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# geoutils
Set of tools to handle raster and vector data sets in Python.
# GeoUtils: consistent geospatial analysis in Python.

![](https://readthedocs.org/projects/geoutils/badge/?version=latest)
[![build](https://github.com/GlacioHack/geoutils/actions/workflows/python-app.yml/badge.svg)](https://github.com/GlacioHack/GeoUtils/actions/workflows/python-app.yml)
Expand All @@ -9,51 +8,42 @@ Set of tools to handle raster and vector data sets in Python.
[![PyPI version](https://badge.fury.io/py/geoutils.svg)](https://badge.fury.io/py/geoutils)
[![Coverage Status](https://coveralls.io/repos/github/GlacioHack/geoutils/badge.svg?branch=main)](https://coveralls.io/github/GlacioHack/geoutils?branch=main)

This package offers Python classes and functions as well as command line tools to work with both geospatial raster and vector datasets. It is built upon rasterio and GeoPandas. In a single command it can import any geo-referenced dataset that is understood by these libraries, complete with all geo-referencing information, various helper functions and interface between vector/raster data.
[![Pre-Commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
[![Formatted with black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)

**GeoUtils** is an open source project to develop a core Python package for geospatial analysis and foster inter-operability between other Python GIS packages.

## Installation

#### With conda (recommended)
```bash
conda install --channel conda-forge --strict-channel-priority geoutils
```
The `--strict-channel-priority` flag seems essential for Windows installs to function correctly, and is recommended for UNIX-based systems as well.
It aims at **facilitating end-user geospatial analysis by revolving around consistent `Raster` and `Vector` objects** that effortlessly interface between
themselves. GeoUtils is founded on **implicit loading behaviour**, **robust numerical interfacing** and **convenient object-based methods** to easily perform
the most common higher-level tasks needed by geospatial users.

#### With pip

From PyPI:
```bash
pip install geoutils
```
If you are looking for an accessible Python package to write the Python equivalent of your [GDAL](https://gdal.org/) command lines, or of your
[QGIS](https://www.qgis.org/en/site/) analysis pipeline **without a steep learning curve** on Python GIS syntax, GeoUtils is perfect for you! For more advanced
users, GeoUtils also aims at being efficient and scalable by supporting lazy loading and parallel computing (ongoing).

Or from the repository tarball: make sure GDAL and PROJ are properly installed, then:
```bash
pip install https://github.com/GlacioHack/geoutils/tarball/main
```
GeoUtils relies on [Rasterio](https://github.com/rasterio/rasterio), [GeoPandas](https://github.com/geopandas/geopandas) and [Pyproj](https://github.com/pyproj4/pyproj) for georeferenced
calculations, and on [NumPy](https://github.com/numpy/numpy) and [Xarray](https://github.com/pydata/xarray) for numerical analysis. It allows easy access to
the functionalities of these packages through interfacing or composition, and quick inter-operability through object conversion.

## Documentation
See the full documentation at https://geoutils.readthedocs.io.


## Structure

GeoUtils is composed of three libraries:
- `georaster.py` to handle raster data set. In particular, a Raster class to load a raster file along with metadata.
- `geovector.py` to handle vector data set. In particular, a Vector class to load a raster file along with metadata.
- `projtools.py` with various tools around projections.
For installation, quick start, gallery examples, a full feature description or a search through the API, see GeoUtils' documentation at:
https://geoutils.readthedocs.io.

## Installation

## How to contribute
```bash
mamba install -c conda-forge geoutils
```

You can find ways to improve the libraries in the [issues](https://github.com/GlacioHack/geoutils/issues) section. All contributions are welcome.
See [mamba's documentation](https://mamba.readthedocs.io/en/latest/) to install `mamba`, which will solve your environment much faster than `conda`.

1. Fork the repository to your personal GitHub account, clone to your computer.
2. (Optional but preferred:) Make a feature branch.
3. Push to your feature branch.
4. When ready, submit a Pull Request from your feature branch to `GlacioHack/geoutils:master`.
5. The PR will be reviewed by at least one other person. Usually your PR will be merged via 'squash and merge'.
## Start contributing

Direct pushing to the GlacioHack repository is not permitted.
1. Fork the repository, make a feature branches and push changes.
2. When ready, submit a pull request from the feature branch of your fork to `GlacioHack/geoutils:master`.
3. The PR will be reviewed by at least one maintainer, discussed, then merged.

A more detailed contribution instruction [can be found here](CONTRIBUTING.md).
More info on [our contributing page](CONTRIBUTING.md).
Loading