prantogg commented on code in PR #60:
URL:
https://github.com/apache/sedona-spatialbench/pull/60#discussion_r2511630191
##########
spatialbench/src/spatial/utils/antimeridian.rs:
##########
@@ -0,0 +1,258 @@
+use geo::{Centroid, LineString, Polygon};
+
+/// Wraps a longitude value to ensure it stays within the valid range of
[-180, 180] degrees.
+///
+/// Longitude is a circular coordinate:
+/// - If longitude exceeds 180°, it wraps around from the eastern hemisphere
back to the western hemisphere.
+/// - If longitude is below -180°, it wraps around from the western hemisphere
back to the eastern hemisphere.
+pub fn wrap_around_longitude(mut lon: f64) -> f64 {
+ while lon > 180.0 {
Review Comment:
The new test suite in 'spatialbench/tests/geometry_tests.rs' also check for
CCW orientation on SF1000 polygons
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]