Esempio n. 1
0
    def readToLineStringRDD(cls, sc: SparkContext,
                            inputPath: str) -> LineStringRDD:
        """

        :param sc:
        :param inputPath:
        :return:
        """
        ShapefileReader.validate_imports()
        jvm = sc._jvm
        jsc = sc._jsc
        srdd = jvm.ShapefileReader.readToLineStringRDD(jsc, inputPath)
        spatial_rdd = LineStringRDD()
        spatial_rdd.set_srdd(srdd)
        return spatial_rdd
Esempio n. 2
0
 def getCenterLineStringRDDAsSpatialRDD(self) -> 'LineStringRDD':
     from geo_pyspark.core.SpatialRDD import LineStringRDD
     srdd = self._srdd.getCenterPolygonAsSpatialRDD()
     linestring_rdd = LineStringRDD()
     linestring_rdd.set_srdd(srdd)
     return linestring_rdd