Skip to content

Commit

Permalink
Merge pull request python-rasters#20 from gregory-halverson/main
Browse files Browse the repository at this point in the history
fixing imports
  • Loading branch information
gregory-halverson authored Oct 30, 2024
2 parents 1805465 + 8a693cb commit 4f555e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
7 changes: 5 additions & 2 deletions rasters/raster.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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)}")

Expand Down

0 comments on commit 4f555e2

Please sign in to comment.