AI Summary & Key Takeaways
AI InsightOn the tested Natural Earth administrative polygon layer, however, the single-thread DuckDB join took 21 to 37 times the GeoPandas time.
📌 3 Key Takeaways
Abstract
This study compares GeoPandas and DuckDB Spatial for point-in-polygon spatial joins on a 16 GB personal computer. Uniform and clustered point sets of 100 000 to 5 000 000 points were generated in three independent realizations over a grid of 10 000 equal, non-overlapping polygons. Both tools read identical GeoParquet inputs, evaluated the same within predicate and returned identical match-pair sets, verified for every dataset. In the main protocol, 240 single-thread runs in isolated processes pinned to one performance core measured load, join and total times and the peak working set reported by the operating system. The GeoPandas join median was 0.46 to 0.63 times the DuckDB median, whereas DuckDB loaded the files in 0.14 to 0.20 of the GeoPandas time. GeoPandas peak memory was 2.2 to 4.9 times the DuckDB value (2.0 GB against 0.41 GB at five million points). In this fixed-cardinality grid workload, the point distribution changed join times by at most about 5%. In a separate sensitivity set, the default 16-thread DuckDB configuration reversed the total-time ranking from 500 000 points upward. On the tested Natural Earth administrative polygon layer, however, the single-thread DuckDB join took 21 to 37 times the GeoPandas time.
Özet
Bu çalışmada GeoPandas ve DuckDB Spatial, 16 GB bellekli bir kişisel bilgisayarda nokta-poligon (point-in-polygon) mekânsal birleştirme performansı bakımından karşılaştırılmıştır. 10 000 eşit ve çakışmayan poligondan oluşan bir ağ üzerinde, 100 000 ile 5 000 000 nokta içeren düzgün ve kümelenmiş nokta kümeleri üç bağımsız örnek olarak üretilmiştir. Her iki araç aynı GeoParquet girdilerini okumuş, noktanın poligon içinde bulunması (within) koşulunu uygulamış ve her veri kümesinde doğrulanmış biçimde aynı eşleşme çiftlerini üretmiştir. Ana protokolde tek performans çekirdeğine sabitlenmiş ayrı süreçlerde yürütülen 240 tek iş parçacıklı koşuda okuma, birleştirme ve toplam süreler ile işletim sisteminin bildirdiği en yüksek bellek kullanımı ölçülmüştür. GeoPandas’ın birleştirme medyanı DuckDB medyanının 0.46 ile 0.63 katı olurken DuckDB dosyaları GeoPandas süresinin 0.14 ile 0.20’sinde okumuştur. GeoPandas’ın en yüksek bellek kullanımı DuckDB değerinin 2.2 ile 4.9 katına ulaşmıştır (beş milyon noktada GeoPandas için 2.0 GB, DuckDB için 0.41 GB). Sonuç sayısının sabit olduğu bu ağ iş yükünde nokta dağılımı birleştirme sürelerini en fazla yaklaşık %5 değiştirmiştir. Ayrı bir duyarlılık deneyinde DuckDB’nin varsayılan 16 iş parçacıklı yapılandırması 500 000 ve daha fazla noktada toplam süre sıralamasını tersine çevirmiştir. Buna karşılık test edilen Natural Earth idari poligon katmanında tek iş parçacıklı DuckDB birleştirmesi GeoPandas süresinin 21 ile 37 katı sürmüştür.