-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Change list - Docs updates - README updates - Update `geometry_col` to work on RecordBatch as well
- Loading branch information
1 parent
f3fec6b
commit 826415b
Showing
41 changed files
with
285 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Enums | ||
|
||
::: geoarrow.rust.compute.enums |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Functions | ||
|
||
## Array/Chunked Array functions | ||
|
||
::: geoarrow.rust.compute | ||
options: | ||
filters: | ||
- "!^_" | ||
members: | ||
- affine_transform | ||
- area | ||
- center | ||
- centroid | ||
- chaikin_smoothing | ||
- convex_hull | ||
- densify | ||
- envelope | ||
- frechet_distance | ||
- geodesic_perimeter | ||
- is_empty | ||
- length | ||
- line_interpolate_point | ||
- line_locate_point | ||
- polylabel | ||
- rotate | ||
- scale | ||
- signed_area | ||
- simplify | ||
- skew | ||
- total_bounds | ||
- translate | ||
|
||
## Table functions | ||
|
||
::: geoarrow.rust.compute | ||
options: | ||
filters: | ||
- "!^_" | ||
members: | ||
- explode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Types | ||
|
||
::: geoarrow.rust.compute.types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# I/O | ||
# Functions | ||
|
||
Read and write to and from geospatial file formats. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
use std::sync::Arc; | ||
|
||
use crate::ffi::from_python::AnyGeometryInput; | ||
use crate::util::{return_chunked_geometry_array, return_geometry_array}; | ||
use geoarrow::algorithm::geo::Center; | ||
use geoarrow::array::GeometryArrayDyn; | ||
use pyo3::prelude::*; | ||
use pyo3_geoarrow::PyGeoArrowResult; | ||
use pyo3_geoarrow::{PyChunkedGeometryArray, PyGeometryArray}; | ||
|
||
#[pyfunction] | ||
pub fn center(py: Python, input: AnyGeometryInput) -> PyGeoArrowResult<PyObject> { | ||
match input { | ||
AnyGeometryInput::Array(arr) => { | ||
let out = arr.as_ref().center()?; | ||
Ok(PyGeometryArray::new(GeometryArrayDyn::new(Arc::new(out))).into_py(py)) | ||
return_geometry_array(py, Arc::new(out)) | ||
} | ||
AnyGeometryInput::Chunked(arr) => { | ||
let out = arr.as_ref().center()?; | ||
Ok(PyChunkedGeometryArray::new(Arc::new(out)).into_py(py)) | ||
return_chunked_geometry_array(py, Arc::new(out)) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,21 @@ | ||
use std::sync::Arc; | ||
|
||
use crate::ffi::from_python::AnyGeometryInput; | ||
use crate::util::{return_chunked_geometry_array, return_geometry_array}; | ||
use geoarrow::algorithm::geo::Centroid; | ||
use geoarrow::array::GeometryArrayDyn; | ||
use pyo3::prelude::*; | ||
use pyo3_geoarrow::PyGeoArrowResult; | ||
use pyo3_geoarrow::{PyChunkedGeometryArray, PyGeometryArray}; | ||
|
||
#[pyfunction] | ||
pub fn centroid(py: Python, input: AnyGeometryInput) -> PyGeoArrowResult<PyObject> { | ||
match input { | ||
AnyGeometryInput::Array(arr) => { | ||
let out = arr.as_ref().centroid()?; | ||
Ok(PyGeometryArray::new(GeometryArrayDyn::new(Arc::new(out))).into_py(py)) | ||
return_geometry_array(py, Arc::new(out)) | ||
} | ||
AnyGeometryInput::Chunked(arr) => { | ||
let out = arr.as_ref().centroid()?; | ||
Ok(PyChunkedGeometryArray::new(Arc::new(out)).into_py(py)) | ||
return_chunked_geometry_array(py, Arc::new(out)) | ||
} | ||
} | ||
} |
Oops, something went wrong.