yirgacheffe 1.7.6__py3-none-any.whl → 1.7.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of yirgacheffe might be problematic. Click here for more details.
- yirgacheffe/_core.py +1 -1
- yirgacheffe/_operators.py +982 -0
- yirgacheffe/layers/base.py +2 -1
- yirgacheffe/layers/constant.py +1 -2
- yirgacheffe/layers/group.py +1 -2
- yirgacheffe/layers/h3layer.py +1 -1
- yirgacheffe/layers/rasters.py +1 -1
- yirgacheffe/layers/rescaled.py +1 -1
- yirgacheffe/layers/vectors.py +1 -1
- yirgacheffe/operators.py +6 -970
- yirgacheffe/window.py +2 -2
- {yirgacheffe-1.7.6.dist-info → yirgacheffe-1.7.7.dist-info}/METADATA +1 -1
- yirgacheffe-1.7.7.dist-info/RECORD +26 -0
- yirgacheffe-1.7.6.dist-info/RECORD +0 -25
- {yirgacheffe-1.7.6.dist-info → yirgacheffe-1.7.7.dist-info}/WHEEL +0 -0
- {yirgacheffe-1.7.6.dist-info → yirgacheffe-1.7.7.dist-info}/entry_points.txt +0 -0
- {yirgacheffe-1.7.6.dist-info → yirgacheffe-1.7.7.dist-info}/licenses/LICENSE +0 -0
- {yirgacheffe-1.7.6.dist-info → yirgacheffe-1.7.7.dist-info}/top_level.txt +0 -0
yirgacheffe/layers/base.py
CHANGED
|
@@ -4,10 +4,11 @@ from typing import Any, Optional, Sequence, Tuple
|
|
|
4
4
|
import deprecation
|
|
5
5
|
|
|
6
6
|
from .. import __version__
|
|
7
|
-
from ..
|
|
7
|
+
from .._operators import LayerMathMixin
|
|
8
8
|
from ..rounding import almost_equal, round_up_pixels, round_down_pixels
|
|
9
9
|
from ..window import Area, MapProjection, PixelScale, Window
|
|
10
10
|
from .._backends import backend
|
|
11
|
+
from .._backends.enumeration import dtype as DataType
|
|
11
12
|
|
|
12
13
|
class YirgacheffeLayer(LayerMathMixin):
|
|
13
14
|
"""The common base class for the different layer types. Most still inherit from RasterLayer as deep down
|
yirgacheffe/layers/constant.py
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
from typing import Any, Union
|
|
2
2
|
|
|
3
|
-
from ..operators import DataType
|
|
4
3
|
from ..window import Area, MapProjection, PixelScale, Window
|
|
5
4
|
from .base import YirgacheffeLayer
|
|
6
5
|
from .._backends import backend
|
|
7
|
-
|
|
6
|
+
from .._backends.enumeration import dtype as DataType
|
|
8
7
|
|
|
9
8
|
class ConstantLayer(YirgacheffeLayer):
|
|
10
9
|
"""This is a layer that will return the identity value - can be used when an input layer is
|
yirgacheffe/layers/group.py
CHANGED
|
@@ -6,13 +6,12 @@ from typing import Any, List, Optional, Sequence, Union
|
|
|
6
6
|
import numpy as np
|
|
7
7
|
from numpy import ma
|
|
8
8
|
|
|
9
|
-
from ..operators import DataType
|
|
10
9
|
from ..rounding import round_down_pixels
|
|
11
10
|
from ..window import Area, Window
|
|
12
11
|
from .base import YirgacheffeLayer
|
|
13
12
|
from .rasters import RasterLayer
|
|
14
13
|
from .._backends import backend
|
|
15
|
-
|
|
14
|
+
from .._backends.enumeration import dtype as DataType
|
|
16
15
|
|
|
17
16
|
class GroupLayerEmpty(ValueError):
|
|
18
17
|
def __init__(self, msg):
|
yirgacheffe/layers/h3layer.py
CHANGED
|
@@ -3,12 +3,12 @@ from typing import Any, Tuple
|
|
|
3
3
|
|
|
4
4
|
import h3
|
|
5
5
|
import numpy as np
|
|
6
|
-
from yirgacheffe.operators import DataType
|
|
7
6
|
|
|
8
7
|
from ..rounding import round_up_pixels
|
|
9
8
|
from ..window import Area, MapProjection, Window
|
|
10
9
|
from .base import YirgacheffeLayer
|
|
11
10
|
from .._backends import backend
|
|
11
|
+
from .._backends.enumeration import dtype as DataType
|
|
12
12
|
|
|
13
13
|
class H3CellLayer(YirgacheffeLayer):
|
|
14
14
|
|
yirgacheffe/layers/rasters.py
CHANGED
|
@@ -10,8 +10,8 @@ from ..constants import WGS_84_PROJECTION
|
|
|
10
10
|
from ..window import Area, MapProjection, PixelScale, Window
|
|
11
11
|
from ..rounding import round_up_pixels
|
|
12
12
|
from .base import YirgacheffeLayer
|
|
13
|
-
from ..operators import DataType
|
|
14
13
|
from .._backends import backend
|
|
14
|
+
from .._backends.enumeration import dtype as DataType
|
|
15
15
|
|
|
16
16
|
class InvalidRasterBand(Exception):
|
|
17
17
|
def __init__ (self, band):
|
yirgacheffe/layers/rescaled.py
CHANGED
|
@@ -4,11 +4,11 @@ from pathlib import Path
|
|
|
4
4
|
from typing import Any, Optional, Union
|
|
5
5
|
|
|
6
6
|
from skimage import transform
|
|
7
|
-
from yirgacheffe.operators import DataType
|
|
8
7
|
|
|
9
8
|
from ..window import MapProjection, PixelScale, Window
|
|
10
9
|
from .rasters import RasterLayer, YirgacheffeLayer
|
|
11
10
|
from .._backends import backend
|
|
11
|
+
from .._backends.enumeration import dtype as DataType
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
class RescaledRasterLayer(YirgacheffeLayer):
|
yirgacheffe/layers/vectors.py
CHANGED
|
@@ -8,11 +8,11 @@ import deprecation
|
|
|
8
8
|
from osgeo import gdal, ogr
|
|
9
9
|
|
|
10
10
|
from .. import __version__
|
|
11
|
-
from ..operators import DataType
|
|
12
11
|
from ..window import Area, MapProjection, PixelScale
|
|
13
12
|
from .base import YirgacheffeLayer
|
|
14
13
|
from .rasters import RasterLayer
|
|
15
14
|
from .._backends import backend
|
|
15
|
+
from .._backends.enumeration import dtype as DataType
|
|
16
16
|
|
|
17
17
|
def _validate_burn_value(burn_value: Any, layer: ogr.Layer) -> DataType: # pylint: disable=R0911
|
|
18
18
|
if isinstance(burn_value, str):
|