This is an automated email from the ASF dual-hosted git repository.
prantogg pushed a commit to branch orient-ccw
in repository https://gitbox.apache.org/repos/asf/sedona-spatialbench.git
The following commit(s) were added to refs/heads/orient-ccw by this push:
new 3f3bb90 fix zero area polygons
3f3bb90 is described below
commit 3f3bb90b6635ff080c2031742a6cee55ad173bba
Author: Pranav Toggi <[email protected]>
AuthorDate: Thu Nov 6 15:15:33 2025 -0800
fix zero area polygons
---
spatialbench/src/spatial/geometry.rs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/spatialbench/src/spatial/geometry.rs
b/spatialbench/src/spatial/geometry.rs
index 8d799c3..5fb2860 100644
--- a/spatialbench/src/spatial/geometry.rs
+++ b/spatialbench/src/spatial/geometry.rs
@@ -82,9 +82,8 @@ pub fn generate_polygon_geom(
center.0 + config.polysize * ang.cos(),
center.1 + config.polysize * ang.sin(),
);
- let (x1, y1) = (x0.clamp(0.0, 1.0), y0.clamp(0.0, 1.0));
- let (x2, y2) = apply_affine(x1, y1, m);
- let (xr, yr) = round_coordinates(x2, y2, GEOMETRY_PRECISION);
+ let (x1, y1) = apply_affine(x0, y0, m);
+ let (xr, yr) = round_coordinates(x1, y1, GEOMETRY_PRECISION);
coord! { x: xr, y: yr }
})
.collect::<Vec<_>>();