Skip to content

Commit

Permalink
Flesh out wkb separation
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebarron committed Sep 18, 2024
1 parent 7b56226 commit 815a156
Show file tree
Hide file tree
Showing 10 changed files with 269 additions and 347 deletions.
4 changes: 2 additions & 2 deletions python/geoarrow-core/src/interop/geopandas/from_geopandas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub fn from_geopandas(py: Python, input: &Bound<PyAny>) -> PyGeoArrowResult<PyOb
Some(&kwargs),
)?
.extract::<PyTable>()?;
let mut table = pytable_to_table(table)?;
table.parse_geometry_to_native(table.default_geometry_column_idx()?, None)?;
let table = pytable_to_table(table)?;
let table = table.parse_serialized_geometry(table.default_geometry_column_idx()?, None)?;
Ok(table_to_pytable(table).to_arro3(py)?)
}
1 change: 0 additions & 1 deletion src/algorithm/geo/within.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use crate::array::*;
use crate::scalar::*;
use crate::trait_::ArrayAccessor;
use crate::trait_::NativeScalar;
use crate::NativeArray;
use arrow_array::builder::BooleanBuilder;
use arrow_array::{BooleanArray, OffsetSizeTrait};
use geo::Within as _Within;
Expand Down
1 change: 0 additions & 1 deletion src/algorithm/native/type_id.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use crate::array::*;
use crate::trait_::ArrayAccessor;
use crate::NativeArray;
use arrow::array::Int16Builder;
use arrow_array::{Int16Array, OffsetSizeTrait};
use std::collections::HashSet;
Expand Down
1 change: 1 addition & 0 deletions src/algorithm/native/unary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ impl<'a, O: OffsetSizeTrait> Unary<'a> for GeometryCollectionArray<O, 2> {}
impl<'a> Unary<'a> for RectArray<2> {}
impl<'a, O: OffsetSizeTrait> Unary<'a> for WKBArray<O> {}

#[allow(dead_code)]
pub trait UnaryPoint<'a>: ArrayAccessor<'a> + NativeArray {
fn unary_point<F, G>(&'a self, op: F) -> PointArray<2>
where
Expand Down
1 change: 1 addition & 0 deletions src/array/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ impl AsChunkedNativeArray for &dyn ChunkedNativeArray {
}
}

#[allow(dead_code)]
pub trait AsChunkedSerializedArray {
/// Downcast this to a [`ChunkedWKBArray`] with `i32` offsets returning `None` if not possible
fn as_wkb_opt(&self) -> Option<&ChunkedWKBArray<i32>>;
Expand Down
Loading

0 comments on commit 815a156

Please sign in to comment.