Closed jbouffard closed 6 years ago
@jamesmcclain We never have supported Python partitioners. The main reason being that PySpark doesn't have them. Instead, the user passes in a partitioning strategy function to certain methods. I'm not really sure how we could support those at the moment, though.
This PR exposes a choice of a
Partitioner
when performing operations in GPS. The two that have been added are:HashPartitioner
andSpatialPartitioner
, which was created by @echeipesh. As of this PR, the methods where thePartitioner
s are exposed in are:repartition
,merge
,pyramid
, andrasterize
.Note: The way to add custom
Partitioner
s in PySpark is by passing inpartitionFunc
as a parameter instead of aPartition
instance (see this as an example). Because of this, there might not be a way in which we can preserve the same partitioning strategy a user set when working with the layer in Scala.