rust-geo-python 0.1.0__tar.gz → 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rust_geo_python-0.1.0 → rust_geo_python-0.1.1}/Cargo.lock +3 -3
- {rust_geo_python-0.1.0 → rust_geo_python-0.1.1}/Cargo.toml +1 -1
- {rust_geo_python-0.1.0 → rust_geo_python-0.1.1}/PKG-INFO +1 -1
- {rust_geo_python-0.1.0 → rust_geo_python-0.1.1}/src/lib.rs +19 -1
- {rust_geo_python-0.1.0 → rust_geo_python-0.1.1}/.github/workflows/CI.yml +0 -0
- {rust_geo_python-0.1.0 → rust_geo_python-0.1.1}/.gitignore +0 -0
- {rust_geo_python-0.1.0 → rust_geo_python-0.1.1}/README.md +0 -0
- {rust_geo_python-0.1.0 → rust_geo_python-0.1.1}/pyproject.toml +0 -0
|
@@ -464,7 +464,7 @@ dependencies = [
|
|
|
464
464
|
|
|
465
465
|
[[package]]
|
|
466
466
|
name = "rust-geo-python"
|
|
467
|
-
version = "0.1.
|
|
467
|
+
version = "0.1.1"
|
|
468
468
|
dependencies = [
|
|
469
469
|
"geo",
|
|
470
470
|
"ndarray",
|
|
@@ -528,9 +528,9 @@ dependencies = [
|
|
|
528
528
|
|
|
529
529
|
[[package]]
|
|
530
530
|
name = "stable_deref_trait"
|
|
531
|
-
version = "1.2.
|
|
531
|
+
version = "1.2.1"
|
|
532
532
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
533
|
-
checksum = "
|
|
533
|
+
checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
|
|
534
534
|
|
|
535
535
|
[[package]]
|
|
536
536
|
name = "syn"
|
|
@@ -15,7 +15,6 @@ fn polygon<'py>(m: &Bound<'py, PyModule>) -> PyResult<()> {
|
|
|
15
15
|
let path = y.axis_iter(Axis(0))
|
|
16
16
|
.map(|x| Point::new(x[0], x[1]))
|
|
17
17
|
.collect::<LineString>();
|
|
18
|
-
//let polygon = Polygon::new(path, vec![]);
|
|
19
18
|
let point = Point::new(x[0], x[1]);
|
|
20
19
|
let distance = Euclidean.distance(&point,&path);
|
|
21
20
|
distance
|
|
@@ -48,6 +47,25 @@ fn polygon<'py>(m: &Bound<'py, PyModule>) -> PyResult<()> {
|
|
|
48
47
|
.collect::<Array1<f64>>();
|
|
49
48
|
distances.into_pyarray(py)
|
|
50
49
|
}
|
|
50
|
+
#[pyfn(m)]
|
|
51
|
+
#[pyo3(name = "polygon_polygon_distance")]
|
|
52
|
+
fn poly_poly_distance_py<'py>(
|
|
53
|
+
x: PyReadonlyArray2<'py, f64>,
|
|
54
|
+
y: PyReadonlyArray2<'py, f64>,
|
|
55
|
+
) -> f64 {
|
|
56
|
+
let path_x = x
|
|
57
|
+
.as_array()
|
|
58
|
+
.axis_iter(Axis(0))
|
|
59
|
+
.map(|x| Point::new(x[0], x[1]))
|
|
60
|
+
.collect::<LineString>();
|
|
61
|
+
let path_y = y
|
|
62
|
+
.as_array()
|
|
63
|
+
.axis_iter(Axis(0))
|
|
64
|
+
.map(|x| Point::new(x[0], x[1]))
|
|
65
|
+
.collect::<LineString>();
|
|
66
|
+
let distance = Euclidean.distance(&path_x,&path_y);
|
|
67
|
+
distance
|
|
68
|
+
}
|
|
51
69
|
|
|
52
70
|
#[pyfn(m)]
|
|
53
71
|
#[pyo3(name = "points_polygon_dist_mut")]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|