Class SpatialPartitioner

    • Field Detail

      • gridType

        protected final GridType gridType
      • grids

        protected final List<org.locationtech.jts.geom.Envelope> grids
    • Constructor Detail

      • SpatialPartitioner

        protected SpatialPartitioner()
      • SpatialPartitioner

        protected SpatialPartitioner​(GridType gridType,
                                     List<org.locationtech.jts.geom.Envelope> grids)
    • Method Detail

      • placeObject

        public abstract <T extends org.locationtech.jts.geom.Geometry> Iterator<scala.Tuple2<Integer,​T>> placeObject​(T spatialObject)
                                                                                                                    throws Exception
        Given a geometry, returns a list of partitions it overlaps.

        For points, returns exactly one partition as long as grid type is non-overlapping. For other geometry types or for overlapping grid types, may return multiple partitions.

        Throws:
        Exception
      • getGridType

        public GridType getGridType()
      • getGrids

        public List<org.locationtech.jts.geom.Envelope> getGrids()
      • getPartition

        public int getPartition​(Object key)
        Specified by:
        getPartition in class org.apache.spark.Partitioner