Skip to content

Commit

Permalink
Move up one level
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebarron committed Nov 12, 2024
1 parent 40d8c17 commit 3e8fed4
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 22 deletions.
File renamed without changes.
13 changes: 7 additions & 6 deletions h3ronpy/python/h3ronpy/pandas/raster.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import typing

import geopandas as gpd
import numpy as np
import pandas as pd
import typing

from ..arrow import raster as arrow_raster
from .. import raster
from .vector import cells_dataframe_to_geodataframe

__doc__ = arrow_raster.__doc__
__doc__ = raster.__doc__

nearest_h3_resolution = arrow_raster.nearest_h3_resolution
rasterize_cells = arrow_raster.rasterize_cells
nearest_h3_resolution = raster.nearest_h3_resolution
rasterize_cells = raster.rasterize_cells


def raster_to_dataframe(
Expand Down Expand Up @@ -39,7 +40,7 @@ def raster_to_dataframe(
:return: pandas `DataFrame` or `GeoDataFrame`
"""

df = arrow_raster.raster_to_dataframe(
df = raster.raster_to_dataframe(
in_raster,
transform,
h3_resolution,
Expand Down
9 changes: 4 additions & 5 deletions h3ronpy/python/h3ronpy/pandas/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@
import pyarrow as pa
import shapely

from h3ronpy.arrow.vector import cells_to_wkb_polygons

from .. import DEFAULT_CELL_COLUMN_NAME, H3_CRS, ContainmentMode
from ..arrow import util as _arrow_util
from ..arrow import vector as _av
from h3ronpy import DEFAULT_CELL_COLUMN_NAME, H3_CRS, ContainmentMode
from h3ronpy import util as _arrow_util
from h3ronpy import vector as _av
from h3ronpy.vector import cells_to_wkb_polygons


def cells_dataframe_to_geodataframe(
Expand Down
8 changes: 4 additions & 4 deletions h3ronpy/python/h3ronpy/polars/raster.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from ..arrow import raster as arrow_raster
from h3ronpy import raster

nearest_h3_resolution = arrow_raster.nearest_h3_resolution
rasterize_cells = arrow_raster.rasterize_cells
nearest_h3_resolution = raster.nearest_h3_resolution
rasterize_cells = raster.rasterize_cells

__doc__ = arrow_raster.__doc__
__doc__ = raster.__doc__

__all__ = [
nearest_h3_resolution.__name__,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,10 @@
import numpy as np
import pyarrow as pa

from h3ronpy import DEFAULT_CELL_COLUMN_NAME
from h3ronpy.arrow import _to_arrow_array, _to_uint64_array
from h3ronpy.h3ronpyrs import raster

from .. import DEFAULT_CELL_COLUMN_NAME
from . import _to_arrow_array, _to_uint64_array
from .vector import cells_bounds, cells_to_wkb_polygons
from h3ronpy.vector import cells_bounds, cells_to_wkb_polygons

try:
# affine library is used by rasterio
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

from arro3.core import Array, DataType, RecordBatch

from h3ronpy import ContainmentMode
from h3ronpy.arrow import _to_arrow_array, _to_uint64_array
from h3ronpy.h3ronpyrs import vector

from .. import ContainmentMode
from . import _to_arrow_array, _to_uint64_array


def cells_to_coordinates(arr, radians: bool = False) -> RecordBatch:
"""
Expand Down

0 comments on commit 3e8fed4

Please sign in to comment.