Skip to content

Commit

Permalink
rename crate to geoarrow (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebarron authored Nov 22, 2023
1 parent 7db8fa4 commit 8767908
Show file tree
Hide file tree
Showing 22 changed files with 81 additions and 83 deletions.
2 changes: 1 addition & 1 deletion 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 Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "geoarrow2"
name = "geoarrow"
version = "0.0.1"
authors = ["Kyle Barron <[email protected]>"]
edition = "2021"
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ This repository also includes [JavaScript (WebAssembly) bindings](https://github
Add this to your `Cargo.toml`:

```toml
geoarrow = { package = "geoarrow2", version = "0.1" }
geoarrow = { git = "https://github.com/geoarrow/geoarrow-rs" }
```

This will let you reference the package name as `geoarrow` in your code, even though the name on Crates.io is `geoarrow2`. Sadly the name `geoarrow` is [squatted on by an empty package](https://crates.io/crates/geoarrow).

## References

- [Prototyping GeoRust + GeoArrow in WebAssembly](https://observablehq.com/@kylebarron/prototyping-georust-geoarrow-in-webassembly) gives an early preview of the JavaScript API.
Expand Down
4 changes: 2 additions & 2 deletions benches/geos_buffer.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use criterion::{criterion_group, criterion_main, Criterion};
use geoarrow2::algorithm::geos::buffer::Buffer;
use geoarrow2::array::{CoordBuffer, InterleavedCoordBuffer, PointArray};
use geoarrow::algorithm::geos::buffer::Buffer;
use geoarrow::array::{CoordBuffer, InterleavedCoordBuffer, PointArray};

fn generate_data() -> PointArray {
let coords = vec![0.0; 100_000];
Expand Down
6 changes: 3 additions & 3 deletions benches/nybb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ use std::fs::File;

use arrow_ipc::reader::FileReader;
use criterion::{criterion_group, criterion_main, Criterion};
use geoarrow2::algorithm::geo::EuclideanDistance;
use geoarrow2::array::{MultiPolygonArray, PointArray};
use geoarrow2::trait_::GeoArrayAccessor;
use geoarrow::algorithm::geo::EuclideanDistance;
use geoarrow::array::{MultiPolygonArray, PointArray};
use geoarrow::trait_::GeoArrayAccessor;

fn load_nybb() -> MultiPolygonArray<i32> {
let file = File::open("fixtures/nybb.arrow").unwrap();
Expand Down
2 changes: 1 addition & 1 deletion benches/wkb.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::fs::File;

use criterion::{criterion_group, criterion_main, Criterion};
use geoarrow2::array::{MultiPolygonArray, WKBArray};
use geoarrow::array::{MultiPolygonArray, WKBArray};
use parquet::arrow::arrow_reader::ParquetRecordBatchReaderBuilder;

fn load_parquet() -> WKBArray<i32> {
Expand Down
38 changes: 19 additions & 19 deletions js/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 js/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ arrow-wasm = { git = "https://github.com/kylebarron/arrow-wasm", rev = "40363b64
] }
console_error_panic_hook = { version = "0.1.6", optional = true }

geoarrow = { path = "../", package = "geoarrow2" }
geoarrow = { path = "../" }
thiserror = "1"
geo = "0.27"
geodesy = { version = "0.11", optional = true, features = ["js"] }
Expand Down
28 changes: 14 additions & 14 deletions 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
Expand Up @@ -27,6 +27,6 @@ pyo3 = { version = "0.20.0", features = [
"serde",
"anyhow",
] }
geoarrow = { path = "../../", package = "geoarrow2" }
geoarrow = { path = "../../" }
thiserror = "1"
geo = "0.27"
4 changes: 2 additions & 2 deletions src/algorithm/geo/area.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ use geo::prelude::Area as GeoArea;
/// ```
/// use geo::polygon;
///
/// use geoarrow2::algorithm::geo::Area;
/// use geoarrow2::array::PolygonArray;
/// use geoarrow::algorithm::geo::Area;
/// use geoarrow::array::PolygonArray;
///
/// let polygon = polygon![
/// (x: 0., y: 0.),
Expand Down
12 changes: 6 additions & 6 deletions src/algorithm/geo/centroid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ use geo::algorithm::centroid::Centroid as GeoCentroid;
/// # Examples
///
/// ```
/// use geoarrow2::algorithm::geo::Centroid;
/// use geoarrow2::array::PolygonArray;
/// use geoarrow2::trait_::GeoArrayAccessor;
/// use geoarrow::algorithm::geo::Centroid;
/// use geoarrow::array::PolygonArray;
/// use geoarrow::trait_::GeoArrayAccessor;
/// use geo::{point, polygon};
///
/// // rhombus shaped polygon
Expand All @@ -42,9 +42,9 @@ pub trait Centroid {
/// # Examples
///
/// ```
/// use geoarrow2::algorithm::geo::Centroid;
/// use geoarrow2::array::LineStringArray;
/// use geoarrow2::trait_::GeoArrayAccessor;
/// use geoarrow::algorithm::geo::Centroid;
/// use geoarrow::array::LineStringArray;
/// use geoarrow::trait_::GeoArrayAccessor;
/// use geo::{line_string, point};
///
/// let line_string = line_string![
Expand Down
6 changes: 3 additions & 3 deletions src/algorithm/geo/chamberlain_duquette_area.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ use geo::prelude::ChamberlainDuquetteArea as GeoChamberlainDuquetteArea;
///
/// ```
/// use geo::{polygon, Polygon};
/// use geoarrow2::array::PolygonArray;
/// use geoarrow2::GeometryArrayTrait;
/// use geoarrow2::algorithm::geo::ChamberlainDuquetteArea;
/// use geoarrow::array::PolygonArray;
/// use geoarrow::GeometryArrayTrait;
/// use geoarrow::algorithm::geo::ChamberlainDuquetteArea;
///
/// // The O2 in London
/// let mut polygon: Polygon<f64> = polygon![
Expand Down
4 changes: 2 additions & 2 deletions src/algorithm/geo/euclidean_length.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ pub trait EuclideanLength {
///
/// ```
/// use geo::line_string;
/// use geoarrow2::array::LineStringArray;
/// use geoarrow2::algorithm::geo::EuclideanLength;
/// use geoarrow::array::LineStringArray;
/// use geoarrow::algorithm::geo::EuclideanLength;
///
/// let line_string = line_string![
/// (x: 40.02f64, y: 116.34),
Expand Down
8 changes: 4 additions & 4 deletions src/algorithm/geo/geodesic_area.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ pub trait GeodesicArea {
///
/// ```
/// use geo::{polygon, Polygon};
/// use geoarrow2::array::PolygonArray;
/// use geoarrow2::algorithm::geo::GeodesicArea;
/// use geoarrow::array::PolygonArray;
/// use geoarrow::algorithm::geo::GeodesicArea;
///
/// // The O2 in London
/// let polygon: Polygon<f64> = polygon![
Expand Down Expand Up @@ -82,8 +82,8 @@ pub trait GeodesicArea {
/// # Examples
/// ```rust
/// use geo::{polygon, Polygon};
/// use geoarrow2::array::PolygonArray;
/// use geoarrow2::algorithm::geo::GeodesicArea;
/// use geoarrow::array::PolygonArray;
/// use geoarrow::algorithm::geo::GeodesicArea;
///
/// // Describe a polygon that covers all of the earth EXCEPT this small square.
/// // The outside of the polygon is in this square, the inside of the polygon is the rest of the earth.
Expand Down
4 changes: 2 additions & 2 deletions src/algorithm/geo/geodesic_length.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ pub trait GeodesicLength {
///
/// ```
/// use geo::LineString;
/// use geoarrow2::array::LineStringArray;
/// use geoarrow2::algorithm::geo::GeodesicLength;
/// use geoarrow::array::LineStringArray;
/// use geoarrow::algorithm::geo::GeodesicLength;
///
/// let linestring = LineString::from(vec![
/// // New York City
Expand Down
4 changes: 2 additions & 2 deletions src/algorithm/geo/haversine_length.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ pub trait HaversineLength {
///
/// ```
/// use geo::LineString;
/// use geoarrow2::array::LineStringArray;
/// use geoarrow2::algorithm::geo::HaversineLength;
/// use geoarrow::array::LineStringArray;
/// use geoarrow::algorithm::geo::HaversineLength;
///
/// let linestring = LineString::<f64>::from(vec![
/// // New York City
Expand Down
4 changes: 2 additions & 2 deletions src/algorithm/geo/line_locate_point.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ use geo::LineLocatePoint as _LineLocatePoint;
///
/// ```
/// use geo::{LineString, point};
/// use geoarrow2::algorithm::geo::LineLocatePoint;
/// use geoarrow2::array::LineStringArray;
/// use geoarrow::algorithm::geo::LineLocatePoint;
/// use geoarrow::array::LineStringArray;
/// use arrow_array::array::Array;
///
/// let linestring: LineString = vec![
Expand Down
6 changes: 3 additions & 3 deletions src/algorithm/geo/simplify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ pub trait Simplify {
/// # Examples
///
/// ```
/// use geoarrow2::algorithm::geo::Simplify;
/// use geoarrow2::array::LineStringArray;
/// use geoarrow2::trait_::GeoArrayAccessor;
/// use geoarrow::algorithm::geo::Simplify;
/// use geoarrow::array::LineStringArray;
/// use geoarrow::trait_::GeoArrayAccessor;
/// use geo::line_string;
///
/// let line_string = line_string![
Expand Down
6 changes: 3 additions & 3 deletions src/algorithm/geo/simplify_vw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ pub trait SimplifyVw {
/// # Examples
///
/// ```
/// use geoarrow2::algorithm::geo::SimplifyVw;
/// use geoarrow2::array::LineStringArray;
/// use geoarrow2::trait_::GeoArrayAccessor;
/// use geoarrow::algorithm::geo::SimplifyVw;
/// use geoarrow::array::LineStringArray;
/// use geoarrow::trait_::GeoArrayAccessor;
/// use geo::line_string;
///
/// let line_string = line_string![
Expand Down
4 changes: 2 additions & 2 deletions src/algorithm/geo/vincenty_length.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ pub trait VincentyLength {
///
/// ```
/// use geo::LineString;
/// use geoarrow2::array::LineStringArray;
/// use geoarrow2::algorithm::geo::VincentyLength;
/// use geoarrow::array::LineStringArray;
/// use geoarrow::algorithm::geo::VincentyLength;
///
/// let linestring = LineString::<f64>::from(vec![
/// // New York City
Expand Down
12 changes: 6 additions & 6 deletions src/trait_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ pub trait GeometryArrayTrait<'a>: std::fmt::Debug + Send + Sync {
/// # Example:
///
/// ```
/// //use geoarrow2::datatypes::GeoDataType;
/// //use geoarrow2::array::PointArray;
/// //use geoarrow2::GeometryArrayTrait;
/// //use geoarrow::datatypes::GeoDataType;
/// //use geoarrow::array::PointArray;
/// //use geoarrow::GeometryArrayTrait;
/// //use geo::point;
///
/// //let point = point!(x: 1., y: 2.);
Expand Down Expand Up @@ -49,9 +49,9 @@ pub trait GeometryArrayTrait<'a>: std::fmt::Debug + Send + Sync {
/// # Example:
///
/// ```
/// use geoarrow2::datatypes::GeoDataType;
/// use geoarrow2::array::PointArray;
/// use geoarrow2::GeometryArrayTrait;
/// use geoarrow::datatypes::GeoDataType;
/// use geoarrow::array::PointArray;
/// use geoarrow::GeometryArrayTrait;
/// use geo::point;
///
/// let point = point!(x: 1., y: 2.);
Expand Down

0 comments on commit 8767908

Please sign in to comment.