paleolimbot commented on code in PR #1778:
URL: https://github.com/apache/sedona/pull/1778#discussion_r1938182351
##########
spark/common/src/main/java/org/apache/sedona/core/spatialRDD/SpatialRDD.java:
##########
@@ -159,6 +159,32 @@ public boolean spatialPartitioning(GridType gridType)
throws Exception {
return true;
}
+ public boolean spatialParitioningWithoutDuplicates(GridType gridType) throws
Exception {
+ int numPartitions = this.rawSpatialRDD.rdd().partitions().length;
+ spatialPartitioningWithoutDuplicates(gridType, numPartitions);
+ return true;
+ }
+
+ public void spatialPartitioningWithoutDuplicates(GridType gridType, int
numPartitions)
+ throws Exception {
+ calc_partitioner(gridType, numPartitions);
+ partitioner = new GenericUniquePartitioner(partitioner);
+ this.spatialPartitionedRDD = partition(partitioner);
+ }
+
+ public void spatialPartitioningWithoutDuplicates(SpatialPartitioner
partitioner) {
+ partitioner = new GenericUniquePartitioner(partitioner);
+ this.spatialPartitionedRDD = partition(partitioner);
+ }
+
+ /** @deprecated Use spatialPartitioningWithoutDuplicates(SpatialPartitioner
partitioner) */
+ public boolean spatialPartitioningWithoutDuplicates(final List<Envelope>
otherGrids)
Review Comment:
Your idea of un-deprecating this is a good one...I had to add this because
it's called from Python if you pass a list of envelopes (and that's how I test
this). I'll turn this into a docstring with some useful content on the
appropriate uses of this.
--
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]