From 93331f6e62481e4c6ff4acce91903cb9c572e3aa Mon Sep 17 00:00:00 2001 From: Gregory Halverson Date: Sat, 28 Sep 2024 15:01:50 -0700 Subject: [PATCH 1/2] updating badge URL --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ceb7026..3ec04e9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # `rasters` python package -![CI](https://github.com/gregory-halverson/rasters/actions/workflows/ci.yml/badge.svg) +![CI](https://github.com/python-rasters/rasters/actions/workflows/ci.yml/badge.svg) This Python software package provides a comprehensive solution for handling gridded and swath raster data. It offers an object-oriented interface for ease of use, treating rasters, raster geometries, vector geometries, and K-D trees as objects. This allows for seamless map visualization in Jupyter notebooks and efficient resampling between swath and grid geometries. From 8a693cba5e35b8153c5efe19a6424a8f2ad7e09b Mon Sep 17 00:00:00 2001 From: Gregory Halverson Date: Wed, 30 Oct 2024 15:45:16 -0700 Subject: [PATCH 2/2] fixing imports --- rasters/raster.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rasters/raster.py b/rasters/raster.py index c0e25be..79e8f8b 100644 --- a/rasters/raster.py +++ b/rasters/raster.py @@ -44,6 +44,7 @@ from .CRS import WGS84 from .raster_geometry import RasterGeometry from .raster_grid import RasterGrid +from .raster_geolocation import RasterGeolocation if TYPE_CHECKING: from .CRS import CRS @@ -57,9 +58,9 @@ from .multi_polygon import MultiPolygon from .kdtree import KDTree # from .raster_geometry import RasterGeometry - from .raster_geolocation import RasterGeolocation + # from .raster_geolocation import RasterGeolocation # from .raster_grid import RasterGrid - from .raster import Raster + # from .raster import Raster from .multi_raster import MultiRaster class Raster: @@ -977,6 +978,8 @@ def to_grid( kd_tree: KDTree = None, nodata: Any = None, **kwargs) -> Raster: + from .CRS import CRS + if not isinstance(grid, RasterGrid): raise TypeError(f"target geometry must be a RasterGrid object, not {type(grid)}")