This is an automated email from the ASF dual-hosted git repository.

jiayu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/sedona-spatialbench.git

commit 2afa9fa434fa187d7e831f41466a592abf0fdb60
Author: Jia Yu <[email protected]>
AuthorDate: Thu Aug 28 07:05:46 2025 -0700

    Update the spider default to sync with the config file (#13)
    
    * Update the spider default to sync with the config file
    
    * Fix the failed test cases
---
 spatialbench-config.yml                 |   6 +++++-
 spatialbench/data/sf-v1/building.tbl.gz | Bin 31046 -> 47029 bytes
 spatialbench/src/generators.rs          |   2 +-
 spatialbench/src/spider_defaults.rs     |  17 +++++++----------
 4 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/spatialbench-config.yml b/spatialbench-config.yml
index 6a44e7f..dce10a7 100644
--- a/spatialbench-config.yml
+++ b/spatialbench-config.yml
@@ -19,5 +19,9 @@ building:
   dim: 2
   seed: 12345
   affine: [360.0, 0.0, -180.0, 0.0, 180.0, -90.0]
+  width: 0.0
+  height: 0.0
   maxseg: 5
-  polysize: 0.000039
\ No newline at end of file
+  polysize: 0.000039
+  params:
+    type: none
\ No newline at end of file
diff --git a/spatialbench/data/sf-v1/building.tbl.gz 
b/spatialbench/data/sf-v1/building.tbl.gz
index 89148f2..a2befa1 100644
Binary files a/spatialbench/data/sf-v1/building.tbl.gz and 
b/spatialbench/data/sf-v1/building.tbl.gz differ
diff --git a/spatialbench/src/generators.rs b/spatialbench/src/generators.rs
index 043044a..a676fd1 100644
--- a/spatialbench/src/generators.rs
+++ b/spatialbench/src/generators.rs
@@ -1778,7 +1778,7 @@ mod tests {
         // Check first Building
         let first = &buildings[1];
         assert_eq!(first.b_buildingkey, 2);
-        assert_eq!(first.to_string(), "2|blush|POLYGON((-37.962323825156744 
28.065637750265665,-37.94908364554638 28.065637750265665,-37.94908364554638 
28.075185613992147,-37.962323825156744 28.075185613992147,-37.962323825156744 
28.065637750265665))|")
+        assert_eq!(first.to_string(), "2|blush|POLYGON((-53.95503773947216 
-4.59336925079586,-53.95553716203489 -4.603649450495837,-53.952720010369774 
-4.601933644900541,-53.95223340198092 -4.601479576109057,-53.95084475390658 
-4.598929409235666,-53.95503773947216 -4.59336925079586))|")
     }
 
     #[test]
diff --git a/spatialbench/src/spider_defaults.rs 
b/spatialbench/src/spider_defaults.rs
index 043364c..acd41f1 100644
--- a/spatialbench/src/spider_defaults.rs
+++ b/spatialbench/src/spider_defaults.rs
@@ -38,24 +38,21 @@ impl SpiderDefaults {
 
     pub fn building_default() -> SpiderGenerator {
         let config = SpiderConfig {
-            dist_type: DistributionType::Bit,
-            geom_type: GeomType::Box,
+            dist_type: DistributionType::Sierpinski,
+            geom_type: GeomType::Polygon,
             dim: 2,
             seed: 12345,
             affine: Some(Self::FULL_WORLD_AFFINE),
 
             // geometry = box
-            width: 0.00005,
-            height: 0.0001,
+            width: 0.0,
+            height: 0.0,
 
             // geometry = polygon
-            maxseg: 0,
-            polysize: 0.0,
+            maxseg: 5,
+            polysize: 0.000039,
 
-            params: DistributionParams::Bit {
-                probability: 0.5,
-                digits: 20,
-            },
+            params: DistributionParams::None,
         };
         SpiderGenerator::new(config)
     }

Reply via email to