Skip to content

Commit

Permalink
Update changelog and bump python version to 0.2 (#576)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebarron authored Mar 22, 2024
1 parent 5c6ba3f commit e019256
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 36 deletions.
51 changes: 51 additions & 0 deletions python/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Changelog

## [0.2.0] - 2024-03-22

### New! :sparkles:

- New I/O support for reading and writing to geospatial formats:
- [Asynchronous FlatGeobuf reader](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/io/#geoarrow.rust.core.read_flatgeobuf_async). This also supports passing a spatial filter.
- [Initial support for reading from PostGIS](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/io/#geoarrow.rust.core.read_postgis). Note that not all Postgres data types are supported yet. Create an issue if your query fails.
- [Reading](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/io/#geoarrow.rust.core.read_geojson_lines) and [writing](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/io/#geoarrow.rust.core.write_geojson_lines) [newline-delimited GeoJSON](https://stevage.github.io/ndgeojson/).
- [Pyogrio integration](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/io/#geoarrow.rust.core.read_pyogrio) for reading from OGR/GDAL.
- [Asynchronous GeoParquet reader](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/io/#geoarrow.rust.core.read_parquet_async) for reading from remote files. By @weiji14 in https://github.com/geoarrow/geoarrow-rs/pull/493
- Also new support for writing GeoParquet files.
- Most I/O readers and writers support Python file-like objects (in binary mode).
- Support for [reading](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/io/#geoarrow.rust.core.read_ipc) and [writing](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/io/#geoarrow.rust.core.write_ipc) Arrow IPC files.
- Better interoperability with the Python geospatial ecosystem.
- [Import from](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/interop/#geoarrow.rust.core.from_geopandas) and [export to](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/interop/#geoarrow.rust.core.to_geopandas) GeoPandas GeoDataFrames. Refer to the [GeoPandas interoperability documentation](https://geoarrow.org/geoarrow-rs/python/v0.2.0/ecosystem/geopandas/).
- [Import from](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/interop/#geoarrow.rust.core.from_shapely) and [export to](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/interop/#geoarrow.rust.core.to_shapely) Shapely arrays. Refer to the [Shapely interoperability documentation](https://geoarrow.org/geoarrow-rs/python/v0.2.0/ecosystem/shapely/).
- [Better integration with Lonboard](https://geoarrow.org/geoarrow-rs/python/v0.2.0/ecosystem/lonboard/) for fast visualization in Jupyter.
- All scalars, arrays, chunked arrays, and table objects implement [`__geo_interface__`](https://gist.github.com/sgillies/2217756) for interoperability with existing tools.
- Numpy interoperability for float array output from algorithms. Pass any `Float64Array` or `BooleanArray` to `numpy.asarray`. You can also pass a numpy array as vectorized input into a function like [`line_interpolate_point`](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/functions/#geoarrow.rust.core.line_interpolate_point).
- New algorithms!
- [Explode a Table](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/functions/#geoarrow.rust.core.explode) where each multi-geometry expands into multiple rows of single geometries.
- [`total_bounds`](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/functions/#geoarrow.rust.core.total_bounds)
- Unified [`area` function](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/functions/#geoarrow.rust.core.area) for planar and geodesic area.
- Unified [`simplify` function](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/functions/#geoarrow.rust.core.simplify) for multiple simplification methods. Also new support for [topology-preserving simplification](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/enums/#geoarrow.rust.core.enums.SimplifyMethod.VW_Preserve).
- Unified [`length` function](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/functions/#geoarrow.rust.core.length) for euclidean and geodesic length calculations.
- [`frechet_distance`](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/functions/#geoarrow.rust.core.frechet_distance) for LineString similarity.
- [`affine_transform`](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/functions/#geoarrow.rust.core.affine_transform), which integrates with the Python [`affine`](https://github.com/rasterio/affine) library.
- [`line_interpolate_point`](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/functions/#geoarrow.rust.core.line_interpolate_point) and [`line_locate_point`](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/functions/#geoarrow.rust.core.line_locate_point) for linear referencing.
- [`polylabel`](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/functions/#geoarrow.rust.core.polylabel) for polygon labeling.
- Improved display of Python objects:
- Scalars now display as SVG geometries inside Jupyter environments.
- Tables, arrays, and chunked arrays implement `__repr__` so that you can inspect data easily.
- Improved usability:
- [`PointArray.from_xy`](https://geoarrow.org/geoarrow-rs/python/v0.2.0/api/core/geometry/array/#geoarrow.rust.core.PointArray.from_xy) to simplify creating a point array from numpy arrays of coordinates.
- Index into arrays and chunked arrays with square brackets. E.g. `point_array[0]` will access the first point in the array. Negative indexing is also supported, so `point_array[-1]` will get the last item in the array.
- New [top-level docs website](https://geoarrow.org/geoarrow-rs/).


## New Contributors

* @Robinlovelace made their first contribution in https://github.com/geoarrow/geoarrow-rs/pull/484
* @weiji14 made their first contribution in https://github.com/geoarrow/geoarrow-rs/pull/493

**Full Changelog**: https://github.com/geoarrow/geoarrow-rs/compare/py-v0.1.0...py-v0.2.0


## [0.1.0] - 2024-01-08

- Initial public release.
2 changes: 1 addition & 1 deletion python/core/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion python/core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "geoarrow-rust-core"
version = "0.1.0"
version = "0.2.0"
authors = ["Kyle Barron <[email protected]>"]
edition = "2021"
description = "Efficient, vectorized geospatial operations in Python."
Expand Down
14 changes: 7 additions & 7 deletions python/core/src/algorithm/geo/simplify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ impl<'a> FromPyObject<'a> for SimplifyMethod {
/// unaltered version of the geometry.
///
/// Other args:
/// method: The method to use for simplification calculation. One of "rdp" or "vw". Refer to
/// the documentation on [SimplifyMethod][geoarrow.rust.core.enums.SimplifyMethod] for more
/// information.
/// method: The method to use for simplification calculation. One of `"rdp"`, `"vw"`, or
/// `"vw_preserve"`. Refer to the documentation on
/// [SimplifyMethod][geoarrow.rust.core.enums.SimplifyMethod] for more information.
///
/// Returns:
/// Simplified geometry array.
Expand Down Expand Up @@ -80,8 +80,8 @@ macro_rules! impl_simplify {
/// will return an unaltered version of the geometry.
///
/// Other args:
/// method: The method to use for simplification calculation. One of "rdp" or
/// "vw". Refer to the documentation on
/// method: The method to use for simplification calculation. One of `"rdp"`,
/// `"vw"`, or `"vw_preserve"`. Refer to the documentation on
/// [SimplifyMethod][geoarrow.rust.core.enums.SimplifyMethod] for more
/// information.
///
Expand Down Expand Up @@ -117,8 +117,8 @@ macro_rules! impl_chunked {
/// will return an unaltered version of the geometry.
///
/// Other args:
/// method: The method to use for simplification calculation. One of "rdp" or
/// "vw". Refer to the documentation on
/// method: The method to use for simplification calculation. One of `"rdp"`,
/// `"vw"`, or `"vw_preserve"`. Refer to the documentation on
/// [SimplifyMethod][geoarrow.rust.core.enums.SimplifyMethod] for more
/// information.
///
Expand Down
8 changes: 4 additions & 4 deletions python/core/src/algorithm/native/explode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use pyo3::prelude::*;

/// Explode a table.
///
/// This is intended to be equivalent to the [`explode` function in
/// GeoPandas][geopandas.GeoDataFrame.explode].
/// This is intended to be equivalent to the [`explode`][geopandas.GeoDataFrame.explode] function
/// in GeoPandas.
///
/// Args:
/// input: input table
Expand All @@ -22,8 +22,8 @@ pub fn explode(input: GeoTable) -> PyGeoArrowResult<GeoTable> {
impl GeoTable {
/// Explode a table.
///
/// This is intended to be equivalent to the [`explode` function in
/// GeoPandas][geopandas.GeoDataFrame.explode].
/// This is intended to be equivalent to the [`explode`][geopandas.GeoDataFrame.explode]
/// function in GeoPandas.
///
/// Returns:
/// A new table with multi-part geometries exploded to separate rows.
Expand Down
3 changes: 2 additions & 1 deletion python/core/src/interop/shapely/from_shapely.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ fn numpy_to_offsets_buffer(
/// method on a chunked GeoArrow array class to construct a chunked array.
/// - This will first call [`to_ragged_array`][shapely.to_ragged_array], falling back to
/// [`to_wkb`][shapely.to_wkb] if necessary. If you know you have mixed-type geometries in your
/// column, use [`MixedGeometryArray.from_shapely`][MixedGeometryArray.from_shapely]. '
/// column, use
/// [`MixedGeometryArray.from_shapely`][geoarrow.rust.core.MixedGeometryArray.from_shapely].
///
/// This is because `to_ragged_array` is the fastest approach but fails on mixed-type geometries.
/// It supports combining Multi-* geometries with non-multi-geometries in the same array, so you
Expand Down
44 changes: 22 additions & 22 deletions python/docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,33 @@ extra:
nav:
- index.md
- API Reference:
- core:
- api/core/index.md
- Geometry Arrays:
- api/core/geometry/array.md
- api/core/geometry/chunked.md
- api/core/geometry/scalar.md
- Primitive Arrays:
- api/core/primitive/array.md
- api/core/primitive/chunked.md
- api/core/table.md
- Operations: api/core/functions.md
- Interoperability: api/core/interop.md
- IO: api/core/io.md
- Enums: api/core/enums.md
- Types: api/core/types.md
- core:
- api/core/index.md
- Geometry Arrays:
- api/core/geometry/array.md
- api/core/geometry/chunked.md
- api/core/geometry/scalar.md
- Primitive Arrays:
- api/core/primitive/array.md
- api/core/primitive/chunked.md
- api/core/table.md
- Operations: api/core/functions.md
- Interoperability: api/core/interop.md
- IO: api/core/io.md
- Enums: api/core/enums.md
- Types: api/core/types.md
- Ecosystem:
- ecosystem/geopandas.md
- ecosystem/lonboard.md
# - ecosystem/polars.md
- ecosystem/pyogrio.md
- ecosystem/shapely.md
- ecosystem/geopandas.md
- ecosystem/lonboard.md
# - ecosystem/polars.md
- ecosystem/pyogrio.md
- ecosystem/shapely.md
- Performance:
- performance/multithreading.md
- performance/multithreading.md
- Changelog: CHANGELOG.md

# - Caveats: caveats.md
# - Performance: performance.md
# - Changelog: CHANGELOG.md
# - "How it works?": how-it-works.md

watch:
Expand Down
1 change: 1 addition & 0 deletions python/docs/source/CHANGELOG.md

0 comments on commit e019256

Please sign in to comment.