prantogg opened a new pull request, #60:
URL: https://github.com/apache/sedona-spatialbench/pull/60

   This pull request addresses #53 by introducing comprehensive improvements to 
the handling and validation of spatial geometries, particularly focused on 
longitude normalization, antimeridian (dateline) crossing, and geometry 
validity. The changes ensure that generated spatial data is robust, compliant 
with geographic standards, and suitable for use in spatial databases and GIS 
tools.
   
   **Spatial geometry handling and validation:**
   
   * Added new utilities in `spatialbench/src/spatial/utils/antimeridian.rs` to 
wrap longitudes to the [-180°, 180°] range, detect polygons crossing the 
dateline, and clamp polygons to one side of the antimeridian. These utilities 
are now used throughout geometry generation code to ensure correctness. 
[[1]](diffhunk://#diff-056492c7f93159f6d18dc4e751fc22f15d2009cb82d6cf30a1c2a6c71808ac38R1-R258)
 
[[2]](diffhunk://#diff-bcaa58882118606d18d308d4aacb03c6ad10ad0ab1229f74189b20c3970e8700R2-R7)
   * Updated geometry generation functions in 
`spatialbench/src/spatial/geometry.rs` to use longitude wrapping and to handle 
polygons that cross the dateline by clamping them and enforcing consistent 
winding order. This improves the validity and global correctness of generated 
geometries. 
[[1]](diffhunk://#diff-5dd7f8a909e069664187088f8a79d07f68a22f0ecf5c5f2163797a6bf177b112L1-R12)
 
[[2]](diffhunk://#diff-5dd7f8a909e069664187088f8a79d07f68a22f0ecf5c5f2163797a6bf177b112R30)
 
[[3]](diffhunk://#diff-5dd7f8a909e069664187088f8a79d07f68a22f0ecf5c5f2163797a6bf177b112L54-R67)
 
[[4]](diffhunk://#diff-5dd7f8a909e069664187088f8a79d07f68a22f0ecf5c5f2163797a6bf177b112L82-R96)
 
[[5]](diffhunk://#diff-5dd7f8a909e069664187088f8a79d07f68a22f0ecf5c5f2163797a6bf177b112L93-R113)
   
   **Testing and validation:**
   
   * Added a new test suite in `spatialbench/tests/geometry_tests.rs` that 
validates generated geometries for coordinate validity, OGC compliance, 
precision constraints, and ensures no dateline crossings in polygons.
   * Updated existing tests and expected values to reflect improved polygon 
winding and geometry correctness.
   
   **Trip and building generation:**
   
   * Ensured generated trip dropoff longitudes are wrapped correctly to avoid 
out-of-range values. 
[[1]](diffhunk://#diff-64432b91bb1c6ab0dbaa1a78481eebd7bf1944d60854b7e05b09f5b7538ef074L14-R14)
 
[[2]](diffhunk://#diff-64432b91bb1c6ab0dbaa1a78481eebd7bf1944d60854b7e05b09f5b7538ef074R1135-R1136)
   
   These changes collectively enhance the reliability, standards compliance, 
and global correctness of spatial data generated by the project.


-- 
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]

Reply via email to