def load(cls, sc: SparkContext, path: str) -> SpatialRDD: jvm = sc._jvm point_rdd = PointRDD() srdd = SpatialObjectLoaderAdapter(jvm).load_point_spatial_rdd( sc._jsc, path) point_rdd.set_srdd(srdd) return point_rdd
def readToPointRDD(cls, sc: SparkContext, inputPath: str) -> PointRDD: """ :param sc: :param inputPath: :return: """ ShapefileReader.validate_imports() jvm = sc._jvm jsc = sc._jsc srdd = jvm.ShapefileReader.readToPointRDD( jsc, inputPath ) spatial_rdd = PointRDD() spatial_rdd.set_srdd(srdd) return spatial_rdd
def getCenterPointAsSpatialRDD(self) -> 'PointRDD': from geospark.core.SpatialRDD import PointRDD srdd = self._srdd.getCenterPointAsSpatialRDD() point_rdd = PointRDD() point_rdd.set_srdd(srdd) return point_rdd
def load(cls, sc: SparkContext, path: str) -> SpatialRDD: jvm = sc._jvm polygon_rdd = PointRDD() srdd = jvm.ObjectSpatialRDDLoader.loadPointSpatialRDD(sc._jsc, path) polygon_rdd.set_srdd(srdd) return polygon_rdd